diff options
| author | Bananeweizen <bananeweizen@gmx.de> | 2013-05-09 09:17:00 +0200 |
|---|---|---|
| committer | Bananeweizen <bananeweizen@gmx.de> | 2013-05-09 09:17:00 +0200 |
| commit | 4b95081918b795575808a5be62655b82e7ca9750 (patch) | |
| tree | d732c2481e1bafb46053b744782ed4c092b049d9 /main/src/cgeo/geocaching/VisitCacheActivity.java | |
| parent | 7b1c980547211e9bc26f3f12e934d128b7da254f (diff) | |
| download | cgeo-4b95081918b795575808a5be62655b82e7ca9750.zip cgeo-4b95081918b795575808a5be62655b82e7ca9750.tar.gz cgeo-4b95081918b795575808a5be62655b82e7ca9750.tar.bz2 | |
fix #2695: Different log types and order before/after log page loading
for owned caches
Diffstat (limited to 'main/src/cgeo/geocaching/VisitCacheActivity.java')
| -rw-r--r-- | main/src/cgeo/geocaching/VisitCacheActivity.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/main/src/cgeo/geocaching/VisitCacheActivity.java b/main/src/cgeo/geocaching/VisitCacheActivity.java index 7c2d1ce..cac0f89 100644 --- a/main/src/cgeo/geocaching/VisitCacheActivity.java +++ b/main/src/cgeo/geocaching/VisitCacheActivity.java @@ -636,16 +636,19 @@ public class VisitCacheActivity extends AbstractLoggingActivity implements DateD } private void selectLogType() { + // use a local copy of the possible types, as that one might be modified in the background by the loader + final ArrayList<LogType> possible = new ArrayList<LogType>(possibleLogTypes); + Builder alert = new AlertDialog.Builder(this); - String[] choices = new String[possibleLogTypes.size()]; + String[] choices = new String[possible.size()]; for (int i = 0; i < choices.length; i++) { - choices[i] = possibleLogTypes.get(i).getL10n(); + choices[i] = possible.get(i).getL10n(); } - alert.setSingleChoiceItems(choices, possibleLogTypes.indexOf(typeSelected), new OnClickListener() { + alert.setSingleChoiceItems(choices, possible.indexOf(typeSelected), new OnClickListener() { @Override public void onClick(DialogInterface dialog, int position) { - setType(possibleLogTypes.get(position)); + setType(possible.get(position)); dialog.dismiss(); } }); |
