diff --git a/app/src/main/kotlin/com/wire/android/ui/common/groupname/GroupConversationNameComponent.kt b/app/src/main/kotlin/com/wire/android/ui/common/groupname/GroupConversationNameComponent.kt
index f85b1c991cf..6085cc81888 100644
--- a/app/src/main/kotlin/com/wire/android/ui/common/groupname/GroupConversationNameComponent.kt
+++ b/app/src/main/kotlin/com/wire/android/ui/common/groupname/GroupConversationNameComponent.kt
@@ -48,7 +48,6 @@ import androidx.compose.ui.text.input.ImeAction
import androidx.compose.ui.text.input.KeyboardType
import com.wire.android.R
import com.wire.android.ui.common.R as commonR
-import com.wire.android.ui.common.Icon
import com.wire.android.ui.common.animation.ShakeAnimation
import com.wire.android.ui.common.button.WireButtonState
import com.wire.android.ui.common.button.WirePrimaryButton
@@ -170,8 +169,8 @@ fun GroupNameScreen(
onClick = newGroupNameTextState::clearText,
) {
Icon(
- painter = painterResource(id = R.drawable.ic_clear_search),
- contentDescription = stringResource(R.string.content_description_clear_content)
+ painter = painterResource(id = commonR.drawable.ic_clear_search),
+ contentDescription = stringResource(commonR.string.content_description_clear_content)
)
}
}
diff --git a/app/src/main/kotlin/com/wire/android/ui/home/conversations/ConversationTopAppBar.kt b/app/src/main/kotlin/com/wire/android/ui/home/conversations/ConversationTopAppBar.kt
index 03d0eb38ba0..634035c1d9f 100644
--- a/app/src/main/kotlin/com/wire/android/ui/home/conversations/ConversationTopAppBar.kt
+++ b/app/src/main/kotlin/com/wire/android/ui/home/conversations/ConversationTopAppBar.kt
@@ -71,6 +71,7 @@ import com.wire.kalium.logic.data.conversation.Conversation
import com.wire.kalium.logic.data.id.ConversationId
import com.wire.kalium.logic.data.id.QualifiedID
import com.wire.kalium.logic.data.user.UserAvailabilityStatus
+import com.wire.android.ui.common.R as commonR
@Composable
fun ConversationScreenTopAppBar(
@@ -176,7 +177,7 @@ private fun ConversationScreenTopAppBarContent(
WireSecondaryIconButton(
onButtonClicked = onSearchButtonClick,
iconResource = R.drawable.ic_search,
- contentDescription = R.string.content_description_conversation_search_icon,
+ contentDescription = commonR.string.content_description_conversation_search_icon,
minSize = dimensions().buttonSmallMinSize,
minClickableSize = DpSize(
dimensions().buttonSmallMinSize.width,
diff --git a/app/src/main/kotlin/com/wire/android/ui/home/conversations/search/SearchUsersAndAppsScreen.kt b/app/src/main/kotlin/com/wire/android/ui/home/conversations/search/SearchUsersAndAppsScreen.kt
index d61008b92fd..6e46835fba7 100644
--- a/app/src/main/kotlin/com/wire/android/ui/home/conversations/search/SearchUsersAndAppsScreen.kt
+++ b/app/src/main/kotlin/com/wire/android/ui/home/conversations/search/SearchUsersAndAppsScreen.kt
@@ -143,6 +143,7 @@ fun SearchUsersAndAppsScreen(
SearchTopBar(
isSearchActive = searchBarState.isSearchActive,
searchBarHint = searchBarTitle,
+ backIconContentDescription = stringResource(id = R.string.content_description_add_participants_back_btn),
searchBarDescription = stringResource(R.string.content_description_add_participants_search_field),
searchQueryTextState = searchBarState.searchQueryTextState,
onActiveChanged = searchBarState::searchActiveChanged,
diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml
index 90f5469d9c4..3c75546916d 100644
--- a/app/src/main/res/values-de/strings.xml
+++ b/app/src/main/res/values-de/strings.xml
@@ -84,7 +84,6 @@
Passwort anzeigen
Passwort ausblenden
Suche-Icon zurück
- Gesprächsverlauf löschen
Unterhaltung ist stummgeschaltet
Icon herunterladen
Icon öffnen
@@ -98,8 +97,6 @@
Unterhaltung löschen
Audioanruf starten
Wire
- Icon suchen
- Sucheingabe
Jemanden erwähnen
Zurück zur Unterhaltungsliste
Unterhaltungsdetails öffnen
diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml
index b4689a21c8c..e3e3082f993 100644
--- a/app/src/main/res/values-es/strings.xml
+++ b/app/src/main/res/values-es/strings.xml
@@ -84,7 +84,6 @@
Mostrar contraseña
Ocultar contraseña
Icono de búsqueda atrás
- Borrar contenido
Conversación silenciada
Icono de descarga
Icono de abrir
@@ -98,8 +97,6 @@
Eliminar la conversación
Iniciar una llamada
Logo de Wire
- Ícono de búsqueda
- Campo de búsqueda
Botón de modo de texto enriquecido
Botón activar modo de dibujo
Encabezado de formato de texto enriquecido
diff --git a/app/src/main/res/values-et/strings.xml b/app/src/main/res/values-et/strings.xml
index 7ce80e0b260..78dfacfdc8b 100644
--- a/app/src/main/res/values-et/strings.xml
+++ b/app/src/main/res/values-et/strings.xml
@@ -58,7 +58,6 @@
Kuva parool
Peida parool
Otsi tagasi ikoon
- Tühjenda sisu
Vaigistatud vestlus
Allalaadimise ikoon
Avamise ikoon
diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml
index 461b6dabc3f..3dd1cd2dc44 100644
--- a/app/src/main/res/values-fr/strings.xml
+++ b/app/src/main/res/values-fr/strings.xml
@@ -77,7 +77,6 @@
Afficher le mot de passe
Cacher le mot de passe
Icône de retour de recherche
- Effacer le contenu
Conversation en sourdine
Icône de téléchargement
Icône d\'ouverture
@@ -89,8 +88,6 @@
Débloquer
Passer un appel audio
Wire
- Icône de Recherche
- Saisie de la recherche
Bouton d\'activation du mode texte enrichi
Activer le bouton du mode dessin
En-tête de mise en forme du texte enrichi
diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml
index b35b1f7d906..dd822486ec5 100644
--- a/app/src/main/res/values-hr/strings.xml
+++ b/app/src/main/res/values-hr/strings.xml
@@ -75,7 +75,6 @@
Prikaži lozinku
Sakrij lozinku
Ikona za povratak
- Izbriši sadržaj
Utišan razgovor
Ikona za preuzimanje
Otvori ikonu
@@ -87,8 +86,6 @@
Odblokiraj
Pokreni audio poziv
Wire
- Ikona pretraživanja
- Unos pretraživanja
Gumb za prikaz obogaćenog teksta
Zaglavlje teksta
Podebljanje teksta
diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml
index 7ac7a78b6bb..6d58a714ad3 100644
--- a/app/src/main/res/values-hu/strings.xml
+++ b/app/src/main/res/values-hu/strings.xml
@@ -84,7 +84,6 @@
Jelszó megjelenítése
Jelszó elrejtése
Keresés vissza ikon
- Tartalom törlése
Némított beszélgetés
Letöltés ikon
Megnyitás ikon
@@ -98,8 +97,6 @@
Beszélgetés törlése
Hívás indítása
Wire
- Keresés ikon
- Keresőmező
Formázott szöveg engedélyezése gomb
Rajzmód gomb engedélyezése
Szövegformázás Címsor
diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml
index 4aa1f66f56c..510b6131f56 100644
--- a/app/src/main/res/values-it/strings.xml
+++ b/app/src/main/res/values-it/strings.xml
@@ -80,7 +80,6 @@
Mostra la password
Nascondi la password
Icona di ricerca all\'indietro
- Cancella il contenuto
Conversazione silenziata
Icona di download
Apri icona
@@ -92,8 +91,6 @@
Sblocca
Avvia chiamata audio
Wire
- Icona di ricerca
- Input della ricerca
Abilita la modalità di testo avanzata
Intestazione formattata in testo ricco
Grassetto formattazione in testo ricco
diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml
index ad3671006c9..7979f5151c1 100644
--- a/app/src/main/res/values-ja/strings.xml
+++ b/app/src/main/res/values-ja/strings.xml
@@ -79,7 +79,6 @@
パスワードを表示
パスワードを非表示
検索に戻るアイコン
- 内容を消去
ミュートした会話
ダウンロードアイコン
開くアイコン
@@ -91,8 +90,6 @@
ブロック解除
音声通話を開始
Wire
- 検索アイコン
- 検索入力
リッチテキストモードボタンを有効にする
お絵描きモードボタンを有効にする
リッチテキスト書式のヘッダー
diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml
index 63a12dd04ed..8097c4d8b55 100644
--- a/app/src/main/res/values-pl/strings.xml
+++ b/app/src/main/res/values-pl/strings.xml
@@ -59,7 +59,6 @@
Pokaż hasło
Ukryj hasło
Ikona wyszukiwania wstecz
- Wyczyść zawartość
Wyciszona rozmowa
Ikona pobierania
Dodaj do ulubionych
diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml
index 936fbbc949d..d32f0cb420a 100644
--- a/app/src/main/res/values-pt/strings.xml
+++ b/app/src/main/res/values-pt/strings.xml
@@ -84,7 +84,6 @@
Mostrar senha
Ocultar senha
Ícone de busca
- Limpar conteúdo
Conversa silenciada
Ícone de download
Ícone de abrir
@@ -96,8 +95,6 @@
Desbloquear
Iniciar chamada de áudio
Wire
- Ícone de pesquisa
- Pesquisa
Habilitar modo de texto avançado
Ativar botão de modo de desenho
Cabeçalho de formatação de Rich Text
diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml
index ce24773f507..caf6aa030c7 100644
--- a/app/src/main/res/values-ru/strings.xml
+++ b/app/src/main/res/values-ru/strings.xml
@@ -86,7 +86,6 @@
Показать пароль
Скрыть пароль
Значок возврата поиска
- Очистить контент
Беззвучные беседы
Значок загрузки
Значок открытия
@@ -100,8 +99,6 @@
Удалить беседу
Начать звонок
Wire
- Значок поиска
- Поиск
Кнопка включения режима форматированного текста
Кнопка включения режима рисования
Заголовок
diff --git a/app/src/main/res/values-si/strings.xml b/app/src/main/res/values-si/strings.xml
index ccb180d0b43..aee8c1b75a4 100644
--- a/app/src/main/res/values-si/strings.xml
+++ b/app/src/main/res/values-si/strings.xml
@@ -84,7 +84,6 @@
මුරපදය පෙන්වන්න
මුරපදය සඟවන්න
ආපසු සොයන්න නිරූපකය
- අන්තර්ගතය මකන්න
නිහඬ කළ සංවාදය
බාගැනීමේ නිරූපකය
ඇරීමේ නිරූපකය
@@ -98,8 +97,6 @@
සංවාදය මකන්න
ශ්රව්ය ඇමතුමක් අරඹන්න
වයර්
- සොයන්න නිරූපකය
- සෙවුම ආදානය
සරු පෙළ නිරූපකය සබල කරන්න
අඳින ප්රකාරය සබල කරන බොත්තම
ශ්රීර්ෂකය ලෙස ආකෘතිකරණය
diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml
index 18d193b7778..cda0d5fb91d 100644
--- a/app/src/main/res/values-sv/strings.xml
+++ b/app/src/main/res/values-sv/strings.xml
@@ -72,7 +72,6 @@
Visa lösenord
Dölj lösenord
- Rensa innehåll
Tystad konversation
Hämta ikon
Öppna ikon
diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml
index a56a11f7c81..7c45a484ae8 100644
--- a/app/src/main/res/values-tr/strings.xml
+++ b/app/src/main/res/values-tr/strings.xml
@@ -84,7 +84,6 @@
Şifreyi göster
Parolayı gizle
Geri arama simgesi
- İçeriği temizle
Sessize alınmış sohbet
İndirme simgesi
Simgeyi aç
@@ -98,8 +97,6 @@
Konuşmayı sil
Sesli aramayı başlat
Wire
- Arama simgesi
- Arama girişi
Zengin metin modunu etkinleştir düğmesi
Çizim modunu etkinleştir düğmesi
Zengin metin biçimlendirme Başlığı
diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml
index 6b9898182d8..521039130c9 100644
--- a/app/src/main/res/values-uk/strings.xml
+++ b/app/src/main/res/values-uk/strings.xml
@@ -65,7 +65,6 @@
Показати пароль
Приховати пароль
- Видалити вміст
Вимкнена бесіда
Завантажити значок
Додати до вподобань
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 53adc32446f..5cdada488b6 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -93,7 +93,6 @@
Show password
Hide password
Search back icon
- Clear content
Muted conversation
Download icon
Open icon
@@ -107,8 +106,6 @@
Delete the conversation
Start audio call
Wire
- Search icon
- Search input
Enable rich text mode button
Enable drawing mode button
Rich text formatting Header
diff --git a/app/src/main/kotlin/com/wire/android/ui/common/CollapsingTopBarScaffold.kt b/core/ui-common/src/main/kotlin/com/wire/android/ui/common/CollapsingTopBarScaffold.kt
similarity index 100%
rename from app/src/main/kotlin/com/wire/android/ui/common/CollapsingTopBarScaffold.kt
rename to core/ui-common/src/main/kotlin/com/wire/android/ui/common/CollapsingTopBarScaffold.kt
diff --git a/app/src/main/kotlin/com/wire/android/ui/common/SearchBar.kt b/core/ui-common/src/main/kotlin/com/wire/android/ui/common/SearchBar.kt
similarity index 97%
rename from app/src/main/kotlin/com/wire/android/ui/common/SearchBar.kt
rename to core/ui-common/src/main/kotlin/com/wire/android/ui/common/SearchBar.kt
index 241cf8b59fe..61c08bf7adc 100644
--- a/app/src/main/kotlin/com/wire/android/ui/common/SearchBar.kt
+++ b/core/ui-common/src/main/kotlin/com/wire/android/ui/common/SearchBar.kt
@@ -1,6 +1,6 @@
/*
* Wire
- * Copyright (C) 2024 Wire Swiss GmbH
+ * Copyright (C) 2025 Wire Swiss GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -42,12 +42,11 @@ import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.unit.sp
-import com.wire.android.R
import com.wire.android.ui.common.progress.WireCircularProgressIndicator
import com.wire.android.ui.common.textfield.WireTextField
import com.wire.android.ui.theme.WireTheme
import com.wire.android.ui.theme.wireColorScheme
-import com.wire.android.util.ui.PreviewMultipleThemes
+import com.wire.android.util.PreviewMultipleThemes
@Composable
fun SearchBarInput(
diff --git a/app/src/main/kotlin/com/wire/android/ui/common/topappbar/search/SearchTopBar.kt b/core/ui-common/src/main/kotlin/com/wire/android/ui/common/topappbar/search/SearchTopBar.kt
similarity index 94%
rename from app/src/main/kotlin/com/wire/android/ui/common/topappbar/search/SearchTopBar.kt
rename to core/ui-common/src/main/kotlin/com/wire/android/ui/common/topappbar/search/SearchTopBar.kt
index 459a03d69de..7b01b123c91 100644
--- a/app/src/main/kotlin/com/wire/android/ui/common/topappbar/search/SearchTopBar.kt
+++ b/core/ui-common/src/main/kotlin/com/wire/android/ui/common/topappbar/search/SearchTopBar.kt
@@ -1,6 +1,6 @@
/*
* Wire
- * Copyright (C) 2024 Wire Swiss GmbH
+ * Copyright (C) 2025 Wire Swiss GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -52,15 +52,13 @@ import androidx.compose.ui.focus.onFocusEvent
import androidx.compose.ui.platform.LocalFocusManager
import androidx.compose.ui.platform.LocalSoftwareKeyboardController
import androidx.compose.ui.res.painterResource
-import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextAlign
-import com.wire.android.R
-import com.wire.android.ui.common.R as commonR
+import com.wire.android.ui.common.R
import com.wire.android.ui.common.SearchBarInput
import com.wire.android.ui.common.dimensions
import com.wire.android.ui.theme.WireTheme
import com.wire.android.ui.theme.wireColorScheme
-import com.wire.android.util.ui.PreviewMultipleThemes
+import com.wire.android.util.PreviewMultipleThemes
@Composable
fun SearchTopBar(
@@ -69,6 +67,7 @@ fun SearchTopBar(
searchQueryTextState: TextFieldState,
modifier: Modifier = Modifier,
isLoading: Boolean = false,
+ backIconContentDescription: String? = null,
searchBarDescription: String? = null,
onCloseSearchClicked: (() -> Unit)? = null,
onActiveChanged: (isActive: Boolean) -> Unit = {},
@@ -128,8 +127,8 @@ fun SearchTopBar(
modifier = Modifier.size(dimensions().buttonCircleMinSize)
) {
Icon(
- painter = painterResource(commonR.drawable.ic_arrow_back),
- contentDescription = stringResource(id = R.string.content_description_add_participants_back_btn),
+ painter = painterResource(R.drawable.ic_arrow_back),
+ contentDescription = backIconContentDescription,
tint = MaterialTheme.wireColorScheme.onBackground,
)
}
diff --git a/app/src/main/res/drawable/ic_clear_search.xml b/core/ui-common/src/main/res/drawable/ic_clear_search.xml
similarity index 100%
rename from app/src/main/res/drawable/ic_clear_search.xml
rename to core/ui-common/src/main/res/drawable/ic_clear_search.xml
diff --git a/core/ui-common/src/main/res/values-de/strings.xml b/core/ui-common/src/main/res/values-de/strings.xml
index bf30dde6901..36ddde1ce6d 100644
--- a/core/ui-common/src/main/res/values-de/strings.xml
+++ b/core/ui-common/src/main/res/values-de/strings.xml
@@ -55,4 +55,7 @@
TB
Haken
"Keine Anwendung zum Öffnen des Download-Ordners gefunden"
+ Gesprächsverlauf löschen
+ Icon suchen
+ Sucheingabe
diff --git a/core/ui-common/src/main/res/values-es/strings.xml b/core/ui-common/src/main/res/values-es/strings.xml
index 196432bbfd7..6ec3b1fe936 100644
--- a/core/ui-common/src/main/res/values-es/strings.xml
+++ b/core/ui-common/src/main/res/values-es/strings.xml
@@ -17,4 +17,7 @@
-->
Marca de verificación
+ Borrar contenido
+ Ícono de búsqueda
+ Campo de búsqueda
diff --git a/core/ui-common/src/main/res/values-et/strings.xml b/core/ui-common/src/main/res/values-et/strings.xml
index b1c74dae97e..5d165e3f0d3 100644
--- a/core/ui-common/src/main/res/values-et/strings.xml
+++ b/core/ui-common/src/main/res/values-et/strings.xml
@@ -18,4 +18,5 @@
-->
Märkeruut
+ Tühjenda sisu
diff --git a/core/ui-common/src/main/res/values-fr/strings.xml b/core/ui-common/src/main/res/values-fr/strings.xml
index adbcbfc6d24..2c75f5d1d04 100644
--- a/core/ui-common/src/main/res/values-fr/strings.xml
+++ b/core/ui-common/src/main/res/values-fr/strings.xml
@@ -18,4 +18,7 @@
-->
Cocher la case
+ Effacer le contenu
+ Icône de Recherche
+ Saisie de la recherche
diff --git a/core/ui-common/src/main/res/values-hr/strings.xml b/core/ui-common/src/main/res/values-hr/strings.xml
index 36363758194..a6b7fdceaa3 100644
--- a/core/ui-common/src/main/res/values-hr/strings.xml
+++ b/core/ui-common/src/main/res/values-hr/strings.xml
@@ -18,4 +18,7 @@
-->
Oznaka kvačice
+ Izbriši sadržaj
+ Ikona pretraživanja
+ Unos pretraživanja
diff --git a/core/ui-common/src/main/res/values-hu/strings.xml b/core/ui-common/src/main/res/values-hu/strings.xml
index ced9cd16ded..b7566612abe 100644
--- a/core/ui-common/src/main/res/values-hu/strings.xml
+++ b/core/ui-common/src/main/res/values-hu/strings.xml
@@ -19,4 +19,7 @@
Pipa jel
"Nem található alkalmazás a letöltési mappa megnyitásához"
+ Tartalom törlése
+ Keresés ikon
+ Keresőmező
diff --git a/core/ui-common/src/main/res/values-it/strings.xml b/core/ui-common/src/main/res/values-it/strings.xml
index 5a8cd8e7612..2b370d42c4a 100644
--- a/core/ui-common/src/main/res/values-it/strings.xml
+++ b/core/ui-common/src/main/res/values-it/strings.xml
@@ -19,4 +19,7 @@
Segno di spunta
"Nessun'applicazione trovata per aprire la cartella dei download"
+ Cancella il contenuto
+ Icona di ricerca
+ Input della ricerca
diff --git a/core/ui-common/src/main/res/values-ja/strings.xml b/core/ui-common/src/main/res/values-ja/strings.xml
index dd2f730573c..2f05561ae57 100644
--- a/core/ui-common/src/main/res/values-ja/strings.xml
+++ b/core/ui-common/src/main/res/values-ja/strings.xml
@@ -18,4 +18,7 @@
-->
チェックマーク
+ 内容を消去
+ 検索アイコン
+ 検索入力
diff --git a/core/ui-common/src/main/res/values-pl/strings.xml b/core/ui-common/src/main/res/values-pl/strings.xml
index 5eb7ad6118e..0f9ff9ae88f 100644
--- a/core/ui-common/src/main/res/values-pl/strings.xml
+++ b/core/ui-common/src/main/res/values-pl/strings.xml
@@ -18,4 +18,5 @@
-->
Zaznaczenie
+ Wyczyść zawartość
diff --git a/core/ui-common/src/main/res/values-pt/strings.xml b/core/ui-common/src/main/res/values-pt/strings.xml
index 60ccc0f7f86..be349d15075 100644
--- a/core/ui-common/src/main/res/values-pt/strings.xml
+++ b/core/ui-common/src/main/res/values-pt/strings.xml
@@ -19,4 +19,7 @@
Marca de seleção
"Nenhum aplicativo encontrado para abrir a pasta de downloads"
+ Limpar conteúdo
+ Ícone de pesquisa
+ Pesquisa
diff --git a/core/ui-common/src/main/res/values-ru/strings.xml b/core/ui-common/src/main/res/values-ru/strings.xml
index 0d0177db174..d22d78f3ef0 100644
--- a/core/ui-common/src/main/res/values-ru/strings.xml
+++ b/core/ui-common/src/main/res/values-ru/strings.xml
@@ -62,4 +62,7 @@
TB
Отметка
"Не найдено приложение для открытия папки загрузок"
+ Очистить контент
+ Значок поиска
+ Поиск
diff --git a/core/ui-common/src/main/res/values-si/strings.xml b/core/ui-common/src/main/res/values-si/strings.xml
index 988ad29dd3d..b7778cc1002 100644
--- a/core/ui-common/src/main/res/values-si/strings.xml
+++ b/core/ui-common/src/main/res/values-si/strings.xml
@@ -19,4 +19,7 @@
හරි ලකුණ
"බාගැනීමේ බහාලුම ඇරීමට සුදුසු යෙදුමක් හමු නොවිණි"
+ අන්තර්ගතය මකන්න
+ සොයන්න නිරූපකය
+ සෙවුම ආදානය
diff --git a/core/ui-common/src/main/res/values-sv/strings.xml b/core/ui-common/src/main/res/values-sv/strings.xml
index 8a2a66600e6..cbf5ef95f32 100644
--- a/core/ui-common/src/main/res/values-sv/strings.xml
+++ b/core/ui-common/src/main/res/values-sv/strings.xml
@@ -19,4 +19,5 @@
App
Bock
+ Rensa innehåll
diff --git a/core/ui-common/src/main/res/values-tr/strings.xml b/core/ui-common/src/main/res/values-tr/strings.xml
index 529ca317520..c39cf75a507 100644
--- a/core/ui-common/src/main/res/values-tr/strings.xml
+++ b/core/ui-common/src/main/res/values-tr/strings.xml
@@ -33,4 +33,7 @@
Uyarı
Daha fazla seçenek göster
Onay işareti
+ İçeriği temizle
+ Arama simgesi
+ Arama girişi
diff --git a/core/ui-common/src/main/res/values-uk/strings.xml b/core/ui-common/src/main/res/values-uk/strings.xml
index 4ff71f9677c..61a0e184d31 100644
--- a/core/ui-common/src/main/res/values-uk/strings.xml
+++ b/core/ui-common/src/main/res/values-uk/strings.xml
@@ -1,5 +1,4 @@
-
-
-
+
+ Видалити вміст
+
diff --git a/core/ui-common/src/main/res/values/strings.xml b/core/ui-common/src/main/res/values/strings.xml
index 92b118eba05..b2d87b464d1 100644
--- a/core/ui-common/src/main/res/values/strings.xml
+++ b/core/ui-common/src/main/res/values/strings.xml
@@ -66,4 +66,9 @@
MB
GB
TB
+
+ Search icon
+ Search input
+ Clear content
+
diff --git a/features/cells/src/main/java/com/wire/android/feature/cells/ui/ConversationFilesScreen.kt b/features/cells/src/main/java/com/wire/android/feature/cells/ui/ConversationFilesScreen.kt
index d9bcfe60ded..fd3f18835b6 100644
--- a/features/cells/src/main/java/com/wire/android/feature/cells/ui/ConversationFilesScreen.kt
+++ b/features/cells/src/main/java/com/wire/android/feature/cells/ui/ConversationFilesScreen.kt
@@ -17,10 +17,16 @@
*/
package com.wire.android.feature.cells.ui
+import androidx.activity.compose.BackHandler
import androidx.compose.animation.AnimatedVisibility
+import androidx.compose.animation.expandVertically
import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
+import androidx.compose.animation.shrinkVertically
+import androidx.compose.animation.slideInVertically
+import androidx.compose.animation.slideOutVertically
import androidx.compose.foundation.Image
+import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxWidth
@@ -63,15 +69,18 @@ import com.wire.android.navigation.PreviewNavigator
import com.wire.android.navigation.WireNavigator
import com.wire.android.navigation.annotation.features.cells.WireDestination
import com.wire.android.navigation.style.PopUpNavigationAnimation
+import com.wire.android.ui.common.CollapsingTopBarScaffold
import com.wire.android.ui.common.MoreOptionIcon
import com.wire.android.ui.common.bottomsheet.rememberWireModalSheetState
import com.wire.android.ui.common.bottomsheet.show
import com.wire.android.ui.common.button.FloatingActionButton
import com.wire.android.ui.common.dimensions
import com.wire.android.ui.common.preview.MultipleThemePreviews
-import com.wire.android.ui.common.scaffold.WireScaffold
+import com.wire.android.ui.common.search.SearchBarState
+import com.wire.android.ui.common.search.rememberSearchbarState
import com.wire.android.ui.common.topappbar.NavigationIconType
import com.wire.android.ui.common.topappbar.WireCenterAlignedTopAppBar
+import com.wire.android.ui.common.topappbar.search.SearchTopBar
import com.wire.android.ui.theme.WireTheme
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableSharedFlow
@@ -93,15 +102,26 @@ fun ConversationFilesScreen(
navigator: WireNavigator,
viewModel: CellViewModel = hiltViewModel(),
) {
+ val conversationSearchBarState = rememberSearchbarState()
+
+ LaunchedEffect(conversationSearchBarState.searchQueryTextState.text) {
+ viewModel.onSearchQueryUpdated(conversationSearchBarState.searchQueryTextState.text.toString())
+ }
+
+ BackHandler(conversationSearchBarState.isSearchActive) {
+ conversationSearchBarState.closeSearch()
+ }
ConversationFilesScreenContent(
navigator = navigator,
currentNodeUuid = viewModel.currentNodeUuid(),
+ conversationSearchBarState = conversationSearchBarState,
isRecycleBin = viewModel.isRecycleBin(),
actions = viewModel.actions,
pagingListItems = viewModel.nodesFlow.collectAsLazyPagingItems(),
downloadFileSheet = viewModel.downloadFileSheet,
menu = viewModel.menu,
+ isSearchResult = viewModel.hasSearchQuery(),
isRestoreInProgress = viewModel.isRestoreInProgress.collectAsState().value,
isDeleteInProgress = viewModel.isDeleteInProgress.collectAsState().value,
isRefreshing = viewModel.isPullToRefresh.collectAsState(),
@@ -120,6 +140,8 @@ fun ConversationFilesScreen(
fun ConversationFilesScreenContent(
navigator: WireNavigator,
currentNodeUuid: String?,
+ conversationSearchBarState: SearchBarState,
+ isSearchResult: Boolean,
actions: Flow,
pagingListItems: LazyPagingItems,
downloadFileSheet: StateFlow,
@@ -176,37 +198,57 @@ fun ConversationFilesScreenContent(
}
)
- WireScaffold(
+ CollapsingTopBarScaffold(
modifier = modifier,
- snackbarHost = {},
- topBar = {
- Column {
- WireCenterAlignedTopAppBar(
- onNavigationPressed = { navigator.navigateBack() },
- title = screenTitle ?: stringResource(R.string.conversation_files_title),
- navigationIconType = NavigationIconType.Back(),
- elevation = dimensions().spacing0x,
- actions = {
- if (!isRecycleBin) {
- MoreOptionIcon(
- contentDescription = R.string.content_description_conversation_files_more_button,
- onButtonClicked = { optionsBottomSheetState.show() }
- )
+ topBarHeader = {
+ AnimatedVisibility(
+ modifier = Modifier.background(MaterialTheme.colorScheme.background),
+ visible = !conversationSearchBarState.isSearchActive,
+ enter = fadeIn() + expandVertically(),
+ exit = shrinkVertically() + fadeOut(),
+ ) {
+ Column {
+ WireCenterAlignedTopAppBar(
+ onNavigationPressed = { navigator.navigateBack() },
+ title = screenTitle ?: stringResource(R.string.conversation_files_title),
+ navigationIconType = NavigationIconType.Back(),
+ elevation = dimensions().spacing0x,
+ actions = {
+ if (!isRecycleBin) {
+ MoreOptionIcon(
+ contentDescription = R.string.content_description_conversation_files_more_button,
+ onButtonClicked = { optionsBottomSheetState.show() }
+ )
+ }
}
- }
- )
- breadcrumbs?.let {
- Breadcrumbs(
- modifier = Modifier
- .height(dimensions().spacing40x)
- .fillMaxWidth(),
- isRecycleBin = isRecycleBin,
- pathSegments = it,
- onBreadcrumbsFolderClick = onBreadcrumbsFolderClick
)
+ breadcrumbs?.let {
+ Breadcrumbs(
+ modifier = Modifier
+ .height(dimensions().spacing32x)
+ .fillMaxWidth(),
+ isRecycleBin = isRecycleBin,
+ pathSegments = it,
+ onBreadcrumbsFolderClick = onBreadcrumbsFolderClick
+ )
+ }
}
}
},
+ topBarCollapsing = {
+ AnimatedVisibility(
+ visible = conversationSearchBarState.isSearchVisible,
+ enter = fadeIn() + slideInVertically(),
+ exit = fadeOut() + slideOutVertically()
+ ) {
+ SearchTopBar(
+ isSearchActive = conversationSearchBarState.isSearchActive,
+ searchBarHint = stringResource(R.string.search_text_input_hint_for_files_folders_in_conversation),
+ searchQueryTextState = conversationSearchBarState.searchQueryTextState,
+ onActiveChanged = conversationSearchBarState::searchActiveChanged,
+ )
+ }
+ },
floatingActionButton = {
if (isFabVisible) {
AnimatedVisibility(
@@ -234,15 +276,16 @@ fun ConversationFilesScreenContent(
)
}
}
- }
- ) { innerPadding ->
- Box(modifier = Modifier.padding(innerPadding)) {
+ },
+ ) {
+ Box {
CellScreenContent(
actionsFlow = actions,
pagingListItems = pagingListItems,
sendIntent = sendIntent,
downloadFileState = downloadFileSheet,
menuState = menu,
+ isSearchResult = isSearchResult,
isAllFiles = false,
isRestoreInProgress = isRestoreInProgress,
isDeleteInProgress = isDeleteInProgress,
@@ -322,6 +365,8 @@ fun PreviewConversationFilesScreen() {
ConversationFilesScreenContent(
navigator = PreviewNavigator,
currentNodeUuid = "conversationId",
+ conversationSearchBarState = rememberSearchbarState(),
+ isSearchResult = false,
actions = flowOf(),
pagingListItems = MutableStateFlow(
PagingData.from(
diff --git a/features/cells/src/main/java/com/wire/android/feature/cells/ui/ConversationFilesWithSlideInTransitionScreen.kt b/features/cells/src/main/java/com/wire/android/feature/cells/ui/ConversationFilesWithSlideInTransitionScreen.kt
index dc3eb3aee8f..1b50601fce5 100644
--- a/features/cells/src/main/java/com/wire/android/feature/cells/ui/ConversationFilesWithSlideInTransitionScreen.kt
+++ b/features/cells/src/main/java/com/wire/android/feature/cells/ui/ConversationFilesWithSlideInTransitionScreen.kt
@@ -17,6 +17,7 @@
*/
package com.wire.android.feature.cells.ui
+import androidx.activity.compose.BackHandler
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.collectAsState
@@ -31,6 +32,7 @@ import com.wire.android.navigation.NavigationCommand
import com.wire.android.navigation.WireNavigator
import com.wire.android.navigation.annotation.features.cells.WireDestination
import com.wire.android.navigation.style.SlideNavigationAnimation
+import com.wire.android.ui.common.search.rememberSearchbarState
@WireDestination(
style = SlideNavigationAnimation::class,
@@ -42,6 +44,15 @@ fun ConversationFilesWithSlideInTransitionScreen(
cellFilesNavArgs: CellFilesNavArgs,
viewModel: CellViewModel = hiltViewModel(),
) {
+ val conversationSearchBarState = rememberSearchbarState()
+
+ LaunchedEffect(conversationSearchBarState.searchQueryTextState.text) {
+ viewModel.onSearchQueryUpdated(conversationSearchBarState.searchQueryTextState.text.toString())
+ }
+
+ BackHandler(conversationSearchBarState.isSearchActive) {
+ conversationSearchBarState.closeSearch()
+ }
LaunchedEffect(viewModel.navigateToRecycleBinRoot.collectAsState().value) {
if (viewModel.navigateToRecycleBinRoot.value) {
@@ -60,6 +71,8 @@ fun ConversationFilesWithSlideInTransitionScreen(
ConversationFilesScreenContent(
navigator = navigator,
currentNodeUuid = viewModel.currentNodeUuid(),
+ conversationSearchBarState = conversationSearchBarState,
+ isSearchResult = false,
screenTitle = stringResource(R.string.conversation_files_title),
isRecycleBin = viewModel.isRecycleBin(),
actions = viewModel.actions,
diff --git a/features/cells/src/main/res/values/strings.xml b/features/cells/src/main/res/values/strings.xml
index 11ac27a2579..369c99457cc 100644
--- a/features/cells/src/main/res/values/strings.xml
+++ b/features/cells/src/main/res/values/strings.xml
@@ -194,4 +194,5 @@
saved to Downloads
Show
Downloading…
+ Search files or folders