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
5386eb03
Commit
5386eb03
authored
Dec 21, 2025
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化isPackMode判断
不再在deckmanagefragment初始化limitlistspinner
parent
007a37d3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
50 deletions
+2
-50
mobile/src/main/java/cn/garymb/ygomobile/AppsSettings.java
mobile/src/main/java/cn/garymb/ygomobile/AppsSettings.java
+0
-3
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/DeckManagerFragment.java
...ava/cn/garymb/ygomobile/ui/cards/DeckManagerFragment.java
+2
-47
No files found.
mobile/src/main/java/cn/garymb/ygomobile/AppsSettings.java
View file @
5386eb03
...
...
@@ -617,7 +617,6 @@ public class AppsSettings {
*
*/
public
void
setLastLimit
(
String
limitName
)
{
Log
.
w
(
TAG
,
"setLastLimit= "
+
limitName
);
App
.
get
().
saveSetting
(
"lastlimit"
,
limitName
);
mSharedPreferences
.
putString
(
Constants
.
PREF_LAST_LIMIT
,
limitName
);
}
...
...
@@ -745,7 +744,6 @@ public class AppsSettings {
}*/
public
void
saveSettings
(
String
key
,
String
value
)
{
Log
.
e
(
TAG
,
"cc: saveSettings: "
+
key
+
":"
+
value
);
if
(
"lastdeck"
.
equals
(
key
))
mSharedPreferences
.
putString
(
Constants
.
PREF_LAST_YDK
,
value
);
if
(
"lastcategory"
.
equals
(
key
))
mSharedPreferences
.
putString
(
Constants
.
PREF_LAST_CATEGORY
,
value
);
if
(
"lastLimit"
.
equals
(
key
))
setLastLimit
(
value
);
...
...
@@ -753,7 +751,6 @@ public class AppsSettings {
}
public
String
getSettings
(
String
key
)
{
Log
.
e
(
TAG
,
"getSettings: "
+
(
"lastLimit"
.
equals
(
key
)
?
getLastLimit
()
:
key
));
if
(
"lastdeck"
.
equals
(
key
))
return
getLastDeckName
();
if
(
"lastcategory"
.
equals
(
key
))
return
getLastCategory
();
if
(
"lastLimit"
.
equals
(
key
))
return
getLastLimit
();
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/DeckManagerFragment.java
View file @
5386eb03
...
...
@@ -667,23 +667,15 @@ public class DeckManagerFragment extends BaseFragemnt implements RecyclerViewIte
dlg
.
dismiss
();
// 初始化卡片搜索器中的项目列表,为卡片搜索功能准备基础数据
mCardSearcher
.
initItems
();
// 初始化禁卡表列表下拉框,并通知整个卡组界面都显示为当前使用的禁卡表
initLimitListSpinners
(
mCardSearchLimitSpinner
);
// 根据资源路径判断是否进入卡包展示模式
if
(
rs
!=
null
&&
rs
.
source
!=
null
)
{
String
parentPath
=
rs
.
source
.
getParent
();
isPackMode
=
parentPath
!=
null
&&
(
parentPath
.
equals
(
mSettings
.
getPackDeckDir
())
||
parentPath
.
equals
(
mSettings
.
getCacheDeckDir
()));
isPackMode
=
parentPath
.
equals
(
mSettings
.
getPackDeckDir
())
||
parentPath
.
equals
(
mSettings
.
getCacheDeckDir
());
}
else
{
isPackMode
=
false
;
}
// 设置当前卡组显示
if
(
rs
!=
null
&&
rs
.
source
!=
null
)
{
setCurDeck
(
rs
,
isPackMode
);
}
else
{
setCurDeck
(
rs
,
false
);
}
// 设置并显示收藏夹
mCardSearcher
.
showFavorites
(
false
);
...
...
@@ -1606,43 +1598,6 @@ public class DeckManagerFragment extends BaseFragemnt implements RecyclerViewIte
return
null
;
}
/**
* 初始化限制列表下拉框
*
* @param spinner 要初始化的Spinner控件
*/
private
void
initLimitListSpinners
(
Spinner
spinner
)
{
List
<
SimpleSpinnerItem
>
items
=
new
ArrayList
<>();
List
<
String
>
limits
=
activity
.
getmLimitManager
().
getLimitNames
();
int
index
=
-
1
;
int
count
=
activity
.
getmLimitManager
().
getCount
();
LimitList
cur
=
null
;
if
(
mCardLoader
!=
null
)
{
cur
=
mCardLoader
.
getLimitList
();
}
// 添加默认选项
items
.
add
(
new
SimpleSpinnerItem
(
0
,
getString
(
R
.
string
.
label_limitlist
)));
// 遍历所有限制列表,构建下拉项
for
(
int
i
=
0
;
i
<
count
;
i
++)
{
int
j
=
i
+
1
;
String
name
=
limits
.
get
(
i
);
items
.
add
(
new
SimpleSpinnerItem
(
j
,
name
));
if
(
cur
!=
null
&&
TextUtils
.
equals
(
cur
.
getName
(),
name
))
{
index
=
j
;
}
}
// 设置适配器
SimpleSpinnerAdapter
adapter
=
new
SimpleSpinnerAdapter
(
mContext
);
adapter
.
setColor
(
Color
.
WHITE
);
adapter
.
set
(
items
);
spinner
.
setAdapter
(
adapter
);
if
(
index
>=
0
)
{
spinner
.
setSelection
(
index
);
}
}
/**
* 设置传参禁卡表的禁限,并更新相关适配器
*
...
...
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