mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-11-10 04:37:25 +01:00
Fix crash when opening links
This commit fixes the issue where opening links while browsing would trigger an account switch with a null name.
This commit is contained in:
parent
de92e0edd3
commit
4ccb1a38bf
@ -224,7 +224,7 @@ public class LinkResolverActivity extends AppCompatActivity {
|
||||
intent.putExtra(ViewPostDetailActivity.EXTRA_NEW_ACCOUNT_NAME, newAccountName);
|
||||
startActivity(intent);
|
||||
} else {
|
||||
if (mAccountQualifedName == null || !mAccountQualifedName.equals(newAccountName)) {
|
||||
if (mAccountQualifedName == null || newAccountName != null && !mAccountQualifedName.equals(newAccountName)) {
|
||||
SwitchAccount.switchAccount(mRedditDataRoomDatabase, mRetrofit, mCurrentAccountSharedPreferences,
|
||||
mExecutor, new Handler(), newAccountName, newAccount -> {
|
||||
EventBus.getDefault().post(new SwitchAccountEvent(getClass().getName()));
|
||||
@ -259,7 +259,7 @@ public class LinkResolverActivity extends AppCompatActivity {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (mAccountQualifedName == null || !mAccountQualifedName.equals(newAccountName)) {
|
||||
if (mAccountQualifedName == null || newAccountName != null && !mAccountQualifedName.equals(newAccountName)) {
|
||||
SwitchAccount.switchAccount(mRedditDataRoomDatabase, mRetrofit, mCurrentAccountSharedPreferences,
|
||||
mExecutor, new Handler(), newAccountName, newAccount -> {
|
||||
EventBus.getDefault().post(new SwitchAccountEvent(getClass().getName()));
|
||||
|
Loading…
Reference in New Issue
Block a user