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
1a7ae14f
Commit
1a7ae14f
authored
Aug 29, 2019
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获得
parent
b0cce088
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
12 deletions
+19
-12
mobile/src/main/java/cn/garymb/ygomobile/AppsSettings.java
mobile/src/main/java/cn/garymb/ygomobile/AppsSettings.java
+19
-12
No files found.
mobile/src/main/java/cn/garymb/ygomobile/AppsSettings.java
View file @
1a7ae14f
...
...
@@ -18,7 +18,6 @@ import java.util.Arrays;
import
java.util.List
;
import
java.util.Locale
;
import
cn.garymb.ygomobile.bean.DeckInfo
;
import
cn.garymb.ygomobile.ui.preference.PreferenceFragmentPlus
;
import
cn.garymb.ygomobile.utils.DeckUtil
;
import
cn.garymb.ygomobile.utils.FileLogUtil
;
...
...
@@ -40,7 +39,6 @@ import static cn.garymb.ygomobile.Constants.PREF_NOTCH_HEIGHT;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
PREF_ONLY_GAME
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
PREF_READ_EX
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
PREF_SENSOR_REFRESH
;
import
static
cn
.
garymb
.
ygomobile
.
utils
.
DeckUtil
.
getDeckTypeName
;
public
class
AppsSettings
{
private
static
final
String
PREF_VERSION
=
"app_version"
;
...
...
@@ -501,16 +499,7 @@ public class AppsSettings {
return
mSharedPreferences
.
getBoolean
(
PREF_SENSOR_REFRESH
,
PREF_DEF_SENSOR_REFRESH
);
}
/***
* 获得最后卡组绝对路径
*/
public
String
getLastDeckPath
()
{
return
mSharedPreferences
.
getString
(
Constants
.
PREF_LAST_YDK
,
Constants
.
PREF_DEF_LAST_YDK
);
}
/***
* 保存最后卡组绝对路径、分类、卡组名
*/
//保存最后卡组绝对路径、分类、卡组名
public
void
setLastDeckPath
(
String
path
)
{
if
(
TextUtils
.
equals
(
path
,
getCurLastDeck
()))
{
//一样
...
...
@@ -527,6 +516,24 @@ public class AppsSettings {
Log
.
i
(
"我是最后卡组+最后分类+最后卡组名"
,
path
+
"以及"
+
DeckUtil
.
getDeckTypeName
(
path
)
+
"以及"
+
lastDeckName
);
}
//获得最后卡组绝对路径
public
String
getLastDeckPath
()
{
return
mSharedPreferences
.
getString
(
Constants
.
PREF_LAST_YDK
,
Constants
.
PREF_DEF_LAST_YDK
);
}
//获得最后分类名
public
String
getLastCategory
(
String
path
)
{
String
lastCategoryName
=
DeckUtil
.
getDeckTypeName
(
path
);
return
mSharedPreferences
.
getString
(
Constants
.
PREF_DEF_LAST_CATEGORY
,
lastCategoryName
);
}
//获得最后卡组名
public
String
getLastDeckName
(
String
path
)
{
File
lastDeck
=
new
File
(
path
);
String
lastDeckName
=
IOUtils
.
tirmName
(
lastDeck
.
getName
(),
Constants
.
YDK_FILE_EX
);
return
mSharedPreferences
.
getString
(
Constants
.
PREF_DEF_LAST_YDK
,
lastDeckName
);
}
public
String
getCurLastDeck
()
{
return
mSharedPreferences
.
getString
(
Constants
.
PREF_DEF_LAST_YDK
,
null
);
}
...
...
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