mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-23 04:41:16 +00:00
Fix create/pick folder being shown when folder roots are shown (fixes #173).
This commit is contained in:
parent
df48d75127
commit
8b563da25d
1 changed files with 5 additions and 0 deletions
|
@ -91,6 +91,9 @@ public class FolderPickerActivity extends SyncthingActivity
|
|||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
if (mListView.getAdapter() == mRootsAdapter)
|
||||
return true;
|
||||
|
||||
// Inflate the menu; this adds items to the action bar if it is present.
|
||||
getMenuInflater().inflate(R.menu.folder_picker, menu);
|
||||
return true;
|
||||
|
@ -169,6 +172,7 @@ public class FolderPickerActivity extends SyncthingActivity
|
|||
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
|
||||
ArrayAdapter<File> adapter = (ArrayAdapter<File>) mListView.getAdapter();
|
||||
displayFolder(adapter.getItem(i));
|
||||
invalidateOptionsMenu();
|
||||
}
|
||||
|
||||
private class FileAdapter extends ArrayAdapter<File> {
|
||||
|
@ -240,6 +244,7 @@ public class FolderPickerActivity extends SyncthingActivity
|
|||
mListView.setAdapter(mRootsAdapter);
|
||||
mLocation = null;
|
||||
}
|
||||
invalidateOptionsMenu();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue