fixed crashes when back to main screen after removing account
This commit is contained in:
parent
8ad206a9c8
commit
cdf6ba0062
|
@ -98,7 +98,6 @@ import org.mariotaku.twidere.util.content.SupportFragmentReloadCursorObserver;
|
|||
import org.mariotaku.twidere.view.ShapedImageView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
@ -612,7 +611,10 @@ public class AccountsDashboardFragment extends BaseSupportListFragment implement
|
|||
final ParcelableAccount[] previousAccounts = mInternalAccounts;
|
||||
mInternalAccounts = new ParcelableAccount[accounts.length];
|
||||
int tempIdx = 0;
|
||||
final List<ParcelableAccount> tempList = Arrays.asList(accounts);
|
||||
final List<ParcelableAccount> tempList = new ArrayList<>();
|
||||
for (ParcelableAccount account : accounts) {
|
||||
tempList.add(account);
|
||||
}
|
||||
if (previousAccounts != null) {
|
||||
for (ParcelableAccount previousAccount : previousAccounts) {
|
||||
final int idx = indexOfAccount(tempList, previousAccount.account_id);
|
||||
|
|
Loading…
Reference in New Issue