Skip to content

Commit

Permalink
fixed crashes when back to main screen after removing account
Browse files Browse the repository at this point in the history
  • Loading branch information
mariotaku committed Mar 21, 2015
1 parent 8ad206a commit cdf6ba0
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@
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;
Expand Down Expand Up @@ -612,7 +611,10 @@ public void setAccounts(ParcelableAccount[] accounts) {
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);
Expand Down

0 comments on commit cdf6ba0

Please sign in to comment.