mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2025-12-20 13:30:15 -07:00
Account manager changes
- Fix account parsing gives wrong behavior. - Use popup menu to select/remove instead of click/hold.
This commit is contained in:
parent
9ef0ddde27
commit
3ff44f863f
7 changed files with 117 additions and 105 deletions
|
|
@ -110,7 +110,9 @@ public class PojavLauncherActivity extends BaseLauncherActivity
|
|||
if (tempProfile != null) {
|
||||
accountList.add(tempProfile.username);
|
||||
}
|
||||
accountList.addAll(Arrays.asList(new File(Tools.DIR_ACCOUNT_OLD).list()));
|
||||
for (String s : new File(Tools.DIR_ACCOUNT_NEW).list()) {
|
||||
accountList.add(s.substring(0, s.length() - 5));
|
||||
}
|
||||
|
||||
ArrayAdapter<String> adapterAcc = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, accountList);
|
||||
adapterAcc.setDropDownViewResource(android.R.layout.simple_list_item_single_choice);
|
||||
|
|
@ -132,7 +134,7 @@ public class PojavLauncherActivity extends BaseLauncherActivity
|
|||
if (tempProfile != null && position == 0) {
|
||||
PojavProfile.setCurrentProfile(PojavLauncherActivity.this, tempProfile);
|
||||
} else {
|
||||
PojavProfile.setCurrentProfile(PojavLauncherActivity.this, Tools.DIR_ACCOUNT_OLD + "/" + accountList.get(position + (tempProfile != null ? 1 : 0)));
|
||||
PojavProfile.setCurrentProfile(PojavLauncherActivity.this, Tools.DIR_ACCOUNT_NEW + "/" + accountList.get(position + (tempProfile != null ? 1 : 0)) + ".json");
|
||||
}
|
||||
pickAccount();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue