Fixed crash

This commit is contained in:
M66B 2018-10-16 10:20:31 +00:00
parent 995930071a
commit 66e007df59
1 changed files with 13 additions and 15 deletions

View File

@ -256,7 +256,6 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
drawerToggle.setDrawerIndicatorEnabled(savedInstanceState.getBoolean("toggle")); drawerToggle.setDrawerIndicatorEnabled(savedInstanceState.getBoolean("toggle"));
checkFirst(); checkFirst();
checkIntent(getIntent());
checkCrash(); checkCrash();
if (!Helper.isPlayStoreInstall(this)) if (!Helper.isPlayStoreInstall(this))
checkUpdate(); checkUpdate();
@ -276,8 +275,8 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
@Override @Override
protected void onNewIntent(Intent intent) { protected void onNewIntent(Intent intent) {
checkIntent(intent);
super.onNewIntent(intent); super.onNewIntent(intent);
setIntent(intent);
} }
@Override @Override
@ -294,6 +293,18 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
iff.addAction(ACTION_STORE_ATTACHMENT); iff.addAction(ACTION_STORE_ATTACHMENT);
iff.addAction(ACTION_SHOW_PRO); iff.addAction(ACTION_SHOW_PRO);
lbm.registerReceiver(receiver, iff); lbm.registerReceiver(receiver, iff);
Intent intent = getIntent();
String action = intent.getAction();
Log.i(Helper.TAG, "View intent=" + intent + " action=" + action);
if (action != null && action.startsWith("thread")) {
intent.setAction(null);
setIntent(intent);
getSupportFragmentManager().popBackStack("unified", 0);
intent.putExtra("id", Long.parseLong(action.split(":")[1]));
onViewThread(intent);
}
} }
@Override @Override
@ -457,19 +468,6 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
}.load(this, new Bundle()); }.load(this, new Bundle());
} }
private void checkIntent(Intent intent) {
String action = intent.getAction();
Log.i(Helper.TAG, "View intent=" + intent + " action=" + action);
if (action != null && action.startsWith("thread")) {
intent.setAction(null);
setIntent(intent);
getSupportFragmentManager().popBackStack("unified", 0);
intent.putExtra("id", Long.parseLong(action.split(":")[1]));
onViewThread(intent);
}
}
private class UpdateInfo { private class UpdateInfo {
public String tag_name; // version public String tag_name; // version
public String html_url; public String html_url;