Fixed opening incorrect message from notification

This commit is contained in:
M66B 2020-12-22 08:14:59 +01:00
parent b39adf602a
commit 5f27799766
3 changed files with 5 additions and 5 deletions

View File

@ -1056,7 +1056,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
onMenuOutbox();
} else if (action.startsWith("thread")) {
intent.putExtra("thread", action.split(":", 2)[1]);
intent.putExtra("id", Long.parseLong(action.split(":", 2)[1]));
onViewThread(intent);
} else if (action.equals("widget")) {

View File

@ -3838,11 +3838,11 @@ class Core {
piContent = PendingIntent.getService(context, ServiceUI.PI_THREAD, thread, PendingIntent.FLAG_UPDATE_CURRENT);
} else {
Intent thread = new Intent(context, ActivityView.class);
thread.setAction("thread:" + message.thread);
thread.setAction("thread:" + message.id);
thread.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
thread.putExtra("account", message.account);
thread.putExtra("folder", message.folder);
thread.putExtra("id", message.id);
thread.putExtra("thread", message.thread);
thread.putExtra("filter_archive", !EntityFolder.ARCHIVE.equals(message.folderType));
piContent = PendingIntent.getActivity(context, ActivityView.REQUEST_THREAD, thread, PendingIntent.FLAG_UPDATE_CURRENT);
}

View File

@ -440,11 +440,11 @@ public class ServiceUI extends IntentService {
if (open) {
Intent thread = new Intent(this, ActivityView.class);
thread.setAction("thread:" + message.thread);
thread.setAction("thread:" + message.id);
thread.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
thread.putExtra("account", message.account);
thread.putExtra("folder", message.folder);
thread.putExtra("id", message.id);
thread.putExtra("thread", message.thread);
thread.putExtra("filter_archive", !EntityFolder.ARCHIVE.equals(folder.type));
startActivity(thread);
}