Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fallenstardust
YGOMobile
Commits
5889d920
Commit
5889d920
authored
Jul 02, 2025
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
移除本地卡组单个上传按钮
parent
3437cc3d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
58 deletions
+2
-58
mobile/src/main/java/cn/garymb/ygomobile/ui/adapters/DeckListAdapter.java
...java/cn/garymb/ygomobile/ui/adapters/DeckListAdapter.java
+0
-41
mobile/src/main/res/layout/item_deck_list_swipe.xml
mobile/src/main/res/layout/item_deck_list_swipe.xml
+2
-17
No files found.
mobile/src/main/java/cn/garymb/ygomobile/ui/adapters/DeckListAdapter.java
View file @
5889d920
...
...
@@ -77,37 +77,6 @@ public class DeckListAdapter<T extends TextSelect> extends BaseQuickAdapter<T, D
deckInfo
=
new
DeckInfo
();
mLimitList
=
DataManager
.
get
().
getLimitManager
().
getTopLimit
();
mContext
=
context
;
addChildClickViewIds
(
R
.
id
.
local_deck_upload_btn
);
LogUtil
.
i
(
TAG
,
"DeckListAdapter constructor"
);
setOnItemChildClickListener
((
adapter
,
view
,
position
)
->
{
//判断是否登录,如果未登录,直接返回
LoginToken
loginToken
=
DeckSquareApiUtil
.
getLoginData
();
if
(
loginToken
==
null
)
{
return
;
}
//获得点击的卡组
DeckFile
deckFile
=
(
DeckFile
)
adapter
.
getData
().
get
(
position
);
LogUtil
.
i
(
TAG
,
"deckFile "
+
deckFile
.
toString
());
//上传卡组
VUiKit
.
defer
().
when
(()
->
{
PushDeckResponse
result
=
DeckSquareApiUtil
.
requestIdAndPushDeck
(
deckFile
,
loginToken
);
return
result
;
}).
fail
(
e
->
{
LogUtil
.
i
(
TAG
,
"square deck detail fail"
+
e
.
getMessage
());
}).
done
(
pushDeckResponse
->
{
if
(
pushDeckResponse
.
isData
())
{
YGOUtil
.
showTextToast
(
"push success!"
);
}
else
{
YGOUtil
.
showTextToast
(
"卡组上传失败!"
);
}
});
});
}
...
...
@@ -222,14 +191,6 @@ public class DeckListAdapter<T extends TextSelect> extends BaseQuickAdapter<T, D
}
else
{
holder
.
item_deck_list
.
setBackgroundResource
(
Color
.
TRANSPARENT
);
}
//卡包展示、人机卡组不显示上传按钮图标
if
(
deckFile
.
getPathFile
().
getParent
().
endsWith
(
Constants
.
CORE_PACK_PATH
)
||
deckFile
.
getPathFile
().
getParent
().
endsWith
(
Constants
.
WINDBOT_DECK_PATH
)
||
deckFile
.
getPathFile
().
getParent
().
endsWith
(
"cacheDeck"
))
{
holder
.
local_deck_upload_btn
.
setVisibility
(
View
.
GONE
);
}
else
{
holder
.
local_deck_upload_btn
.
setVisibility
(
View
.
VISIBLE
);
}
}
public
void
setSelectPosition
(
int
selectPosition
)
{
...
...
@@ -296,7 +257,6 @@ class DeckViewHolder extends com.chad.library.adapter.base.viewholder.BaseViewHo
LinearLayout
ll_extra_n_side
;
View
item_deck_list
;
View
deck_info
;
Button
local_deck_upload_btn
;
public
DeckViewHolder
(
View
view
)
{
super
(
view
);
...
...
@@ -312,6 +272,5 @@ class DeckViewHolder extends com.chad.library.adapter.base.viewholder.BaseViewHo
prerelease_star
=
findView
(
R
.
id
.
prerelease_star
);
banned_mark
=
findView
(
R
.
id
.
banned_mark
);
deck_info
=
findView
(
R
.
id
.
deck_info
);
local_deck_upload_btn
=
findView
(
R
.
id
.
local_deck_upload_btn
);
}
}
\ No newline at end of file
mobile/src/main/res/layout/item_deck_list_swipe.xml
View file @
5889d920
...
...
@@ -34,11 +34,10 @@
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:orientation=
"horizontal"
android:weightSum=
"5"
>
android:orientation=
"horizontal"
>
<LinearLayout
android:layout_width=
"
0dp
"
android:layout_width=
"
match_parent
"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_marginLeft=
"10dp"
...
...
@@ -137,19 +136,5 @@
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom"
android:layout_weight=
"1"
>
<Button
android:id=
"@+id/local_deck_upload_btn"
android:layout_width=
"20dp"
android:layout_height=
"20dp"
android:layout_marginLeft=
"@dimen/dp_10"
android:background=
"@drawable/btn_cloud_upload_bg"
android:gravity=
"center"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment