From 2858aeb55e5954a97c78111031fe5a5f5872f773 Mon Sep 17 00:00:00 2001 From: sk Date: Wed, 31 May 2023 09:45:24 +0200 Subject: [PATCH] only set last account id if creating new activity --- .../java/org/joinmastodon/android/ExternalShareActivity.java | 1 - .../src/main/java/org/joinmastodon/android/MainActivity.java | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/ExternalShareActivity.java b/mastodon/src/main/java/org/joinmastodon/android/ExternalShareActivity.java index 0c770762a..405a3e171 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ExternalShareActivity.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ExternalShareActivity.java @@ -40,7 +40,6 @@ public class ExternalShareActivity extends FragmentStackActivity{ openComposeFragment(sessions.get(0).getID()); }else{ new AccountSwitcherSheet(this, null, true, isMastodonURL, (accountId, open) -> { - AccountSessionManager.getInstance().setLastActiveAccountID(accountId); if (open) { UiUtils.lookupURL(this, accountId, text, false, (clazz, args) -> { if (clazz == null) { diff --git a/mastodon/src/main/java/org/joinmastodon/android/MainActivity.java b/mastodon/src/main/java/org/joinmastodon/android/MainActivity.java index d21bf6d36..bbef4dd47 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/MainActivity.java +++ b/mastodon/src/main/java/org/joinmastodon/android/MainActivity.java @@ -40,6 +40,7 @@ public class MainActivity extends FragmentStackActivity{ Bundle args=new Bundle(); Intent intent=getIntent(); if(intent.hasExtra("fromExternalShare")) { + AccountSessionManager.getInstance().setLastActiveAccountID(intent.getStringExtra("account")); showFragmentForExternalShare(intent.getExtras()); return; }