mirror of
https://github.com/nextcloud/android.git
synced 2024-11-23 21:55:48 +03:00
Click on OC icon shows the navigation drawer if the current folder isn't the root folder
This commit is contained in:
parent
d05160c1e2
commit
d789d304e3
2 changed files with 17 additions and 7 deletions
|
@ -609,8 +609,8 @@ public class FileActivity extends ActionBarActivity
|
|||
*/
|
||||
@Override
|
||||
public void onRemoteOperationFinish(RemoteOperation operation, RemoteOperationResult result) {
|
||||
Log_OC.d(TAG, "Received result of operation in FileActivity - common behaviour for all the " +
|
||||
"FileActivities ");
|
||||
Log_OC.d(TAG, "Received result of operation in FileActivity - common behaviour for all the "
|
||||
+ "FileActivities ");
|
||||
|
||||
mFileOperationsHelper.setOpIdWaitingFor(Long.MAX_VALUE);
|
||||
|
||||
|
|
|
@ -520,10 +520,18 @@ public class FileDisplayActivity extends HookActivity implements
|
|||
break;
|
||||
}
|
||||
case android.R.id.home: {
|
||||
if (mDrawerLayout.isDrawerOpen(GravityCompat.START)) {
|
||||
mDrawerLayout.closeDrawer(GravityCompat.START);
|
||||
FileFragment second = getSecondFragment();
|
||||
OCFile currentDir = getCurrentDir();
|
||||
if((currentDir != null && currentDir.getParentId() != 0) ||
|
||||
(second != null && second.getFile() != null)) {
|
||||
onBackPressed();
|
||||
|
||||
} else {
|
||||
mDrawerLayout.openDrawer(GravityCompat.START);
|
||||
if (mDrawerLayout.isDrawerOpen(GravityCompat.START)) {
|
||||
mDrawerLayout.closeDrawer(GravityCompat.START);
|
||||
} else {
|
||||
mDrawerLayout.openDrawer(GravityCompat.START);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -843,7 +851,8 @@ public class FileDisplayActivity extends HookActivity implements
|
|||
registerReceiver(mUploadFinishReceiver, uploadIntentFilter);
|
||||
|
||||
// Listen for download messages
|
||||
IntentFilter downloadIntentFilter = new IntentFilter(FileDownloader.getDownloadAddedMessage());
|
||||
IntentFilter downloadIntentFilter = new IntentFilter(
|
||||
FileDownloader.getDownloadAddedMessage());
|
||||
downloadIntentFilter.addAction(FileDownloader.getDownloadFinishMessage());
|
||||
mDownloadFinishReceiver = new DownloadFinishReceiver();
|
||||
registerReceiver(mDownloadFinishReceiver, downloadIntentFilter);
|
||||
|
@ -965,7 +974,8 @@ public class FileDisplayActivity extends HookActivity implements
|
|||
// current folder was removed from the server
|
||||
Toast.makeText( FileDisplayActivity.this,
|
||||
String.format(
|
||||
getString(R.string.sync_current_folder_was_removed),
|
||||
getString(R.string.
|
||||
sync_current_folder_was_removed),
|
||||
mDirectories.getItem(0)),
|
||||
Toast.LENGTH_LONG)
|
||||
.show();
|
||||
|
|
Loading…
Reference in a new issue