1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-02-22 06:01:12 +00:00

Prevent crash

This commit is contained in:
M66B 2018-12-12 15:59:34 +01:00
parent 7a3fd24c23
commit 8eda63c4ea

View file

@ -1190,26 +1190,28 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
BroadcastReceiver receiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED)) {
String action = intent.getAction();
if (ACTION_VIEW_MESSAGES.equals(action))
onViewMessages(intent);
else if (ACTION_VIEW_THREAD.equals(action))
onViewThread(intent);
else if (ACTION_VIEW_FULL.equals(action))
onViewFull(intent);
else if (ACTION_EDIT_FOLDER.equals(action))
onEditFolder(intent);
else if (ACTION_EDIT_ANSWER.equals(action))
onEditAnswer(intent);
else if (ACTION_STORE_ATTACHMENT.equals(action))
onStoreAttachment(intent);
else if (ACTION_DECRYPT.equals(action))
onDecrypt(intent);
else if (ACTION_SHOW_PRO.equals(action))
onShowPro(intent);
else if (ACTION_SHOW_LEGEND.equals(action))
onMenuLegend();
if (ACTION_VIEW_MESSAGES.equals(action))
onViewMessages(intent);
else if (ACTION_VIEW_THREAD.equals(action))
onViewThread(intent);
else if (ACTION_VIEW_FULL.equals(action))
onViewFull(intent);
else if (ACTION_EDIT_FOLDER.equals(action))
onEditFolder(intent);
else if (ACTION_EDIT_ANSWER.equals(action))
onEditAnswer(intent);
else if (ACTION_STORE_ATTACHMENT.equals(action))
onStoreAttachment(intent);
else if (ACTION_DECRYPT.equals(action))
onDecrypt(intent);
else if (ACTION_SHOW_PRO.equals(action))
onShowPro(intent);
else if (ACTION_SHOW_LEGEND.equals(action))
onMenuLegend();
}
}
};