mirror of
https://github.com/nextcloud/android.git
synced 2024-11-24 06:05:42 +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
|
@Override
|
||||||
public void onRemoteOperationFinish(RemoteOperation operation, RemoteOperationResult result) {
|
public void onRemoteOperationFinish(RemoteOperation operation, RemoteOperationResult result) {
|
||||||
Log_OC.d(TAG, "Received result of operation in FileActivity - common behaviour for all the " +
|
Log_OC.d(TAG, "Received result of operation in FileActivity - common behaviour for all the "
|
||||||
"FileActivities ");
|
+ "FileActivities ");
|
||||||
|
|
||||||
mFileOperationsHelper.setOpIdWaitingFor(Long.MAX_VALUE);
|
mFileOperationsHelper.setOpIdWaitingFor(Long.MAX_VALUE);
|
||||||
|
|
||||||
|
|
|
@ -520,11 +520,19 @@ public class FileDisplayActivity extends HookActivity implements
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case android.R.id.home: {
|
case android.R.id.home: {
|
||||||
|
FileFragment second = getSecondFragment();
|
||||||
|
OCFile currentDir = getCurrentDir();
|
||||||
|
if((currentDir != null && currentDir.getParentId() != 0) ||
|
||||||
|
(second != null && second.getFile() != null)) {
|
||||||
|
onBackPressed();
|
||||||
|
|
||||||
|
} else {
|
||||||
if (mDrawerLayout.isDrawerOpen(GravityCompat.START)) {
|
if (mDrawerLayout.isDrawerOpen(GravityCompat.START)) {
|
||||||
mDrawerLayout.closeDrawer(GravityCompat.START);
|
mDrawerLayout.closeDrawer(GravityCompat.START);
|
||||||
} else {
|
} else {
|
||||||
mDrawerLayout.openDrawer(GravityCompat.START);
|
mDrawerLayout.openDrawer(GravityCompat.START);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case R.id.action_sort: {
|
case R.id.action_sort: {
|
||||||
|
@ -843,7 +851,8 @@ public class FileDisplayActivity extends HookActivity implements
|
||||||
registerReceiver(mUploadFinishReceiver, uploadIntentFilter);
|
registerReceiver(mUploadFinishReceiver, uploadIntentFilter);
|
||||||
|
|
||||||
// Listen for download messages
|
// Listen for download messages
|
||||||
IntentFilter downloadIntentFilter = new IntentFilter(FileDownloader.getDownloadAddedMessage());
|
IntentFilter downloadIntentFilter = new IntentFilter(
|
||||||
|
FileDownloader.getDownloadAddedMessage());
|
||||||
downloadIntentFilter.addAction(FileDownloader.getDownloadFinishMessage());
|
downloadIntentFilter.addAction(FileDownloader.getDownloadFinishMessage());
|
||||||
mDownloadFinishReceiver = new DownloadFinishReceiver();
|
mDownloadFinishReceiver = new DownloadFinishReceiver();
|
||||||
registerReceiver(mDownloadFinishReceiver, downloadIntentFilter);
|
registerReceiver(mDownloadFinishReceiver, downloadIntentFilter);
|
||||||
|
@ -965,7 +974,8 @@ public class FileDisplayActivity extends HookActivity implements
|
||||||
// current folder was removed from the server
|
// current folder was removed from the server
|
||||||
Toast.makeText( FileDisplayActivity.this,
|
Toast.makeText( FileDisplayActivity.this,
|
||||||
String.format(
|
String.format(
|
||||||
getString(R.string.sync_current_folder_was_removed),
|
getString(R.string.
|
||||||
|
sync_current_folder_was_removed),
|
||||||
mDirectories.getItem(0)),
|
mDirectories.getItem(0)),
|
||||||
Toast.LENGTH_LONG)
|
Toast.LENGTH_LONG)
|
||||||
.show();
|
.show();
|
||||||
|
|
Loading…
Reference in a new issue