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
967c2356
Commit
967c2356
authored
Nov 20, 2025
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
在线卡组的userid改为Integer以符合标准
parent
dc5e8e37
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
18 deletions
+17
-18
mobile/src/main/java/cn/garymb/ygomobile/bean/Deck.java
mobile/src/main/java/cn/garymb/ygomobile/bean/Deck.java
+2
-2
mobile/src/main/java/cn/garymb/ygomobile/bean/DeckInfo.java
mobile/src/main/java/cn/garymb/ygomobile/bean/DeckInfo.java
+2
-2
mobile/src/main/java/cn/garymb/ygomobile/loader/DeckLoader.java
.../src/main/java/cn/garymb/ygomobile/loader/DeckLoader.java
+1
-1
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/deck/DeckAdapater.java
.../java/cn/garymb/ygomobile/ui/cards/deck/DeckAdapater.java
+2
-2
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/deck/DeckItemUtils.java
...java/cn/garymb/ygomobile/ui/cards/deck/DeckItemUtils.java
+1
-1
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/deck_square/DeckSquareFileUtil.java
...mb/ygomobile/ui/cards/deck_square/DeckSquareFileUtil.java
+9
-10
No files found.
mobile/src/main/java/cn/garymb/ygomobile/bean/Deck.java
View file @
967c2356
...
...
@@ -51,7 +51,7 @@ public class Deck implements Parcelable {
/**
* 卡组广场用的用户id,可以为空
*/
public
String
userId
=
null
;
public
Integer
userId
=
null
;
public
Deck
()
{
mainlist
=
new
ArrayList
<>();
...
...
@@ -203,7 +203,7 @@ public class Deck implements Parcelable {
deckId
=
id
;
}
public
void
setUserId
(
String
id
)
{
public
void
setUserId
(
Integer
id
)
{
userId
=
id
;
}
}
mobile/src/main/java/cn/garymb/ygomobile/bean/DeckInfo.java
View file @
967c2356
...
...
@@ -30,7 +30,7 @@ public class DeckInfo {
private
int
mainCount
,
extraCount
,
sideCount
;
public
String
deckId
=
null
;
//当前的卡组id(卡组广场)
public
String
userId
=
null
;
//当前的用户id(卡组广场)
public
Integer
userId
=
null
;
//当前的用户id(卡组广场)
public
DeckInfo
()
{
mainCards
=
new
ArrayList
<>();
...
...
@@ -361,7 +361,7 @@ public class DeckInfo {
deckId
=
id
;
}
public
void
setUserId
(
String
id
)
{
public
void
setUserId
(
Integer
id
)
{
userId
=
id
;
}
}
mobile/src/main/java/cn/garymb/ygomobile/loader/DeckLoader.java
View file @
967c2356
...
...
@@ -73,7 +73,7 @@ public class DeckLoader {
}
else
if
(
line
.
startsWith
(
"###"
))
{
line
=
line
.
trim
().
substring
(
3
);
if
(
line
.
length
()
>
0
)
deck
.
setUserId
(
line
);
deck
.
setUserId
(
Integer
.
parseInt
(
line
)
);
}
else
if
(
line
.
startsWith
(
"##"
))
{
line
=
line
.
trim
().
substring
(
2
);
if
(
line
.
length
()
>
0
)
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/deck/DeckAdapater.java
View file @
967c2356
...
...
@@ -69,7 +69,7 @@ public class DeckAdapater extends RecyclerView.Adapter<DeckViewHolder> implement
private
String
mDeckMd5
;
private
DeckInfo
mDeckInfo
;
private
String
deckId
=
null
;
private
String
userId
=
null
;
private
Integer
userId
=
null
;
public
DeckAdapater
(
Context
context
,
RecyclerView
recyclerView
,
ImageLoader
imageLoader
)
{
this
.
context
=
context
;
...
...
@@ -668,7 +668,7 @@ public class DeckAdapater extends RecyclerView.Adapter<DeckViewHolder> implement
deckId
=
id
;
}
public
void
setUserId
(
String
id
)
{
public
void
setUserId
(
Integer
id
)
{
userId
=
id
;
}
}
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/deck/DeckItemUtils.java
View file @
967c2356
...
...
@@ -117,7 +117,7 @@ class DeckItemUtils {
* @param file 原有file
* @return 如果file为null,返回false
*/
public
static
boolean
save
(
List
<
DeckItem
>
items
,
String
deckId
,
String
userId
,
File
file
)
{
public
static
boolean
save
(
List
<
DeckItem
>
items
,
String
deckId
,
Integer
userId
,
File
file
)
{
FileOutputStream
outputStream
=
null
;
OutputStreamWriter
writer
=
null
;
try
{
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/deck_square/DeckSquareFileUtil.java
View file @
967c2356
...
...
@@ -71,9 +71,9 @@ public class DeckSquareFileUtil {
// LogUtil.i(TAG, line);
if
(
line
.
startsWith
(
"###"
))
{
//注意,先判断###,后判断##。因为###会包括##的情况
try
{
String
data
=
line
.
replace
(
"#"
,
""
);
if
(!
data
.
isEmpty
())
{
deckId
=
data
;
line
=
line
.
replace
(
"#"
,
""
);
if
(!
line
.
isEmpty
())
{
userId
=
Integer
.
parseInt
(
line
)
;
}
// userId = Integer.parseInt(line.replaceAll("###", ""));
}
catch
(
NumberFormatException
e
)
{
...
...
@@ -81,8 +81,7 @@ public class DeckSquareFileUtil {
}
}
else
if
(
line
.
startsWith
(
"##"
))
{
line
=
line
.
replace
(
"#"
,
""
);
userId
=
Integer
.
parseInt
(
line
);
deckId
=
line
.
replace
(
"#"
,
""
);
}
...
...
@@ -266,14 +265,14 @@ public class DeckSquareFileUtil {
IOUtils
.
close
(
inputStream
);
}
if
(!
userIdFlag
)
{
//原始ydk中不存在userId,添加userId行
if
(!
deckIdFlag
)
{
//原始ydk中不存在deckId,添加deckId行
contentBuilder
.
append
(
"\n"
);
contentBuilder
.
append
(
"##"
+
user
Id
);
contentBuilder
.
append
(
"##"
+
deck
Id
);
}
if
(!
deckIdFlag
)
{
//原始ydk中不存在deckId,添加deckId行
if
(!
userIdFlag
)
{
//原始ydk中不存在userId,添加userId行
contentBuilder
.
append
(
"\n"
);
contentBuilder
.
append
(
"###"
+
deck
Id
);
contentBuilder
.
append
(
"###"
+
user
Id
);
}
String
content
=
contentBuilder
.
toString
();
...
...
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