diff options
author | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2024-08-11 15:39:24 +0000 |
---|---|---|
committer | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2024-08-11 15:39:24 +0000 |
commit | 476e84fdca472567dffcf36019e47df518afc108 (patch) | |
tree | 15ce6c018a1be5278255bba7b465ba4d78a12a4c /app/src/main | |
parent | 9ba4016c2ed229a21751be599840c4cef2010b02 (diff) | |
download | infinity-for-reddit-476e84fdca472567dffcf36019e47df518afc108.tar infinity-for-reddit-476e84fdca472567dffcf36019e47df518afc108.tar.gz infinity-for-reddit-476e84fdca472567dffcf36019e47df518afc108.tar.bz2 infinity-for-reddit-476e84fdca472567dffcf36019e47df518afc108.tar.lz infinity-for-reddit-476e84fdca472567dffcf36019e47df518afc108.tar.xz infinity-for-reddit-476e84fdca472567dffcf36019e47df518afc108.tar.zst infinity-for-reddit-476e84fdca472567dffcf36019e47df518afc108.zip |
Fix switching account issue in ViewPostDetailActivity and InboxActivity when a user clicks the notification that belongs to another account.
Diffstat (limited to '')
2 files changed, 5 insertions, 0 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/InboxActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/InboxActivity.java index 30879333..fa6c28b5 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/InboxActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/InboxActivity.java @@ -223,6 +223,7 @@ public class InboxActivity extends BaseActivity implements ActivityToolbarInterf mNewAccountName = null; if (newAccount != null) { accessToken = newAccount.getAccessToken(); + accountName = newAccount.getAccountName(); } bindView(savedInstanceState); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewPostDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewPostDetailActivity.java index 40aaafe7..73df4d13 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewPostDetailActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewPostDetailActivity.java @@ -345,6 +345,10 @@ public class ViewPostDetailActivity extends BaseActivity implements SortTypeSele Toast.makeText(this, R.string.account_switched, Toast.LENGTH_SHORT).show(); mNewAccountName = null; + if (newAccount != null) { + accessToken = newAccount.getAccessToken(); + accountName = newAccount.getAccountName(); + } bindView(savedInstanceState); }); |