Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
4706eca
feat: version history screen
ohassine Nov 26, 2025
a1bc8ef
feat: cleanup
ohassine Nov 26, 2025
857cdf0
feat: cleanup
ohassine Nov 26, 2025
4eefc69
Merge remote-tracking branch 'origin/develop' into fetch-node-versions
ohassine Nov 26, 2025
6c182d8
feat: fetch and display node versions
ohassine Nov 27, 2025
ce46c89
feat: fetch and display node versions
ohassine Nov 27, 2025
f4dd342
feat: unit test
ohassine Nov 27, 2025
92c5b49
feat: kalium
ohassine Nov 27, 2025
ea05b7a
Merge remote-tracking branch 'origin/develop' into fetch-and-display-…
ohassine Nov 27, 2025
c24e792
Merge remote-tracking branch 'origin/develop' into fetch-and-display-…
ohassine Nov 27, 2025
6883656
Merge remote-tracking branch 'origin/develop' into fetch-and-display-…
ohassine Nov 27, 2025
ef20c4c
feat: add feature flag
ohassine Nov 27, 2025
9e3644e
feat: add a TODO
ohassine Nov 27, 2025
794168d
Merge remote-tracking branch 'origin/develop' into fetch-and-display-…
ohassine Nov 27, 2025
db5d4bf
feat: cleanup
ohassine Nov 27, 2025
fec23eb
feat: cleanup
ohassine Nov 27, 2025
0e97c39
feat: cleanup
ohassine Nov 27, 2025
3471ce3
feat: detekt
ohassine Nov 28, 2025
03184d8
feat: kalium reference
ohassine Nov 28, 2025
6913bc2
Merge remote-tracking branch 'origin/develop' into fetch-and-display-…
ohassine Nov 28, 2025
2752835
feat: cleanup
ohassine Nov 28, 2025
357148b
feat: restore node version
ohassine Dec 2, 2025
303ec8f
feat: cleanup
ohassine Dec 3, 2025
5181f83
feat: add file name to top bar
ohassine Dec 3, 2025
3a07db6
feat: pull to refresh
ohassine Dec 3, 2025
4f7c981
feat: dismissOnClickOutside dialog
ohassine Dec 3, 2025
189915c
feat: download node version
ohassine Dec 4, 2025
8e715d1
Merge remote-tracking branch 'origin/develop' into download-version
ohassine Dec 4, 2025
41dbd05
feat: address comments
ohassine Dec 4, 2025
773f29d
Merge remote-tracking branch 'origin/develop' into fetch-and-display-…
ohassine Dec 4, 2025
18a3787
feat: conflicts
ohassine Dec 4, 2025
46de6bf
feat: kalium
ohassine Dec 4, 2025
775abed
feat: show version history in bottom sheet
ohassine Dec 4, 2025
0a14b38
Merge remote-tracking branch 'origin/fetch-and-display-node-versions'…
ohassine Dec 4, 2025
81249c4
feat: conflicts
ohassine Dec 4, 2025
0b5131b
feat: detekt
ohassine Dec 5, 2025
4c71e6c
feat: add TODO
ohassine Dec 5, 2025
4d4f97b
Merge remote-tracking branch 'origin/develop' into download-version
ohassine Dec 5, 2025
f9c7c34
feat: conflicts
ohassine Dec 5, 2025
55e15dd
feat: detekt
ohassine Dec 5, 2025
79bb499
feat: test
ohassine Dec 5, 2025
394f5db
feat: add TODO to handle error case
ohassine Dec 5, 2025
e41c4fc
feat: use AnimatedContent
ohassine Dec 5, 2025
444cfda
feat: lint
ohassine Dec 5, 2025
9afbd69
feat: lint
ohassine Dec 5, 2025
4095775
feat: conflicts
ohassine Dec 5, 2025
b8f18a5
feat: kalium reference
ohassine Dec 5, 2025
4fde618
feat: cleanup
ohassine Dec 8, 2025
55fa027
feat: cleanup
ohassine Dec 8, 2025
b95e72c
feat: conflicts
ohassine Dec 8, 2025
fc65c42
feat: add apple target class
ohassine Dec 8, 2025
1e28823
feat: conflicts
ohassine Dec 8, 2025
5cf6b8a
Merge branch 'restore-node-version' into download-version
ohassine Dec 8, 2025
f880a53
Merge remote-tracking branch 'origin/restore-node-version' into downl…
ohassine Dec 8, 2025
ab90809
feat: cleanup
ohassine Dec 8, 2025
8216d62
feat: cleanup
ohassine Dec 9, 2025
b58a6c6
Merge branch 'develop' into download-version
ohassine Dec 9, 2025
54d6af5
feat: cleanup
ohassine Dec 9, 2025
b515966
feat: cleanup
ohassine Dec 9, 2025
1ae12b9
feat: detekt
ohassine Dec 9, 2025
832d596
feat: cleanup
ohassine Dec 9, 2025
abb9e9c
fix: resolve conflicts
ohassine Dec 17, 2025
0ed6f22
Merge branch 'develop' into download-version
ohassine Dec 17, 2025
2e45dd9
fix: cleanup
ohassine Dec 17, 2025
fba0da2
fix: test
ohassine Dec 17, 2025
bc7ccea
Merge remote-tracking branch 'origin/develop' into download-version
ohassine Dec 18, 2025
0b35980
fix: support android 8–9
ohassine Dec 18, 2025
d555ba0
fix: lint
ohassine Dec 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import com.wire.kalium.cells.domain.usecase.AddAttachmentDraftUseCase
import com.wire.kalium.cells.domain.usecase.CreateFolderUseCase
import com.wire.kalium.cells.domain.usecase.DeleteCellAssetUseCase
import com.wire.kalium.cells.domain.usecase.DownloadCellFileUseCase
import com.wire.kalium.cells.domain.usecase.DownloadCellVersionUseCase
import com.wire.kalium.cells.domain.usecase.GetAllTagsUseCase
import com.wire.kalium.cells.domain.usecase.GetCellFileUseCase
import com.wire.kalium.cells.domain.usecase.GetEditorUrlUseCase
Expand Down Expand Up @@ -111,7 +112,7 @@ class CellsModule {

@ViewModelScoped
@Provides
fun provideDownloadUseCase(cellsScope: CellsScope): DownloadCellFileUseCase = cellsScope.downloadFile
fun provideDownloadUseCase(cellsScope: CellsScope): DownloadCellFileUseCase = cellsScope.downloadCellFile

@ViewModelScoped
@Provides
Expand Down Expand Up @@ -220,4 +221,9 @@ class CellsModule {
@Provides
fun provideRestoreNodeVersionUseCase(cellsScope: CellsScope): RestoreNodeVersionUseCase =
cellsScope.restoreNodeVersion

@ViewModelScoped
@Provides
fun provideDownloadCellVersionUseCase(cellsScope: CellsScope): DownloadCellVersionUseCase =
cellsScope.downloadCellVersion
}
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ import com.wire.android.util.normalizeLink
import com.wire.android.util.serverDate
import com.wire.android.util.ui.PreviewMultipleThemes
import com.wire.android.util.ui.UIText
import com.wire.android.util.ui.openDownloadFolder
import com.wire.android.util.openDownloadFolder
import com.wire.kalium.common.error.NetworkFailure
import com.wire.kalium.logic.data.conversation.Conversation
import com.wire.kalium.logic.data.conversation.Conversation.TypingIndicatorMode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ import com.wire.android.ui.theme.wireDimensions
import com.wire.android.util.ui.PreviewMultipleThemes
import com.wire.android.util.ui.SnackBarMessageHandler
import com.wire.android.util.ui.UIText
import com.wire.android.util.ui.openDownloadFolder
import com.wire.android.util.openDownloadFolder
import com.wire.kalium.logic.data.id.ConversationId
import kotlinx.coroutines.launch
import kotlinx.serialization.Serializable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ import com.wire.android.util.permission.rememberWriteStoragePermissionFlow
import com.wire.android.util.startFileShareIntent
import com.wire.android.util.ui.PreviewMultipleThemes
import com.wire.android.util.ui.SnackBarMessageHandler
import com.wire.android.util.ui.openDownloadFolder
import com.wire.android.util.openDownloadFolder

@OptIn(ExperimentalCoilApi::class)
@WireDestination(
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1516,7 +1516,6 @@ registriert. Bitte versuchen Sie es mit einer anderen.</string>
<string name="ten_seconds_short_label">10 Sek</string>
<string name="label_debug_data">Daten zur Fehlerbehebung</string>
<string name="label_log_options_description">"Dadurch werden anonymisierte Informationen zur Fehlerbehebung lokal gespeichert. "</string>
<string name="label_no_application_found_open_downloads_folder">"Keine Anwendung zum Öffnen des Download-Ordners gefunden"</string>
<string name="notification_obfuscated_message_title">Jemand</string>
<string name="notification_obfuscated_message_content">Hat eine selbstlöschende Nachricht gesendet</string>
<string name="settings_licenses_settings_label">Lizenzen</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-hu/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1418,7 +1418,6 @@ Kérjük, próbálja meg újra.</string>
<string name="label_debug_data">Hibakeresési információ</string>
<string name="title_internal_debugging">Belső hibakeresés</string>
<string name="label_log_options_description">"Ez helyileg tárolja az anonimizált hibaelhárítási információkat. "</string>
<string name="label_no_application_found_open_downloads_folder">"Nem található alkalmazás a letöltési mappa megnyitásához"</string>
<string name="notification_obfuscated_message_title">Valaki</string>
<string name="notification_obfuscated_message_content">Önmegsemmisítő üzenetet küldött</string>
<string name="settings_licenses_settings_label">Licenc információ</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-it/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1098,7 +1098,6 @@ registrato. Sei pregato di riprovare.</string>
<string name="label_debug_data">Dati di debug</string>
<string name="title_internal_debugging">Debug interno</string>
<string name="label_log_options_description">"Questo memorizza localmente le informazioni anonime di risoluzione dei problemi. "</string>
<string name="label_no_application_found_open_downloads_folder">"Nessun'applicazione trovata per aprire la cartella dei download"</string>
<string name="notification_obfuscated_message_title">Qualcuno</string>
<string name="notification_obfuscated_message_content">Ha inviato un messaggio a eliminazione automatica</string>
<string name="settings_licenses_settings_label">Informazioni sulla licenza</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-pt/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1358,7 +1358,6 @@ registrado. Tente novamente.</string>
<string name="label_debug_data">Dados de depuração</string>
<string name="title_internal_debugging">Depuração interna</string>
<string name="label_log_options_description">"Isso armazena informações anônimas de solução de problemas localmente. "</string>
<string name="label_no_application_found_open_downloads_folder">"Nenhum aplicativo encontrado para abrir a pasta de downloads"</string>
<string name="notification_obfuscated_message_title">Alguém</string>
<string name="notification_obfuscated_message_content">Enviou uma mensagem de auto-exclusão</string>
<string name="settings_licenses_settings_label">Informações de Licença</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-ru/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1658,7 +1658,6 @@
<string name="label_debug_data">Отладочные данные</string>
<string name="title_internal_debugging">Внутренняя отладка</string>
<string name="label_log_options_description">"Это позволяет локально сохранять анонимизированную информацию о неполадках. "</string>
<string name="label_no_application_found_open_downloads_folder">"Не найдено приложение для открытия папки загрузок"</string>
<string name="notification_obfuscated_message_title">Кто-то</string>
<string name="notification_obfuscated_message_content">Отправил самоудаляющееся сообщение</string>
<string name="settings_licenses_settings_label">Информация о лицензии</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-si/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1427,7 +1427,6 @@
<string name="label_debug_data">නිදෝස්කරණ දත්ත</string>
<string name="title_internal_debugging">අභ්‍යන්තර නිදොස්කරණය</string>
<string name="label_log_options_description">"මෙය නිර්නාමික දෝෂ නිරාකරණ තොරතුරු ස්ථානීයව ගබඩා කරයි. "</string>
<string name="label_no_application_found_open_downloads_folder">"බාගැනීමේ බහාලුම ඇරීමට සුදුසු යෙදුමක් හමු නොවිණි"</string>
<string name="notification_obfuscated_message_title">යමෙක්</string>
<string name="notification_obfuscated_message_content">ඉබේ මැකෙන පණිවිඩයක් එවා ඇත</string>
<string name="settings_licenses_settings_label">බලපත්‍රයෙහි තොරතුරු</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1624,7 +1624,6 @@ In group conversations, the group admin can overwrite this setting.</string>
<string name="label_debug_data">Debug data</string>
<string name="title_internal_debugging">Internal debugging</string>
<string name="label_log_options_description">"This stores anonymized troubleshooting information locally. "</string>
<string name="label_no_application_found_open_downloads_folder">"No application found to open downloads folder"</string>
<string name="notification_obfuscated_message_title">Someone</string>
<string name="notification_obfuscated_message_content">Sent a self-deleting message</string>
<string name="settings_licenses_settings_label">License Information</string>
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -15,16 +15,19 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see http://www.gnu.org/licenses/.
*/
package com.wire.android.util.ui
package com.wire.android.util

import android.app.DownloadManager
import android.content.ActivityNotFoundException
import android.content.Context
import android.content.Intent
import android.widget.Toast
import com.wire.android.ui.common.R

fun openDownloadFolder(context: Context) {
val errorToastMessage = context.resources.getString(com.wire.android.R.string.label_no_application_found_open_downloads_folder)
fun openDownloadFolder(
context: Context,
) {
val errorToastMessage = context.resources.getString(R.string.label_no_application_found_open_downloads_folder)

Check warning on line 30 in core/ui-common/src/main/kotlin/com/wire/android/util/DownloadFolderOpener.kt

View check run for this annotation

Codecov / codecov/patch

core/ui-common/src/main/kotlin/com/wire/android/util/DownloadFolderOpener.kt#L30

Added line #L30 was not covered by tests
try {
context.startActivity(Intent(DownloadManager.ACTION_VIEW_DOWNLOADS))
} catch (e: ActivityNotFoundException) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,14 @@
fun String.capitalizeFirstLetter(): String = lowercase().replaceFirstChar(Char::titlecaseChar)

fun String.normalizeFileName(): String = this.replace("/", "")

fun String.addBeforeExtension(insert: String): String {
val dotIndex = this.lastIndexOf('.')

Check warning on line 52 in core/ui-common/src/main/kotlin/com/wire/android/util/StringUtils.kt

View check run for this annotation

Codecov / codecov/patch

core/ui-common/src/main/kotlin/com/wire/android/util/StringUtils.kt#L52

Added line #L52 was not covered by tests
return if (dotIndex != -1) {
val name = this.take(dotIndex)
val ext = this.substring(dotIndex)
"${name}_$insert$ext"

Check warning on line 56 in core/ui-common/src/main/kotlin/com/wire/android/util/StringUtils.kt

View check run for this annotation

Codecov / codecov/patch

core/ui-common/src/main/kotlin/com/wire/android/util/StringUtils.kt#L54-L56

Added lines #L54 - L56 were not covered by tests
} else {
this + insert

Check warning on line 58 in core/ui-common/src/main/kotlin/com/wire/android/util/StringUtils.kt

View check run for this annotation

Codecov / codecov/patch

core/ui-common/src/main/kotlin/com/wire/android/util/StringUtils.kt#L58

Added line #L58 was not covered by tests
}
}
1 change: 1 addition & 0 deletions core/ui-common/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,5 @@
<string name="size_unit_gigabytes">GB</string>
<string name="size_unit_terabytes">TB</string>
<string name="content_description_check">Haken</string>
<string name="label_no_application_found_open_downloads_folder">"Keine Anwendung zum Öffnen des Download-Ordners gefunden"</string>
</resources>
1 change: 1 addition & 0 deletions core/ui-common/src/main/res/values-hu/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@
-->
<resources>
<string name="content_description_check">Pipa jel</string>
<string name="label_no_application_found_open_downloads_folder">"Nem található alkalmazás a letöltési mappa megnyitásához"</string>
</resources>
1 change: 1 addition & 0 deletions core/ui-common/src/main/res/values-it/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@
-->
<resources>
<string name="content_description_check">Segno di spunta</string>
<string name="label_no_application_found_open_downloads_folder">"Nessun'applicazione trovata per aprire la cartella dei download"</string>
</resources>
1 change: 1 addition & 0 deletions core/ui-common/src/main/res/values-pt/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@
-->
<resources>
<string name="content_description_check">Marca de seleção</string>
<string name="label_no_application_found_open_downloads_folder">"Nenhum aplicativo encontrado para abrir a pasta de downloads"</string>
</resources>
1 change: 1 addition & 0 deletions core/ui-common/src/main/res/values-ru/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,5 @@
<string name="size_unit_gigabytes">GB</string>
<string name="size_unit_terabytes">TB</string>
<string name="content_description_check">Отметка</string>
<string name="label_no_application_found_open_downloads_folder">"Не найдено приложение для открытия папки загрузок"</string>
</resources>
1 change: 1 addition & 0 deletions core/ui-common/src/main/res/values-si/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@
-->
<resources>
<string name="content_description_check">හරි ලකුණ</string>
<string name="label_no_application_found_open_downloads_folder">"බාගැනීමේ බහාලුම ඇරීමට සුදුසු යෙදුමක් හමු නොවිණි"</string>
</resources>
2 changes: 1 addition & 1 deletion core/ui-common/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
<string name="label_ok">Ok</string>
<string name="label_cancel">Cancel</string>
<string name="label_no_selected_date">No selected date</string>

<string name="content_description_check">Check mark</string>
<string name="label_no_application_found_open_downloads_folder">"No application found to open downloads folder"</string>

<string name="size_unit_bytes">B</string>
<string name="size_unit_kilobytes">KB</string>
Expand Down
3 changes: 2 additions & 1 deletion default.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@
"analytics_app_key": "8ffae535f1836ed5f58fd5c8a11c00eca07c5438",
"analytics_server_url": "https://wire.count.ly/",
"enable_new_registration": true,
"use_async_flush_logging": true
"use_async_flush_logging": true,
"collabora_integration": true
},
"internal": {
"application_id": "com.wire.internal",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ internal fun CellScreenContent(
isSearchResult: Boolean = false,
isFiltering: Boolean = false,
retryEditNodeError: (String) -> Unit = {},
showVersionHistoryScreen: (String, String) -> Unit = { _, _ -> }
showVersionHistoryScreen: (String, String) -> Unit = { _, _ -> },
) {

val context = LocalContext.current
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ data class CellVersion(
val modifiedAt: String = "",
val modifiedBy: String = "",
val fileSize: String = "",
val isCurrentVersion: Boolean = false
val isCurrentVersion: Boolean = false,
val presignedUrl: String? = null
)

data class VersionGroup(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ import com.wire.android.ui.theme.wireDimensions

@Composable
fun VersionActionBottomSheet(
sheetState: WireModalSheetState<CellVersion>,
sheetState: WireModalSheetState<Pair<String, CellVersion>>,
onDismiss: () -> Unit,
onRestoreVersionClicked: (String) -> Unit,
onDownloadVersionClicked: (String) -> Unit,
onDownloadVersionClicked: (String, String) -> Unit,
) {
WireModalSheetLayout(
onDismissRequest = onDismiss,
Expand All @@ -52,13 +52,13 @@ fun VersionActionBottomSheet(
add {
RestoreVersionModalItem(
title = stringResource(R.string.restore_version_bottom_sheet_item_label),
onClicked = { onRestoreVersionClicked(state.versionId) },
onClicked = { onRestoreVersionClicked(state.second.versionId) },
)
}
add {
DownloadVersionModalItem(
title = stringResource(R.string.download_version_bottom_sheet_item_label),
onClicked = { onDownloadVersionClicked(state.versionId) },
onClicked = { onDownloadVersionClicked(state.second.versionId, state.first) },
)
}
}
Expand Down Expand Up @@ -111,10 +111,10 @@ private fun DownloadVersionModalItem(
private fun PreviewCellsOptionsBottomSheet() {
WireTheme {
VersionActionBottomSheet(
sheetState = rememberWireModalSheetState(WireSheetValue.Expanded(value = CellVersion())),
sheetState = rememberWireModalSheetState(WireSheetValue.Expanded(value = "" to CellVersion())),
onDismiss = {},
onRestoreVersionClicked = {},
onDownloadVersionClicked = {}
onDownloadVersionClicked = { _, _ -> }
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
package com.wire.android.feature.cells.ui.versioning

class VersionHistoryNavArgs(
val uuid: String? = null,
val fileName: String? = null
val uuid: String,
val fileName: String
)
Loading