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
b70aaabc
Commit
b70aaabc
authored
Jul 30, 2019
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix对空卡组分享、删除、重命名闪退
parent
207576ef
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
15 deletions
+18
-15
mobile/assets/changelog.html
mobile/assets/changelog.html
+1
-0
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/DeckManagerActivityImpl.java
...cn/garymb/ygomobile/ui/cards/DeckManagerActivityImpl.java
+14
-15
mobile/src/main/res/values-ko/strings.xml
mobile/src/main/res/values-ko/strings.xml
+1
-0
mobile/src/main/res/values-zh/strings.xml
mobile/src/main/res/values-zh/strings.xml
+1
-0
mobile/src/main/res/values/strings.xml
mobile/src/main/res/values/strings.xml
+1
-0
No files found.
mobile/assets/changelog.html
View file @
b70aaabc
...
@@ -50,6 +50,7 @@
...
@@ -50,6 +50,7 @@
3.未分类下无卡组时选择卡组闪退的问题;
3.未分类下无卡组时选择卡组闪退的问题;
4.提取录像卡组无法保存卡组的问题;
4.提取录像卡组无法保存卡组的问题;
5.卡组重命名不保存到原路径的问题;
5.卡组重命名不保存到原路径的问题;
6.对空卡组操作闪退的问题;
</pre>
</pre>
</body>
</body>
</html>
</html>
\ No newline at end of file
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/DeckManagerActivityImpl.java
View file @
b70aaabc
...
@@ -602,6 +602,10 @@ class DeckManagerActivityImpl extends BaseCardsAcitivity implements RecyclerView
...
@@ -602,6 +602,10 @@ class DeckManagerActivityImpl extends BaseCardsAcitivity implements RecyclerView
showResult
(
true
);
showResult
(
true
);
break
;
break
;
case
R
.
id
.
action_share_deck
:
case
R
.
id
.
action_share_deck
:
if
(
mDeckAdapater
.
getYdkFile
()
==
null
)
{
Toast
.
makeText
(
this
,
R
.
string
.
unable_to_edit_empty_deck
,
Toast
.
LENGTH_SHORT
).
show
();
return
true
;
}
shareDeck
();
shareDeck
();
break
;
break
;
case
R
.
id
.
action_save
:
case
R
.
id
.
action_save
:
...
@@ -620,14 +624,11 @@ class DeckManagerActivityImpl extends BaseCardsAcitivity implements RecyclerView
...
@@ -620,14 +624,11 @@ class DeckManagerActivityImpl extends BaseCardsAcitivity implements RecyclerView
}
}
}
}
break
;
break
;
// case R.id.action_save_as:
// if (mYdkFile == null) {
// inputDeckName(null);
// } else {
// inputDeckName(mYdkFile.getName());
// }
// break;
case
R
.
id
.
action_rename
:
case
R
.
id
.
action_rename
:
if
(
mDeckAdapater
.
getYdkFile
()
==
null
)
{
Toast
.
makeText
(
this
,
R
.
string
.
unable_to_edit_empty_deck
,
Toast
.
LENGTH_SHORT
).
show
();
return
true
;
}
if
(
mDeckAdapater
.
getYdkFile
().
getParent
().
equals
(
mSettings
.
getAiDeckDir
()))
{
if
(
mDeckAdapater
.
getYdkFile
().
getParent
().
equals
(
mSettings
.
getAiDeckDir
()))
{
Toast
.
makeText
(
this
,
R
.
string
.
donot_editor_bot_Deck
,
Toast
.
LENGTH_SHORT
).
show
();
Toast
.
makeText
(
this
,
R
.
string
.
donot_editor_bot_Deck
,
Toast
.
LENGTH_SHORT
).
show
();
}
else
{
}
else
{
...
@@ -652,10 +653,11 @@ class DeckManagerActivityImpl extends BaseCardsAcitivity implements RecyclerView
...
@@ -652,10 +653,11 @@ class DeckManagerActivityImpl extends BaseCardsAcitivity implements RecyclerView
}
}
break
;
break
;
case
R
.
id
.
action_delete_deck
:
{
case
R
.
id
.
action_delete_deck
:
{
File
ydk
=
mDeckAdapater
.
getYdkFile
();
if
(
mDeckAdapater
.
getYdkFile
()
==
null
)
{
if
(
ydk
==
null
)
Toast
.
makeText
(
this
,
R
.
string
.
unable_to_edit_empty_deck
,
Toast
.
LENGTH_SHORT
).
show
();
return
true
;
return
true
;
if
(
ydk
.
getParent
().
equals
(
mSettings
.
getAiDeckDir
()))
{
}
if
(
mDeckAdapater
.
getYdkFile
().
getParent
().
equals
(
mSettings
.
getAiDeckDir
()))
{
Toast
.
makeText
(
this
,
R
.
string
.
donot_editor_bot_Deck
,
Toast
.
LENGTH_SHORT
).
show
();
Toast
.
makeText
(
this
,
R
.
string
.
donot_editor_bot_Deck
,
Toast
.
LENGTH_SHORT
).
show
();
}
else
{
}
else
{
DialogPlus
builder
=
new
DialogPlus
(
this
);
DialogPlus
builder
=
new
DialogPlus
(
this
);
...
@@ -664,8 +666,8 @@ class DeckManagerActivityImpl extends BaseCardsAcitivity implements RecyclerView
...
@@ -664,8 +666,8 @@ class DeckManagerActivityImpl extends BaseCardsAcitivity implements RecyclerView
builder
.
setMessageGravity
(
Gravity
.
CENTER_HORIZONTAL
);
builder
.
setMessageGravity
(
Gravity
.
CENTER_HORIZONTAL
);
builder
.
setLeftButtonListener
((
dlg
,
rs
)
->
{
builder
.
setLeftButtonListener
((
dlg
,
rs
)
->
{
if
(
ydk
!=
null
)
{
if
(
mDeckAdapater
.
getYdkFile
()
!=
null
)
{
FileUtils
.
deleteFile
(
ydk
);
FileUtils
.
deleteFile
(
mDeckAdapater
.
getYdkFile
()
);
dlg
.
dismiss
();
dlg
.
dismiss
();
File
file
=
getFirstYdk
();
File
file
=
getFirstYdk
();
initDecksListSpinners
(
mDeckSpinner
,
file
);
initDecksListSpinners
(
mDeckSpinner
,
file
);
...
@@ -685,9 +687,6 @@ class DeckManagerActivityImpl extends BaseCardsAcitivity implements RecyclerView
...
@@ -685,9 +687,6 @@ class DeckManagerActivityImpl extends BaseCardsAcitivity implements RecyclerView
case
R
.
id
.
action_sort
:
case
R
.
id
.
action_sort
:
mDeckAdapater
.
sort
();
mDeckAdapater
.
sort
();
break
;
break
;
// case R.id.action_share_deck:
// shareDeck();
// break;
default
:
default
:
return
false
;
return
false
;
}
}
...
...
mobile/src/main/res/values-ko/strings.xml
View file @
b70aaabc
...
@@ -268,4 +268,5 @@
...
@@ -268,4 +268,5 @@
<string
name=
"screenshoot"
>
사진공유
</string>
<string
name=
"screenshoot"
>
사진공유
</string>
<string
name=
"code_share"
>
덱 코드 공유
</string>
<string
name=
"code_share"
>
덱 코드 공유
</string>
<string
name=
"donot_editor_bot_Deck"
>
덱을 변경하지 말아 주세요. 그러면 프로그램이 제대로 작동하지 않을 수 있습니다.
</string>
<string
name=
"donot_editor_bot_Deck"
>
덱을 변경하지 말아 주세요. 그러면 프로그램이 제대로 작동하지 않을 수 있습니다.
</string>
<string
name=
"unable_to_edit_empty_deck"
>
수정 금지 빈 덱
</string>
</resources>
</resources>
mobile/src/main/res/values-zh/strings.xml
View file @
b70aaabc
...
@@ -267,4 +267,5 @@
...
@@ -267,4 +267,5 @@
<string
name=
"no_deck_is_selected"
>
未选中卡组
</string>
<string
name=
"no_deck_is_selected"
>
未选中卡组
</string>
<string
name=
"done"
>
完成!
</string>
<string
name=
"done"
>
完成!
</string>
<string
name=
"donot_editor_bot_Deck"
>
请不要更改/删除AI卡组否则会导致人机模式无法正常使用
</string>
<string
name=
"donot_editor_bot_Deck"
>
请不要更改/删除AI卡组否则会导致人机模式无法正常使用
</string>
<string
name=
"unable_to_edit_empty_deck"
>
不可操作空卡组
</string>
</resources>
</resources>
mobile/src/main/res/values/strings.xml
View file @
b70aaabc
...
@@ -270,4 +270,5 @@
...
@@ -270,4 +270,5 @@
<string
name=
"donot_editor_bot_Deck"
>
Pls Donot edit/remove AI Deck, if you do\nAI mode wont work properly
</string>
<string
name=
"donot_editor_bot_Deck"
>
Pls Donot edit/remove AI Deck, if you do\nAI mode wont work properly
</string>
<string
name=
"code_share"
>
Code Share
</string>
<string
name=
"code_share"
>
Code Share
</string>
<string
name=
"screenshoot"
>
Screenshoot
</string>
<string
name=
"screenshoot"
>
Screenshoot
</string>
<string
name=
"unable_to_edit_empty_deck"
>
unable to edit empty deck
</string>
</resources>
</resources>
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