only set last account id if creating new activity

This commit is contained in:
sk 2023-05-31 09:45:24 +02:00
parent 357104efa9
commit 2858aeb55e
2 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,6 @@ public class ExternalShareActivity extends FragmentStackActivity{
openComposeFragment(sessions.get(0).getID()); openComposeFragment(sessions.get(0).getID());
}else{ }else{
new AccountSwitcherSheet(this, null, true, isMastodonURL, (accountId, open) -> { new AccountSwitcherSheet(this, null, true, isMastodonURL, (accountId, open) -> {
AccountSessionManager.getInstance().setLastActiveAccountID(accountId);
if (open) { if (open) {
UiUtils.lookupURL(this, accountId, text, false, (clazz, args) -> { UiUtils.lookupURL(this, accountId, text, false, (clazz, args) -> {
if (clazz == null) { if (clazz == null) {

View File

@ -40,6 +40,7 @@ public class MainActivity extends FragmentStackActivity{
Bundle args=new Bundle(); Bundle args=new Bundle();
Intent intent=getIntent(); Intent intent=getIntent();
if(intent.hasExtra("fromExternalShare")) { if(intent.hasExtra("fromExternalShare")) {
AccountSessionManager.getInstance().setLastActiveAccountID(intent.getStringExtra("account"));
showFragmentForExternalShare(intent.getExtras()); showFragmentForExternalShare(intent.getExtras());
return; return;
} }