From 10b91c2504e3b065a7c2c2bcf4aab9c2a0c28d7a Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 21 Mar 2022 20:06:48 +0100 Subject: [PATCH] show the copied path at copying to clipboard --- app/build.gradle | 2 +- .../filemanager/pro/adapters/ItemsAdapter.kt | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index cbaa43e3..bc2fa30e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -63,7 +63,7 @@ android { } dependencies { - implementation 'com.github.SimpleMobileTools:Simple-Commons:e699738fae' + implementation 'com.github.SimpleMobileTools:Simple-Commons:24fca0324f' implementation 'com.github.Stericson:RootTools:df729dcb13' implementation 'com.github.Stericson:RootShell:1.6' implementation 'com.alexvasilkov:gesture-views:2.5.2' diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/adapters/ItemsAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/adapters/ItemsAdapter.kt index e3d35801..6d5a9fcc 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/adapters/ItemsAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/adapters/ItemsAdapter.kt @@ -366,10 +366,8 @@ class ItemsAdapter( } private fun copyPath() { - val clip = ClipData.newPlainText(activity.getString(R.string.app_name), getFirstSelectedItemPath()) - (activity.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager).setPrimaryClip(clip) + activity.copyToClipboard(getFirstSelectedItemPath()) finishActMode() - activity.toast(R.string.path_copied) } private fun setAs() {