Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile-Cn-Ko-En
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-Cn-Ko-En
Commits
badb8041
Commit
badb8041
authored
Jul 07, 2025
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix异步导致的传参丢失
parent
901c8a1e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/deck_square/DeckSquareApiUtil.java
...ymb/ygomobile/ui/cards/deck_square/DeckSquareApiUtil.java
+4
-4
No files found.
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/deck_square/DeckSquareApiUtil.java
View file @
badb8041
...
...
@@ -15,7 +15,6 @@ import cn.garymb.ygomobile.AppsSettings;
import
cn.garymb.ygomobile.Constants
;
import
cn.garymb.ygomobile.bean.DeckType
;
import
cn.garymb.ygomobile.bean.events.DeckFile
;
import
cn.garymb.ygomobile.lite.R
;
import
cn.garymb.ygomobile.ui.cards.deck_square.api_response.BasicResponse
;
import
cn.garymb.ygomobile.ui.cards.deck_square.api_response.DeckIdResponse
;
import
cn.garymb.ygomobile.ui.cards.deck_square.api_response.DeckMultiIdResponse
;
...
...
@@ -498,6 +497,9 @@ public class DeckSquareApiUtil {
SharedPreferenceUtil
.
getServerToken
()
);
// 创建一个局部变量来持有deckFileList的引用,因为有时候异步执行会导致获取不到传参的deckFileList
final
List
<
DeckFile
>
localDeckFileList
=
new
ArrayList
<>(
deckFileList
);
// 获取在线卡组列表(异步处理)
VUiKit
.
defer
().
when
(()
->
{
return
DeckSquareApiUtil
.
getUserDecks
(
loginToken
);
...
...
@@ -507,10 +509,9 @@ public class DeckSquareApiUtil {
if
(
result
==
null
||
result
.
getData
()
==
null
)
{
return
;
}
List
<
MyOnlineDeckDetail
>
onlineDecks
=
result
.
getData
();
for
(
MyOnlineDeckDetail
onlineDeck
:
onlineDecks
)
{
for
(
DeckFile
deckFile
:
d
eckFileList
)
{
for
(
DeckFile
deckFile
:
localD
eckFileList
)
{
if
(
onlineDeck
.
getDeckName
().
equals
(
deckFile
.
getName
()))
{
// 删除在线卡组(异步处理)
VUiKit
.
defer
().
when
(()
->
{
...
...
@@ -526,7 +527,6 @@ public class DeckSquareApiUtil {
break
;
}
}
}
});
}
...
...
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