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
979f258d
Commit
979f258d
authored
Jul 01, 2025
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改上传下载逻辑
parent
6f9b8948
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
mobile/src/main/java/cn/garymb/ygomobile/deck_square/DeckSquareApiUtil.java
...va/cn/garymb/ygomobile/deck_square/DeckSquareApiUtil.java
+11
-7
No files found.
mobile/src/main/java/cn/garymb/ygomobile/deck_square/DeckSquareApiUtil.java
View file @
979f258d
...
...
@@ -31,6 +31,7 @@ import cn.garymb.ygomobile.deck_square.api_response.PushMultiDeck;
import
cn.garymb.ygomobile.deck_square.api_response.PushSingleDeck
;
import
cn.garymb.ygomobile.deck_square.api_response.SquareDeckResponse
;
import
cn.garymb.ygomobile.deck_square.api_response.SyncDecksResponse
;
import
cn.garymb.ygomobile.lite.R
;
import
cn.garymb.ygomobile.ui.plus.VUiKit
;
import
cn.garymb.ygomobile.utils.LogUtil
;
import
cn.garymb.ygomobile.utils.OkhttpUtil
;
...
...
@@ -67,7 +68,7 @@ public class DeckSquareApiUtil {
Integer
serverUserId
=
SharedPreferenceUtil
.
getServerUserId
();
if
(
serverToken
==
null
||
serverUserId
==
-
1
)
{
YGOUtil
.
showTextToast
(
"Please login first!"
);
YGOUtil
.
showTextToast
(
R
.
string
.
login_mycard
);
return
null
;
}
return
new
LoginToken
(
serverUserId
,
serverToken
);
...
...
@@ -468,13 +469,16 @@ public class DeckSquareApiUtil {
onlineUpdateDate
=
String
.
valueOf
(
dateTime
.
toInstant
(
ZoneOffset
.
UTC
).
toEpochMilli
());
}
LogUtil
.
d
(
"seesee"
,
localUpdateDate
+
"//"
+
onlineUpdateDate
);
LogUtil
.
w
(
"seesee lockdeck.getDeckPath"
,
localDeck
.
getDeckPath
());
if
(
onlineUpdateDate
!=
null
&&
(
localUpdateDate
==
null
||
onlineUpdateDate
.
compareTo
(
localUpdateDate
)
>
0
))
{
// 在线卡组更新时间更晚,下载在线卡组覆盖本地卡组
downloadOnlineDeck
(
onlineDeck
,
localDeck
.
getDeckPath
());
if
(
onlineUpdateDate
!=
null
)
{
if
(
onlineUpdateDate
.
compareTo
(
localUpdateDate
)
>
0
)
{
// 在线卡组更新时间更晚,下载在线卡组覆盖本地卡组
downloadOnlineDeck
(
onlineDeck
,
localDeck
.
getDeckPath
());
}
else
{
// 本地卡组更新时间更晚,上传本地卡组覆盖在线卡组
uploadLocalDeck
(
localDeck
,
onlineDeck
.
getDeckId
(),
loginToken
);
}
}
else
{
// 本地卡组更新时间更晚,上传本地卡组覆盖在线卡组
uploadLocalDeck
(
localDeck
,
onlineDeck
.
getDeckId
(),
loginToken
);
downloadOnlineDeck
(
onlineDeck
,
localDeck
.
getDeckPath
());
}
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