mirror of
https://github.com/nextcloud/android.git
synced 2024-11-24 06:05:42 +03:00
Include again 'Refresh account' in the menu
This commit is contained in:
parent
35eb4dbfcf
commit
7196b88374
1 changed files with 53 additions and 45 deletions
|
@ -230,6 +230,7 @@ public class FileDisplayActivity extends HookActivity implements
|
|||
getSupportActionBar().setHomeButtonEnabled(true); // mandatory since Android ICS,
|
||||
// according to the official
|
||||
// documentation
|
||||
|
||||
setSupportProgressBarIndeterminateVisibility(mSyncInProgress
|
||||
/*|| mRefreshSharesInProgress*/);
|
||||
// always AFTER setContentView(...) ; to work around bug in its implementation
|
||||
|
@ -300,7 +301,7 @@ public class FileDisplayActivity extends HookActivity implements
|
|||
mDrawerLayout,
|
||||
R.drawable.ic_drawer,
|
||||
R.string.drawer_open,
|
||||
R.string.empty) {
|
||||
R.string.drawer_close) {
|
||||
|
||||
/** Called when a drawer has settled in a completely closed state. */
|
||||
public void onDrawerClosed(View view) {
|
||||
|
@ -613,6 +614,7 @@ public class FileDisplayActivity extends HookActivity implements
|
|||
menu.findItem(R.id.action_upload).setVisible(!drawerOpen);
|
||||
menu.findItem(R.id.action_create_dir).setVisible(!drawerOpen);
|
||||
menu.findItem(R.id.action_sort).setVisible(!drawerOpen);
|
||||
menu.findItem(R.id.action_sync_account).setVisible(!drawerOpen);
|
||||
|
||||
return super.onPrepareOptionsMenu(menu);
|
||||
}
|
||||
|
@ -630,12 +632,18 @@ public class FileDisplayActivity extends HookActivity implements
|
|||
boolean retval = true;
|
||||
switch (item.getItemId()) {
|
||||
case R.id.action_create_dir: {
|
||||
CreateFolderDialogFragment dialog = CreateFolderDialogFragment.newInstance(getCurrentDir());
|
||||
CreateFolderDialogFragment dialog =
|
||||
CreateFolderDialogFragment.newInstance(getCurrentDir());
|
||||
dialog.show(getSupportFragmentManager(), DIALOG_CREATE_FOLDER);
|
||||
break;
|
||||
}
|
||||
case R.id.action_sync_account: {
|
||||
startSynchronization();
|
||||
break;
|
||||
}
|
||||
case R.id.action_upload: {
|
||||
UploadSourceDialogFragment dialog = UploadSourceDialogFragment.newInstance(getAccount());
|
||||
UploadSourceDialogFragment dialog =
|
||||
UploadSourceDialogFragment.newInstance(getAccount());
|
||||
dialog.show(getSupportFragmentManager(), DIALOG_UPLOAD_SOURCE);
|
||||
|
||||
break;
|
||||
|
@ -646,7 +654,6 @@ public class FileDisplayActivity extends HookActivity implements
|
|||
} else {
|
||||
mDrawerLayout.openDrawer(GravityCompat.START);
|
||||
}
|
||||
// TODO add hamburger to left of android.R.id.home
|
||||
break;
|
||||
}
|
||||
case R.id.action_sort: {
|
||||
|
@ -659,7 +666,8 @@ public class FileDisplayActivity extends HookActivity implements
|
|||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setTitle(R.string.actionbar_sort_title)
|
||||
.setSingleChoiceItems(R.array.actionbar_sortby, sortOrder , new DialogInterface.OnClickListener() {
|
||||
.setSingleChoiceItems(R.array.actionbar_sortby, sortOrder ,
|
||||
new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
switch (which){
|
||||
case 0:
|
||||
|
|
Loading…
Reference in a new issue