vibrate on adding the current clip to pinned ones

This commit is contained in:
tibbi 2022-01-29 20:55:08 +01:00
parent ddcbd7751f
commit 4919587685
1 changed files with 4 additions and 0 deletions

View File

@ -10,6 +10,7 @@ import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import androidx.recyclerview.widget.StaggeredGridLayoutManager import androidx.recyclerview.widget.StaggeredGridLayoutManager
import com.simplemobiletools.commons.extensions.applyColorFilter import com.simplemobiletools.commons.extensions.applyColorFilter
import com.simplemobiletools.commons.extensions.performHapticFeedback
import com.simplemobiletools.commons.extensions.removeUnderlines import com.simplemobiletools.commons.extensions.removeUnderlines
import com.simplemobiletools.commons.extensions.toast import com.simplemobiletools.commons.extensions.toast
import com.simplemobiletools.commons.helpers.ensureBackgroundThread import com.simplemobiletools.commons.helpers.ensureBackgroundThread
@ -101,6 +102,9 @@ class ClipsKeyboardAdapter(
context.clipsDB.insertOrUpdate(clip) context.clipsDB.insertOrUpdate(clip)
refreshClipsListener.refreshClips() refreshClipsListener.refreshClips()
context.toast(R.string.text_pinned) context.toast(R.string.text_pinned)
if (context.config.vibrateOnKeypress) {
performHapticFeedback()
}
} }
} }
} else { } else {