diff --git a/presentation/src/main/java/feature/main/MainViewModel.kt b/presentation/src/main/java/feature/main/MainViewModel.kt index d6a14152..cad7e42f 100644 --- a/presentation/src/main/java/feature/main/MainViewModel.kt +++ b/presentation/src/main/java/feature/main/MainViewModel.kt @@ -34,6 +34,7 @@ import injection.appComponent import interactor.DeleteConversation import interactor.MarkAllSeen import interactor.MarkArchived +import interactor.MarkBlocked import interactor.MarkUnarchived import interactor.MigratePreferences import interactor.PartialSync @@ -57,13 +58,15 @@ class MainViewModel : QkViewModel(MainState()) { @Inject lateinit var deleteConversation: DeleteConversation @Inject lateinit var markArchived: MarkArchived @Inject lateinit var markUnarchived: MarkUnarchived + @Inject lateinit var markBlocked: MarkBlocked @Inject lateinit var migratePreferences: MigratePreferences @Inject lateinit var partialSync: PartialSync @Inject lateinit var prefs: Preferences - private val menuArchive by lazy { MenuItem(context.getString(R.string.menu_archive), 0) } - private val menuUnarchive by lazy { MenuItem(context.getString(R.string.menu_unarchive), 1) } - private val menuDelete by lazy { MenuItem(context.getString(R.string.menu_delete), 2) } + private val menuArchive by lazy { MenuItem(context.getString(R.string.inbox_menu_archive), 0) } + private val menuUnarchive by lazy { MenuItem(context.getString(R.string.inbox_menu_unarchive), 1) } + private val menuBlock by lazy { MenuItem(context.getString(R.string.inbox_menu_block), 2) } + private val menuDelete by lazy { MenuItem(context.getString(R.string.inbox_menu_delete), 3) } private val conversations by lazy { messageRepo.getConversations() } @@ -167,11 +170,11 @@ class MainViewModel : QkViewModel(MainState()) { .withLatestFrom(state, { _, mainState -> when (mainState.page) { is Inbox -> { - val page = mainState.page.copy(menu = listOf(menuArchive, menuDelete)) + val page = mainState.page.copy(menu = listOf(menuArchive, menuBlock, menuDelete)) newState { it.copy(page = page) } } is Archived -> { - val page = mainState.page.copy(menu = listOf(menuUnarchive, menuDelete)) + val page = mainState.page.copy(menu = listOf(menuUnarchive, menuBlock, menuDelete)) newState { it.copy(page = page) } } } @@ -197,6 +200,7 @@ class MainViewModel : QkViewModel(MainState()) { when (actionId) { menuArchive.actionId -> markArchived.execute(threadId) menuUnarchive.actionId -> markUnarchived.execute(threadId) + menuBlock.actionId -> markBlocked.execute(threadId) menuDelete.actionId -> view.showDeleteDialog() } }) diff --git a/presentation/src/main/res/values-bn/strings.xml b/presentation/src/main/res/values-bn/strings.xml index 09bc713f..ffdd94be 100644 --- a/presentation/src/main/res/values-bn/strings.xml +++ b/presentation/src/main/res/values-bn/strings.xml @@ -35,9 +35,9 @@ Clear কল করুন Details - Archive conversation - Remove from archive - মুছে ফেলুন + Archive conversation + Remove from archive + মুছে ফেলুন Save image Optimizing database, this might take a minute… You: %s diff --git a/presentation/src/main/res/values-cs/strings.xml b/presentation/src/main/res/values-cs/strings.xml index a11e3643..5f3607ba 100644 --- a/presentation/src/main/res/values-cs/strings.xml +++ b/presentation/src/main/res/values-cs/strings.xml @@ -35,9 +35,9 @@ Vymazat Volat Podrobnosti - Archivovat konverzaci - Odebrat z archivu - Smazat + Archivovat konverzaci + Odebrat z archivu + Smazat Uložit obrázek Optimalizace databáze, to může chvíli trvat… You: %s diff --git a/presentation/src/main/res/values-da/strings.xml b/presentation/src/main/res/values-da/strings.xml index d0d08369..509c8a3f 100644 --- a/presentation/src/main/res/values-da/strings.xml +++ b/presentation/src/main/res/values-da/strings.xml @@ -35,9 +35,9 @@ Ryd Ring op Oplysninger - Arkivér samtale - Fjern fra arkiv - Slett + Arkivér samtale + Fjern fra arkiv + Slett Gem billede Optimerer database, dette kan tage et øjeblik… You: %s diff --git a/presentation/src/main/res/values-de/strings.xml b/presentation/src/main/res/values-de/strings.xml index a1692354..bd166112 100644 --- a/presentation/src/main/res/values-de/strings.xml +++ b/presentation/src/main/res/values-de/strings.xml @@ -35,9 +35,9 @@ Clear Anrufen Details - Archive conversation - Remove from archive - Löschen + Archive conversation + Remove from archive + Löschen Save image Optimizing database, this might take a minute… You: %s diff --git a/presentation/src/main/res/values-es/strings.xml b/presentation/src/main/res/values-es/strings.xml index 9ce1cde2..027134aa 100644 --- a/presentation/src/main/res/values-es/strings.xml +++ b/presentation/src/main/res/values-es/strings.xml @@ -35,9 +35,9 @@ Clear Llamar Details - Archive conversation - Remove from archive - Eliminar + Archive conversation + Remove from archive + Eliminar Save image Optimizing database, this might take a minute… You: %s diff --git a/presentation/src/main/res/values-fa/strings.xml b/presentation/src/main/res/values-fa/strings.xml index 9f0c3874..6cead4d2 100644 --- a/presentation/src/main/res/values-fa/strings.xml +++ b/presentation/src/main/res/values-fa/strings.xml @@ -35,9 +35,9 @@ پاک کردن تماس جزئیات - بایگانی مکالمه - حذف از بایگانی - حذف + بایگانی مکالمه + حذف از بایگانی + حذف ذخیره عکس بهینه سازی پایگاه داده، این ممکن است یک دقیقه را… You: %s diff --git a/presentation/src/main/res/values-fi/strings.xml b/presentation/src/main/res/values-fi/strings.xml index 0fc2089c..2f5fb786 100644 --- a/presentation/src/main/res/values-fi/strings.xml +++ b/presentation/src/main/res/values-fi/strings.xml @@ -35,9 +35,9 @@ Clear Soita Details - Archive conversation - Remove from archive - Poista + Archive conversation + Remove from archive + Poista Save image Optimizing database, this might take a minute… You: %s diff --git a/presentation/src/main/res/values-fr/strings.xml b/presentation/src/main/res/values-fr/strings.xml index f8d65397..b1b78196 100644 --- a/presentation/src/main/res/values-fr/strings.xml +++ b/presentation/src/main/res/values-fr/strings.xml @@ -35,9 +35,9 @@ Effacer Appeler Détails - Archiver la conversation - Supprimer des archives - Supprimer + Archiver la conversation + Supprimer des archives + Supprimer Sauvegarder l\'image Optimisation de la base de données, cela peut prendre un moment… You: %s diff --git a/presentation/src/main/res/values-hi/strings.xml b/presentation/src/main/res/values-hi/strings.xml index 84d8418a..67d410e5 100644 --- a/presentation/src/main/res/values-hi/strings.xml +++ b/presentation/src/main/res/values-hi/strings.xml @@ -35,9 +35,9 @@ Clear कॉल Details - Archive conversation - Remove from archive - Delete + Archive conversation + Remove from archive + Delete Save image Optimizing database, this might take a minute… You: %s diff --git a/presentation/src/main/res/values-hr/strings.xml b/presentation/src/main/res/values-hr/strings.xml index 63765b17..5150f27c 100644 --- a/presentation/src/main/res/values-hr/strings.xml +++ b/presentation/src/main/res/values-hr/strings.xml @@ -35,9 +35,9 @@ Očisti Nazovi Detalji - Arhiviraj razgovor - Ukloni iz arhive - Izbriši + Arhiviraj razgovor + Ukloni iz arhive + Izbriši Save image Optimiziranje baze podataka, ovo može potrajati minutu… You: %s diff --git a/presentation/src/main/res/values-hu/strings.xml b/presentation/src/main/res/values-hu/strings.xml index 4a6f105a..7aac78cd 100644 --- a/presentation/src/main/res/values-hu/strings.xml +++ b/presentation/src/main/res/values-hu/strings.xml @@ -35,9 +35,9 @@ Clear Hívás Details - Archive conversation - Remove from archive - Törlés + Archive conversation + Remove from archive + Törlés Save image Optimizing database, this might take a minute… You: %s diff --git a/presentation/src/main/res/values-in/strings.xml b/presentation/src/main/res/values-in/strings.xml index cc146075..f8a23864 100644 --- a/presentation/src/main/res/values-in/strings.xml +++ b/presentation/src/main/res/values-in/strings.xml @@ -35,9 +35,9 @@ Clear Panggil Detail - Archive conversation - Buang dari arsip - Hapus + Archive conversation + Buang dari arsip + Hapus Simpan gambar Optimizing database, this might take a minute… You: %s diff --git a/presentation/src/main/res/values-it/strings.xml b/presentation/src/main/res/values-it/strings.xml index f5686a7f..ab5be2be 100644 --- a/presentation/src/main/res/values-it/strings.xml +++ b/presentation/src/main/res/values-it/strings.xml @@ -35,9 +35,9 @@ Azzera Chiama Dettagli - Archivio conversazione - Rimuovi dall\'archivio - Elimina + Archivio conversazione + Rimuovi dall\'archivio + Elimina Salva immagine Ottimizzazione del database, questa operazione potrebbe richiedere un minuto… You: %s diff --git a/presentation/src/main/res/values-iw/strings.xml b/presentation/src/main/res/values-iw/strings.xml index 8d9fe80a..62931969 100644 --- a/presentation/src/main/res/values-iw/strings.xml +++ b/presentation/src/main/res/values-iw/strings.xml @@ -35,9 +35,9 @@ Clear התקשר Details - Archive conversation - Remove from archive - מחק + Archive conversation + Remove from archive + מחק Save image Optimizing database, this might take a minute… You: %s diff --git a/presentation/src/main/res/values-ja/strings.xml b/presentation/src/main/res/values-ja/strings.xml index ca4fe38f..6530adc1 100644 --- a/presentation/src/main/res/values-ja/strings.xml +++ b/presentation/src/main/res/values-ja/strings.xml @@ -35,9 +35,9 @@ クリア 通話 詳細 - 会話のアーカイブ - アーカイブから削除 - 削除 + 会話のアーカイブ + アーカイブから削除 + 削除 画像を保存 データベースを最適化します。これは数分かかる場合があります… You: %s diff --git a/presentation/src/main/res/values-ko/strings.xml b/presentation/src/main/res/values-ko/strings.xml index 9d210fb8..66508eb7 100644 --- a/presentation/src/main/res/values-ko/strings.xml +++ b/presentation/src/main/res/values-ko/strings.xml @@ -35,9 +35,9 @@ 비우기 전화 자세히 - 대화 보관하기 - 보관함에서 제거 - 삭제 + 대화 보관하기 + 보관함에서 제거 + 삭제 Save image 데이터베이스 초기화 중, 시간이 약간 걸립니다... You: %s diff --git a/presentation/src/main/res/values-lt/strings.xml b/presentation/src/main/res/values-lt/strings.xml index 8fac639a..dadc59ce 100644 --- a/presentation/src/main/res/values-lt/strings.xml +++ b/presentation/src/main/res/values-lt/strings.xml @@ -35,9 +35,9 @@ Clear Skambinti Details - Archive conversation - Remove from archive - Ištrinti + Archive conversation + Remove from archive + Ištrinti Save image Optimizing database, this might take a minute… You: %s diff --git a/presentation/src/main/res/values-ne/strings.xml b/presentation/src/main/res/values-ne/strings.xml index 2ceae0b3..81cebc50 100644 --- a/presentation/src/main/res/values-ne/strings.xml +++ b/presentation/src/main/res/values-ne/strings.xml @@ -35,9 +35,9 @@ Clear सम्पर्क Details - Archive conversation - Remove from archive - Delete + Archive conversation + Remove from archive + Delete Save image Optimizing database, this might take a minute… You: %s diff --git a/presentation/src/main/res/values-nl/strings.xml b/presentation/src/main/res/values-nl/strings.xml index 438e3038..f34fcef8 100644 --- a/presentation/src/main/res/values-nl/strings.xml +++ b/presentation/src/main/res/values-nl/strings.xml @@ -35,9 +35,9 @@ Annuleren Bel Details - Conversatie archiveren - Verwijderen van archief - Verwijderen + Conversatie archiveren + Verwijderen van archief + Verwijderen Afbeelding opslaan Database aan het optimaliseren. Even geduld… You: %s diff --git a/presentation/src/main/res/values-no/strings.xml b/presentation/src/main/res/values-no/strings.xml index b6f090e1..d13b9026 100644 --- a/presentation/src/main/res/values-no/strings.xml +++ b/presentation/src/main/res/values-no/strings.xml @@ -35,9 +35,9 @@ Clear Ring Details - Archive conversation - Remove from archive - Slett + Archive conversation + Remove from archive + Slett Save image Optimizing database, this might take a minute… You: %s diff --git a/presentation/src/main/res/values-pl/strings.xml b/presentation/src/main/res/values-pl/strings.xml index 0027524d..62237626 100644 --- a/presentation/src/main/res/values-pl/strings.xml +++ b/presentation/src/main/res/values-pl/strings.xml @@ -35,9 +35,9 @@ Clear Zadzwoń Details - Archive conversation - Remove from archive - Usuń + Archive conversation + Remove from archive + Usuń Save image Optimizing database, this might take a minute… You: %s diff --git a/presentation/src/main/res/values-pt-rBR/strings.xml b/presentation/src/main/res/values-pt-rBR/strings.xml index e2418385..74be6a67 100644 --- a/presentation/src/main/res/values-pt-rBR/strings.xml +++ b/presentation/src/main/res/values-pt-rBR/strings.xml @@ -35,9 +35,9 @@ Limpar Ligar Detalhes - Arquivar conversa - Remover do arquivo - Deletar + Arquivar conversa + Remover do arquivo + Deletar Guardar imagem A otimizar. Por favor aguarde um pouco… You: %s diff --git a/presentation/src/main/res/values-pt/strings.xml b/presentation/src/main/res/values-pt/strings.xml index 45490dfa..cfbb26e4 100644 --- a/presentation/src/main/res/values-pt/strings.xml +++ b/presentation/src/main/res/values-pt/strings.xml @@ -35,9 +35,9 @@ Limpar Ligar Detalhes - Arquivar conversa - Remover do arquivo - Apagar + Arquivar conversa + Remover do arquivo + Apagar Guardar imagem A otimizar. Por favor aguarde um pouco… You: %s diff --git a/presentation/src/main/res/values-ro/strings.xml b/presentation/src/main/res/values-ro/strings.xml index bbe8f283..d2f571c9 100644 --- a/presentation/src/main/res/values-ro/strings.xml +++ b/presentation/src/main/res/values-ro/strings.xml @@ -35,9 +35,9 @@ Clear Apel Details - Archive conversation - Remove from archive - Ştergeţi + Archive conversation + Remove from archive + Ştergeţi Save image Optimizing database, this might take a minute… You: %s diff --git a/presentation/src/main/res/values-ru/strings.xml b/presentation/src/main/res/values-ru/strings.xml index 7c45d37c..280afa17 100644 --- a/presentation/src/main/res/values-ru/strings.xml +++ b/presentation/src/main/res/values-ru/strings.xml @@ -35,9 +35,9 @@ Очистить Позвонить Подробности - Архивировать переписку - Удалить из архива - Удалить + Архивировать переписку + Удалить из архива + Удалить Сохранить изображение Оптимизация базы данных, это может занять немного времени… You: %s diff --git a/presentation/src/main/res/values-sk/strings.xml b/presentation/src/main/res/values-sk/strings.xml index 536f4371..e4d7a64e 100644 --- a/presentation/src/main/res/values-sk/strings.xml +++ b/presentation/src/main/res/values-sk/strings.xml @@ -35,9 +35,9 @@ Clear Volať Details - Archive conversation - Remove from archive - Vymazať + Archive conversation + Remove from archive + Vymazať Save image Optimizing database, this might take a minute… You: %s diff --git a/presentation/src/main/res/values-sr/strings.xml b/presentation/src/main/res/values-sr/strings.xml index c40ee7ce..6b3a3c88 100644 --- a/presentation/src/main/res/values-sr/strings.xml +++ b/presentation/src/main/res/values-sr/strings.xml @@ -35,9 +35,9 @@ Clear Позови Details - Archive conversation - Remove from archive - Избриши + Archive conversation + Remove from archive + Избриши Save image Optimizing database, this might take a minute… You: %s diff --git a/presentation/src/main/res/values-sv/strings.xml b/presentation/src/main/res/values-sv/strings.xml index 7e6259b8..543690d4 100644 --- a/presentation/src/main/res/values-sv/strings.xml +++ b/presentation/src/main/res/values-sv/strings.xml @@ -35,9 +35,9 @@ Rensa Ring Details - Arkivera konversationen - Ta bort från arkiv - Ta bort + Arkivera konversationen + Ta bort från arkiv + Ta bort Save image Optimerar databasen, det här kan ta en stund… You: %s diff --git a/presentation/src/main/res/values-tl/strings.xml b/presentation/src/main/res/values-tl/strings.xml index 0e409ee6..22f1267f 100644 --- a/presentation/src/main/res/values-tl/strings.xml +++ b/presentation/src/main/res/values-tl/strings.xml @@ -35,9 +35,9 @@ Clear Tawagan Details - Archive conversation - Remove from archive - Burahin + Archive conversation + Remove from archive + Burahin Save image Optimizing database, this might take a minute… You: %s diff --git a/presentation/src/main/res/values-tr/strings.xml b/presentation/src/main/res/values-tr/strings.xml index 7e5ae6ab..822dd788 100644 --- a/presentation/src/main/res/values-tr/strings.xml +++ b/presentation/src/main/res/values-tr/strings.xml @@ -35,9 +35,9 @@ Clear Ara Details - Archive conversation - Remove from archive - Sil + Archive conversation + Remove from archive + Sil Save image Optimizing database, this might take a minute… You: %s diff --git a/presentation/src/main/res/values-vi/strings.xml b/presentation/src/main/res/values-vi/strings.xml index b88cd90e..612ee23b 100644 --- a/presentation/src/main/res/values-vi/strings.xml +++ b/presentation/src/main/res/values-vi/strings.xml @@ -35,9 +35,9 @@ Clear Cuộc gọi Details - Archive conversation - Remove from archive - Xóa + Archive conversation + Remove from archive + Xóa Save image Optimizing database, this might take a minute… You: %s diff --git a/presentation/src/main/res/values-zh-rCN/strings.xml b/presentation/src/main/res/values-zh-rCN/strings.xml index 312fb805..3673999f 100644 --- a/presentation/src/main/res/values-zh-rCN/strings.xml +++ b/presentation/src/main/res/values-zh-rCN/strings.xml @@ -35,9 +35,9 @@ 清除 致電 详情 - Archive conversation - Remove from archive - 删除 + Archive conversation + Remove from archive + 删除 Save image Optimizing database, this might take a minute… You: %s diff --git a/presentation/src/main/res/values-zh/strings.xml b/presentation/src/main/res/values-zh/strings.xml index 13e84e64..c64e39c6 100644 --- a/presentation/src/main/res/values-zh/strings.xml +++ b/presentation/src/main/res/values-zh/strings.xml @@ -35,9 +35,9 @@ Clear 致電 Details - Archive conversation - Remove from archive - Delete + Archive conversation + Remove from archive + Delete Save image Optimizing database, this might take a minute… You: %s diff --git a/presentation/src/main/res/values/strings.xml b/presentation/src/main/res/values/strings.xml index 7ed75eef..81e06872 100644 --- a/presentation/src/main/res/values/strings.xml +++ b/presentation/src/main/res/values/strings.xml @@ -37,9 +37,6 @@ Clear Call Details - Archive conversation - Remove from archive - Delete Save image Optimizing database, this might take a minute… @@ -61,6 +58,10 @@ Your conversations will appear here No results + Archive + Unarchive + Block + Delete Your archived conversations will appear here Your scheduled messages will appear here