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
e987a2b3
Commit
e987a2b3
authored
Jul 04, 2025
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复上传卡组带拓展名的问题,必须上传封面id
parent
2c7d8c68
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
13 deletions
+17
-13
mobile/src/main/java/cn/garymb/ygomobile/bean/events/DeckFile.java
...c/main/java/cn/garymb/ygomobile/bean/events/DeckFile.java
+1
-1
mobile/src/main/java/cn/garymb/ygomobile/deck_square/DeckSelectFragment.java
...a/cn/garymb/ygomobile/deck_square/DeckSelectFragment.java
+1
-1
mobile/src/main/java/cn/garymb/ygomobile/deck_square/DeckSquareApiUtil.java
...va/cn/garymb/ygomobile/deck_square/DeckSquareApiUtil.java
+15
-11
No files found.
mobile/src/main/java/cn/garymb/ygomobile/bean/events/DeckFile.java
View file @
e987a2b3
...
...
@@ -32,7 +32,7 @@ public class DeckFile extends TextSelect {
this
.
setName
(
name
);
this
.
fileFullName
=
null
;
this
.
path
=
path
;
this
.
firstCode
=
-
1
;
this
.
firstCode
=
DeckUtil
.
getFirstCardCode
(
path
.
getAbsolutePath
())
;
setObject
(
this
);
}
...
...
mobile/src/main/java/cn/garymb/ygomobile/deck_square/DeckSelectFragment.java
View file @
e987a2b3
...
...
@@ -390,7 +390,7 @@ public class DeckSelectFragment extends Fragment {
LogUtil
.
e
(
TAG
,
"Delete Online Deck failed: "
+
deleteError
);
}).
done
((
deleteSuccess
)
->
{
if
(
deleteSuccess
.
isData
())
{
YGOUtil
.
showTextToast
(
getContext
().
getString
(
R
.
string
.
done
)
);
YGOUtil
.
showTextToast
(
R
.
string
.
done
);
LogUtil
.
i
(
TAG
,
"Online deck deleted successfully"
);
}
});
...
...
mobile/src/main/java/cn/garymb/ygomobile/deck_square/DeckSquareApiUtil.java
View file @
e987a2b3
...
...
@@ -35,6 +35,7 @@ import cn.garymb.ygomobile.deck_square.api_response.PushSingleDeck;
import
cn.garymb.ygomobile.deck_square.api_response.SquareDeckResponse
;
import
cn.garymb.ygomobile.deck_square.bo.MyDeckItem
;
import
cn.garymb.ygomobile.deck_square.bo.SyncMutliDeckResult
;
import
cn.garymb.ygomobile.utils.DeckUtil
;
import
cn.garymb.ygomobile.utils.LogUtil
;
import
cn.garymb.ygomobile.utils.OkhttpUtil
;
import
cn.garymb.ygomobile.utils.SharedPreferenceUtil
;
...
...
@@ -47,7 +48,7 @@ import okhttp3.Response;
public
class
DeckSquareApiUtil
{
private
static
final
String
TAG
=
"
seesee
decksquareApiUtil"
;
private
static
final
String
TAG
=
"decksquareApiUtil"
;
public
static
boolean
needLogin
()
{
...
...
@@ -239,6 +240,7 @@ public class DeckSquareApiUtil {
PushMultiDeck
.
DeckData
data
=
new
PushMultiDeck
.
DeckData
();
data
.
setDeckYdk
(
deckContent
);
data
.
setDeckName
(
myDeckItem
.
getDeckName
());
data
.
setDeckCoverCard1
(
myDeckItem
.
getDeckCoverCard1
());
data
.
setDeckId
(
deckIdList
.
get
(
i
));
...
...
@@ -525,7 +527,7 @@ public class DeckSquareApiUtil {
}
public
static
SyncMutliDeckResult
synchronizeDecksV2
()
throws
IOException
,
ParseException
{
public
static
SyncMutliDeckResult
synchronizeDecksV2
()
throws
IOException
{
SyncMutliDeckResult
autoSyncResult
=
new
SyncMutliDeckResult
();
// 检查用户是否登录
LoginToken
loginToken
=
DeckSquareApiUtil
.
getLoginData
();
...
...
@@ -582,20 +584,19 @@ public class DeckSquareApiUtil {
if
(
onlineUpdateDate
>
localUpdateDate
)
{
// 在线卡组更新时间更晚,下载在线卡组覆盖本地卡组
LogUtil
.
w
(
TAG
,
"sync-download deck: "
+
localDeck
.
getDeckName
());
autoSyncResult
.
syncDownload
.
add
(
localDeck
);
downloadOnlineDeck
(
onlineDeck
,
localDeck
.
getDeckPath
(),
onlineUpdateDate
);
}
else
if
(
onlineUpdateDate
==
localUpdateDate
)
{
LogUtil
.
w
(
TAG
,
"no need to sync deck: "
+
localDeck
.
getDeckName
());
//时间戳相同,不需要更新
}
else
if
(
onlineUpdateDate
<
localUpdateDate
)
{
//} else if (onlineUpdateDate == localUpdateDate) {
// LogUtil.w(TAG, "no need to sync deck: " + localDeck.getDeckName());
// //时间戳相同,不需要更新
}
else
{
// 本地卡组更新时间更晚,上传本地卡组覆盖在线卡组
// uploadLocalDeck(localDeck, onlineDeck.getDeckId(), loginToken);
LogUtil
.
w
(
TAG
,
"sync-upload deck: "
+
localDeck
.
getDeckName
());
localDeck
.
setDeckName
(
localDeck
.
getDeckName
().
replace
(
Constants
.
YDK_FILE_EX
,
""
));
//TODO 上版本很多人已经传了带.ydk的云备份,姑且只在这次再次上传时去掉.ydk
localDeck
.
setDeckCoverCard1
(
DeckUtil
.
getFirstCardCode
(
localDeck
.
getDeckPath
()));
localDeck
.
setDeckId
(
onlineDeck
.
getDeckId
());
LogUtil
.
w
(
TAG
,
"seesee sync-upload deck: "
+
localDeck
.
getDeckName
()
+
"、封面id:"
+
localDeck
.
getDeckCoverCard1
());
syncUploadDecks
.
add
(
localDeck
);
autoSyncResult
.
syncUpload
.
add
(
localDeck
);
}
...
...
@@ -605,6 +606,9 @@ public class DeckSquareApiUtil {
// 本地卡组在在线列表中不存在,则需要获取新的deckid来直接上传
if
(!
foundOnlineDeck
)
{
localDeck
.
setDeckName
(
localDeck
.
getDeckName
().
replace
(
Constants
.
YDK_FILE_EX
,
""
));
localDeck
.
setDeckCoverCard1
(
DeckUtil
.
getFirstCardCode
(
localDeck
.
getDeckPath
()));
LogUtil
.
w
(
TAG
,
"seesee upload deck new: "
+
localDeck
.
getDeckName
()
+
"、封面id:"
+
localDeck
.
getDeckCoverCard1
());
newPushDecks
.
add
(
localDeck
);
autoSyncResult
.
newUpload
.
add
(
localDeck
);
}
...
...
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