mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 08:58:30 +03:00
Fix Notification -> on device navigation path
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
parent
258af3c465
commit
6704bb0427
2 changed files with 10 additions and 3 deletions
|
@ -442,6 +442,7 @@ public abstract class DrawerActivity extends ToolbarActivity
|
|||
((FileDisplayActivity) this).browseToRoot();
|
||||
EventBus.getDefault().post(new ChangeMenuEvent());
|
||||
} else {
|
||||
MainApp.showOnlyFilesOnDevice(false);
|
||||
Intent intent = new Intent(getApplicationContext(), FileDisplayActivity.class);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||
intent.setAction(FileDisplayActivity.ALL_FILES);
|
||||
|
@ -478,8 +479,7 @@ public abstract class DrawerActivity extends ToolbarActivity
|
|||
} else if (itemId == R.id.nav_shared) {
|
||||
startSharedSearch(menuItem);
|
||||
} else if (itemId == R.id.nav_recently_modified) {
|
||||
handleSearchEvents(new SearchEvent("", SearchRemoteOperation.SearchType.RECENTLY_MODIFIED_SEARCH),
|
||||
menuItem.getItemId());
|
||||
startRecentlyModifiedSearch(menuItem);
|
||||
} else {
|
||||
if (menuItem.getItemId() >= MENU_ITEM_EXTERNAL_LINK &&
|
||||
menuItem.getItemId() <= MENU_ITEM_EXTERNAL_LINK + 100) {
|
||||
|
@ -531,6 +531,13 @@ public abstract class DrawerActivity extends ToolbarActivity
|
|||
launchActivityForSearch(searchEvent, menuItem.getItemId());
|
||||
}
|
||||
|
||||
private void startRecentlyModifiedSearch(MenuItem menuItem) {
|
||||
SearchEvent searchEvent = new SearchEvent("", SearchRemoteOperation.SearchType.RECENTLY_MODIFIED_SEARCH);
|
||||
MainApp.showOnlyFilesOnDevice(false);
|
||||
|
||||
launchActivityForSearch(searchEvent, menuItem.getItemId());
|
||||
}
|
||||
|
||||
private void startPhotoSearch(MenuItem menuItem) {
|
||||
SearchEvent searchEvent = new SearchEvent("image/%", SearchRemoteOperation.SearchType.PHOTO_SEARCH);
|
||||
MainApp.showOnlyFilesOnDevice(false);
|
||||
|
@ -1066,6 +1073,7 @@ public abstract class DrawerActivity extends ToolbarActivity
|
|||
MainApp.showOnlyFilesOnDevice(onDeviceOnly);
|
||||
Intent fileDisplayActivity = new Intent(getApplicationContext(), FileDisplayActivity.class);
|
||||
fileDisplayActivity.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||
fileDisplayActivity.setAction(FileDisplayActivity.ALL_FILES);
|
||||
startActivity(fileDisplayActivity);
|
||||
}
|
||||
|
||||
|
|
|
@ -1498,7 +1498,6 @@ public class FileDisplayActivity extends FileActivity
|
|||
public void browseToRoot() {
|
||||
OCFileListFragment listOfFiles = getListOfFilesFragment();
|
||||
if (listOfFiles != null) { // should never be null, indeed
|
||||
MainApp.showOnlyFilesOnDevice(false);
|
||||
OCFile root = getStorageManager().getFileByPath(OCFile.ROOT_PATH);
|
||||
listOfFiles.listDirectory(root, MainApp.isOnlyOnDevice(), false);
|
||||
setFile(listOfFiles.getCurrentFile());
|
||||
|
|
Loading…
Reference in a new issue