mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 09:39:25 +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();
|
((FileDisplayActivity) this).browseToRoot();
|
||||||
EventBus.getDefault().post(new ChangeMenuEvent());
|
EventBus.getDefault().post(new ChangeMenuEvent());
|
||||||
} else {
|
} else {
|
||||||
|
MainApp.showOnlyFilesOnDevice(false);
|
||||||
Intent intent = new Intent(getApplicationContext(), FileDisplayActivity.class);
|
Intent intent = new Intent(getApplicationContext(), FileDisplayActivity.class);
|
||||||
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||||
intent.setAction(FileDisplayActivity.ALL_FILES);
|
intent.setAction(FileDisplayActivity.ALL_FILES);
|
||||||
|
@ -478,8 +479,7 @@ public abstract class DrawerActivity extends ToolbarActivity
|
||||||
} else if (itemId == R.id.nav_shared) {
|
} else if (itemId == R.id.nav_shared) {
|
||||||
startSharedSearch(menuItem);
|
startSharedSearch(menuItem);
|
||||||
} else if (itemId == R.id.nav_recently_modified) {
|
} else if (itemId == R.id.nav_recently_modified) {
|
||||||
handleSearchEvents(new SearchEvent("", SearchRemoteOperation.SearchType.RECENTLY_MODIFIED_SEARCH),
|
startRecentlyModifiedSearch(menuItem);
|
||||||
menuItem.getItemId());
|
|
||||||
} else {
|
} else {
|
||||||
if (menuItem.getItemId() >= MENU_ITEM_EXTERNAL_LINK &&
|
if (menuItem.getItemId() >= MENU_ITEM_EXTERNAL_LINK &&
|
||||||
menuItem.getItemId() <= MENU_ITEM_EXTERNAL_LINK + 100) {
|
menuItem.getItemId() <= MENU_ITEM_EXTERNAL_LINK + 100) {
|
||||||
|
@ -531,6 +531,13 @@ public abstract class DrawerActivity extends ToolbarActivity
|
||||||
launchActivityForSearch(searchEvent, menuItem.getItemId());
|
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) {
|
private void startPhotoSearch(MenuItem menuItem) {
|
||||||
SearchEvent searchEvent = new SearchEvent("image/%", SearchRemoteOperation.SearchType.PHOTO_SEARCH);
|
SearchEvent searchEvent = new SearchEvent("image/%", SearchRemoteOperation.SearchType.PHOTO_SEARCH);
|
||||||
MainApp.showOnlyFilesOnDevice(false);
|
MainApp.showOnlyFilesOnDevice(false);
|
||||||
|
@ -1066,6 +1073,7 @@ public abstract class DrawerActivity extends ToolbarActivity
|
||||||
MainApp.showOnlyFilesOnDevice(onDeviceOnly);
|
MainApp.showOnlyFilesOnDevice(onDeviceOnly);
|
||||||
Intent fileDisplayActivity = new Intent(getApplicationContext(), FileDisplayActivity.class);
|
Intent fileDisplayActivity = new Intent(getApplicationContext(), FileDisplayActivity.class);
|
||||||
fileDisplayActivity.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
fileDisplayActivity.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||||
|
fileDisplayActivity.setAction(FileDisplayActivity.ALL_FILES);
|
||||||
startActivity(fileDisplayActivity);
|
startActivity(fileDisplayActivity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1498,7 +1498,6 @@ public class FileDisplayActivity extends FileActivity
|
||||||
public void browseToRoot() {
|
public void browseToRoot() {
|
||||||
OCFileListFragment listOfFiles = getListOfFilesFragment();
|
OCFileListFragment listOfFiles = getListOfFilesFragment();
|
||||||
if (listOfFiles != null) { // should never be null, indeed
|
if (listOfFiles != null) { // should never be null, indeed
|
||||||
MainApp.showOnlyFilesOnDevice(false);
|
|
||||||
OCFile root = getStorageManager().getFileByPath(OCFile.ROOT_PATH);
|
OCFile root = getStorageManager().getFileByPath(OCFile.ROOT_PATH);
|
||||||
listOfFiles.listDirectory(root, MainApp.isOnlyOnDevice(), false);
|
listOfFiles.listDirectory(root, MainApp.isOnlyOnDevice(), false);
|
||||||
setFile(listOfFiles.getCurrentFile());
|
setFile(listOfFiles.getCurrentFile());
|
||||||
|
|
Loading…
Reference in a new issue