Add short Toast after populate Magikeyboard

This commit is contained in:
J-Jamet
2020-06-03 19:24:05 +02:00
parent 3d392ead19
commit f7af4f06ea
2 changed files with 6 additions and 3 deletions

View File

@@ -108,9 +108,12 @@ class EntrySelectionLauncherActivity : AppCompatActivity() {
}
}
fun populateKeyboardAndMoveAppToBackground(activity: Activity, entry: EntryInfo, intent: Intent) {
fun populateKeyboardAndMoveAppToBackground(activity: Activity,
entry: EntryInfo,
intent: Intent,
toast: Boolean = true) {
// Populate Magikeyboard with entry
MagikIME.addEntryAndLaunchNotificationIfAllowed(activity, entry)
MagikIME.addEntryAndLaunchNotificationIfAllowed(activity, entry, toast)
// Consume the selection mode
EntrySelectionHelper.removeEntrySelectionModeFromIntent(intent)
activity.moveTaskToBack(true)

View File

@@ -162,7 +162,7 @@ class KeyboardEntryNotificationService : LockNotificationService() {
if (toast) {
Toast.makeText(context,
context.getString(R.string.keyboard_notification_entry_content_title, entry.title),
Toast.LENGTH_LONG).show()
Toast.LENGTH_SHORT).show()
}
// Show the notification if allowed in Preferences