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
d5c93e7e
Commit
d5c93e7e
authored
Apr 11, 2020
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
只由mainActivity初始化一次
parent
c02040ac
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
14 deletions
+10
-14
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/DeckManagerActivityImpl.java
...cn/garymb/ygomobile/ui/cards/DeckManagerActivityImpl.java
+3
-4
mobile/src/main/java/cn/garymb/ygomobile/ui/home/MainActivity.java
...c/main/java/cn/garymb/ygomobile/ui/home/MainActivity.java
+6
-0
mobile/src/main/java/cn/garymb/ygomobile/ui/home/ResCheckTask.java
...c/main/java/cn/garymb/ygomobile/ui/home/ResCheckTask.java
+0
-6
mobile/src/main/java/cn/garymb/ygomobile/ui/preference/fragments/SettingFragment.java
...mb/ygomobile/ui/preference/fragments/SettingFragment.java
+0
-3
mobile/src/main/java/ocgcore/ConfigManager.java
mobile/src/main/java/ocgcore/ConfigManager.java
+1
-1
No files found.
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/DeckManagerActivityImpl.java
View file @
d5c93e7e
...
@@ -278,9 +278,7 @@ class DeckManagerActivityImpl extends BaseCardsAcitivity implements RecyclerView
...
@@ -278,9 +278,7 @@ class DeckManagerActivityImpl extends BaseCardsAcitivity implements RecyclerView
//设置当前卡组
//设置当前卡组
setCurDeck
(
rs
);
setCurDeck
(
rs
);
//设置收藏夹
//设置收藏夹
ConfigManager
systemConf
=
DataManager
.
openConfig
(
mSettings
.
getSystemConfig
());
SparseArray
<
Card
>
id
=
mCardLoader
.
readCards
(
ConfigManager
.
mLines
);
systemConf
.
read
();
SparseArray
<
Card
>
id
=
mCardLoader
.
readCards
(
systemConf
.
mLines
);
if
(
id
!=
null
)
{
if
(
id
!=
null
)
{
for
(
int
i
=
0
;
i
<
id
.
size
();
i
++)
for
(
int
i
=
0
;
i
<
id
.
size
();
i
++)
Favorite
.
add
(
id
.
valueAt
(
i
));
Favorite
.
add
(
id
.
valueAt
(
i
));
...
@@ -356,9 +354,10 @@ class DeckManagerActivityImpl extends BaseCardsAcitivity implements RecyclerView
...
@@ -356,9 +354,10 @@ class DeckManagerActivityImpl extends BaseCardsAcitivity implements RecyclerView
}
}
}
}
}
}
@Override
@Override
public
void
onSearchResult
(
List
<
Card
>
cardInfos
,
boolean
isHide
)
{
public
void
onSearchResult
(
List
<
Card
>
cardInfos
,
boolean
isHide
)
{
super
.
onSearchResult
(
cardInfos
,
isHide
);
super
.
onSearchResult
(
cardInfos
,
isHide
);
if
(!
isHide
)
if
(!
isHide
)
showResult
(
false
);
showResult
(
false
);
}
}
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/home/MainActivity.java
View file @
d5c93e7e
...
@@ -32,6 +32,8 @@ import cn.garymb.ygomobile.utils.FileUtils;
...
@@ -32,6 +32,8 @@ import cn.garymb.ygomobile.utils.FileUtils;
import
cn.garymb.ygomobile.utils.IOUtils
;
import
cn.garymb.ygomobile.utils.IOUtils
;
import
cn.garymb.ygomobile.utils.NetUtils
;
import
cn.garymb.ygomobile.utils.NetUtils
;
import
cn.garymb.ygomobile.utils.YGOUtil
;
import
cn.garymb.ygomobile.utils.YGOUtil
;
import
ocgcore.ConfigManager
;
import
ocgcore.DataManager
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
ACTION_RELOAD
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
ACTION_RELOAD
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
NETWORK_IMAGE
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
NETWORK_IMAGE
;
...
@@ -55,6 +57,8 @@ public class MainActivity extends HomeActivity {
...
@@ -55,6 +57,8 @@ public class MainActivity extends HomeActivity {
private
ImageUpdater
mImageUpdater
;
private
ImageUpdater
mImageUpdater
;
private
boolean
enableStart
;
private
boolean
enableStart
;
public
ConfigManager
favConf
=
DataManager
.
openConfig
(
AppsSettings
.
get
().
getSystemConfig
());
@Override
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
super
.
onCreate
(
savedInstanceState
);
...
@@ -64,6 +68,8 @@ public class MainActivity extends HomeActivity {
...
@@ -64,6 +68,8 @@ public class MainActivity extends HomeActivity {
// ActivityCompat.requestPermissions(this, PERMISSIONS, 0);
// ActivityCompat.requestPermissions(this, PERMISSIONS, 0);
//资源复制
//资源复制
checkRes
();
checkRes
();
//加载收藏夹
favConf
.
read
();
}
}
@SuppressLint
({
"StringFormatMatches"
,
"StringFormatInvalid"
})
@SuppressLint
({
"StringFormatMatches"
,
"StringFormatInvalid"
})
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/home/ResCheckTask.java
View file @
d5c93e7e
...
@@ -211,12 +211,6 @@ public class ResCheckTask extends AsyncTask<Void, Integer, Integer> {
...
@@ -211,12 +211,6 @@ public class ResCheckTask extends AsyncTask<Void, Integer, Integer> {
}
}
}
}
//设置收藏夹
ConfigManager
systemConf
=
DataManager
.
openConfig
(
mSettings
.
getSystemConfig
());
systemConf
.
read
();
//systemConf.setFontSize(mSettings.getFontSize());//已弃用
systemConf
.
close
();
//如果是新版本
//如果是新版本
if
(
needsUpdate
)
{
if
(
needsUpdate
)
{
//复制卡组
//复制卡组
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/preference/fragments/SettingFragment.java
View file @
d5c93e7e
...
@@ -175,9 +175,6 @@ public class SettingFragment extends PreferenceFragmentPlus {
...
@@ -175,9 +175,6 @@ public class SettingFragment extends PreferenceFragmentPlus {
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
}
}
ConfigManager
configManager
=
DataManager
.
openConfig
(
mSettings
.
getSystemConfig
());
//configManager.setFontSize(size);//已弃用
configManager
.
close
();
}
}
if
(
preference
instanceof
CheckBoxPreference
)
{
if
(
preference
instanceof
CheckBoxPreference
)
{
CheckBoxPreference
checkBoxPreference
=
(
CheckBoxPreference
)
preference
;
CheckBoxPreference
checkBoxPreference
=
(
CheckBoxPreference
)
preference
;
...
...
mobile/src/main/java/ocgcore/ConfigManager.java
View file @
d5c93e7e
...
@@ -15,7 +15,7 @@ import cn.garymb.ygomobile.utils.IOUtils;
...
@@ -15,7 +15,7 @@ import cn.garymb.ygomobile.utils.IOUtils;
public
class
ConfigManager
implements
Closeable
{
public
class
ConfigManager
implements
Closeable
{
public
List
<
Integer
>
mLines
=
new
ArrayList
<>();
public
static
List
<
Integer
>
mLines
=
new
ArrayList
<>();
private
File
file
;
private
File
file
;
ConfigManager
(
File
file
)
{
ConfigManager
(
File
file
)
{
...
...
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