Commit 7a266bce authored by fallenstardust's avatar fallenstardust

首页启动ygopro的同时移除卡组编辑fragment

以便下次打开卡组编辑会重新初始化ygopro使用的最后卡组
parent d20c5ce6
......@@ -33,6 +33,7 @@ import cn.garymb.ygomobile.utils.glide.GlideCompat;
public class YGOStarter {
private static String TAG = "YGOStarter";
private static Bitmap mLogo;
private static void setFullScreen(Activity activity, ActivityShowInfo activityShowInfo) {
......@@ -166,10 +167,10 @@ public class YGOStarter {
//如果距离上次加入游戏的时间大于1秒才处理
if (System.currentTimeMillis() - lasttime >= 1000) {
lasttime = System.currentTimeMillis();
Log.e("YGOStarter", "设置背景前" + System.currentTimeMillis());
Log.e(TAG, "设置背景前" + System.currentTimeMillis());
//显示加载背景
showLoadingBg(activity);
Log.e("YGOStarter", "设置背景后" + System.currentTimeMillis());
Log.e(TAG, "设置背景后" + System.currentTimeMillis());
}
Intent intent = new Intent(activity, YGOMobileActivity.class);
if (options != null) {
......@@ -178,9 +179,9 @@ public class YGOStarter {
}
IrrlichtBridge.setArgs(intent, args);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
Log.e("YGOStarter", "跳转前" + System.currentTimeMillis());
Log.e(TAG, "跳转前" + System.currentTimeMillis());
activity.startActivity(intent);
Log.e("YGOStarter", "跳转后" + System.currentTimeMillis());
Log.e(TAG, "跳转后" + System.currentTimeMillis());
}
private static HashMap<Activity, ActivityShowInfo> Infos = new HashMap<>();
......
......@@ -66,6 +66,7 @@ import cn.garymb.ygomobile.ui.activities.WebActivity;
import cn.garymb.ygomobile.ui.adapters.ServerListAdapter;
import cn.garymb.ygomobile.ui.adapters.SimpleListAdapter;
import cn.garymb.ygomobile.ui.cards.CardDetailRandom;
import cn.garymb.ygomobile.ui.cards.DeckManagerFragment;
import cn.garymb.ygomobile.ui.mycard.McNews;
import cn.garymb.ygomobile.ui.mycard.MyCard;
import cn.garymb.ygomobile.ui.mycard.mcchat.util.ImageUtil;
......@@ -626,6 +627,7 @@ public class HomeFragment extends BaseFragemnt implements OnDuelAssistantListene
protected void openGame() {
YGOStarter.startGame(getActivity(), null);
getFragmentManager().beginTransaction().remove(activity.fragment_deck_cards).commit();
}
private void duelAssistantCheck() {
......@@ -713,9 +715,11 @@ public class HomeFragment extends BaseFragemnt implements OnDuelAssistantListene
break;
case R.id.action_replay:
YGOStarter.startGame(getActivity(), null, "-k", "-r");
getFragmentManager().beginTransaction().remove(activity.fragment_deck_cards).commit();
break;
case R.id.action_bot:
YGOStarter.startGame(getActivity(), null, "-k", "-s");
getFragmentManager().beginTransaction().remove(activity.fragment_deck_cards).commit();
break;
case R.id.action_download_ex:
// if (!AppsSettings.get().isReadExpansions()) {//如果未开启扩展卡设置,直接跳过
......@@ -745,14 +749,7 @@ public class HomeFragment extends BaseFragemnt implements OnDuelAssistantListene
});
}
break;/*
case R.id.action_join_qq_group:
String key = "anEjPCDdhLgxtfLre-nT52G1Coye3LkK";
joinQQGroup(key);
break;
case R.id.action_reset_game_res:
updateImages();
break;*/
break;
case R.id.nav_webpage: {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(Constants.URL_DONATE));
......
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