diff options
author | Alex Ning <chineseperson5@gmail.com> | 2019-08-19 07:46:46 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2019-08-19 07:46:46 +0000 |
commit | 5bf002629d92610c152ee3ef9bd2ca7b71fd5cbc (patch) | |
tree | 66e28b16fb8fee57b9c8cae42c9ca057b67f9c34 /app/src/main/java/ml/docilealligator/infinityforreddit | |
parent | 4d68033145ec3f36cbab31c81568ce44352c6a28 (diff) | |
download | infinity-for-reddit-5bf002629d92610c152ee3ef9bd2ca7b71fd5cbc.tar infinity-for-reddit-5bf002629d92610c152ee3ef9bd2ca7b71fd5cbc.tar.gz infinity-for-reddit-5bf002629d92610c152ee3ef9bd2ca7b71fd5cbc.tar.bz2 infinity-for-reddit-5bf002629d92610c152ee3ef9bd2ca7b71fd5cbc.tar.lz infinity-for-reddit-5bf002629d92610c152ee3ef9bd2ca7b71fd5cbc.tar.xz infinity-for-reddit-5bf002629d92610c152ee3ef9bd2ca7b71fd5cbc.tar.zst infinity-for-reddit-5bf002629d92610c152ee3ef9bd2ca7b71fd5cbc.zip |
Fixed cannot mark message as read after clicking the notification.
Diffstat (limited to 'app/src/main/java/ml/docilealligator/infinityforreddit')
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/PullNotificationWorker.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/PullNotificationWorker.java b/app/src/main/java/ml/docilealligator/infinityforreddit/PullNotificationWorker.java index 5e306572..b9be2633 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/PullNotificationWorker.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/PullNotificationWorker.java @@ -55,8 +55,6 @@ public class PullNotificationWorker extends Worker { try { Log.i("workmanager", "before response"); - String currentAccountName = redditDataRoomDatabase.accountDao().getCurrentAccount().getUsername(); - List<Account> accounts = redditDataRoomDatabase.accountDao().getAllAccounts(); for(int accountIndex = 0; accountIndex < accounts.size(); accountIndex++) { Account account = accounts.get(accountIndex); @@ -119,6 +117,7 @@ public class PullNotificationWorker extends Worker { Uri uri = LinkResolverActivity.getRedditUriByPath(message.getContext()); intent.setData(uri); intent.putExtra(LinkResolverActivity.EXTRA_NEW_ACCOUNT_NAME, accountName); + intent.putExtra(LinkResolverActivity.EXTRA_MESSAGE_FULLNAME, message.getFullname()); PendingIntent pendingIntent = PendingIntent.getActivity(context, accountIndex * 6, intent, PendingIntent.FLAG_UPDATE_CURRENT); builder.setContentIntent(pendingIntent); } else if(kind.equals(Message.TYPE_ACCOUNT)) { @@ -131,6 +130,7 @@ public class PullNotificationWorker extends Worker { Uri uri = LinkResolverActivity.getRedditUriByPath(message.getContext()); intent.setData(uri); intent.putExtra(LinkResolverActivity.EXTRA_NEW_ACCOUNT_NAME, accountName); + intent.putExtra(LinkResolverActivity.EXTRA_MESSAGE_FULLNAME, message.getFullname()); PendingIntent pendingIntent = PendingIntent.getActivity(context, accountIndex * 6 + 2, intent, PendingIntent.FLAG_UPDATE_CURRENT); builder.setContentIntent(pendingIntent); } else if(kind.equals(Message.TYPE_MESSAGE)) { |