mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-17 19:38:52 +01:00
Enable shortcuts usage for android conversations features
This commit is contained in:
@@ -93,6 +93,7 @@ class ReceiveSms @Inject constructor(
|
||||
// update shortcuts
|
||||
Timber.v("update shortcuts")
|
||||
shortcutManager.updateShortcuts()
|
||||
shortcutManager.reportShortcutUsed(it.id)
|
||||
|
||||
// update the badge and widget
|
||||
Timber.v("update badge and widget")
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
package dev.octoshrimpy.quik.interactor
|
||||
|
||||
import android.content.Context
|
||||
import dev.octoshrimpy.quik.manager.ShortcutManager
|
||||
import dev.octoshrimpy.quik.model.Attachment
|
||||
import dev.octoshrimpy.quik.repository.ConversationRepository
|
||||
import dev.octoshrimpy.quik.repository.MessageRepository
|
||||
@@ -29,7 +30,8 @@ class SendMessage @Inject constructor(
|
||||
private val context: Context,
|
||||
private val conversationRepo: ConversationRepository,
|
||||
private val messageRepo: MessageRepository,
|
||||
private val updateBadge: UpdateBadge
|
||||
private val updateBadge: UpdateBadge,
|
||||
private val shortcutManager: ShortcutManager
|
||||
) : Interactor<SendMessage.Params>() {
|
||||
|
||||
data class Params(
|
||||
@@ -62,6 +64,8 @@ class SendMessage @Inject constructor(
|
||||
|
||||
conversationRepo.markUnarchived(threadId)
|
||||
|
||||
shortcutManager.reportShortcutUsed(threadId)
|
||||
|
||||
// delete attachment local files, if any, because they're saved to mms db by now
|
||||
params.attachments.forEach { it.removeCacheFile() }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user