Use fileID for passing to the files app

Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
Mario Danic 2019-04-29 10:41:16 +02:00 committed by Mario Đanić
parent 550b46c454
commit 71de8a5245
2 changed files with 2 additions and 2 deletions

View File

@ -118,7 +118,7 @@ public class MagicPreviewMessageViewHolder extends MessageHolders.IncomingImageM
filesAppIntent.setPackage(context.getString(R.string.nc_import_accounts_from)); filesAppIntent.setPackage(context.getString(R.string.nc_import_accounts_from));
Bundle options = new Bundle(); Bundle options = new Bundle();
options.putString(BundleKeys.KEY_ACCOUNT, accountString); options.putString(BundleKeys.KEY_ACCOUNT, accountString);
options.putString(BundleKeys.KEY_FILE_PATH, "/" + message.getSelectedIndividualHashMap().get("path")); options.putString(BundleKeys.KEY_FILE_ID, message.getSelectedIndividualHashMap().get("id"));
context.startActivity(filesAppIntent, options); context.startActivity(filesAppIntent, options);
} else { } else {
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(message.getSelectedIndividualHashMap().get("link"))); Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(message.getSelectedIndividualHashMap().get("link")));

View File

@ -54,5 +54,5 @@ public class BundleKeys {
public static final String KEY_BROWSER_TYPE = "KEY_BROWSER_TYPE"; public static final String KEY_BROWSER_TYPE = "KEY_BROWSER_TYPE";
public static final String KEY_FILE_PATHS = "KEY_FILE_PATHS"; public static final String KEY_FILE_PATHS = "KEY_FILE_PATHS";
public static final String KEY_ACCOUNT = "KEY_ACCOUNT"; public static final String KEY_ACCOUNT = "KEY_ACCOUNT";
public static final String KEY_FILE_PATH = "KEY_FILE_PATH"; public static final String KEY_FILE_ID = "KEY_FILE_ID";
} }