From 3619a32a9cb4feee5751b87ed6d8090a9ca72087 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 4 Mar 2017 21:53:12 +0100 Subject: [PATCH] allow setting the editor app as default, fix #164 --- .../com/simplemobiletools/gallery/extensions/activity.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/activity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/activity.kt index 3fa42c499..742905b43 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/activity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/activity.kt @@ -87,10 +87,9 @@ fun Activity.openWith(file: File) { fun Activity.openEditor(file: File) { val intent = Intent(Intent.ACTION_EDIT) intent.setDataAndType(Uri.fromFile(file), "image/*") - val chooser = Intent.createChooser(intent, getString(R.string.edit_image_with)) if (intent.resolveActivity(packageManager) != null) { - startActivityForResult(chooser, REQUEST_EDIT_IMAGE) + startActivityForResult(intent, REQUEST_EDIT_IMAGE) } else { toast(R.string.no_editor_found) }