Commit 9c64a03a authored by feihuaduo's avatar feihuaduo

修复外部使用带卡组名的卡组码无法直接跳转ygo打开的问题

parent 698c519d
...@@ -242,6 +242,12 @@ public interface Constants { ...@@ -242,6 +242,12 @@ public interface Constants {
String QUERY_YDK = "ydk"; String QUERY_YDK = "ydk";
String QUERY_NAME = "name"; String QUERY_NAME = "name";
/**
* 打开卡组的路径,参数可以是以下两种形式:
* <br/>1、青眼白龙.ydk
* <br/> 2、/sdcard/ygocore/deck/青眼白龙.ydk
*/
String ARG_OPEN_DECK_PATH = "openDeckPath";
String PATH_ROOM = "/room"; String PATH_ROOM = "/room";
String QUERY_HOST = "host"; String QUERY_HOST = "host";
String QUERY_PORT = "port"; String QUERY_PORT = "port";
......
...@@ -4,6 +4,7 @@ import static cn.garymb.ygomobile.Constants.ACTION_OPEN_DECK; ...@@ -4,6 +4,7 @@ import static cn.garymb.ygomobile.Constants.ACTION_OPEN_DECK;
import static cn.garymb.ygomobile.Constants.ACTION_OPEN_GAME; import static cn.garymb.ygomobile.Constants.ACTION_OPEN_GAME;
import static cn.garymb.ygomobile.Constants.CORE_EXPANSIONS; import static cn.garymb.ygomobile.Constants.CORE_EXPANSIONS;
import static cn.garymb.ygomobile.Constants.CORE_LIMIT_PATH; import static cn.garymb.ygomobile.Constants.CORE_LIMIT_PATH;
import static cn.garymb.ygomobile.Constants.ARG_OPEN_DECK_PATH;
import static cn.garymb.ygomobile.Constants.CORE_REPLAY_PATH; import static cn.garymb.ygomobile.Constants.CORE_REPLAY_PATH;
import static cn.garymb.ygomobile.Constants.CORE_SINGLE_PATH; import static cn.garymb.ygomobile.Constants.CORE_SINGLE_PATH;
import static cn.garymb.ygomobile.Constants.QUERY_NAME; import static cn.garymb.ygomobile.Constants.QUERY_NAME;
...@@ -274,7 +275,7 @@ public class GameUriManager { ...@@ -274,7 +275,7 @@ public class GameUriManager {
// return; // return;
// } // }
if (Constants.URI_DECK.equals(host)) { if (Constants.URI_DECK.equals(host)) {
String name = uri.getQueryParameter(QUERY_NAME); String name = uri.getQueryParameter(ARG_OPEN_DECK_PATH);
if (!TextUtils.isEmpty(name)) { if (!TextUtils.isEmpty(name)) {
doOpenPath(name); doOpenPath(name);
} else { } else {
......
...@@ -39,6 +39,9 @@ public class Deck implements Parcelable { ...@@ -39,6 +39,9 @@ public class Deck implements Parcelable {
private final ArrayList<Integer> extraList; private final ArrayList<Integer> extraList;
private final ArrayList<Integer> sideList; private final ArrayList<Integer> sideList;
private String name; private String name;
/**
* 是否是完整卡组,部分卡组码可能保存出来是不完整的卡组
*/
private boolean isCompleteDeck = true; private boolean isCompleteDeck = true;
public Deck() { public Deck() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment