From 491958768542b26053ddd394f75bcca9e54116ce Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 29 Jan 2022 20:55:08 +0100 Subject: [PATCH] vibrate on adding the current clip to pinned ones --- .../keyboard/adapters/ClipsKeyboardAdapter.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/keyboard/adapters/ClipsKeyboardAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/keyboard/adapters/ClipsKeyboardAdapter.kt index ec9056a..fa4eba6 100644 --- a/app/src/main/kotlin/com/simplemobiletools/keyboard/adapters/ClipsKeyboardAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/keyboard/adapters/ClipsKeyboardAdapter.kt @@ -10,6 +10,7 @@ import android.view.ViewGroup import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.StaggeredGridLayoutManager import com.simplemobiletools.commons.extensions.applyColorFilter +import com.simplemobiletools.commons.extensions.performHapticFeedback import com.simplemobiletools.commons.extensions.removeUnderlines import com.simplemobiletools.commons.extensions.toast import com.simplemobiletools.commons.helpers.ensureBackgroundThread @@ -101,6 +102,9 @@ class ClipsKeyboardAdapter( context.clipsDB.insertOrUpdate(clip) refreshClipsListener.refreshClips() context.toast(R.string.text_pinned) + if (context.config.vibrateOnKeypress) { + performHapticFeedback() + } } } } else {