1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-12 12:35:04 -05:00

Fix notification click behaviour for multiple accounts.

Test case:
- Have two accounts A and B
- Get a mail on A
- Get a mail on B
- Click on the notification for A

Result:
You end up seeing the message from B instead of A

The reason for that is that we need to register separate PendingIntents
for each account.
This commit is contained in:
Danny Baumann 2013-01-10 09:45:37 +01:00
parent b88b4007a8
commit 3d14bd53f1

View File

@ -4806,8 +4806,8 @@ public class MessagingController implements Runnable {
targetIntent = FolderList.actionHandleNotification(context, account, initialFolder); targetIntent = FolderList.actionHandleNotification(context, account, initialFolder);
} }
PendingIntent pi = PendingIntent.getActivity(context, 0, targetIntent, PendingIntent.FLAG_UPDATE_CURRENT); builder.setContentIntent(PendingIntent.getActivity(context,
builder.setContentIntent(pi); account.getAccountNumber(), targetIntent, PendingIntent.FLAG_UPDATE_CURRENT));
builder.setDeleteIntent(NotificationActionService.getAcknowledgeIntent(context, account)); builder.setDeleteIntent(NotificationActionService.getAcknowledgeIntent(context, account));
// Only ring or vibrate if we have not done so already on this account and fetch // Only ring or vibrate if we have not done so already on this account and fetch