From f6b38d2b494cb18b4be6c32a5c57e1717bf88649 Mon Sep 17 00:00:00 2001 From: ariskotsomitopoulos Date: Mon, 21 Mar 2022 13:13:09 +0200 Subject: [PATCH 001/561] Add runBlocking when decrypt events to avoid thread switching when accessing the realm instance (thread local) --- .../database/helper/ThreadSummaryHelper.kt | 19 ++++-- .../sync/handler/room/RoomSyncHandler.kt | 66 ++++++++++--------- 2 files changed, 48 insertions(+), 37 deletions(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/helper/ThreadSummaryHelper.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/helper/ThreadSummaryHelper.kt index 7087f07162..8d9304f61b 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/helper/ThreadSummaryHelper.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/helper/ThreadSummaryHelper.kt @@ -20,6 +20,7 @@ import io.realm.Realm import io.realm.RealmQuery import io.realm.Sort import io.realm.kotlin.createObject +import kotlinx.coroutines.runBlocking import org.matrix.android.sdk.api.session.crypto.CryptoService import org.matrix.android.sdk.api.session.crypto.MXCryptoError import org.matrix.android.sdk.api.session.events.model.Event @@ -127,7 +128,7 @@ private fun EventEntity.toTimelineEventEntity(roomMemberContentsByUser: HashMap< return timelineEventEntity } -internal suspend fun ThreadSummaryEntity.Companion.createOrUpdate( +internal fun ThreadSummaryEntity.Companion.createOrUpdate( threadSummaryType: ThreadSummaryUpdateType, realm: Realm, roomId: String, @@ -153,10 +154,18 @@ internal suspend fun ThreadSummaryEntity.Companion.createOrUpdate( } val rootThreadEventEntity = createEventEntity(roomId, rootThreadEvent, realm).also { - decryptIfNeeded(cryptoService, it, roomId) + try { + decryptIfNeeded(cryptoService, it, roomId) + } catch (e: InterruptedException) { + Timber.i("Decryption got interrupted") + } } val latestThreadEventEntity = createLatestEventEntity(roomId, rootThreadEvent, roomMemberContentsByUser, realm)?.also { - decryptIfNeeded(cryptoService, it, roomId) + try { + decryptIfNeeded(cryptoService, it, roomId) + } catch (e: InterruptedException) { + Timber.i("Decryption got interrupted") + } } val isUserParticipating = rootThreadEvent.unsignedData.relations.latestThread.isUserParticipating == true || rootThreadEvent.senderId == userId roomMemberContentsByUser.addSenderState(realm, roomId, rootThreadEvent.senderId) @@ -204,8 +213,8 @@ internal suspend fun ThreadSummaryEntity.Companion.createOrUpdate( } } -private suspend fun decryptIfNeeded(cryptoService: CryptoService?, eventEntity: EventEntity, roomId: String) { - cryptoService ?: return +private fun decryptIfNeeded(cryptoService: CryptoService?, eventEntity: EventEntity, roomId: String) = runBlocking { + cryptoService ?: return@runBlocking val event = eventEntity.asDomain() if (event.isEncrypted() && event.mxDecryptionResult == null && event.eventId != null) { try { diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/room/RoomSyncHandler.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/room/RoomSyncHandler.kt index 8fe85f0d31..51e32b25cb 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/room/RoomSyncHandler.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/room/RoomSyncHandler.kt @@ -102,11 +102,11 @@ internal class RoomSyncHandler @Inject constructor(private val readReceiptHandle data class LEFT(val data: Map) : HandlingStrategy() } - suspend fun handle(realm: Realm, - roomsSyncResponse: RoomsSyncResponse, - isInitialSync: Boolean, - aggregator: SyncResponsePostTreatmentAggregator, - reporter: ProgressReporter? = null) { + fun handle(realm: Realm, + roomsSyncResponse: RoomsSyncResponse, + isInitialSync: Boolean, + aggregator: SyncResponsePostTreatmentAggregator, + reporter: ProgressReporter? = null) { Timber.v("Execute transaction from $this") handleRoomSync(realm, HandlingStrategy.JOINED(roomsSyncResponse.join), isInitialSync, aggregator, reporter) handleRoomSync(realm, HandlingStrategy.INVITED(roomsSyncResponse.invite), isInitialSync, aggregator, reporter) @@ -121,11 +121,11 @@ internal class RoomSyncHandler @Inject constructor(private val readReceiptHandle } // PRIVATE METHODS ***************************************************************************** - private suspend fun handleRoomSync(realm: Realm, - handlingStrategy: HandlingStrategy, - isInitialSync: Boolean, - aggregator: SyncResponsePostTreatmentAggregator, - reporter: ProgressReporter?) { + private fun handleRoomSync(realm: Realm, + handlingStrategy: HandlingStrategy, + isInitialSync: Boolean, + aggregator: SyncResponsePostTreatmentAggregator, + reporter: ProgressReporter?) { val insertType = if (isInitialSync) { EventInsertType.INITIAL_SYNC } else { @@ -158,11 +158,11 @@ internal class RoomSyncHandler @Inject constructor(private val readReceiptHandle realm.insertOrUpdate(rooms) } - private suspend fun insertJoinRoomsFromInitSync(realm: Realm, - handlingStrategy: HandlingStrategy.JOINED, - syncLocalTimeStampMillis: Long, - aggregator: SyncResponsePostTreatmentAggregator, - reporter: ProgressReporter?) { + private fun insertJoinRoomsFromInitSync(realm: Realm, + handlingStrategy: HandlingStrategy.JOINED, + syncLocalTimeStampMillis: Long, + aggregator: SyncResponsePostTreatmentAggregator, + reporter: ProgressReporter?) { val bestChunkSize = computeBestChunkSize( listSize = handlingStrategy.data.keys.size, limit = (initialSyncStrategy as? InitialSyncStrategy.Optimized)?.maxRoomsToInsert ?: Int.MAX_VALUE @@ -200,12 +200,12 @@ internal class RoomSyncHandler @Inject constructor(private val readReceiptHandle } } - private suspend fun handleJoinedRoom(realm: Realm, - roomId: String, - roomSync: RoomSync, - insertType: EventInsertType, - syncLocalTimestampMillis: Long, - aggregator: SyncResponsePostTreatmentAggregator): RoomEntity { + private fun handleJoinedRoom(realm: Realm, + roomId: String, + roomSync: RoomSync, + insertType: EventInsertType, + syncLocalTimestampMillis: Long, + aggregator: SyncResponsePostTreatmentAggregator): RoomEntity { Timber.v("Handle join sync for room $roomId") val ephemeralResult = (roomSync.ephemeral as? LazyRoomSyncEphemeral.Parsed) @@ -351,15 +351,15 @@ internal class RoomSyncHandler @Inject constructor(private val readReceiptHandle return roomEntity } - private suspend fun handleTimelineEvents(realm: Realm, - roomId: String, - roomEntity: RoomEntity, - eventList: List, - prevToken: String? = null, - isLimited: Boolean = true, - insertType: EventInsertType, - syncLocalTimestampMillis: Long, - aggregator: SyncResponsePostTreatmentAggregator): ChunkEntity { + private fun handleTimelineEvents(realm: Realm, + roomId: String, + roomEntity: RoomEntity, + eventList: List, + prevToken: String? = null, + isLimited: Boolean = true, + insertType: EventInsertType, + syncLocalTimestampMillis: Long, + aggregator: SyncResponsePostTreatmentAggregator): ChunkEntity { val lastChunk = ChunkEntity.findLastForwardChunkOfRoom(realm, roomEntity.roomId) if (isLimited && lastChunk != null) { lastChunk.deleteOnCascade(deleteStateEvents = false, canDeleteRoot = true) @@ -387,8 +387,10 @@ internal class RoomSyncHandler @Inject constructor(private val readReceiptHandle val isInitialSync = insertType == EventInsertType.INITIAL_SYNC if (event.isEncrypted() && !isInitialSync) { - runBlocking { + try { decryptIfNeeded(event, roomId) + } catch (e: InterruptedException) { + Timber.i("Decryption got interrupted") } } var contentToInject: String? = null @@ -504,7 +506,7 @@ internal class RoomSyncHandler @Inject constructor(private val readReceiptHandle } } - private suspend fun decryptIfNeeded(event: Event, roomId: String) { + private fun decryptIfNeeded(event: Event, roomId: String) = runBlocking { try { // Event from sync does not have roomId, so add it to the event first val result = cryptoService.decryptEvent(event.copy(roomId = roomId), "") From a959a15636cf7ad783aa8ca2ab8c07d611941d25 Mon Sep 17 00:00:00 2001 From: ariskotsomitopoulos Date: Mon, 21 Mar 2022 13:18:20 +0200 Subject: [PATCH 002/561] Add changelog --- changelog.d/5592.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/5592.bugfix diff --git a/changelog.d/5592.bugfix b/changelog.d/5592.bugfix new file mode 100644 index 0000000000..f0df3dc646 --- /dev/null +++ b/changelog.d/5592.bugfix @@ -0,0 +1 @@ +Improve/fix crashes on messages decryption From 277619d833ac703710f6a1ecc6c897d6311898ed Mon Sep 17 00:00:00 2001 From: ariskotsomitopoulos Date: Mon, 21 Mar 2022 13:39:15 +0200 Subject: [PATCH 003/561] Format code & add comments --- .../database/helper/ThreadSummaryHelper.kt | 1 + .../room/timeline/TimelineEventDecryptor.kt | 24 +++++++++---------- .../sync/handler/room/RoomSyncHandler.kt | 1 + 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/helper/ThreadSummaryHelper.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/helper/ThreadSummaryHelper.kt index 8d9304f61b..bfe310cd8b 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/helper/ThreadSummaryHelper.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/helper/ThreadSummaryHelper.kt @@ -213,6 +213,7 @@ internal fun ThreadSummaryEntity.Companion.createOrUpdate( } } +// note: runBlocking should be used here while we are in realm single thread executor, to avoid thread switching private fun decryptIfNeeded(cryptoService: CryptoService?, eventEntity: EventEntity, roomId: String) = runBlocking { cryptoService ?: return@runBlocking val event = eventEntity.asDomain() diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/TimelineEventDecryptor.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/TimelineEventDecryptor.kt index 3ddd877b78..e225b31f45 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/TimelineEventDecryptor.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/TimelineEventDecryptor.kt @@ -101,9 +101,7 @@ internal class TimelineEventDecryptor @Inject constructor( executor?.execute { Realm.getInstance(realmConfiguration).use { realm -> try { - runBlocking { - processDecryptRequest(request, realm) - } + processDecryptRequest(request, realm) } catch (e: InterruptedException) { Timber.i("Decryption got interrupted") } @@ -113,16 +111,18 @@ internal class TimelineEventDecryptor @Inject constructor( private fun threadAwareNonEncryptedEvents(request: DecryptionRequest, realm: Realm) { val event = request.event - realm.executeTransaction { - val eventId = event.eventId ?: return@executeTransaction - val eventEntity = EventEntity - .where(it, eventId = eventId) - .findFirst() - val decryptedEvent = eventEntity?.asDomain() - threadsAwarenessHandler.makeEventThreadAware(realm, event.roomId, decryptedEvent, eventEntity) + realm.executeTransaction { + val eventId = event.eventId ?: return@executeTransaction + val eventEntity = EventEntity + .where(it, eventId = eventId) + .findFirst() + val decryptedEvent = eventEntity?.asDomain() + threadsAwarenessHandler.makeEventThreadAware(realm, event.roomId, decryptedEvent, eventEntity) } } - private suspend fun processDecryptRequest(request: DecryptionRequest, realm: Realm) { + + // note: runBlocking should be used here while we are in realm single thread executor, to avoid thread switching + private fun processDecryptRequest(request: DecryptionRequest, realm: Realm) = runBlocking { val event = request.event val timelineId = request.timelineId @@ -130,7 +130,7 @@ internal class TimelineEventDecryptor @Inject constructor( // Here we have requested a decryption to an event that is not encrypted // We will simply make this event thread aware threadAwareNonEncryptedEvents(request, realm) - return + return@runBlocking } try { val result = cryptoService.decryptEvent(request.event, timelineId) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/room/RoomSyncHandler.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/room/RoomSyncHandler.kt index 51e32b25cb..e488fd0671 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/room/RoomSyncHandler.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/room/RoomSyncHandler.kt @@ -506,6 +506,7 @@ internal class RoomSyncHandler @Inject constructor(private val readReceiptHandle } } + // note: runBlocking should be used here while we are in realm single thread executor, to avoid thread switching private fun decryptIfNeeded(event: Event, roomId: String) = runBlocking { try { // Event from sync does not have roomId, so add it to the event first From acc9874bdfb9040cef09434307f3a392a0bbd0d1 Mon Sep 17 00:00:00 2001 From: Michael Kaye <1917473+michaelkaye@users.noreply.github.com> Date: Wed, 30 Mar 2022 16:46:44 +0100 Subject: [PATCH 004/561] Move to using hookshot to send notifications, rather than logging into matrix room. --- .github/workflows/nightly.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index b875a57abe..045df203cc 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -330,10 +330,9 @@ jobs: if: always() && github.event_name != 'workflow_dispatch' # No concurrency required, runs every time on a schedule. steps: - - uses: michaelkaye/matrix-hookshot-action@v0.3.0 + - uses: michaelkaye/matrix-hookshot-action@v1.0.0 with: github_token: ${{ secrets.GITHUB_TOKEN }} - matrix_access_token: ${{ secrets.ELEMENT_ANDROID_NOTIFICATION_ACCESS_TOKEN }} - matrix_room_id: ${{ secrets.ELEMENT_ANDROID_INTERNAL_ROOM_ID }} + hookshot_url: ${{ secrets.ELEMENT_ANDROID_HOOKSHOT_URL }} text_template: "{{#if '${{ github.event_name }}' == 'schedule' }}Nightly test run{{else}}Test run (on ${{ github.ref }}){{/if }}: {{#each job_statuses }}{{#with this }}{{#if completed }} {{name}} {{conclusion}} at {{completed_at}}, {{/if}}{{/with}}{{/each}}" html_template: "{{#if '${{ github.event_name }}' == 'schedule' }}Nightly test run{{else}}Test run (on ${{ github.ref }}){{/if }}: {{#each job_statuses }}{{#with this }}{{#if completed }}
{{icon conclusion}} {{name}} {{conclusion}} at {{completed_at}} [details]{{/if}}{{/with}}{{/each}}" From 3d64f13c7e5170ea2e752acb763d2bdf39b0e6a8 Mon Sep 17 00:00:00 2001 From: maciejek997 Date: Tue, 5 Apr 2022 13:04:45 +0000 Subject: [PATCH 005/561] Translated using Weblate (Polish) Currently translated at 92.6% (2030 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/pl/ --- vector/src/main/res/values-pl/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/vector/src/main/res/values-pl/strings.xml b/vector/src/main/res/values-pl/strings.xml index fe98d6b6a1..8974f1798c 100644 --- a/vector/src/main/res/values-pl/strings.xml +++ b/vector/src/main/res/values-pl/strings.xml @@ -2334,4 +2334,5 @@ Odkrywanie (%s) Dokończ konfigurację odkrywania. Usuń wszystkie nieudane wiadomości + Nie znasz swojego hasła zapasowego klucza\? Możesz %s \ No newline at end of file From 232c400c082c8c141cf668e84ab3cc907afaaa8e Mon Sep 17 00:00:00 2001 From: Piotr Strebski Date: Tue, 5 Apr 2022 13:01:35 +0000 Subject: [PATCH 006/561] Translated using Weblate (Polish) Currently translated at 92.6% (2030 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/pl/ --- vector/src/main/res/values-pl/strings.xml | 95 ++++++++++++----------- 1 file changed, 50 insertions(+), 45 deletions(-) diff --git a/vector/src/main/res/values-pl/strings.xml b/vector/src/main/res/values-pl/strings.xml index 8974f1798c..df3253a462 100644 --- a/vector/src/main/res/values-pl/strings.xml +++ b/vector/src/main/res/values-pl/strings.xml @@ -287,22 +287,21 @@ ${app_name} wymaga dostępu do kamery i mikrofonu, aby przeprowadzać rozmowy wideo. \n \nPrzyznaj dostęp w następnym oknie. - Lista uczestników + Członkowie - 1 członek - kilku członków + %d członek + %d członków %d członków - + %d członków Nie będziesz w stanie cofnąć tej zmiany, ponieważ przyznajesz użytkownikowi uprawnienia równe swoim. -\n \nJesteś pewien\? - Zbanowanie użytkownika usunie go z tego pokoju i uniemożliwi ponowne dołączenie. + Zablokowanie użytkownika usunie go z tego pokoju i uniemożliwi ponowne dołączenie. - Nowa wiadomość - Kilka nowych wiadomości + %d nowa wiadomość + %d nowe wiadomości %d nowych wiadomości - + %d nowych wiadomości Może to oznaczać że ktoś zakłóca twoje połączenie, lub Twój telefon nie ufa certyfikatowi dostarczonemu przez zdalny serwer. Jeśli administrator serwera oświadczył, że jest to oczekiwane, upewnij się, że poniższy odcisk palca odpowiada odciskowi palca dostarczonemu przez niego. @@ -539,7 +538,8 @@ Przywrócono kopię zapasową z %d kluczem. Przywrócono kopię zapasową z %d kluczami. - + Przywrócono kopię zapasową z %d kluczami. + Przywrócono kopię zapasową z %d kluczami. Użyj kopii zapasowej klucza Uruchamianie… (%1$d z %2$d) @@ -736,7 +736,7 @@ \nMenedżerzy integracji odbierają dane konfiguracji, modyfikują widżety, wysyłają zaproszenia do pokojów i ustawiają poziomy uprawnień w Twoim imieniu. Pokaż podgląd linków wewnątrz czatu jeśli twój serwer wspiera tę funkcję. Formatuj wiadomości używając składni Markdown zanim zostaną wysłane. Pozwala to na zaawansowane formatowanie takie jak używanie asterysków do wyświetlania tekstu w kursywie. - Nie wpływa to na zaproszenia, wyrzucenia oraz bany. + Zaproszenia, usunięcia i bany pozostają nienaruszone. Wysyłaj wiadomości za pomocą klawisza enter Przycisk enter na klawiaturze programowej wyśle wiadomość zamiast wprowadzania łamanania linii Znajdź @@ -747,13 +747,14 @@ %1$s: %2$d wiadomość %1$s: %2$d wiadomości - - + %1$s: %2$d wiadomości + %1$s: %2$d wiadomości %d powiadomienie - %d powiadomień - + %d powiadomienia + %d powiadomień + %d powiadomień Nowe wydarzenie Nowe wiadomości @@ -825,9 +826,10 @@ Zarządzaj w Kopii Zapasowej Kluczy Tworzenei kopii zapasowej kluczy… - Kopiowanie %d klucza… - Kopiowanie %d kluczy… - + Tworzenie kopii zapasowej %d klucza… + Tworzenie kopii zapasowej %d kluczy… + Tworzenie kopii zapasowej %d kluczy… + Tworzenie kopii zapasowej %d kluczy… Niektóre powiadomienia są wyłączone w osobistej konfiguracji. Usługi Google Play są aktualne. @@ -888,8 +890,8 @@ %d użytkownik odczytał %d użytkowników odczytało - - + %d użytkowników odczytało + %d użytkowników odczytało Wystąpił błąd poczas otrzymywania załącznika. Nie można obsłużyć otrzymanych danych @@ -999,9 +1001,10 @@ Wprowadzony kod jest nieprawidłowy. Sprawdź. Nieaktualny serwer domowy - Zostało wysłane zbyt wiele żądań. Możesz spróbować ponownie za %1$d sekundę… - Zostało wysłane zbyt wiele żądań. Możesz spróbować ponownie za %1$d sekundy… - + Wysłano zbyt wiele próśb. Możesz spróbować ponownie za %1$d sekundę… + Wysłano zbyt wiele próśb. Możesz spróbować ponownie za %1$d sekundy… + Wysłano zbyt wiele próśb. Możesz spróbować ponownie za %1$d sekund… + Wysłano zbyt wiele próśb. Możesz spróbować ponownie za %1$d sekund… Wylogowałeś(-łaś) się Mogło to się stać z wielu powodów: @@ -1081,8 +1084,9 @@ Dowiedz się więcej Jedna osoba - %1$d osób - + %1$d osoby + %1$d osób + %1$d osób Opuszczanie pokoju… Administratorzy @@ -1104,8 +1108,7 @@ Oś czasu Edycja wiadomości Aktywować szyfrowanie\? - Raz włączone szyfrowanie w pokoju nie może zostać wyłączone. Wiadomości wysłane w zaszyfrowanym pokoju nie są widziane przez serwer, a jedynie przez uczestników w pokoju. -\nAktywowanie szyfrowania może uniemożliwić wielu botom i mostom prawidłowe działanie. + Raz włączone szyfrowanie w pokoju nie może zostać wyłączone. Wiadomości wysłane w zaszyfrowanym pokoju nie są widziane przez serwer, a jedynie przez uczestników w pokoju. Aktywowanie szyfrowania może uniemożliwić wielu botom i mostkom prawidłowe działanie. Aktywuj szyfrowanie Aby być bezpiecznym, zweryfikuj %s poprzez sprawdzenie jednorazowego kodu. Aby być bezpiecznym, zrób to osobiście lub użyj innej metody komunikacji. @@ -1131,8 +1134,9 @@ Zweryfikuj tą sesję aby oznaczyć ją jako zaufaną i przyznać jej dostęp do zaszyfrowanych wiadomości. Jeżeli nie logowałeś(-łaś) się do tej sesji, twoje konto mogło zostać naruszone: %d aktywna sesja - %d aktywnych sesji - + %d aktywne sesje + %d aktywnych sesji + %d aktywnych sesji Zweryfikuj tą sesję Otwórz obecną sesję i użyj jej do zweryfikowania obecnej, przyznając jej dostęp do zaszyfrowanych wiadomości. @@ -1161,7 +1165,8 @@ Wyślij obraz w oryginalnym rozmiarze Wyślij obrazy w oryginalnym rozmiarze - + Wyślij obrazów w oryginalnym rozmiarze + Wyślij obrazów w oryginalnym rozmiarze Potwierdź Usunięcie Jesteś pewny(-na), że chcesz usunąć to wydarzenie\? Jeżeli usuniesz nazwę pokoju lub zmienisz temat, wciąż będzie możliwe cofnięcie zmiany. @@ -1354,9 +1359,9 @@ WIDOK %d sekunda - %d sek. - %d sek. - %d sek. + %d sekundy + %d sekund + %d sekund Aplikacja odebrała PUSH Przetestuj powiadomienia push @@ -1581,10 +1586,10 @@ Naklejka %1$s wymaga otrzymania zaproszenia do dołączenia. - %1$s, %2$s i %3$d czyta - %1$s, %2$s i %3$d czytają - - + %1$s, %2$s i %3$d inny czyta + %1$s, %2$s i %3$d innych czyta + %1$s, %2$s i %3$d innych czyta + %1$s, %2$s i %3$d innych czyta Nie udało się uzyskać widoczności katalogu bieżącego pokoju (%1$s). Skonfiguruj na tym urządzeniu @@ -1825,7 +1830,7 @@ Uprawnienia Przestrzeni Uprawnienia pokoju Odblokowanie użytkownika pozwoli mu na ponowne dołączenie do tej przestrzeni. - Blokowanie użytkowników wyrzuci ich z tej przestrzeni i uniemożliwi im dołączenie ponownie. + Zablokowanie użytkownika usunie go z tego miejsca i uniemożliwi ponowne dołączenie. Ten pokój jest prywatny. Nie będziesz w stanie dołączyć bez zaproszenia. Zakańczanie połączenia… Brak odpowiedzi @@ -1975,7 +1980,7 @@ Nie będziesz w stanie ponownie dołączyć, do momentu kiedy nie zostaniesz ponownie zaproszony. Jesteś jedyną osoba tutaj. Jeśli wyjdziesz, nikt nie będzie w stanie dołączyć w przyszłości, włączając Ciebie. Czy jesteś pewny, że chcesz opuścić %s\? - Opuść przestrzeń + Opuść Dodawaj pokoje Przeglądaj pokoje Ukończ konfigurację @@ -1985,7 +1990,7 @@ \nSpróbuj ponownie później lub zapytaj administratora tego pokoju czy masz dostęp. Dołącz pomimo to Dołącz do przestrzeni - Stwórz przestrzeń + Utwórz przestrzeń Na razie pomiń Dołącz do mojej przestrzeni %1$s %2$s Nie będą częścią %s @@ -2016,7 +2021,7 @@ Ja i moi znajomi Prywatna przestrzeń do organizacji Twoich pokojów Tylko ja - Upewnij się, że odpowiednie osoby mają dostęp do %s. Możesz zmienić to później. + Upewnij się, że odpowiednie osoby mają dostęp do %s. Z kim pracujesz\? Aby dołączyć do istniejącej przestrzeni, potrzebujesz zaproszenia. Możesz zmienić to później @@ -2028,10 +2033,10 @@ \nCzekanie na odpowiedź serwera… Pusty pokój (było %s) - %1$s, %2$s, %3$s i %4$d innych + %1$s, %2$s, %3$s i %4$d inny %1$s, %2$s, %3$s i %4$d innych - - + %1$s, %2$s, %3$s i %4$d innych + %1$s, %2$s, %3$s i %4$d innych %1$s, %2$s, %3$s i %4$s Niestandardowe @@ -2208,7 +2213,7 @@ Dodano %1$s jako adresy dla tego pokoju. pojedyncze logowanie - Pokój opuszczony! + Pokój został opuszczony! Błąd podczas wyszukiwania numeru telefonu Przekaż %1$s dotknij by powrócić From 8f751af7e49164335d7339ffa44b51635325d2c5 Mon Sep 17 00:00:00 2001 From: m1chj <8hm0nutuhsa9@opayq.com> Date: Tue, 5 Apr 2022 12:52:35 +0000 Subject: [PATCH 007/561] Translated using Weblate (Polish) Currently translated at 92.6% (2030 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/pl/ --- vector/src/main/res/values-pl/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/res/values-pl/strings.xml b/vector/src/main/res/values-pl/strings.xml index df3253a462..c8578f359e 100644 --- a/vector/src/main/res/values-pl/strings.xml +++ b/vector/src/main/res/values-pl/strings.xml @@ -2110,7 +2110,7 @@ Zdecyduj kto może odnaleźć i dołączyć do tego pokoju. Dotknij, aby edytować przestrzenie Wybierz przestrzenie - Zdecyduj które przestrzenie mogą mieć dostęp do tego pokoju. Członkowie wybranej przestrzeni będą mogli ją odnaleźć i dołączyć do Pokoju przez nazwę. + Zdecyduj, które przestrzenie mogą mieć dostęp do tego pokoju. Członkowie zaznaczonej przestrzeni będą mogli odnaleźć i dołączyć do nazwy pokoju. Przestrzenie mogące uzyskać dostęp Zezwól użytkownikom przestrzeni na znalezienie i dostęp. Ulepszenia pokoju From b19b10015057131c2760c9007981a8f9e6d1bc0d Mon Sep 17 00:00:00 2001 From: maciejek997 Date: Tue, 5 Apr 2022 13:05:31 +0000 Subject: [PATCH 008/561] Translated using Weblate (Polish) Currently translated at 92.7% (2031 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/pl/ --- vector/src/main/res/values-pl/strings.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vector/src/main/res/values-pl/strings.xml b/vector/src/main/res/values-pl/strings.xml index c8578f359e..8c6a559c42 100644 --- a/vector/src/main/res/values-pl/strings.xml +++ b/vector/src/main/res/values-pl/strings.xml @@ -2340,4 +2340,10 @@ Dokończ konfigurację odkrywania. Usuń wszystkie nieudane wiadomości Nie znasz swojego hasła zapasowego klucza\? Możesz %s + + wpis + wpisów + wpisy + wpisy + \ No newline at end of file From 2b9dd885546d056907a1ee49d531761b61e920a8 Mon Sep 17 00:00:00 2001 From: Piotr Strebski Date: Tue, 5 Apr 2022 13:05:13 +0000 Subject: [PATCH 009/561] Translated using Weblate (Polish) Currently translated at 92.7% (2031 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/pl/ --- vector/src/main/res/values-pl/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/res/values-pl/strings.xml b/vector/src/main/res/values-pl/strings.xml index 8c6a559c42..236ea514c0 100644 --- a/vector/src/main/res/values-pl/strings.xml +++ b/vector/src/main/res/values-pl/strings.xml @@ -2339,7 +2339,7 @@ Odkrywanie (%s) Dokończ konfigurację odkrywania. Usuń wszystkie nieudane wiadomości - Nie znasz swojego hasła zapasowego klucza\? Możesz %s + Nie znasz hasła swojego zapasowego klucza\? Możesz %s. wpis wpisów From da32eb8a99c98aeadfdbfb846a74a2a289b5183e Mon Sep 17 00:00:00 2001 From: maciejek997 Date: Tue, 5 Apr 2022 13:10:11 +0000 Subject: [PATCH 010/561] Translated using Weblate (Polish) Currently translated at 93.1% (2039 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/pl/ --- vector/src/main/res/values-pl/strings.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/vector/src/main/res/values-pl/strings.xml b/vector/src/main/res/values-pl/strings.xml index 236ea514c0..95e7115b44 100644 --- a/vector/src/main/res/values-pl/strings.xml +++ b/vector/src/main/res/values-pl/strings.xml @@ -2346,4 +2346,12 @@ wpisy wpisy + + %d osoba którą znasz już dołączyła + %d osoby które znasz już dołączyły + + + + Brakujący typ wiadomości + Brak zawartości \ No newline at end of file From be3b75e1368cf6bdd87bb64509397866df6e86e1 Mon Sep 17 00:00:00 2001 From: m1chj <8hm0nutuhsa9@opayq.com> Date: Tue, 5 Apr 2022 13:07:46 +0000 Subject: [PATCH 011/561] Translated using Weblate (Polish) Currently translated at 93.1% (2039 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/pl/ --- vector/src/main/res/values-pl/strings.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vector/src/main/res/values-pl/strings.xml b/vector/src/main/res/values-pl/strings.xml index 95e7115b44..ffec372c06 100644 --- a/vector/src/main/res/values-pl/strings.xml +++ b/vector/src/main/res/values-pl/strings.xml @@ -2333,8 +2333,8 @@ Uzyskaj pomoc w korzystaniu z ${app_name} Nie masz uprawnień by dołączyć do tego pokoju Typ - Niedostępny - Dostępny + Offline + Online Pokaż znaczniki odczytania Odkrywanie (%s) Dokończ konfigurację odkrywania. @@ -2354,4 +2354,7 @@ Brakujący typ wiadomości Brak zawartości + Wyślij wydarzenie niestandardowe + Ostrzegawczy poziom zaufania + Upewnij się najpierw \ No newline at end of file From 3d9974ed82aaafa03de75002bbc3ab95296c489d Mon Sep 17 00:00:00 2001 From: Piotr Strebski Date: Tue, 5 Apr 2022 13:07:23 +0000 Subject: [PATCH 012/561] Translated using Weblate (Polish) Currently translated at 93.1% (2039 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/pl/ --- vector/src/main/res/values-pl/strings.xml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/vector/src/main/res/values-pl/strings.xml b/vector/src/main/res/values-pl/strings.xml index ffec372c06..c4aa40884a 100644 --- a/vector/src/main/res/values-pl/strings.xml +++ b/vector/src/main/res/values-pl/strings.xml @@ -2335,16 +2335,16 @@ Typ Offline Online - Pokaż znaczniki odczytania + Wyświetl znaczniki odczytania Odkrywanie (%s) Dokończ konfigurację odkrywania. Usuń wszystkie nieudane wiadomości Nie znasz hasła swojego zapasowego klucza\? Możesz %s. - wpis - wpisów - wpisy - wpisy + %d wpis + %d wpisy + %d wpisów + %d wpisów %d osoba którą znasz już dołączyła @@ -2357,4 +2357,6 @@ Wyślij wydarzenie niestandardowe Ostrzegawczy poziom zaufania Upewnij się najpierw + Nie sprawdzono + Sprawdzono \ No newline at end of file From 2e81f2ab2af08d46c5a058c771783dd0fa732f51 Mon Sep 17 00:00:00 2001 From: maciejek997 Date: Tue, 5 Apr 2022 13:11:25 +0000 Subject: [PATCH 013/561] Translated using Weblate (Polish) Currently translated at 93.1% (2041 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/pl/ --- vector/src/main/res/values-pl/strings.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vector/src/main/res/values-pl/strings.xml b/vector/src/main/res/values-pl/strings.xml index c4aa40884a..9965c6e629 100644 --- a/vector/src/main/res/values-pl/strings.xml +++ b/vector/src/main/res/values-pl/strings.xml @@ -2349,8 +2349,8 @@ %d osoba którą znasz już dołączyła %d osoby które znasz już dołączyły - - + + Brakujący typ wiadomości Brak zawartości @@ -2359,4 +2359,5 @@ Upewnij się najpierw Nie sprawdzono Sprawdzono + Aby zmiany weszły w życie, należy uruchomić ponownie aplikację. \ No newline at end of file From 5e035267178c79c500d2137bd3d5da0fb676b19d Mon Sep 17 00:00:00 2001 From: Piotr Strebski Date: Tue, 5 Apr 2022 13:10:57 +0000 Subject: [PATCH 014/561] Translated using Weblate (Polish) Currently translated at 93.1% (2041 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/pl/ --- vector/src/main/res/values-pl/strings.xml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/vector/src/main/res/values-pl/strings.xml b/vector/src/main/res/values-pl/strings.xml index 9965c6e629..eef2755808 100644 --- a/vector/src/main/res/values-pl/strings.xml +++ b/vector/src/main/res/values-pl/strings.xml @@ -2347,10 +2347,10 @@ %d wpisów - %d osoba którą znasz już dołączyła - %d osoby które znasz już dołączyły - - + %d osoba, którą znasz, już dołączyła + %d osoby, które znasz, już dołączyły + %d osób, które znasz, już dołączyły + %d osób, które znasz, już dołączyły Brakujący typ wiadomości Brak zawartości @@ -2360,4 +2360,5 @@ Nie sprawdzono Sprawdzono Aby zmiany weszły w życie, należy uruchomić ponownie aplikację. + Włącz matematykę LaTeX \ No newline at end of file From aaf3f080d02faf3ae2a174230056f3da5db51fff Mon Sep 17 00:00:00 2001 From: maciejek997 Date: Tue, 5 Apr 2022 13:11:56 +0000 Subject: [PATCH 015/561] Translated using Weblate (Polish) Currently translated at 93.2% (2042 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/pl/ --- vector/src/main/res/values-pl/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/vector/src/main/res/values-pl/strings.xml b/vector/src/main/res/values-pl/strings.xml index eef2755808..5766aafc73 100644 --- a/vector/src/main/res/values-pl/strings.xml +++ b/vector/src/main/res/values-pl/strings.xml @@ -2361,4 +2361,5 @@ Sprawdzono Aby zmiany weszły w życie, należy uruchomić ponownie aplikację. Włącz matematykę LaTeX + Zakończ ankietę. \ No newline at end of file From 67159f7dc9e33fe8dc5b67a60de092d8f79d3a27 Mon Sep 17 00:00:00 2001 From: Piotr Strebski Date: Tue, 5 Apr 2022 13:11:46 +0000 Subject: [PATCH 016/561] Translated using Weblate (Polish) Currently translated at 93.2% (2042 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/pl/ --- vector/src/main/res/values-pl/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/res/values-pl/strings.xml b/vector/src/main/res/values-pl/strings.xml index 5766aafc73..8609f13af4 100644 --- a/vector/src/main/res/values-pl/strings.xml +++ b/vector/src/main/res/values-pl/strings.xml @@ -2359,7 +2359,7 @@ Upewnij się najpierw Nie sprawdzono Sprawdzono - Aby zmiany weszły w życie, należy uruchomić ponownie aplikację. + Aby zmiany zostały zastosowane, należy uruchomić ponownie aplikację. Włącz matematykę LaTeX Zakończ ankietę. \ No newline at end of file From 99ad49498d8e953e859566faee621df1ca4c2c1d Mon Sep 17 00:00:00 2001 From: maciejek997 Date: Tue, 5 Apr 2022 13:12:09 +0000 Subject: [PATCH 017/561] Translated using Weblate (Polish) Currently translated at 93.2% (2043 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/pl/ --- vector/src/main/res/values-pl/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/vector/src/main/res/values-pl/strings.xml b/vector/src/main/res/values-pl/strings.xml index 8609f13af4..6328703475 100644 --- a/vector/src/main/res/values-pl/strings.xml +++ b/vector/src/main/res/values-pl/strings.xml @@ -2362,4 +2362,5 @@ Aby zmiany zostały zastosowane, należy uruchomić ponownie aplikację. Włącz matematykę LaTeX Zakończ ankietę. + Zakończyć ankietę\? \ No newline at end of file From 7dd56244a974c76300fcb9ced9d8339b48133a3f Mon Sep 17 00:00:00 2001 From: Piotr Strebski Date: Tue, 5 Apr 2022 13:12:03 +0000 Subject: [PATCH 018/561] Translated using Weblate (Polish) Currently translated at 93.2% (2043 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/pl/ --- vector/src/main/res/values-pl/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/res/values-pl/strings.xml b/vector/src/main/res/values-pl/strings.xml index 6328703475..2d6a1d2abb 100644 --- a/vector/src/main/res/values-pl/strings.xml +++ b/vector/src/main/res/values-pl/strings.xml @@ -2361,6 +2361,6 @@ Sprawdzono Aby zmiany zostały zastosowane, należy uruchomić ponownie aplikację. Włącz matematykę LaTeX - Zakończ ankietę. + Zakończ ankietę Zakończyć ankietę\? \ No newline at end of file From bad0c0a2e1e823346d6d4952e84a10e5b4ead3b3 Mon Sep 17 00:00:00 2001 From: maciejek997 Date: Tue, 5 Apr 2022 13:12:32 +0000 Subject: [PATCH 019/561] Translated using Weblate (Polish) Currently translated at 93.3% (2044 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/pl/ --- vector/src/main/res/values-pl/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/vector/src/main/res/values-pl/strings.xml b/vector/src/main/res/values-pl/strings.xml index 2d6a1d2abb..f829f7f307 100644 --- a/vector/src/main/res/values-pl/strings.xml +++ b/vector/src/main/res/values-pl/strings.xml @@ -2363,4 +2363,5 @@ Włącz matematykę LaTeX Zakończ ankietę Zakończyć ankietę\? + To powstrzyma użytkowników od głosowania i wyświetli finalny wynik ankiety. \ No newline at end of file From 157a14fdc24b748c57384e95b4b318f84fc2bb7e Mon Sep 17 00:00:00 2001 From: Piotr Strebski Date: Tue, 5 Apr 2022 13:12:20 +0000 Subject: [PATCH 020/561] Translated using Weblate (Polish) Currently translated at 93.3% (2044 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/pl/ --- vector/src/main/res/values-pl/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/res/values-pl/strings.xml b/vector/src/main/res/values-pl/strings.xml index f829f7f307..e4b7b28a01 100644 --- a/vector/src/main/res/values-pl/strings.xml +++ b/vector/src/main/res/values-pl/strings.xml @@ -2362,6 +2362,6 @@ Aby zmiany zostały zastosowane, należy uruchomić ponownie aplikację. Włącz matematykę LaTeX Zakończ ankietę - Zakończyć ankietę\? + Czy zakończyć ankietę\? To powstrzyma użytkowników od głosowania i wyświetli finalny wynik ankiety. \ No newline at end of file From 79f5a7c6664c492a9ed34881a5b19a80fb924355 Mon Sep 17 00:00:00 2001 From: ariskotsomitopoulos Date: Thu, 7 Apr 2022 14:37:18 +0300 Subject: [PATCH 021/561] Fix crash when user navigates back --- .../settings/account/deactivation/DeactivateAccountViewModel.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/java/im/vector/app/features/settings/account/deactivation/DeactivateAccountViewModel.kt b/vector/src/main/java/im/vector/app/features/settings/account/deactivation/DeactivateAccountViewModel.kt index 964219ce23..56f91547db 100644 --- a/vector/src/main/java/im/vector/app/features/settings/account/deactivation/DeactivateAccountViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/settings/account/deactivation/DeactivateAccountViewModel.kt @@ -100,7 +100,7 @@ class DeactivateAccountViewModel @AssistedInject constructor(@Assisted private v } ) DeactivateAccountViewEvents.Done - } catch (failure: Exception) { + } catch (failure: Throwable) { if (failure.isInvalidUIAAuth()) { DeactivateAccountViewEvents.InvalidAuth } else { From 7e67f3c88b9c598f34a1b055046b7d25b4cac1f8 Mon Sep 17 00:00:00 2001 From: ariskotsomitopoulos Date: Thu, 7 Apr 2022 16:05:49 +0300 Subject: [PATCH 022/561] Fix Deactivation account loader --- .../settings/account/deactivation/DeactivateAccountViewModel.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vector/src/main/java/im/vector/app/features/settings/account/deactivation/DeactivateAccountViewModel.kt b/vector/src/main/java/im/vector/app/features/settings/account/deactivation/DeactivateAccountViewModel.kt index 56f91547db..ab4b9264eb 100644 --- a/vector/src/main/java/im/vector/app/features/settings/account/deactivation/DeactivateAccountViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/settings/account/deactivation/DeactivateAccountViewModel.kt @@ -59,6 +59,7 @@ class DeactivateAccountViewModel @AssistedInject constructor(@Assisted private v is DeactivateAccountAction.DeactivateAccount -> handleDeactivateAccount(action) DeactivateAccountAction.SsoAuthDone -> { Timber.d("## UIA - FallBack success") + _viewEvents.post(DeactivateAccountViewEvents.Loading()) if (pendingAuth != null) { uiaContinuation?.resume(pendingAuth!!) } else { @@ -66,6 +67,7 @@ class DeactivateAccountViewModel @AssistedInject constructor(@Assisted private v } } is DeactivateAccountAction.PasswordAuthDone -> { + _viewEvents.post(DeactivateAccountViewEvents.Loading()) val decryptedPass = session.loadSecureSecret(action.password.fromBase64().inputStream(), ReAuthActivity.DEFAULT_RESULT_KEYSTORE_ALIAS) uiaContinuation?.resume( UserPasswordAuth( From 6b47db92dcc5cce66b772b0896edf1ba8299162f Mon Sep 17 00:00:00 2001 From: ariskotsomitopoulos Date: Thu, 7 Apr 2022 16:23:21 +0300 Subject: [PATCH 023/561] Add changelog --- changelog.d/5721.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/5721.bugfix diff --git a/changelog.d/5721.bugfix b/changelog.d/5721.bugfix new file mode 100644 index 0000000000..8b752b43a9 --- /dev/null +++ b/changelog.d/5721.bugfix @@ -0,0 +1 @@ +Improving deactivation experience along with a crash fix \ No newline at end of file From ff7c19537ec3df5c86de633497daea5edce01c0f Mon Sep 17 00:00:00 2001 From: Piotr Strebski Date: Tue, 5 Apr 2022 13:37:38 +0000 Subject: [PATCH 024/561] Translated using Weblate (Polish) Currently translated at 12.7% (7 of 55 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/pl/ --- fastlane/metadata/android/pl-PL/changelogs/40103070.txt | 4 ++-- fastlane/metadata/android/pl-PL/changelogs/40104060.txt | 2 ++ fastlane/metadata/android/pl-PL/changelogs/40104070.txt | 2 ++ fastlane/metadata/android/pl-PL/changelogs/40104080.txt | 2 ++ 4 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 fastlane/metadata/android/pl-PL/changelogs/40104060.txt create mode 100644 fastlane/metadata/android/pl-PL/changelogs/40104070.txt create mode 100644 fastlane/metadata/android/pl-PL/changelogs/40104080.txt diff --git a/fastlane/metadata/android/pl-PL/changelogs/40103070.txt b/fastlane/metadata/android/pl-PL/changelogs/40103070.txt index 2cb20a9570..08d9d2193e 100644 --- a/fastlane/metadata/android/pl-PL/changelogs/40103070.txt +++ b/fastlane/metadata/android/pl-PL/changelogs/40103070.txt @@ -1,2 +1,2 @@ -Główne zmiany w tej wersji: Poprawki błędów dotyczące głównie powiadomień -Pełny changelog: https://github.com/vector-im/element-android/releases/tag/v1.3.7 +Główne zmiany w tej wersji: Poprawki błędów dotyczące głównie powiadomień. +Pełna lista zmian: https://github.com/vector-im/element-android/releases/tag/v1.3.7-RC2 diff --git a/fastlane/metadata/android/pl-PL/changelogs/40104060.txt b/fastlane/metadata/android/pl-PL/changelogs/40104060.txt new file mode 100644 index 0000000000..216842ada0 --- /dev/null +++ b/fastlane/metadata/android/pl-PL/changelogs/40104060.txt @@ -0,0 +1,2 @@ +Główne zmiany w tej wersji: Oś czasu wątku jest teraz aktywna i szybsza. Różne poprawki błędów i ulepszenia stabilności. +Pełna lista zmian: https://github.com/vector-im/element-android/releases/tag/v1.4.6 diff --git a/fastlane/metadata/android/pl-PL/changelogs/40104070.txt b/fastlane/metadata/android/pl-PL/changelogs/40104070.txt new file mode 100644 index 0000000000..91c13d3d79 --- /dev/null +++ b/fastlane/metadata/android/pl-PL/changelogs/40104070.txt @@ -0,0 +1,2 @@ +Główne zmiany w tej wersji: Różne poprawki błędów i ulepszenia stabilności. +Pełna lista zmian: https://github.com/vector-im/element-android/releases/tag/v1.4.7 diff --git a/fastlane/metadata/android/pl-PL/changelogs/40104080.txt b/fastlane/metadata/android/pl-PL/changelogs/40104080.txt new file mode 100644 index 0000000000..5286f40de5 --- /dev/null +++ b/fastlane/metadata/android/pl-PL/changelogs/40104080.txt @@ -0,0 +1,2 @@ +Główne zmiany w tej wersji: Oś czasu wątku jest teraz aktywna i szybsza. Różne poprawki błędów i ulepszenia stabilności. +Pełna lista zmian: https://github.com/vector-im/element-android/releases From 23cdd4fac396a4f3ce92156d3eb3261e53cd5ac7 Mon Sep 17 00:00:00 2001 From: Linerly Date: Tue, 5 Apr 2022 22:54:35 +0000 Subject: [PATCH 025/561] Translated using Weblate (Indonesian) Currently translated at 100.0% (2190 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/id/ --- vector/src/main/res/values-in/strings.xml | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/vector/src/main/res/values-in/strings.xml b/vector/src/main/res/values-in/strings.xml index 29831c1377..5ca1a361d4 100644 --- a/vector/src/main/res/values-in/strings.xml +++ b/vector/src/main/res/values-in/strings.xml @@ -1742,7 +1742,7 @@ Di masa mendatang proses verifikasi ini akan dimutakhirkan. \nCoba lagi nanti, atau tanyakan ke admin ruangan untuk mengecek jika Anda punya akses. Bergabung Saja Bergabung ke Space - Buat Space + Buat space Lewat untuk sekarang Bergabung ke space saya %1$s %2$s Mereka tidak akan menjadi bagian dari %s @@ -1784,7 +1784,7 @@ Di masa mendatang proses verifikasi ini akan dimutakhirkan. Tipe space apa yang Anda ingin buat\? Space privat Anda Space publik Anda - Tambahkan Space + Tambahkan space Space privat Space publik Apakah Anda yakin untuk menghapus semua pesan yang belum dikirim di ruangan ini\? @@ -2393,4 +2393,23 @@ Di masa mendatang proses verifikasi ini akan dimutakhirkan. \n \nIni hanya transisi sekali, utasan sekarang sebagai bagian dari spesifikasi Matrix. Utasan Mencapai Beta 🎉 + Penbagian lokasi sedang dilakukan + ${app_name} Lokasi langsung + Homeserver tidak menerima nama pengguna dengan hanya angka. + Lewati + Simpan dan lanjutkan + Preferensi Anda telah disimpan. + Anda siap! + Ayo + Anda dapat mengubahnya kapan saja. + Tambahkan sebuah foto profil + Anda dapat mengubahnya nanti + Nama Tampilan + Ini akan ditampilkan ketika Anda mengirim pesan. + Pilih nama tampilan + Akun %s Anda telah dibuat. + Selamat! + Kembalikan saya ke beranda + Ubah profil + Nonaktifkan \ No newline at end of file From f2bbcddd5f219390ed7aba8af02c1ab8188f8e51 Mon Sep 17 00:00:00 2001 From: random Date: Wed, 6 Apr 2022 08:26:44 +0000 Subject: [PATCH 026/561] Translated using Weblate (Italian) Currently translated at 100.0% (2190 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/it/ --- vector/src/main/res/values-it/strings.xml | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/vector/src/main/res/values-it/strings.xml b/vector/src/main/res/values-it/strings.xml index d14aa3c671..15f08ba6da 100644 --- a/vector/src/main/res/values-it/strings.xml +++ b/vector/src/main/res/values-it/strings.xml @@ -1959,7 +1959,7 @@ \nRiprova più tardi, o chiedi a un amministratore della stanza di controllare se hai l\'accesso. Unisciti comunque Unisciti a uno Spazio - Crea Spazio + Crea spazio Per il momento, salta Unisciti al mio Spazio %1$s %2$s Non faranno parte di %s @@ -1998,7 +1998,7 @@ Che tipo di Spazio vuoi creare\? Il tuo Spazio privato Il tuo Spazio pubblico - Aggiungi Spazio + Aggiungi spazio Esci dalla stanza con un ID (o dalla stanza attuale se vuota) Unisciti allo Spazio con un ID Crea uno Spazio @@ -2429,4 +2429,23 @@ \n \nSarà una transizione una-tantum, dato che le conversazioni ora sono parte delle specifiche di Matrix. I messaggi in conversazioni entrano in beta 🎉 + Portami a casa + Stai condividendo la posizione + Posizione in tempo reale di ${app_name} + L\'homeserver non accetta nomi utente con solo numeri. + Salta questo passo + Salva e continua + Le tue preferenze sono state salvate. + Tutto pronto! + Andiamo + Puoi cambiarla in qualsiasi momento. + Aggiungi un\'immagine del profilo + Puoi cambiarlo in seguito + Nome da mostrare + Verrà mostrato quando invii messaggi. + Scegli un nome da mostrare + Il tuo account %s è stato creato. + Congratulazioni! + Personalizza profilo + Disattiva \ No newline at end of file From 21231127631edd497bd29c9dfc4ccf0b9d248f9b Mon Sep 17 00:00:00 2001 From: lvre <7uu3qrbvm@relay.firefox.com> Date: Tue, 5 Apr 2022 16:51:26 +0000 Subject: [PATCH 027/561] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (55 of 55 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/pt_BR/ --- fastlane/metadata/android/pt-BR/changelogs/40104060.txt | 2 ++ fastlane/metadata/android/pt-BR/changelogs/40104070.txt | 2 ++ fastlane/metadata/android/pt-BR/changelogs/40104080.txt | 2 ++ 3 files changed, 6 insertions(+) create mode 100644 fastlane/metadata/android/pt-BR/changelogs/40104060.txt create mode 100644 fastlane/metadata/android/pt-BR/changelogs/40104070.txt create mode 100644 fastlane/metadata/android/pt-BR/changelogs/40104080.txt diff --git a/fastlane/metadata/android/pt-BR/changelogs/40104060.txt b/fastlane/metadata/android/pt-BR/changelogs/40104060.txt new file mode 100644 index 0000000000..17d8225c0d --- /dev/null +++ b/fastlane/metadata/android/pt-BR/changelogs/40104060.txt @@ -0,0 +1,2 @@ +Principais mudanças nesta versão: Timeline de Thread estão agora ao vivo e mais rápidas. Vários consertos de bugs e melhorias de estabilidade. +Changelog completo: https://github.com/vector-im/element-android/releases/tag/v1.4.6 diff --git a/fastlane/metadata/android/pt-BR/changelogs/40104070.txt b/fastlane/metadata/android/pt-BR/changelogs/40104070.txt new file mode 100644 index 0000000000..fad9bfe739 --- /dev/null +++ b/fastlane/metadata/android/pt-BR/changelogs/40104070.txt @@ -0,0 +1,2 @@ +Principais mudanças nesta versão: Vários consertos de bugs e melhorias de estabilidade. +Changelog completo: https://github.com/vector-im/element-android/releases/tag/v1.4.7 diff --git a/fastlane/metadata/android/pt-BR/changelogs/40104080.txt b/fastlane/metadata/android/pt-BR/changelogs/40104080.txt new file mode 100644 index 0000000000..ca2b54f2f2 --- /dev/null +++ b/fastlane/metadata/android/pt-BR/changelogs/40104080.txt @@ -0,0 +1,2 @@ +Principais mudanças nesta versão: Timeline de Thread estão agora ao vivo e mais rápidas. Vários consertos de bugs e melhorias de estabilidade. +Changelog completo: https://github.com/vector-im/element-android/releases From 8b125923e9429388074e3327a8dbbbb953221b23 Mon Sep 17 00:00:00 2001 From: Jozef Gaal Date: Tue, 5 Apr 2022 19:07:18 +0000 Subject: [PATCH 028/561] Translated using Weblate (Slovak) Currently translated at 100.0% (2190 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/sk/ --- vector/src/main/res/values-sk/strings.xml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/vector/src/main/res/values-sk/strings.xml b/vector/src/main/res/values-sk/strings.xml index bd3e86e40c..0807657f8e 100644 --- a/vector/src/main/res/values-sk/strings.xml +++ b/vector/src/main/res/values-sk/strings.xml @@ -2485,4 +2485,23 @@ \n \nPôjde o jednorazový prechod, keďže vlákna sú teraz súčasťou špecifikácie Matrix. Vlákna sa blížia k beta verzii 🎉 + Váš účet %s bol vytvorený. + Prebieha zdieľanie polohy + ${app_name} Poloha v reálnom čase + Domovský server neakceptuje používateľské meno obsahujúce iba číslice. + Vynechať tento krok + Uložiť a pokračovať + Vaše nastavenia boli uložené. + Všetko je pripravené! + Poďme na to + Toto môžete kedykoľvek zmeniť. + Pridať profilový obrázok + Neskôr to môžete zmeniť + Zobrazované meno + Toto sa zobrazí pri odosielaní správ. + Vyberte si zobrazované meno + Gratulujeme! + Zober ma domov + Prispôsobiť profil + Zakázať \ No newline at end of file From 661d95cf29068d8027bd3a5f74cf91687c6e0886 Mon Sep 17 00:00:00 2001 From: Ihor Hordiichuk Date: Tue, 5 Apr 2022 17:26:00 +0000 Subject: [PATCH 029/561] Translated using Weblate (Ukrainian) Currently translated at 100.0% (55 of 55 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/uk/ --- fastlane/metadata/android/uk/changelogs/40104060.txt | 2 ++ fastlane/metadata/android/uk/changelogs/40104070.txt | 2 ++ fastlane/metadata/android/uk/changelogs/40104080.txt | 2 ++ 3 files changed, 6 insertions(+) create mode 100644 fastlane/metadata/android/uk/changelogs/40104060.txt create mode 100644 fastlane/metadata/android/uk/changelogs/40104070.txt create mode 100644 fastlane/metadata/android/uk/changelogs/40104080.txt diff --git a/fastlane/metadata/android/uk/changelogs/40104060.txt b/fastlane/metadata/android/uk/changelogs/40104060.txt new file mode 100644 index 0000000000..28f051724a --- /dev/null +++ b/fastlane/metadata/android/uk/changelogs/40104060.txt @@ -0,0 +1,2 @@ +Основні зміни в цій версії: Хронологія тредів працює наживо і швидше. Усунуто різні вади й поліпшено стабільність. +Вичерпний перелік змін: https://github.com/vector-im/element-android/releases/tag/v1.4.6 diff --git a/fastlane/metadata/android/uk/changelogs/40104070.txt b/fastlane/metadata/android/uk/changelogs/40104070.txt new file mode 100644 index 0000000000..dff28b7825 --- /dev/null +++ b/fastlane/metadata/android/uk/changelogs/40104070.txt @@ -0,0 +1,2 @@ +Основні зміни в цій версії: Усунуто різні вади й поліпшено стабільність. +Вичерпний перелік змін: https://github.com/vector-im/element-android/releases/tag/v1.4.7 diff --git a/fastlane/metadata/android/uk/changelogs/40104080.txt b/fastlane/metadata/android/uk/changelogs/40104080.txt new file mode 100644 index 0000000000..e5f7e7b271 --- /dev/null +++ b/fastlane/metadata/android/uk/changelogs/40104080.txt @@ -0,0 +1,2 @@ +Основні зміни в цій версії: Хронологія тредів працює наживо і швидше. Усунуто різні вади й поліпшено стабільність. +Вичерпний перелік змін: https://github.com/vector-im/element-android/releases From d538e2d9a9ac0e0a2c1d7b3ae5c1cdf29938765e Mon Sep 17 00:00:00 2001 From: waclaw66 Date: Tue, 5 Apr 2022 17:09:57 +0000 Subject: [PATCH 030/561] Translated using Weblate (Czech) Currently translated at 100.0% (2190 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/cs/ --- vector/src/main/res/values-cs/strings.xml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/vector/src/main/res/values-cs/strings.xml b/vector/src/main/res/values-cs/strings.xml index c66ff56b3e..3121f859f3 100644 --- a/vector/src/main/res/values-cs/strings.xml +++ b/vector/src/main/res/values-cs/strings.xml @@ -2485,4 +2485,23 @@ \n \nPůjde o jednorázový přechod, protože vlákna jsou nyní součástí Matrix specifikace. Vlákna se blíží k betaverzi 🎉 + Probíhá sdílení polohy + ${app_name} poloha živě + Domovský server neakceptuje uživatelská jména obsahující pouze číslice. + Přeskočit tento krok + Uložit a pokračovat + Vaše předvolby byly uloženy. + Vše je připraveno! + Jdeme na to + Tuto můžete kdykoli změnit. + Přidat profilový obrázek + Později to můžete změnit + Zobrazované jméno + Toto se zobrazí při odesílání zpráv. + Zvolte si zobrazované jméno + Váš účet %s byl založen. + Gratulujeme! + Vezmi mě domů + Přizpůsobit profil + Zakázat \ No newline at end of file From c09cb3358a1a3f86325d086db7e50da0cf2bd7b3 Mon Sep 17 00:00:00 2001 From: waclaw66 Date: Tue, 5 Apr 2022 17:02:53 +0000 Subject: [PATCH 031/561] Translated using Weblate (Czech) Currently translated at 100.0% (55 of 55 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/cs/ --- fastlane/metadata/android/cs-CZ/changelogs/40104060.txt | 2 ++ fastlane/metadata/android/cs-CZ/changelogs/40104070.txt | 2 ++ fastlane/metadata/android/cs-CZ/changelogs/40104080.txt | 2 ++ 3 files changed, 6 insertions(+) create mode 100644 fastlane/metadata/android/cs-CZ/changelogs/40104060.txt create mode 100644 fastlane/metadata/android/cs-CZ/changelogs/40104070.txt create mode 100644 fastlane/metadata/android/cs-CZ/changelogs/40104080.txt diff --git a/fastlane/metadata/android/cs-CZ/changelogs/40104060.txt b/fastlane/metadata/android/cs-CZ/changelogs/40104060.txt new file mode 100644 index 0000000000..3eda022464 --- /dev/null +++ b/fastlane/metadata/android/cs-CZ/changelogs/40104060.txt @@ -0,0 +1,2 @@ +Hlavní změny v této verzi: Časová osa vláken je nyní živá a rychlejší. Opravy různých chyb a vylepšení stability. +Úplný seznam změn: https://github.com/vector-im/element-android/releases/tag/v1.4.6 diff --git a/fastlane/metadata/android/cs-CZ/changelogs/40104070.txt b/fastlane/metadata/android/cs-CZ/changelogs/40104070.txt new file mode 100644 index 0000000000..cba2012c1c --- /dev/null +++ b/fastlane/metadata/android/cs-CZ/changelogs/40104070.txt @@ -0,0 +1,2 @@ +Hlavní změny v této verzi: Opravy různých chyb a vylepšení stability. +Úplný seznam změn: https://github.com/vector-im/element-android/releases/tag/v1.4.7 diff --git a/fastlane/metadata/android/cs-CZ/changelogs/40104080.txt b/fastlane/metadata/android/cs-CZ/changelogs/40104080.txt new file mode 100644 index 0000000000..61e7fd7940 --- /dev/null +++ b/fastlane/metadata/android/cs-CZ/changelogs/40104080.txt @@ -0,0 +1,2 @@ +Hlavní změny v této verzi: Časová osa vlákna je nyní živá a rychlejší. Opravy různých chyb a vylepšení stability. +Úplný seznam změn: https://github.com/vector-im/element-android/releases From 833798bd252b3536ccf50bc4ac7eeb50c571c7e3 Mon Sep 17 00:00:00 2001 From: Piotr Strebski Date: Tue, 5 Apr 2022 15:14:46 +0000 Subject: [PATCH 032/561] Translated using Weblate (Polish) Currently translated at 97.4% (2135 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/pl/ --- vector/src/main/res/values-pl/strings.xml | 93 +++++++++++++++++++++-- 1 file changed, 87 insertions(+), 6 deletions(-) diff --git a/vector/src/main/res/values-pl/strings.xml b/vector/src/main/res/values-pl/strings.xml index e4b7b28a01..ef24d6e62b 100644 --- a/vector/src/main/res/values-pl/strings.xml +++ b/vector/src/main/res/values-pl/strings.xml @@ -1798,18 +1798,18 @@ %1$s, %2$s i %3$s %s w Ustawieniach, aby otrzymywać zaproszenia bezpośrednio w ${app_name}. Zmiana tematu - Aktualizacja Przestrzeni + Aktualizacja przestrzeni Aktualizacja pokoju Wysyłanie zdarzeń m.room.server_acl Zmiana uprawnień - Zmiana nazwy Przestrzeni + Zmiana nazwy przestrzeni Zmiana nazwy pokoju Zmiana widoczności historii Włączanie szyfrowania przestrzeni Włączanie szyfrowania pokoju - Zmiana głównego adresu Przestrzeni + Zmiana głównego adresu przestrzeni Zmiana głównego adresu pokoju - Zmiana awatara Przestrzeni + Zmiana awatara przestrzeni Zmiana awatara pokoju Modyfikowanie widgetów Powiadamianie wszystkich @@ -2354,7 +2354,7 @@ Brakujący typ wiadomości Brak zawartości - Wyślij wydarzenie niestandardowe + Wyślij zdarzenie niestandardowe Ostrzegawczy poziom zaufania Upewnij się najpierw Nie sprawdzono @@ -2363,5 +2363,86 @@ Włącz matematykę LaTeX Zakończ ankietę Czy zakończyć ankietę\? - To powstrzyma użytkowników od głosowania i wyświetli finalny wynik ankiety. + To powstrzyma użytkowników od głosowania i wyświetli ostateczny wynik ankiety. + Uwaga: aplikacja zostanie uruchomiona ponownie + Włącz wątkowanie wiadomości + Upewnij się, że odpowiednie osoby mają dostęp do firmy %s. Więcej osób możesz zaprosić później. + Wyślij niestandardowe zdarzenie stanowe + Wyślij zdarzenie stanowe + Zdarzenia stanowe + Zawartość zdarzenia + Zdarzenie stanowe wysłane! + Zdarzenie wysłane! + Nieprawidłowe zdarzenie + Zawartość wydarzenia + Klucz stanu + Konsultacja z %1$s + Serwer domowy nie akceptuje nazwy użytkownika zawierającej tylko cyfry. + Wymusza odrzucenie bieżącej sesji grupy wychodzącej w zaszyfrowanym pokoju + Pobieranie krzywego klucza + Szyfrowanie jest błędnie skonfigurowane + Przywróć szyfrowanie + Skontaktuj się z administratorem, aby przywrócić szyfrowanie do prawidłowego stanu. + Szyfrowanie zostało błędnie skonfigurowane. + Utwórz konto + Pomiń ten krok + Zapisz i kontynuuj + Twoje ustawienia zostały zapisane. + Wszystko ustawiłeś! + Chodźmy + Możesz go zmienić w każdym momencie. + Dodaj obraz profilu + Możesz zmienić ją później + Powiadomienie pokoju + Wyświetlana nazwa + Będzie ona widoczna podczas wysyłania wiadomości. + Wybierz wyświetlaną nazwę + Twoje konto %s zostało utworzone. + Gratulacje! + Zabierz mnie do domu + Spersonalizuj profil + Połącz się z serwerem + Chcesz dołączyć do istniejącego serwera\? + pominąć to pytanie + Nie wiesz jeszcze\? Możesz %s + Społeczności + Zespoły + Przyjaciele i rodzina + Pomożemy Ci się połączyć. + Z kim będziesz najczęściej rozmawiać\? + Szyfrowane od-końca-do-końca i nie wymaga numeru telefonu. Brak reklam i dataminingu. + Wybierz, gdzie prowadzone są Twoje rozmowy, dając Ci kontrolę i niezależność. Połączenie przez sieć Matrix. + Bezpieczna i niezależna komunikacja, która zapewnia ten sam poziom prywatności, co rozmowa twarzą w twarz we własnym domu. + Wiadomości dla Twojego zespołu. + Położenie + Zagadnienia prawne + Już przeglądasz ten wątek! + Wyświetl w pokoju + Odpowiedz w wątku + Polecenie „%s” jest rozpoznawane, ale nie jest obsługiwane w wątkach. + Ten serwer nie zapewnia żadnych zasad. + Polityka Twojego serwera tożsamości + Polityka Twojego serwera domowego + Polityka ${app_name} + Wątki zbliżają się do wersji beta 🎉 + Z wątku + Wskazówka: naciśnij i przytrzymaj wiadomość i użyj „%s”. + Dzięki wątkom Twoje rozmowy są aktualne i łatwe do śledzenia. + Organizuj dyskusje za pomocą wątków + Pokazuje wszystkie wątki, w których brałeś udział + Pokazuje wszystkie wątki z bieżącego pokoju + Moje wątki + Wszystkie wątki + Filtr + Wątki + Wątek + Filtruj wątki w pokoju + Szyfrowanie zostało źle skonfigurowane, więc nie możesz wysyłać wiadomości. Kliknij, aby otworzyć ustawienia. + Szyfrowanie zostało źle skonfigurowane, więc nie możesz wysyłać wiadomości. Skontaktuj się z administratorem, aby przywrócić szyfrowanie do prawidłowego stanu. + %1$s, %2$s i inni + %1$s i %2$s + Skopiuj odnośnik do wątku + Zobacz w pokoju + Wyłącz + Wyświetl wątki \ No newline at end of file From de109c9772458f1f0c2f41480e08c2c8cfcbebd9 Mon Sep 17 00:00:00 2001 From: maciejek997 Date: Tue, 5 Apr 2022 13:13:52 +0000 Subject: [PATCH 033/561] Translated using Weblate (Polish) Currently translated at 97.4% (2135 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/pl/ --- vector/src/main/res/values-pl/strings.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/vector/src/main/res/values-pl/strings.xml b/vector/src/main/res/values-pl/strings.xml index ef24d6e62b..662574536f 100644 --- a/vector/src/main/res/values-pl/strings.xml +++ b/vector/src/main/res/values-pl/strings.xml @@ -2445,4 +2445,14 @@ Zobacz w pokoju Wyłącz Wyświetl wątki + Utwórz ankietę + Otwórz kontakty + Wyślij naklejkę + Prześlij plik + Wyślij obrazy oraz wideo + Otwórz kamerę + Usuń ankietę + Ankieta zakończona + Oddano głos + Zakończ ankietę \ No newline at end of file From fca0b042e879f5c6fba76fccef851bfffacd572c Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Wed, 6 Apr 2022 04:13:09 +0000 Subject: [PATCH 034/561] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (2190 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/zh_Hant/ --- vector/src/main/res/values-zh-rTW/strings.xml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/vector/src/main/res/values-zh-rTW/strings.xml b/vector/src/main/res/values-zh-rTW/strings.xml index 781591ace7..ea0c677168 100644 --- a/vector/src/main/res/values-zh-rTW/strings.xml +++ b/vector/src/main/res/values-zh-rTW/strings.xml @@ -2391,4 +2391,23 @@ \n \n這會是一次性的過渡,因為討論串現在是 Matrix 規範的一部分了。 討論串接近測試版了 🎉 + 正在進行位置分享 + ${app_name} 即時位置 + 家伺服器不接受僅有數字的使用者名稱。 + 略過此步驟 + 儲存並繼續 + 您的偏好設定已儲存。 + 準備好了! + 走吧 + 您可以在任何時候變更這個。 + 新增個人資訊照片 + 您可以在稍後變更這個 + 顯示名稱 + 這將會在您傳送訊息時顯示。 + 選擇顯示名稱 + 您的帳號 %s 已建立。 + 恭喜! + 帶我回家 + 個人化檔案 + 停用 \ No newline at end of file From 0167e3a222b7cab6396928a6efcc7d73b4f5531a Mon Sep 17 00:00:00 2001 From: Danial Behzadi Date: Tue, 5 Apr 2022 12:34:02 +0000 Subject: [PATCH 035/561] Translated using Weblate (Persian) Currently translated at 100.0% (2190 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/fa/ --- vector/src/main/res/values-fa/strings.xml | 29 ++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/vector/src/main/res/values-fa/strings.xml b/vector/src/main/res/values-fa/strings.xml index ab6bac5c1b..9a23913f76 100644 --- a/vector/src/main/res/values-fa/strings.xml +++ b/vector/src/main/res/values-fa/strings.xml @@ -1247,7 +1247,7 @@ نتیجه‌ای در پی نداشت فیلترکردن کاربران مسدود شده - %d مورد + ۱ مورد %d مورد تنها اگر مدیر کارساز، اثرانگشتی منتشر کرده که با بالایی مطابق است، بپذیرید. @@ -2430,4 +2430,31 @@ هم‌رسانی مکان کنونیم بزرگ‌نمایی به مکان کنونی سنجاق مکان گزیده روی نقشه + داریم به ارائه یک بتای عمومی برای رشته‌ها نزدیک‌تر می‌شویم. +\n +\nهمین‌طور که برایش آماده می‌شویم، نیاز به انجام چند تغییر است: رشته‌هایی که پیش از این ایجاد شده‌اند،به شکل پاسخ‌های عادی نشان داده خواهند شد. +\n +\nاین کار، یک تبدیل یک باره است؛ چرا که رشته‌ها اکنون بخشی از مشخّصات ماتریکسند. + رشته‌ها به بتا می رسند 🎉 + هم‌رساین مکان در حال انجام است + مکان زندهٔ ${app_name} + اگر می‌خواهید مکانتان را هم‌رسانی کنید، ${app_name} نیاز به دسترسی همیشگی مکان هنگام در پس‌زمینه بودن کاره دارد. +\nفقط برای مدتی که برمی‌گزینید، به مکانتان دسترسی خواهیم داشت. + کارساز خانگی، نام‌های کاربری فقط رقمی را نمی‌پذیرد. + پرش از این گام + ذخیره و ادامه + ترجیحاتتان ذخیره شد. + همه‌چیز تنظیم شده! + بزن بریم + می‌توانید هرزمانی تغییرش دهید. + گزینش نامی نمایشی + افزودن یک تصویر نمایه + می‌توانید بعدها تغییرش دهید + نام نمایشی + هنگامی که پیام می‌فرستید نشان داده خواهد شد. + حسابتان %s ایجاد شد. + تبریک! + مرا به خانه ببر + شخصی سازی نمایه + از کار انداختن \ No newline at end of file From 1a6de70d927891891d4da4000c946e16ebf2b915 Mon Sep 17 00:00:00 2001 From: random Date: Wed, 6 Apr 2022 08:29:04 +0000 Subject: [PATCH 036/561] Translated using Weblate (Italian) Currently translated at 100.0% (55 of 55 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/it/ --- fastlane/metadata/android/it-IT/changelogs/40104060.txt | 2 ++ fastlane/metadata/android/it-IT/changelogs/40104070.txt | 2 ++ fastlane/metadata/android/it-IT/changelogs/40104080.txt | 2 ++ 3 files changed, 6 insertions(+) create mode 100644 fastlane/metadata/android/it-IT/changelogs/40104060.txt create mode 100644 fastlane/metadata/android/it-IT/changelogs/40104070.txt create mode 100644 fastlane/metadata/android/it-IT/changelogs/40104080.txt diff --git a/fastlane/metadata/android/it-IT/changelogs/40104060.txt b/fastlane/metadata/android/it-IT/changelogs/40104060.txt new file mode 100644 index 0000000000..c9ea8af2cc --- /dev/null +++ b/fastlane/metadata/android/it-IT/changelogs/40104060.txt @@ -0,0 +1,2 @@ +Modifiche principali in questa versione: la linea temporale per argomenti è ora attiva e più veloce. Varie correzioni e miglioramenti. +Cronologia completa: https://github.com/vector-im/element-android/releases/tag/v1.4.6 diff --git a/fastlane/metadata/android/it-IT/changelogs/40104070.txt b/fastlane/metadata/android/it-IT/changelogs/40104070.txt new file mode 100644 index 0000000000..2dfd415920 --- /dev/null +++ b/fastlane/metadata/android/it-IT/changelogs/40104070.txt @@ -0,0 +1,2 @@ +Modifiche principali in questa versione: varie correzioni di errori e miglioramenti della stabilità. +Cronologia completa: https://github.com/vector-im/element-android/releases/tag/v1.4.7 diff --git a/fastlane/metadata/android/it-IT/changelogs/40104080.txt b/fastlane/metadata/android/it-IT/changelogs/40104080.txt new file mode 100644 index 0000000000..8427e3d3fe --- /dev/null +++ b/fastlane/metadata/android/it-IT/changelogs/40104080.txt @@ -0,0 +1,2 @@ +Modifiche principali in questa versione: la linea temporale per argomenti è ora attiva e più veloce. Varie correzioni e miglioramenti. +Cronologia completa: https://github.com/vector-im/element-android/releases From 5f30a66929a3faf79e0f191cabf13788174b10a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Tue, 5 Apr 2022 16:38:40 +0000 Subject: [PATCH 037/561] Translated using Weblate (Estonian) Currently translated at 100.0% (55 of 55 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/et/ --- fastlane/metadata/android/et/changelogs/40104060.txt | 2 ++ fastlane/metadata/android/et/changelogs/40104070.txt | 2 ++ fastlane/metadata/android/et/changelogs/40104080.txt | 2 ++ 3 files changed, 6 insertions(+) create mode 100644 fastlane/metadata/android/et/changelogs/40104060.txt create mode 100644 fastlane/metadata/android/et/changelogs/40104070.txt create mode 100644 fastlane/metadata/android/et/changelogs/40104080.txt diff --git a/fastlane/metadata/android/et/changelogs/40104060.txt b/fastlane/metadata/android/et/changelogs/40104060.txt new file mode 100644 index 0000000000..f506b617ed --- /dev/null +++ b/fastlane/metadata/android/et/changelogs/40104060.txt @@ -0,0 +1,2 @@ +Põhilised muutused selles versioonis: jutulõngad on nüüd kasutatavad ja toimivad kiiremini, lisaks pisiparandused ja stabiilsust parandavad kohendused. +Kogu ingliskeelne muudatuste logi: https://github.com/vector-im/element-android/releases/tag/v1.4.6 diff --git a/fastlane/metadata/android/et/changelogs/40104070.txt b/fastlane/metadata/android/et/changelogs/40104070.txt new file mode 100644 index 0000000000..ea3582678d --- /dev/null +++ b/fastlane/metadata/android/et/changelogs/40104070.txt @@ -0,0 +1,2 @@ +Põhilised muutused selles versioonis: pisiparandused ja stabiilsust parandavad kohendused. +Kogu ingliskeelne muudatuste logi: https://github.com/vector-im/element-android/releases/tag/v1.4.7 diff --git a/fastlane/metadata/android/et/changelogs/40104080.txt b/fastlane/metadata/android/et/changelogs/40104080.txt new file mode 100644 index 0000000000..a35fded9b6 --- /dev/null +++ b/fastlane/metadata/android/et/changelogs/40104080.txt @@ -0,0 +1,2 @@ +Põhilised muutused selles versioonis: jutulõngad on nüüd kasutatavad ja toimivad kiiremini, lisaks pisiparandused ja stabiilsust parandavad kohendused. +Kogu ingliskeelne muudatuste logi: https://github.com/vector-im/element-android/releases From 9e39df111d8aadf26cf914503565b51f9150bd90 Mon Sep 17 00:00:00 2001 From: LinAGKar Date: Wed, 6 Apr 2022 19:38:40 +0000 Subject: [PATCH 038/561] Translated using Weblate (Swedish) Currently translated at 100.0% (2190 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/sv/ --- vector/src/main/res/values-sv/strings.xml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/vector/src/main/res/values-sv/strings.xml b/vector/src/main/res/values-sv/strings.xml index 2b4e3502f8..c6c8b45441 100644 --- a/vector/src/main/res/values-sv/strings.xml +++ b/vector/src/main/res/values-sv/strings.xml @@ -2438,4 +2438,23 @@ \nMedan vi förbereder den så behöver vi göra några ändringar: trådar skapade innan den här tidpunkten kommer att visas som vanliga svar. \n \nDet kommer att vara en engångshändelse, eftersom trådar nu är en del av Matrixspecifikationen. + Platsdelning pågår + ${app_name} Kontinuerlig plats + Hemservern accepterar inte användarnamn med bara siffror. + Hoppa över det här steget + Spara och fortsätt + Dina inställningar har sparats. + Du är redo! + Nu kör vi + Du kan ändra detta när som helst. + Lägg till en profilbild + Du kan ändra detta senare + Visningsnamn + Det här kommer att visas när du skickar meddelanden. + Välj ett visningsnamn + Ditt konto %s har skapats. + Grattis! + För mig hem + Anpassa profil + Inaktivera \ No newline at end of file From b2b1e1ca0a51a9d4df3f8468ea7db1959d921f4d Mon Sep 17 00:00:00 2001 From: Jozef Gaal Date: Tue, 5 Apr 2022 18:26:33 +0000 Subject: [PATCH 039/561] Translated using Weblate (Slovak) Currently translated at 100.0% (55 of 55 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/sk/ --- fastlane/metadata/android/sk/changelogs/40104060.txt | 2 ++ fastlane/metadata/android/sk/changelogs/40104070.txt | 2 ++ fastlane/metadata/android/sk/changelogs/40104080.txt | 2 ++ 3 files changed, 6 insertions(+) create mode 100644 fastlane/metadata/android/sk/changelogs/40104060.txt create mode 100644 fastlane/metadata/android/sk/changelogs/40104070.txt create mode 100644 fastlane/metadata/android/sk/changelogs/40104080.txt diff --git a/fastlane/metadata/android/sk/changelogs/40104060.txt b/fastlane/metadata/android/sk/changelogs/40104060.txt new file mode 100644 index 0000000000..53e192fe7c --- /dev/null +++ b/fastlane/metadata/android/sk/changelogs/40104060.txt @@ -0,0 +1,2 @@ +Hlavné zmeny v tejto verzii: Vlákna na časovej osi sú teraz živé a rýchlejšie. Rôzne opravy chýb a vylepšenia stability. +Úplný zoznam zmien: https://github.com/vector-im/element-android/releases/tag/v1.4.6 diff --git a/fastlane/metadata/android/sk/changelogs/40104070.txt b/fastlane/metadata/android/sk/changelogs/40104070.txt new file mode 100644 index 0000000000..1e056cf32f --- /dev/null +++ b/fastlane/metadata/android/sk/changelogs/40104070.txt @@ -0,0 +1,2 @@ +Hlavné zmeny v tejto verzii: Rôzne opravy chýb a vylepšenia stability. +Úplný zoznam zmien: https://github.com/vector-im/element-android/releases/tag/v1.4.7 diff --git a/fastlane/metadata/android/sk/changelogs/40104080.txt b/fastlane/metadata/android/sk/changelogs/40104080.txt new file mode 100644 index 0000000000..7f42250fb9 --- /dev/null +++ b/fastlane/metadata/android/sk/changelogs/40104080.txt @@ -0,0 +1,2 @@ +Hlavné zmeny v tejto verzii: Vlákna na časovej osi sú teraz živé a rýchlejšie. Rôzne opravy chýb a vylepšenia stability. +Úplný zoznam zmien: https://github.com/vector-im/element-android/releases From 9e85abe8e61c6a985459a659407b85f1adf39c98 Mon Sep 17 00:00:00 2001 From: Danial Behzadi Date: Tue, 5 Apr 2022 12:21:05 +0000 Subject: [PATCH 040/561] Translated using Weblate (Persian) Currently translated at 100.0% (55 of 55 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/fa/ --- fastlane/metadata/android/fa/changelogs/40104060.txt | 2 ++ fastlane/metadata/android/fa/changelogs/40104070.txt | 2 ++ fastlane/metadata/android/fa/changelogs/40104080.txt | 2 ++ 3 files changed, 6 insertions(+) create mode 100644 fastlane/metadata/android/fa/changelogs/40104060.txt create mode 100644 fastlane/metadata/android/fa/changelogs/40104070.txt create mode 100644 fastlane/metadata/android/fa/changelogs/40104080.txt diff --git a/fastlane/metadata/android/fa/changelogs/40104060.txt b/fastlane/metadata/android/fa/changelogs/40104060.txt new file mode 100644 index 0000000000..5a1188b370 --- /dev/null +++ b/fastlane/metadata/android/fa/changelogs/40104060.txt @@ -0,0 +1,2 @@ +تغییرات عمده در این نگارش: خط زمانی رشته‌ها اکنون زنده و سریع‌تر است. چندین رفع اشکال و بهبود پایداری. +گزارش دگرگونی کامل: https://github.com/vector-im/element-android/releases/tag/v1.4.6 diff --git a/fastlane/metadata/android/fa/changelogs/40104070.txt b/fastlane/metadata/android/fa/changelogs/40104070.txt new file mode 100644 index 0000000000..d35ded337b --- /dev/null +++ b/fastlane/metadata/android/fa/changelogs/40104070.txt @@ -0,0 +1,2 @@ +تغییرات عمده در این نگارش: چندین رفع اشکال و بهبود پایداری. +گزارش دگرگونی کامل: https://github.com/vector-im/element-android/releases/tag/v1.4.7 diff --git a/fastlane/metadata/android/fa/changelogs/40104080.txt b/fastlane/metadata/android/fa/changelogs/40104080.txt new file mode 100644 index 0000000000..673a46a10d --- /dev/null +++ b/fastlane/metadata/android/fa/changelogs/40104080.txt @@ -0,0 +1,2 @@ +تغییرات عمده در این نگارش: خط زمانی رشته‌ها اکنون زنده و سریع‌تر است. چندین رفع اشکال و بهبود پایداری. +گزارش دگرگونی کامل: https://github.com/vector-im/element-android/releases From 9fb71130a40675a54573ade48cdf9a399a1fe383 Mon Sep 17 00:00:00 2001 From: lvre <7uu3qrbvm@relay.firefox.com> Date: Tue, 5 Apr 2022 17:13:06 +0000 Subject: [PATCH 041/561] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (2190 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/pt_BR/ --- vector/src/main/res/values-pt-rBR/strings.xml | 43 +++++++++++++------ 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/vector/src/main/res/values-pt-rBR/strings.xml b/vector/src/main/res/values-pt-rBR/strings.xml index d06937fb64..f682a123f4 100644 --- a/vector/src/main/res/values-pt-rBR/strings.xml +++ b/vector/src/main/res/values-pt-rBR/strings.xml @@ -1953,11 +1953,11 @@ %d entradas Limite de upload de arquivo do servidor - Qualquer pessoa num espaço com esta sala pode encontrá-la e juntar-se a ela. Somente admins desta sala podem adicioná-la a um espaço. + Qualquer pessoa num espaço com esta sala pode achá-la e se juntar a ela. Somente admins desta sala podem adicioná-la a um espaço. Membros de espaço somente - Qualquer pessoa pode encontrar a sala e juntar-se + Qualquer pessoa pode achar a sala e se juntar Pública - Somente pessoas convidadas podem encontrar e juntar-se + Somente pessoas convidadas podem achar e se juntar Privada Configuração de acesso desconhecida (%s) Qualquer pessoa pode tocar na sala, membros podem então aceitar ou rejeitar @@ -2024,7 +2024,7 @@ %d pessoas que você conhece já têm se juntado Juntar-Se a Espaço - Criar Espaço + Criar espaço Junte-se a meu espaço %1$s %2$s Elas vão ser capazes de explorar %s Convidar para %s @@ -2058,7 +2058,7 @@ Que tipo de espaço você quer criar\? Seu espaço privado Seu espaço público - Adicionar Espaço + Adicionar espaço Espaço privado Espaço público Criar um Espaço @@ -2111,8 +2111,8 @@ %d chamadas de áudio perdidas Por favor note que fazer upgrade vai fazer uma nova versão da sala. Todas as mensagens atuais vão permanecer nesta sala arquivada. - Qualquer pessoa em um espaço pai vai ser capaz de encontrar e juntar-se a esta sala - não precisa convidar manualmente todo mundo. Você vai ser capaz de mudar isto em configurações de sala a qualquer hora. - Qualquer pessoa em %s vai ser capaz de encontrar e juntar-se a esta sala - não precisa convidar todo mundo. Você vai ser capaz de mudar isto em configurações de sala a qualquer hora. + Qualquer pessoa em um espaço pai vai ser capaz de achar e se juntar a esta sala - não precisa convidar manualmente todo mundo. Você vai ser capaz de mudar isto em configurações de sala a qualquer hora. + Qualquer pessoa em %s vai ser capaz de achar e se juntar a esta sala - não precisa convidar todo mundo. Você vai ser capaz de mudar isto em configurações de sala a qualquer hora. Mensagem de Voz (%1$s) Não dá para responder ou editar enquanto mensagem de voz está ativa Não dá para gravar uma mensagem de voz @@ -2130,13 +2130,13 @@ Voz Outros espaços ou salas que você poderia não saber Espaço que você sabe que contém esta sala - Decida quem pode encontrar e juntar-se a esta sala. + Decida quem pode achar e se juntar a esta sala. Toque para editar espaços Selecionar espaços - Decida que espaços podem acessar esta sala. Se um espaço é selecionado seus membros vão ser capazes de encontrar e juntar-se a Nome de sala. + Decida que espaços podem acessar esta sala. Se um espaço é selecionado seus membros vão ser capazes de achar e se juntar a Nome de sala. Espaços que podem acessar Permitir membros de espaço a encontrar e acessar. - Membros de Escpaço %s podem encontrar, previsualizar e juntar-se. + Membros de Espaço %s podem achar, previsualizar e se juntar. Privada (Convite Somente) Para enviar mensagens de voz, por favor conceda a permissão Microfone. Notifique-me para @@ -2222,7 +2222,7 @@ Abrir Configurações de Descoberta Pesquisar por nome, ID ou mail Criar Novo Espaço - Qualquer pessoa pode encontrar o espaço e se juntar + Qualquer pessoa pode achar o espaço e se juntar Acesso a espaço Quem pode acessar\? Habilitar notificações de email para %s @@ -2392,7 +2392,7 @@ O comando \"%s\" é reconhecido mas não suportado em threads. De uma Thread Dica: Toque longo numa mensagem e use “%s”. - Threads ajudam a manter suas conversas em-tópico e fáceis de rastrear. + Threads ajudam manter suas conversas em-tópico e fáceis de rastrear. Mantenha discussões organizadas com threads Mostra todas as threads nas quais você tem participado Minhas Threads @@ -2438,4 +2438,23 @@ \n \nIsto vai ser uma transição única visto que Threads são agora parte da especificação Matrix. Threads Aproximando-Se a Beta 🎉 + ${app_name} Localização ao Vivo + Compartilhamento de localização está em progresso + O servidorcasa não aceita nome de usuária(o) com somente dígitos. + Pular este passo + Salvar e continuar + Suas preferências têm sido salvas. + Você está pronta(o)! + Vamo lá + Você pode mudar isto a qualquer hora. + Adicione uma imagem de perfil + Você pode mudar isto mais tarde + Nome de Exibição + Isto vai ser mostrado quando você enviar mensagens. + Escolha um nome de exibição + Sua conta %s tem sido criada. + Parabéns! + Me leve para casa + Personalizar perfil + Desabilitar \ No newline at end of file From e6e9681856d8898a2a57a2b946152742c4dea5c2 Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Wed, 6 Apr 2022 04:04:09 +0000 Subject: [PATCH 042/561] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (55 of 55 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/zh_Hant/ --- fastlane/metadata/android/zh-TW/changelogs/40104060.txt | 2 ++ fastlane/metadata/android/zh-TW/changelogs/40104070.txt | 2 ++ fastlane/metadata/android/zh-TW/changelogs/40104080.txt | 2 ++ 3 files changed, 6 insertions(+) create mode 100644 fastlane/metadata/android/zh-TW/changelogs/40104060.txt create mode 100644 fastlane/metadata/android/zh-TW/changelogs/40104070.txt create mode 100644 fastlane/metadata/android/zh-TW/changelogs/40104080.txt diff --git a/fastlane/metadata/android/zh-TW/changelogs/40104060.txt b/fastlane/metadata/android/zh-TW/changelogs/40104060.txt new file mode 100644 index 0000000000..316fad3363 --- /dev/null +++ b/fastlane/metadata/android/zh-TW/changelogs/40104060.txt @@ -0,0 +1,2 @@ +此版本中的主要變動:討論串時間軸現已更新,而且更快了。多個臭蟲修復與穩定性改善。 +完整的變更紀錄:https://github.com/vector-im/element-android/releases/tag/v1.4.6 diff --git a/fastlane/metadata/android/zh-TW/changelogs/40104070.txt b/fastlane/metadata/android/zh-TW/changelogs/40104070.txt new file mode 100644 index 0000000000..2cd9da666e --- /dev/null +++ b/fastlane/metadata/android/zh-TW/changelogs/40104070.txt @@ -0,0 +1,2 @@ +此版本中的主要變動:多個臭蟲修復與穩定性改善。 +完整的變更紀錄:https://github.com/vector-im/element-android/releases/tag/v1.4.7 diff --git a/fastlane/metadata/android/zh-TW/changelogs/40104080.txt b/fastlane/metadata/android/zh-TW/changelogs/40104080.txt new file mode 100644 index 0000000000..c036aa7d56 --- /dev/null +++ b/fastlane/metadata/android/zh-TW/changelogs/40104080.txt @@ -0,0 +1,2 @@ +此版本中的主要變動:討論串時間軸現已更新,而且更快了。多個臭蟲修復與穩定性改善。 +完整的變更紀錄:https://github.com/vector-im/element-android/releases From 2b3e3cf7e69c36a08b347fe687e34c521d862447 Mon Sep 17 00:00:00 2001 From: LinAGKar Date: Wed, 6 Apr 2022 19:27:48 +0000 Subject: [PATCH 043/561] Translated using Weblate (Swedish) Currently translated at 100.0% (55 of 55 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/sv/ --- fastlane/metadata/android/sv-SE/changelogs/40104060.txt | 2 ++ fastlane/metadata/android/sv-SE/changelogs/40104070.txt | 2 ++ fastlane/metadata/android/sv-SE/changelogs/40104080.txt | 2 ++ 3 files changed, 6 insertions(+) create mode 100644 fastlane/metadata/android/sv-SE/changelogs/40104060.txt create mode 100644 fastlane/metadata/android/sv-SE/changelogs/40104070.txt create mode 100644 fastlane/metadata/android/sv-SE/changelogs/40104080.txt diff --git a/fastlane/metadata/android/sv-SE/changelogs/40104060.txt b/fastlane/metadata/android/sv-SE/changelogs/40104060.txt new file mode 100644 index 0000000000..16a49fa3bc --- /dev/null +++ b/fastlane/metadata/android/sv-SE/changelogs/40104060.txt @@ -0,0 +1,2 @@ +Huvudsakliga ändringar i den här versionen: Trådtidslinje är nu live och snabbare. Diverse buggfixar och stabilitetsförbättringar. +Full ändringslogg: https://github.com/vector-im/element-android/releases/tag/v1.4.6 diff --git a/fastlane/metadata/android/sv-SE/changelogs/40104070.txt b/fastlane/metadata/android/sv-SE/changelogs/40104070.txt new file mode 100644 index 0000000000..01f79e85d6 --- /dev/null +++ b/fastlane/metadata/android/sv-SE/changelogs/40104070.txt @@ -0,0 +1,2 @@ +Huvudsakliga ändringar i den här versionen: Diverse buggfixar och stabilitetsförbättringar. +Full ändringslogg: https://github.com/vector-im/element-android/releases/tag/v1.4.7 diff --git a/fastlane/metadata/android/sv-SE/changelogs/40104080.txt b/fastlane/metadata/android/sv-SE/changelogs/40104080.txt new file mode 100644 index 0000000000..2ac7df2cda --- /dev/null +++ b/fastlane/metadata/android/sv-SE/changelogs/40104080.txt @@ -0,0 +1,2 @@ +Huvudsakliga ändringar i den här versionen: Trådtidslinje är nu live och snabbare. Diverse buggfixar och stabilitetsförbättringar. +Full ändringslogg: https://github.com/vector-im/element-android/releases/tag/v1.4.8 From 7ae42d81c15cecd51a03f6f50466a4429701d546 Mon Sep 17 00:00:00 2001 From: Ihor Hordiichuk Date: Tue, 5 Apr 2022 17:34:15 +0000 Subject: [PATCH 044/561] Translated using Weblate (Ukrainian) Currently translated at 100.0% (2190 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/uk/ --- vector/src/main/res/values-uk/strings.xml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/vector/src/main/res/values-uk/strings.xml b/vector/src/main/res/values-uk/strings.xml index 26d090e3ef..ce1781cb9c 100644 --- a/vector/src/main/res/values-uk/strings.xml +++ b/vector/src/main/res/values-uk/strings.xml @@ -1490,7 +1490,7 @@ Невідоме налаштування доступу (%s) Будь-хто може попроситися до кімнати, учасники можуть прийняти або відхилити Усе одно приєднатися - Створити Простір + Створити простір Приєднатися до Простору Поділитися посиланням Запросити електронним листом @@ -2530,4 +2530,23 @@ \n \nЦе буде одноразовий перехід, оскільки треди — тепер частина специфікації Matrix. Незабаром бета-версія тредів 🎉 + Триває передавання місцеперебування + ${app_name} Місцеперебування наживо + Домашній сервер не приймає ім\'я користувача лише з цифр. + Пропустити цей крок + Зберегти й продовжити + Ваші налаштування збережено. + Усе налаштовано! + Поїхали + Ви можете змінити його будь-коли. + Додати зображення профілю + Ви можете змінити його пізніше + Показуване ім\'я + Його буде показано у надісланих повідомленнях. + Виберіть показуване ім\'я + Ваш обліковий запис %s створено. + Вітаємо! + На головну + Персоналізувати профіль + Вимкнути \ No newline at end of file From 051cf101d1f6e3335b7fb86ed2e2a55d259da7f6 Mon Sep 17 00:00:00 2001 From: Linerly Date: Tue, 5 Apr 2022 22:59:01 +0000 Subject: [PATCH 045/561] Translated using Weblate (Indonesian) Currently translated at 100.0% (55 of 55 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/id/ --- fastlane/metadata/android/id/changelogs/40104060.txt | 2 ++ fastlane/metadata/android/id/changelogs/40104070.txt | 2 ++ fastlane/metadata/android/id/changelogs/40104080.txt | 2 ++ 3 files changed, 6 insertions(+) create mode 100644 fastlane/metadata/android/id/changelogs/40104060.txt create mode 100644 fastlane/metadata/android/id/changelogs/40104070.txt create mode 100644 fastlane/metadata/android/id/changelogs/40104080.txt diff --git a/fastlane/metadata/android/id/changelogs/40104060.txt b/fastlane/metadata/android/id/changelogs/40104060.txt new file mode 100644 index 0000000000..3b4ce82497 --- /dev/null +++ b/fastlane/metadata/android/id/changelogs/40104060.txt @@ -0,0 +1,2 @@ +Perubahan utama dalam versi ini: Linimasa utasan sekarang langsung dan lebih cepat. Banyak perbaikan kutu dan perbaikan stabilitas. +Catatan perubahan lanjutan: https://github.com/vector-im/element-android/releases/tag/v1.4.6 diff --git a/fastlane/metadata/android/id/changelogs/40104070.txt b/fastlane/metadata/android/id/changelogs/40104070.txt new file mode 100644 index 0000000000..39daf31eb6 --- /dev/null +++ b/fastlane/metadata/android/id/changelogs/40104070.txt @@ -0,0 +1,2 @@ +Perubahan utama dalam versi ini: Banyak perbaikan kutu dan perbaikan stabilitas. +Catatan perubahan lanjutan: https://github.com/vector-im/element-android/releases/tag/v1.4.7 diff --git a/fastlane/metadata/android/id/changelogs/40104080.txt b/fastlane/metadata/android/id/changelogs/40104080.txt new file mode 100644 index 0000000000..0a5ae82096 --- /dev/null +++ b/fastlane/metadata/android/id/changelogs/40104080.txt @@ -0,0 +1,2 @@ +Perubahan utama dalam versi ini: Linimasa utasan sekarang langsung dan lebih cepat. Banyak perbaikan kutu dan perbaikan stabilitas. +Catatan perubahan lanjutan: https://github.com/vector-im/element-android/releases From c54a124d34ae2ae7524ab9445573723361c49cec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Wed, 6 Apr 2022 17:24:09 +0000 Subject: [PATCH 046/561] Translated using Weblate (Estonian) Currently translated at 99.9% (2188 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/et/ --- vector/src/main/res/values-et/strings.xml | 27 +++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/vector/src/main/res/values-et/strings.xml b/vector/src/main/res/values-et/strings.xml index e320550323..19b4d37102 100644 --- a/vector/src/main/res/values-et/strings.xml +++ b/vector/src/main/res/values-et/strings.xml @@ -245,7 +245,7 @@ Kas sa oled kindel\? Varunda Kui sa enne väljalogimist ei varunda oma võtmeid, siis sa kaotad ligipääsu oma krüptitud sõnumitele. - Laeme… + Laadime… Sobib Tühista Salvesta @@ -1958,7 +1958,7 @@ Kogukonnakeskused on uus võimalus siduda jututubasid ja inimesi. Lisa olemasolevaid jututubasid ja kogukonnakeskuseid Lahku kogukonnast - Lisa jututuba + Lisa jututube Tutvu jututubadega %d sinu tuttav on juba liitunud @@ -1968,7 +1968,7 @@ \nProovi hiljem uuesti või küsi jututoa haldajalt, kas sul on olemas selleks vajalikud õigused. Liitu ikkagi Liitu kogukonnakeskusega - Loo kogukonnakeskus + Loo kogukond Hetkel jäta vahele Palun liitu %1$s kogukonnakeskusega %2$s Nad ei saa osalema %s jututoas @@ -2007,7 +2007,7 @@ Missugust kogukonnakeskust sooviksid sa luua\? Sinu privaatne kogukonnakeskus Sinu avalik kogukonnakeskus - Lisa kogukonnakeskus + Lisa kogukond Lahku antud tunnusega jututoast (tunnuse puudumisel jututoast, kus hetkel asud) Liitu kogukonnakeskusega tema tunnuse alusel Loo kogukonnakeskus @@ -2438,4 +2438,23 @@ \n \nKuna jutulõngad on nüüd osa Matrix\'i spetsifikatsioonist, siis see on ühekordne muudatus. Jutulõngad on peaaegu valmis 🎉 + Asukoha reaalajas jagamine on hetkel kasutusel + Asukoht reaalajas - ${app_name} + Koduserver ei võimalda ainult numbritest koosneva kasutajanime loomist. + Jäta see samm vahele + Salvesta ja jätka + Sinu eelistused on salvestatud. + Kõik on valmis! + Alustame nüüd + Sa võid seda hiljem alati muuta. + Lisa profiilipilt + Sa võid seda hiljem muuta + Kuvatav nimi + Seda näidatakse sõnumite saatmisel. + Vali kuvatav nimi + Sinu kasutajakonto %s on nüüd olemas. + Õnnitlused! + Mine avalehele + Isikupärasta oma profiili + Lülita välja \ No newline at end of file From f9a9c72c7b3ca0cff88d041ced8f8d6bfcfd6948 Mon Sep 17 00:00:00 2001 From: Besnik Bleta Date: Fri, 8 Apr 2022 12:14:36 +0000 Subject: [PATCH 047/561] Translated using Weblate (Albanian) Currently translated at 100.0% (55 of 55 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/sq/ --- fastlane/metadata/android/sq/changelogs/40104060.txt | 2 ++ fastlane/metadata/android/sq/changelogs/40104070.txt | 2 ++ fastlane/metadata/android/sq/changelogs/40104080.txt | 2 ++ 3 files changed, 6 insertions(+) create mode 100644 fastlane/metadata/android/sq/changelogs/40104060.txt create mode 100644 fastlane/metadata/android/sq/changelogs/40104070.txt create mode 100644 fastlane/metadata/android/sq/changelogs/40104080.txt diff --git a/fastlane/metadata/android/sq/changelogs/40104060.txt b/fastlane/metadata/android/sq/changelogs/40104060.txt new file mode 100644 index 0000000000..48cbd2150c --- /dev/null +++ b/fastlane/metadata/android/sq/changelogs/40104060.txt @@ -0,0 +1,2 @@ +Ndryshimet kryesore në këtë version: Vijat kohore të rrjedhave tani janë në punë dhe më të shpejta. Ndreqje të metash të ndryshme dhe përmirësime qëndrueshmërie. +Regjistër i plotë ndryshimesh: https://github.com/vector-im/element-android/releases/tag/v1.4.6 diff --git a/fastlane/metadata/android/sq/changelogs/40104070.txt b/fastlane/metadata/android/sq/changelogs/40104070.txt new file mode 100644 index 0000000000..ad487c57ee --- /dev/null +++ b/fastlane/metadata/android/sq/changelogs/40104070.txt @@ -0,0 +1,2 @@ +Ndryshimet kryesore në këtë version: Ndreqje të metash të ndryshme dhe përmirësime qëndrueshmërie. +Regjistër i plotë ndryshimesh: https://github.com/vector-im/element-android/releases/tag/v1.4.7 diff --git a/fastlane/metadata/android/sq/changelogs/40104080.txt b/fastlane/metadata/android/sq/changelogs/40104080.txt new file mode 100644 index 0000000000..49156d0c96 --- /dev/null +++ b/fastlane/metadata/android/sq/changelogs/40104080.txt @@ -0,0 +1,2 @@ +Ndryshimet kryesore në këtë version: Vijat kohore të rrjedhave tani janë në punë dhe më të shpejta. Ndreqje të metash të ndryshme dhe përmirësime qëndrueshmërie. +Regjistër i plotë ndryshimesh: https://github.com/vector-im/element-android/releases From b4e8b073812d62a4540f00f580f25d5b57b69731 Mon Sep 17 00:00:00 2001 From: Besnik Bleta Date: Fri, 8 Apr 2022 12:19:14 +0000 Subject: [PATCH 048/561] Translated using Weblate (Albanian) Currently translated at 99.4% (2177 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/sq/ --- vector/src/main/res/values-sq/strings.xml | 24 +++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/vector/src/main/res/values-sq/strings.xml b/vector/src/main/res/values-sq/strings.xml index fb7fb1448e..ddb492016c 100644 --- a/vector/src/main/res/values-sq/strings.xml +++ b/vector/src/main/res/values-sq/strings.xml @@ -1957,7 +1957,7 @@ \nRiprovoni më vonë, ose kërkojini një përgjegjësi dhome të kontrollojë nëse keni leje për hyrje. Hyni, Sido Qoftë Hyni te Hapësirë - Krijo Hapësirën + Krijo hapësirën Hëpërhë anashkaloje Ejani në hapësirën time %1$s %2$s S’do të jenë pjesë e %s @@ -1996,7 +1996,7 @@ Ç’lloj hapësire doni të krijoni\? Hapësira juaj private Hapësira juaj publike - Shtoni Hapësirë + Shtoni hapësirë Braktiseni dhomën me ID-në e dhënë (ose dhomën e tanishme, në qoftë nul) Hyni te Hapësira me ID-në e dhënë Krijoni një Hapësirë @@ -2425,4 +2425,24 @@ \n \nKy do të jetë tranzicion vetëm për një herë, meqë tanimë Rrjedhat janë pjesë e protokollit Matrix. Rrjedhat Po i Afrohen Beta-s 🎉 + Tregimi i vendndodhjes është në punë e sipër + Jepe vendndodhjen “live” + Jepe vendndodhjen “live” + Shërbyesi Home s’pranon emër përdorues vetëm me shifra. + Anashkalojeni këtë hap + Ruajeni dhe vazhdoni + Parapëlqimet tuaja u ruajtën. + Kaq qe! + Shkojmë + Këtë mund ta ndryshoni kurdo. + Shtoni një foto profili + Këtë mund ta ndryshoni më vonë + Emër Në Ekran + Kjo do të shfaqet kur dërgoni mesazhe. + Zgjidhni një emër për në ekran + Llogaria juaj %s u krijua. + Përgëzime! + Shpjemëni në shtëpi + Personalizoni profil + Çaktivizoje \ No newline at end of file From 323954be333e490ce335baccd4f79d9f32f02034 Mon Sep 17 00:00:00 2001 From: Piotr Strebski Date: Fri, 8 Apr 2022 09:15:21 +0000 Subject: [PATCH 049/561] Translated using Weblate (Polish) Currently translated at 100.0% (2190 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/pl/ --- vector/src/main/res/values-pl/strings.xml | 99 ++++++++++++++++++++++- 1 file changed, 97 insertions(+), 2 deletions(-) diff --git a/vector/src/main/res/values-pl/strings.xml b/vector/src/main/res/values-pl/strings.xml index 662574536f..9c1e9a9264 100644 --- a/vector/src/main/res/values-pl/strings.xml +++ b/vector/src/main/res/values-pl/strings.xml @@ -1,5 +1,5 @@ - + Zaproszenie od %s %1$s zaprosił(a) %2$s %1$s zaprosił(a) Cię @@ -1952,7 +1952,7 @@ Niektóre pokoje mogą być ukryte, gdyż są prywatne i wymagają od Ciebie zaproszenia. Niektóre pokoje mogą być ukryte, gdyż są prywatne i wymagają od Ciebie zaproszenia. \nNie masz uprawnień aby dodawać pokoje. - W tej Przestrzeni nie ma żadnych pokojów + W tej przestrzeni nie ma żadnych pokojów Proszę skontaktować się z administratorem Twojego serwera domowego aby uzyskać więcej informacji Wygląda na to, że Twój serwer domowy jeszcze nie obsługuje Przestrzeni Lubisz eksperymentować\? @@ -2455,4 +2455,99 @@ Ankieta zakończona Oddano głos Zakończ ankietę + + I jeszcze %1$d + I jeszcze %1$d + I jeszcze %1$d + I jeszcze %1$d + + + Wynik końcowy na podstawie %1$d głosu + Wynik końcowy na podstawie %1$d głosów + Wynik końcowy na podstawie %1$d głosów + Wynik końcowy na podstawie %1$d głosów + + + Oddano %1$d głos. Głosuj, aby zobaczyć wyniki + Oddano %1$d głosy. Głosuj, aby zobaczyć wyniki + Oddano %1$d głosów. Głosuj, aby zobaczyć wyniki + Oddano %1$d głosów. Głosuj, aby zobaczyć wyniki + + + W oparciu o %1$d głos + W oparciu o %1$d głosy + W oparciu o %1$d głosów + W oparciu o %1$d głosów + + + %1$d głos + %1$d głosy + %1$d głosów + %1$d głosów + + + Wymagana jest co najmniej %1$s opcja + Wymagane są co najmniej %1$s opcje + Wymaganych jest co najmniej %1$s opcji + Wymaganych jest co najmniej %1$s opcji + + Zbliżamy się do udostępnienia publicznej wersji beta dla wątków. +\n +\nPrzygotowując się do tego, musimy wprowadzić pewne zmiany: wątki utworzone przed tym punktem będą wyświetlane jako zwykłe odpowiedzi. +\n +\nBędzie to jednorazowe przejście, ponieważ wątki są teraz częścią specyfikacji Matrix. + + %d zmieniony ACL serwera + %d zmienione ACL serwera + %d zmienionych ACL serwera + %d zmienionych ACL serwera + + Pokaż mniej + Udostępnij lokalizację + Pokaż dymki wiadomości + Trwa udostępnianie lokalizacji + Lokalizacja na żywo ${app_name} + Zatrzymaj + Włączona lokalizacja na żywo + Nie udało się wczytać mapy + Renderuj lokalizacje użytkowników na osi czasu + Po włączeniu będziesz mógł wysłać swoją lokalizację do dowolnego pokoju + Włącz udostępnianie lokalizacji + Otwórz za pomocą + ${app_name} nie może uzyskać dostępu do Twojej lokalizacji. Spróbuj ponownie później. + ${app_name} nie może uzyskać dostępu do Twojej lokalizacji + Jeśli chcesz udostępniać swoją lokalizację na żywo, ${app_name} potrzebuje dostępu do lokalizacji przez cały czas, gdy aplikacja działa w tle. +\n Będziemy mieć dostęp do Twojej lokalizacji tylko przez wybrany przez Ciebie okres. + Zgoda na dostęp + Udostępnij tę lokalizację + Udostępnij tę lokalizację + Udostępnij lokalizację na żywo + Udostępnij lokalizację na żywo + Udostępnij moją aktualną lokalizację + Udostępnij moją aktualną lokalizację + Powiększ do bieżącej lokalizacji + Przypnij na mapie wybraną lokalizację + Udostępnij lokalizację + Mapa + Udostępnij lokalizację + Lokalizacja + Udostępnij lokalizację + Wyniki są ujawniane dopiero po zakończeniu ankiety + Ankieta zamknięta + Głosujący widzą wyniki zaraz po oddaniu głosu + Otwarta ankieta + Rodzaj ankiety + Modyfikacja ankiety + opcja zwyciężająca + Brak głosów + Zaproszenie do tej przestrzeni zostało wysłane do %s, które nie jest powiązane z Twoim kontem + Zaproszenie do tego pokoju zostało wysłane do %s, które nie jest powiązane z Twoim kontem + Każdy w przestrzeni nadrzędnej będzie mógł znaleźć ten pokój i dołączyć do niego — nie ma potrzeby ręcznego zapraszania wszystkich. W każdej chwili możesz to zmienić w ustawieniach pokoju. + Automatycznie aktualizuj nadrzędną przestrzeń + Twój system automatycznie wyśle dzienniki, gdy wystąpi błąd niemożności odszyfrowania + Błędy automatycznego deszyfrowania raportów. + Opuść pokój o podanym identyfikatorze (lub aktualny pokój, jeśli null) + Udostępnili swoją lokalizację + Powiadom cały pokój + Użytkownicy \ No newline at end of file From 44446ce3959e80d7d82e9250d5852d6dc674b161 Mon Sep 17 00:00:00 2001 From: Piotr Strebski Date: Fri, 8 Apr 2022 09:41:07 +0000 Subject: [PATCH 050/561] Translated using Weblate (Polish) Currently translated at 40.0% (22 of 55 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/pl/ --- fastlane/metadata/android/pl-PL/changelogs/40103060.txt | 2 ++ fastlane/metadata/android/pl-PL/changelogs/40103080.txt | 2 ++ fastlane/metadata/android/pl-PL/changelogs/40103090.txt | 2 ++ fastlane/metadata/android/pl-PL/changelogs/40103100.txt | 2 ++ fastlane/metadata/android/pl-PL/changelogs/40103110.txt | 2 ++ fastlane/metadata/android/pl-PL/changelogs/40103120.txt | 2 ++ fastlane/metadata/android/pl-PL/changelogs/40103130.txt | 2 ++ fastlane/metadata/android/pl-PL/changelogs/40103140.txt | 2 ++ fastlane/metadata/android/pl-PL/changelogs/40103150.txt | 2 ++ fastlane/metadata/android/pl-PL/changelogs/40103160.txt | 2 ++ fastlane/metadata/android/pl-PL/changelogs/40103170.txt | 2 ++ fastlane/metadata/android/pl-PL/changelogs/40103180.txt | 2 ++ fastlane/metadata/android/pl-PL/changelogs/40104000.txt | 2 ++ fastlane/metadata/android/pl-PL/changelogs/40104020.txt | 2 ++ fastlane/metadata/android/pl-PL/changelogs/40104040.txt | 2 ++ fastlane/metadata/android/pl-PL/title.txt | 2 +- 16 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 fastlane/metadata/android/pl-PL/changelogs/40103060.txt create mode 100644 fastlane/metadata/android/pl-PL/changelogs/40103080.txt create mode 100644 fastlane/metadata/android/pl-PL/changelogs/40103090.txt create mode 100644 fastlane/metadata/android/pl-PL/changelogs/40103100.txt create mode 100644 fastlane/metadata/android/pl-PL/changelogs/40103110.txt create mode 100644 fastlane/metadata/android/pl-PL/changelogs/40103120.txt create mode 100644 fastlane/metadata/android/pl-PL/changelogs/40103130.txt create mode 100644 fastlane/metadata/android/pl-PL/changelogs/40103140.txt create mode 100644 fastlane/metadata/android/pl-PL/changelogs/40103150.txt create mode 100644 fastlane/metadata/android/pl-PL/changelogs/40103160.txt create mode 100644 fastlane/metadata/android/pl-PL/changelogs/40103170.txt create mode 100644 fastlane/metadata/android/pl-PL/changelogs/40103180.txt create mode 100644 fastlane/metadata/android/pl-PL/changelogs/40104000.txt create mode 100644 fastlane/metadata/android/pl-PL/changelogs/40104020.txt create mode 100644 fastlane/metadata/android/pl-PL/changelogs/40104040.txt diff --git a/fastlane/metadata/android/pl-PL/changelogs/40103060.txt b/fastlane/metadata/android/pl-PL/changelogs/40103060.txt new file mode 100644 index 0000000000..9dc1e9e297 --- /dev/null +++ b/fastlane/metadata/android/pl-PL/changelogs/40103060.txt @@ -0,0 +1,2 @@ +Główne zmiany w tej wersji: Dodanie obsługi obecności, dla pokoju wiadomości bezpośrednich (uwaga: obecność jest wyłączona na matrix.org). Dodano ponownie obsługę Android Auto. +Pełna lista zmian: https://github.com/vector-im/element-android/releases/tag/v1.3.6 diff --git a/fastlane/metadata/android/pl-PL/changelogs/40103080.txt b/fastlane/metadata/android/pl-PL/changelogs/40103080.txt new file mode 100644 index 0000000000..c850479f59 --- /dev/null +++ b/fastlane/metadata/android/pl-PL/changelogs/40103080.txt @@ -0,0 +1,2 @@ +Główne zmiany w tej wersji: Poprawki błędów! +Pełna lista zmian: https://github.com/vector-im/element-android/releases/tag/v1.3.8 diff --git a/fastlane/metadata/android/pl-PL/changelogs/40103090.txt b/fastlane/metadata/android/pl-PL/changelogs/40103090.txt new file mode 100644 index 0000000000..13e1aed51e --- /dev/null +++ b/fastlane/metadata/android/pl-PL/changelogs/40103090.txt @@ -0,0 +1,2 @@ +Główne zmiany w tej wersji: Dodano obsługę wersji roboczej wiadomości głosowych. Wiele poprawek! +Pełna lista zmian: https://github.com/vector-im/element-android/releases/tag/v1.3.9 diff --git a/fastlane/metadata/android/pl-PL/changelogs/40103100.txt b/fastlane/metadata/android/pl-PL/changelogs/40103100.txt new file mode 100644 index 0000000000..406f07f70f --- /dev/null +++ b/fastlane/metadata/android/pl-PL/changelogs/40103100.txt @@ -0,0 +1,2 @@ +Główne zmiany w tej wersji: Dodano obsługę ankiet (w laboratoriach). Nowy projekt podglądu adresu URL. +Pełna lista zmian: https://github.com/vector-im/element-android/releases/tag/v1.3.10 diff --git a/fastlane/metadata/android/pl-PL/changelogs/40103110.txt b/fastlane/metadata/android/pl-PL/changelogs/40103110.txt new file mode 100644 index 0000000000..f9b38673c7 --- /dev/null +++ b/fastlane/metadata/android/pl-PL/changelogs/40103110.txt @@ -0,0 +1,2 @@ +Główne zmiany w tej wersji: Poprawki błędów! +Pełna lista zmian: https://github.com/vector-im/element-android/releases/tag/v1.3.11 diff --git a/fastlane/metadata/android/pl-PL/changelogs/40103120.txt b/fastlane/metadata/android/pl-PL/changelogs/40103120.txt new file mode 100644 index 0000000000..db6c1c86bd --- /dev/null +++ b/fastlane/metadata/android/pl-PL/changelogs/40103120.txt @@ -0,0 +1,2 @@ +Główne zmiany w tej wersji: Poprawki błędów! +Pełna lista zmian: https://github.com/vector-im/element-android/releases/tag/v1.3.12 diff --git a/fastlane/metadata/android/pl-PL/changelogs/40103130.txt b/fastlane/metadata/android/pl-PL/changelogs/40103130.txt new file mode 100644 index 0000000000..affd085177 --- /dev/null +++ b/fastlane/metadata/android/pl-PL/changelogs/40103130.txt @@ -0,0 +1,2 @@ +Główne zmiany w tej wersji: Pierwsza zmiana na ekranach rejestracji, w tym możliwość włączenia Analytics. Dodano obsługę dla wydarzeń z dodatkiem matematyki w laboratoriach. +Pełna lista zmian: https://github.com/vector-im/element-android/releases/tag/v1.3.13 diff --git a/fastlane/metadata/android/pl-PL/changelogs/40103140.txt b/fastlane/metadata/android/pl-PL/changelogs/40103140.txt new file mode 100644 index 0000000000..0727d3b4ff --- /dev/null +++ b/fastlane/metadata/android/pl-PL/changelogs/40103140.txt @@ -0,0 +1,2 @@ +Główne zmiany w tej wersji: Pierwsza zmiana na ekranach rejestracji, w tym możliwość włączenia Analytics. Dodano obsługę dla wydarzeń z dodatkiem matematyki w laboratoriach. +Pełna lista zmian: https://github.com/vector-im/element-android/releases/tag/v1.3.14 diff --git a/fastlane/metadata/android/pl-PL/changelogs/40103150.txt b/fastlane/metadata/android/pl-PL/changelogs/40103150.txt new file mode 100644 index 0000000000..48d6d0feb3 --- /dev/null +++ b/fastlane/metadata/android/pl-PL/changelogs/40103150.txt @@ -0,0 +1,2 @@ +Główne zmiany w tej wersji: Pierwsza zmiana na ekranach rejestracji, w tym możliwość włączenia Analytics. Dodano obsługę dla wydarzeń z dodatkiem matematyki w laboratoriach. +Pełna lista zmian: https://github.com/vector-im/element-android/releases/tag/v1.3.15 diff --git a/fastlane/metadata/android/pl-PL/changelogs/40103160.txt b/fastlane/metadata/android/pl-PL/changelogs/40103160.txt new file mode 100644 index 0000000000..df66e3042a --- /dev/null +++ b/fastlane/metadata/android/pl-PL/changelogs/40103160.txt @@ -0,0 +1,2 @@ +Główne zmiany w tej wersji: wyślij swoją lokalizację do dowolnego pokoju. Edytuj ankietę. +Pełna lista zmian: https://github.com/vector-im/element-android/releases/tag/v1.3.16 diff --git a/fastlane/metadata/android/pl-PL/changelogs/40103170.txt b/fastlane/metadata/android/pl-PL/changelogs/40103170.txt new file mode 100644 index 0000000000..77d40898a6 --- /dev/null +++ b/fastlane/metadata/android/pl-PL/changelogs/40103170.txt @@ -0,0 +1,2 @@ +Główne zmiany w tej wersji: wyślij swoją lokalizację do dowolnego pokoju. Edytuj ankietę. +Pełna lista zmian: https://github.com/vector-im/element-android/releases/tag/v1.3.17 diff --git a/fastlane/metadata/android/pl-PL/changelogs/40103180.txt b/fastlane/metadata/android/pl-PL/changelogs/40103180.txt new file mode 100644 index 0000000000..c0f671a58e --- /dev/null +++ b/fastlane/metadata/android/pl-PL/changelogs/40103180.txt @@ -0,0 +1,2 @@ +Główne zmiany w tej wersji: wyślij swoją lokalizację do dowolnego pokoju. Edytuj ankietę. +Pełna lista zmian: https://github.com/vector-im/element-android/releases/tag/v1.3.18 diff --git a/fastlane/metadata/android/pl-PL/changelogs/40104000.txt b/fastlane/metadata/android/pl-PL/changelogs/40104000.txt new file mode 100644 index 0000000000..f9f4c80cf9 --- /dev/null +++ b/fastlane/metadata/android/pl-PL/changelogs/40104000.txt @@ -0,0 +1,2 @@ +Główne zmiany w tej wersji: Wstępna implementacja komunikatów wątków. Bąbelki wiadomości. +Pełna lista zmian: https://github.com/vector-im/element-android/releases/tag/v1.4.0 diff --git a/fastlane/metadata/android/pl-PL/changelogs/40104020.txt b/fastlane/metadata/android/pl-PL/changelogs/40104020.txt new file mode 100644 index 0000000000..190427d548 --- /dev/null +++ b/fastlane/metadata/android/pl-PL/changelogs/40104020.txt @@ -0,0 +1,2 @@ +Główne zmiany w tej wersji: dodanie obsługi @room i nieujawnionych ankiet, i wiele innych drobnych zmian. +Pełna lista zmian: https://github.com/vector-im/element-android/releases/tag/v1.4.2 diff --git a/fastlane/metadata/android/pl-PL/changelogs/40104040.txt b/fastlane/metadata/android/pl-PL/changelogs/40104040.txt new file mode 100644 index 0000000000..9894e54c03 --- /dev/null +++ b/fastlane/metadata/android/pl-PL/changelogs/40104040.txt @@ -0,0 +1,2 @@ +Główne zmiany w tej wersji: aktualizacje interfejsu użytkownika wskaźnika pisania. Różne poprawki błędów i ulepszenia stabilności. +Pełna lista zmian: https://github.com/vector-im/element-android/releases/tag/v1.4.4 diff --git a/fastlane/metadata/android/pl-PL/title.txt b/fastlane/metadata/android/pl-PL/title.txt index 907f907f99..500e9c04e8 100644 --- a/fastlane/metadata/android/pl-PL/title.txt +++ b/fastlane/metadata/android/pl-PL/title.txt @@ -1 +1 @@ -Element +Element - Bezpieczny komunikator From 9414a29b80920ba4e97d16ea94d93e8f600c32f0 Mon Sep 17 00:00:00 2001 From: ariskotsomitopoulos Date: Mon, 11 Apr 2022 15:38:18 +0300 Subject: [PATCH 051/561] Add Cancelled state to UIA --- .../sdk/internal/auth/registration/UIAExt.kt | 19 +++++++---- .../internal/auth/registration/UiaResult.kt | 23 +++++++++++++ .../internal/crypto/tasks/DeleteDeviceTask.kt | 5 +-- .../tasks/InitializeCrossSigningTask.kt | 5 +-- .../session/account/DeactivateAccountTask.kt | 32 ++++++++++++------- .../profile/FinalizeAddingThreePidTask.kt | 5 +-- .../util/exceptions/UiaCancelledException.kt | 19 +++++++++++ .../deactivation/DeactivateAccountFragment.kt | 8 +++-- .../DeactivateAccountViewModel.kt | 11 ++++--- 9 files changed, 96 insertions(+), 31 deletions(-) create mode 100644 matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/registration/UiaResult.kt create mode 100644 matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/util/exceptions/UiaCancelledException.kt diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/registration/UIAExt.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/registration/UIAExt.kt index da0866a5fd..8c97cbde27 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/registration/UIAExt.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/registration/UIAExt.kt @@ -20,6 +20,7 @@ import org.matrix.android.sdk.api.auth.UIABaseAuth import org.matrix.android.sdk.api.auth.UserInteractiveAuthInterceptor import org.matrix.android.sdk.api.failure.Failure import org.matrix.android.sdk.api.failure.toRegistrationFlowResponse +import org.matrix.android.sdk.internal.util.exceptions.UiaCancelledException import timber.log.Timber import kotlin.coroutines.suspendCoroutine @@ -30,14 +31,15 @@ import kotlin.coroutines.suspendCoroutine * @param interceptor see doc in [UserInteractiveAuthInterceptor] * @param retryBlock called at the end of the process, in this block generally retry executing the task, with * provided authUpdate - * @return true if UIA is handled without error + * @return UiaResult if UIA handled, failed or cancelled + * */ internal suspend fun handleUIA(failure: Throwable, interceptor: UserInteractiveAuthInterceptor, - retryBlock: suspend (UIABaseAuth) -> Unit): Boolean { + retryBlock: suspend (UIABaseAuth) -> Unit): UiaResult { Timber.d("## UIA: check error ${failure.message}") val flowResponse = failure.toRegistrationFlowResponse() - ?: return false.also { + ?: return UiaResult.FAILURE.also { Timber.d("## UIA: not a UIA error") } @@ -50,14 +52,19 @@ internal suspend fun handleUIA(failure: Throwable, interceptor.performStage(flowResponse, (failure as? Failure.ServerError)?.error?.code, continuation) } } catch (failure2: Throwable) { - Timber.w(failure2, "## UIA: failed to participate") - return false + return if (failure2 is UiaCancelledException) { + Timber.w(failure2, "## UIA: cancelled") + UiaResult.CANCELLED + } else { + Timber.w(failure2, "## UIA: failed to participate") + UiaResult.FAILURE + } } Timber.d("## UIA: updated auth") return try { retryBlock(authUpdate) - true + UiaResult.SUCCESS } catch (failure3: Throwable) { handleUIA(failure3, interceptor, retryBlock) } diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/registration/UiaResult.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/registration/UiaResult.kt new file mode 100644 index 0000000000..35404944db --- /dev/null +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/registration/UiaResult.kt @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2022 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.matrix.android.sdk.internal.auth.registration + +enum class UiaResult { + SUCCESS, + FAILURE, + CANCELLED +} diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/tasks/DeleteDeviceTask.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/tasks/DeleteDeviceTask.kt index ca04bac5d5..cf10625327 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/tasks/DeleteDeviceTask.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/tasks/DeleteDeviceTask.kt @@ -18,6 +18,7 @@ package org.matrix.android.sdk.internal.crypto.tasks import org.matrix.android.sdk.api.auth.UIABaseAuth import org.matrix.android.sdk.api.auth.UserInteractiveAuthInterceptor +import org.matrix.android.sdk.internal.auth.registration.UiaResult import org.matrix.android.sdk.internal.auth.registration.handleUIA import org.matrix.android.sdk.internal.crypto.api.CryptoApi import org.matrix.android.sdk.internal.crypto.model.rest.DeleteDeviceParams @@ -47,13 +48,13 @@ internal class DefaultDeleteDeviceTask @Inject constructor( } } catch (throwable: Throwable) { if (params.userInteractiveAuthInterceptor == null || - !handleUIA( + handleUIA( failure = throwable, interceptor = params.userInteractiveAuthInterceptor, retryBlock = { authUpdate -> execute(params.copy(userAuthParam = authUpdate)) } - ) + ) != UiaResult.SUCCESS ) { Timber.d("## UIA: propagate failure") throw throwable diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/tasks/InitializeCrossSigningTask.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/tasks/InitializeCrossSigningTask.kt index e2fd54f0d8..441d69d3d5 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/tasks/InitializeCrossSigningTask.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/tasks/InitializeCrossSigningTask.kt @@ -18,6 +18,7 @@ package org.matrix.android.sdk.internal.crypto.tasks import dagger.Lazy import org.matrix.android.sdk.api.auth.UserInteractiveAuthInterceptor +import org.matrix.android.sdk.internal.auth.registration.UiaResult import org.matrix.android.sdk.internal.auth.registration.handleUIA import org.matrix.android.sdk.internal.crypto.MXOlmDevice import org.matrix.android.sdk.internal.crypto.MyDeviceInfoHolder @@ -126,13 +127,13 @@ internal class DefaultInitializeCrossSigningTask @Inject constructor( uploadSigningKeysTask.execute(uploadSigningKeysParams) } catch (failure: Throwable) { if (params.interactiveAuthInterceptor == null || - !handleUIA( + handleUIA( failure = failure, interceptor = params.interactiveAuthInterceptor, retryBlock = { authUpdate -> uploadSigningKeysTask.execute(uploadSigningKeysParams.copy(userAuthParam = authUpdate)) } - ) + ) != UiaResult.SUCCESS ) { Timber.d("## UIA: propagate failure") throw failure diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/account/DeactivateAccountTask.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/account/DeactivateAccountTask.kt index 752856b931..9c3402d0e3 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/account/DeactivateAccountTask.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/account/DeactivateAccountTask.kt @@ -18,12 +18,14 @@ package org.matrix.android.sdk.internal.session.account import org.matrix.android.sdk.api.auth.UIABaseAuth import org.matrix.android.sdk.api.auth.UserInteractiveAuthInterceptor +import org.matrix.android.sdk.internal.auth.registration.UiaResult import org.matrix.android.sdk.internal.auth.registration.handleUIA import org.matrix.android.sdk.internal.network.GlobalErrorReceiver import org.matrix.android.sdk.internal.network.executeRequest import org.matrix.android.sdk.internal.session.cleanup.CleanupSession import org.matrix.android.sdk.internal.session.identity.IdentityDisconnectTask import org.matrix.android.sdk.internal.task.Task +import org.matrix.android.sdk.internal.util.exceptions.UiaCancelledException import timber.log.Timber import javax.inject.Inject @@ -51,18 +53,24 @@ internal class DefaultDeactivateAccountTask @Inject constructor( } true } catch (throwable: Throwable) { - if (!handleUIA( - failure = throwable, - interceptor = params.userInteractiveAuthInterceptor, - retryBlock = { authUpdate -> - execute(params.copy(userAuthParam = authUpdate)) - } - ) - ) { - Timber.d("## UIA: propagate failure") - throw throwable - } else { - false + when (handleUIA( + failure = throwable, + interceptor = params.userInteractiveAuthInterceptor, + retryBlock = { authUpdate -> + execute(params.copy(userAuthParam = authUpdate)) + } + )) { + UiaResult.SUCCESS -> { + false + } + UiaResult.FAILURE -> { + Timber.d("## UIA: propagate failure") + throw throwable + } + UiaResult.CANCELLED -> { + Timber.d("## UIA: cancelled") + throw UiaCancelledException() + } } } diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/profile/FinalizeAddingThreePidTask.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/profile/FinalizeAddingThreePidTask.kt index 6ff4efaf11..5b640cea73 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/profile/FinalizeAddingThreePidTask.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/profile/FinalizeAddingThreePidTask.kt @@ -22,6 +22,7 @@ import org.matrix.android.sdk.api.auth.UserInteractiveAuthInterceptor import org.matrix.android.sdk.api.failure.Failure import org.matrix.android.sdk.api.failure.toRegistrationFlowResponse import org.matrix.android.sdk.api.session.identity.ThreePid +import org.matrix.android.sdk.internal.auth.registration.UiaResult import org.matrix.android.sdk.internal.auth.registration.handleUIA import org.matrix.android.sdk.internal.database.model.PendingThreePidEntity import org.matrix.android.sdk.internal.database.model.PendingThreePidEntityFields @@ -72,13 +73,13 @@ internal class DefaultFinalizeAddingThreePidTask @Inject constructor( true } catch (throwable: Throwable) { if (params.userInteractiveAuthInterceptor == null || - !handleUIA( + handleUIA( failure = throwable, interceptor = params.userInteractiveAuthInterceptor, retryBlock = { authUpdate -> execute(params.copy(userAuthParam = authUpdate)) } - ) + ) != UiaResult.SUCCESS ) { Timber.d("## UIA: propagate failure") throw throwable.toRegistrationFlowResponse() diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/util/exceptions/UiaCancelledException.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/util/exceptions/UiaCancelledException.kt new file mode 100644 index 0000000000..56971bc44b --- /dev/null +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/util/exceptions/UiaCancelledException.kt @@ -0,0 +1,19 @@ +/* + * Copyright 2022 The Matrix.org Foundation C.I.C. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.matrix.android.sdk.internal.util.exceptions + +class UiaCancelledException(message: String? = null) : Exception(message) diff --git a/vector/src/main/java/im/vector/app/features/settings/account/deactivation/DeactivateAccountFragment.kt b/vector/src/main/java/im/vector/app/features/settings/account/deactivation/DeactivateAccountFragment.kt index 4397da00c4..d0e1247ee2 100644 --- a/vector/src/main/java/im/vector/app/features/settings/account/deactivation/DeactivateAccountFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/account/deactivation/DeactivateAccountFragment.kt @@ -34,6 +34,7 @@ import im.vector.app.features.analytics.plan.MobileScreen import im.vector.app.features.auth.ReAuthActivity import im.vector.app.features.settings.VectorSettingsActivity import org.matrix.android.sdk.api.auth.data.LoginFlowTypes +import org.matrix.android.sdk.internal.util.exceptions.UiaCancelledException import javax.inject.Inject class DeactivateAccountFragment @Inject constructor() : VectorBaseFragment() { @@ -114,7 +115,9 @@ class DeactivateAccountFragment @Inject constructor() : VectorBaseFragment { settingsActivity?.ignoreInvalidTokenError = false dismissLoadingDialog() - displayErrorDialog(it.throwable) + if (it.throwable !is UiaCancelledException) { + displayErrorDialog(it.throwable) + } } DeactivateAccountViewEvents.Done -> { MainActivity.restartApp(requireActivity(), MainActivityArgs(clearCredentials = true, isAccountDeactivated = true)) @@ -123,7 +126,8 @@ class DeactivateAccountFragment @Inject constructor() : VectorBaseFragment + getString(R.string.deactivate_account_title) + ).let { intent -> reAuthActivityResultLauncher.launch(intent) } } diff --git a/vector/src/main/java/im/vector/app/features/settings/account/deactivation/DeactivateAccountViewModel.kt b/vector/src/main/java/im/vector/app/features/settings/account/deactivation/DeactivateAccountViewModel.kt index ab4b9264eb..8cd9ac79a5 100644 --- a/vector/src/main/java/im/vector/app/features/settings/account/deactivation/DeactivateAccountViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/settings/account/deactivation/DeactivateAccountViewModel.kt @@ -33,6 +33,7 @@ import org.matrix.android.sdk.api.failure.isInvalidUIAAuth import org.matrix.android.sdk.api.session.Session import org.matrix.android.sdk.internal.crypto.crosssigning.fromBase64 import org.matrix.android.sdk.internal.crypto.model.rest.DefaultBaseAuth +import org.matrix.android.sdk.internal.util.exceptions.UiaCancelledException import timber.log.Timber import kotlin.coroutines.Continuation import kotlin.coroutines.resume @@ -44,7 +45,7 @@ data class DeactivateAccountViewState( class DeactivateAccountViewModel @AssistedInject constructor(@Assisted private val initialState: DeactivateAccountViewState, private val session: Session) : - VectorViewModel(initialState) { + VectorViewModel(initialState) { @AssistedFactory interface Factory : MavericksAssistedViewModelFactory { @@ -57,7 +58,7 @@ class DeactivateAccountViewModel @AssistedInject constructor(@Assisted private v override fun handle(action: DeactivateAccountAction) { when (action) { is DeactivateAccountAction.DeactivateAccount -> handleDeactivateAccount(action) - DeactivateAccountAction.SsoAuthDone -> { + DeactivateAccountAction.SsoAuthDone -> { Timber.d("## UIA - FallBack success") _viewEvents.post(DeactivateAccountViewEvents.Loading()) if (pendingAuth != null) { @@ -66,7 +67,7 @@ class DeactivateAccountViewModel @AssistedInject constructor(@Assisted private v uiaContinuation?.resumeWithException(IllegalArgumentException()) } } - is DeactivateAccountAction.PasswordAuthDone -> { + is DeactivateAccountAction.PasswordAuthDone -> { _viewEvents.post(DeactivateAccountViewEvents.Loading()) val decryptedPass = session.loadSecureSecret(action.password.fromBase64().inputStream(), ReAuthActivity.DEFAULT_RESULT_KEYSTORE_ALIAS) uiaContinuation?.resume( @@ -77,9 +78,9 @@ class DeactivateAccountViewModel @AssistedInject constructor(@Assisted private v ) ) } - DeactivateAccountAction.ReAuthCancelled -> { + DeactivateAccountAction.ReAuthCancelled -> { Timber.d("## UIA - Reauth cancelled") - uiaContinuation?.resumeWithException(Exception()) + uiaContinuation?.resumeWithException(UiaCancelledException()) uiaContinuation = null pendingAuth = null } From 3eb97923cc10c98a052753f992494b1e8e9fdd93 Mon Sep 17 00:00:00 2001 From: ariskotsomitopoulos Date: Mon, 11 Apr 2022 15:43:32 +0300 Subject: [PATCH 052/561] Update Copyright --- .../matrix/android/sdk/internal/auth/registration/UiaResult.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/registration/UiaResult.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/registration/UiaResult.kt index 35404944db..d0665b0e37 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/registration/UiaResult.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/registration/UiaResult.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 New Vector Ltd + * Copyright 2022 The Matrix.org Foundation C.I.C. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From 4bc75b25749f575c9df16118250ef5a6e583fc9e Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Sun, 10 Apr 2022 11:05:41 +0000 Subject: [PATCH 053/561] Translated using Weblate (Korean) Currently translated at 38.4% (842 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/ko/ --- vector/src/main/res/values-ko/strings.xml | 59 ++++++++--------------- 1 file changed, 21 insertions(+), 38 deletions(-) diff --git a/vector/src/main/res/values-ko/strings.xml b/vector/src/main/res/values-ko/strings.xml index 900fa23a1c..b57bfd40d7 100644 --- a/vector/src/main/res/values-ko/strings.xml +++ b/vector/src/main/res/values-ko/strings.xml @@ -20,10 +20,10 @@ %s님이 음성 통화를 걸었습니다. %s님이 전화를 받았습니다. %s님이 전화를 끊었습니다. - %1$s님이 이후 %2$s에게 방 기록을 공개했습니다 - 초대된 시점부터 모든 방 구성원. - 들어온 시점부터 모든 방 구성원. - 모든 방 구성원. + %1$s님이 이 시점 이후 방 기록을 %2$s님이 볼 수 있도록 공개했습니다 + 방 참여자 모두, 다만 초대받은 시점부터. + 방 참여자 모두, 다만 들어온 시점부터. + 방 참여자 모두. 누구나. %s님이 방을 업그레이드했습니다. (아바타도 변경됨) @@ -39,7 +39,6 @@ 전화번호 방 초대 %1$s님과 %2$s님 - 빈 방 초기 동기화: \n계정 가져오는 중… @@ -134,7 +133,6 @@ 완료 정말 로그아웃하시겠습니까\? 읽음으로 표시 - 커뮤니티 최근에 애플리케이션이 충돌한 것 같습니다. 충돌 보고서를 열까요\? 사용자 이름 @@ -145,7 +143,6 @@ 알맞지 않은 사용자 이름이나 비밀번호 올바른 이메일 주소가 아닙니다 비밀번호를 잊어버리셨나요\? - 이벤트 청취하기 키 백업이 진행 중입니다. 지금 로그아웃하면 암호화된 메시지에 접근할 수 없습니다. 암호화된 메시지에 대한 접근을 읽지 않도록 모든 장치에서 보안 키 백업이 활성화되어 있어야 합니다. @@ -153,7 +150,6 @@ 키 백업 중… 로그아웃하기 전에 키를 백업하지 않으면 암호화된 메시지에 접근할 수 없습니다. - 수락하기 차단 초대 @@ -168,7 +164,6 @@ 죄송합니다, 이 작업을 완료하기 위한 외부 애플리케이션이 없습니다. 통합 인증으로 로그인 이 이메일 주소는 이미 정의되었습니다. - 이 홈서버는 당신이 로봇인지 아닌 지를 확인하고 싶습니다 계정에 연결된 이메일 주소를 입력해야 합니다. 이메일 주소를 확인할 수 없습니다: 이메일에 있는 링크를 클릭했는 지 확인하세요 @@ -199,14 +194,10 @@ 영상 통화 진행 중… 상대방이 전화를 받지 못했습니다. 정보 - - 음성 통화를 하려면 ${app_name}은 마이크에 접근하는 권한이 필요합니다. - 영상 통화를 하려면 ${app_name}은 카메라와 마이크에 접근하는 권한이 필요합니다. \n \n전화를 하려면 다음 팝업에서 접근을 허용해주세요. - 아니오 계속 @@ -215,15 +206,9 @@ 받지 않기 구성원 목록 읽지 않은 첫 부분으로 이동하기. - - %d명의 구성원 - - - - 방 떠나기 방을 떠나겠습니까\? 다이렉트 대화 @@ -258,12 +243,9 @@ %d개 선택됨 - 검색 방 구성원 필터 결과 없음 - - 모든 메시지 홈 화면에 단축 아이콘 추가 프로필 사진 @@ -396,7 +378,6 @@ 가상 키보드의 엔터 버튼으로 줄 바꿈을 하는 대신 메시지를 보냅니다 계정 비활성화 내 계정 비활성화 - 정보 분석 정보 분석 데이터 보내기 ${app_name}은 애플리케이션을 개선할 수 있도록 익명의 분석을 수집합니다. @@ -405,7 +386,6 @@ 공개 이름 업데이트 마지막으로 본 순간 %1$s @ %2$s - 인증 이것으로 로그인 홈서버 @@ -453,7 +433,6 @@ 예기치 않은 방식으로 중단될 수 있는 실험적인 기능들입니다. 주의해서 사용하세요. 메인 주소로 설정 메인 주소로 설정 해제 - 테마 암호 복호화 오류 공개 이름 @@ -464,7 +443,6 @@ 로컬 파일로 키 내보내기 내보내기 내보낸 키를 암호화하는 암호를 만드세요. 키를 가져오려면 같은 암호를 입력해야 합니다. - 암호화된 메시지 복구 키 백업 관리 종단간 암호화 방 키 가져오기 @@ -479,7 +457,6 @@ 확인 이 기기가 신뢰할 수 있는 지 확인하려면, 다른 방법을 사용하여 소유자에게 연락하세요 (예: 현실에서 혹은 전화로) 그리고 이 기기의 사용자 설정에서 표시된 키가 아래에 있는 키와 맞는지 물어보세요: 그것이 맞다면, 아래의 확인 버튼을 누르세요. 맞지 않다면, 다른 사람이 이 기기를 가로채고 있는 것이고 블랙리스트에 올려야 합니다. 앞으로 이 확인 절차는 더 정교해질 것입니다. - 방 목록 선택 홈서버 URL %s 서버의 모든 방 @@ -487,7 +464,6 @@ %d개의 읽지 않은 알림 메시지 - %d개의 방 @@ -569,8 +545,6 @@ 초대받음 - - %2$s님에 의해 %1$s 방에서 추방당했습니다 %2$s님에 의해 %1$s 방에서 출입 금지당했습니다 이유: %1$s @@ -636,7 +610,6 @@ 복구 키 저장 공유 파일로 저장 - 백업이 이미 홈서버에 존재합니다 이미 키 백업을 다른 기기에 설정한 모양입니다. 만들고 있는 것으로 바꾸겠습니까\? 바꾸기 @@ -687,7 +660,6 @@ 백업 상태 확인하기 백업 삭제 서버에서 백업한 암호화 키를 삭제하겠습니까\? 더 이상 복구 키를 사용해 암호화된 메시지 기록을 읽을 수 없습니다. - 암호화된 메시지를 잃지 마세요 키 백업하기 새 암호화된 메시지 키 @@ -700,11 +672,8 @@ 버전 알고리즘 서명 - 확인되었습니다! 알겠습니다 - - 확인 요청 %s님이 당신의 기기를 확인하고 싶습니다 알 수 없는 오류 @@ -795,7 +764,6 @@ 없음 취소 연결 해제 - 이 URL로는 홈서버에 접근할 수 없습니다, 확인해주세요 백그라운드 동기화 모드 (실험적) 배터리에 최적화됨 @@ -806,7 +774,6 @@ \n이는 라디오와 배터리 사용에 영향을 주며 ${app_name}이 이벤트를 수신하고 있는 상태라는 알림이 영구적으로 표시됩니다. 백그라운드 동기화 없음 앱이 백그라운드에 있을 때 수신 메시지의 알림을 받지 않습니다. - 탐색 탐색 설정을 관리합니다. ID 서버를 사용하고 있지 않습니다 @@ -875,7 +842,6 @@ 이 내용을 부적절한 문자로 신고했습니다. \n \n이 사용자의 내용을 더 이상 보고 싶지 않다면, 사용자를 차단하거나 메시지를 감출 수 있습니다. - 통합 통합 수락 설명 @@ -982,4 +948,21 @@ 주제를 다음으로 변경했습니다: %1$s 표시 이름을 삭제했습니다 (이전 이름: %1$s) 표시 이름을 %1$s에서 %2$s(으)로 변경했습니다 + 서버 접근제어목록을 설정했습니다. + %s님이 서버 접근제어목록을 설정했습니다. + 이곳을 업그레이드했습니다. + %s님이 이곳을 업그레이드했습니다. + 방을 업그레이드했습니다. + 이 시점 이후 메시지를 %1$s님이 볼 수 있도록 공개했습니다 + %1$s님이 이 시점 이후 메시지를 %2$s님이 볼 수 있도록 공개했습니다 + 이 시점 이후 방 기록을 %1$s님이 볼 수 있도록 공개했습니다 + 전화를 끊었습니다. + 전화를 받았습니다. + 통화 연결을 위한 데이터를 보냈습니다. + %s님이 통화 연결을 위한 데이터를 보냈습니다. + 음성 통화를 시작했습니다. + 영상 통화를 시작했습니다. + 방 이름을 바꾸었습니다: %1$s + 방 사진을 바꾸었습니다 + %1$s님이 방 사진을 바꾸었습니다 \ No newline at end of file From 6f2cdd2a9d26a4c7513636d9c7c642aa3a69c847 Mon Sep 17 00:00:00 2001 From: Johan Smits Date: Mon, 11 Apr 2022 09:47:57 +0000 Subject: [PATCH 054/561] Translated using Weblate (Dutch) Currently translated at 100.0% (2190 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/nl/ --- vector/src/main/res/values-nl/strings.xml | 431 +++++++++++----------- 1 file changed, 221 insertions(+), 210 deletions(-) diff --git a/vector/src/main/res/values-nl/strings.xml b/vector/src/main/res/values-nl/strings.xml index a87aeefe2e..80f819157e 100644 --- a/vector/src/main/res/values-nl/strings.xml +++ b/vector/src/main/res/values-nl/strings.xml @@ -32,14 +32,13 @@ %1$s heeft de uitnodiging voor %2$s aanvaard ** Kan niet ontsleutelen: %s ** Het apparaat van de afzender heeft geen sleutels voor dit bericht gestuurd. - Kan bericht niet verzenden + Kan bericht niet versturen Matrix-fout E-mailadres Telefoonnummer Gespreksuitnodiging %1$s en %2$s Leeg gesprek - Initiële synchronisatie: \nAccount wordt geïmporteerd… Initiële synchronisatie: @@ -101,7 +100,6 @@ Verwijderen Hernoemen Inhoud melden - of Uitnodigen Afmelden @@ -124,7 +122,6 @@ Alleen Matrix-contacten Geen resultaten Gesprekken - Logboek versturen Crash-logboek versturen Schermafdruk versturen @@ -134,13 +131,13 @@ Om het probleem te kunnen onderzoeken worden logboeken van deze cliënt met de foutmelding verstuurd. Deze foutmelding, inclusief de logboeken en schermafdruk, zullen niet openbaar zichtbaar zijn. Indien u liever alleen de bovenstaande tekst verstuurt, haal dan het vinkje weg: Het ziet er naar uit dat u de telefoon in frustratie schudt. Wilt u een probleem melden\? De foutmelding is verzonden - Verzenden van foutmelding is mislukt (%s) + Versturen van foutmelding is mislukt (%s) Voortgang (%s%%) De toepassing is de vorige keer gecrasht. Wilt u dit melden\? Gesprek toetreden - Gebruikersnaam + Inlognaam Afmelden - Thuisserver-URL + Server-URL Zoeken Spraakoproep beginnen Video-oproep beginnen @@ -148,15 +145,13 @@ Foto of video maken Aanmelden Indienen - Verkeerde gebruikersnaam en/of wachtwoord + Verkeerde inlognaam en/of wachtwoord Dit is geen geldig e-mailadres Dit e-mailadres is al in gebruik. Wachtwoord vergeten? - - Deze thuisserver wil graag weten of u geen robot bent + Deze server wil graag weten of u geen robot bent Het e-mailadres dat aan uw account gekoppeld is moet ingevoerd worden. Verifiëren van het e-mailadres is mislukt: zorg dat u op de koppeling in de e-mail hebt geklikt - Voer een geldige URL in Ongeldige JSON Bevatte geen geldige JSON @@ -172,14 +167,10 @@ Oproep gaande… De andere kant heeft niet opgenomen. Informatie - - ${app_name} heeft toegang nodig tot uw microfoon om spraakoproepen te maken. - ${app_name} heeft toegang nodig tot uw camera en microfoon om video-oproepen te maken. \n \nVerleen toegang op de volgende pop-ups om de oproep te maken. - JA NEE Verdergaan @@ -187,17 +178,16 @@ Toetreden Afwijzen Ga naar ongelezen - Gesprek verlaten Weet u zeker dat u het gesprek wilt verlaten\? TWEEGESPREKKEN Uitnodigen Verbannen Ontbannen - Alle berichten van deze gebruiker verbergen - Alle berichten van deze gebruiker tonen + Alle berichten van deze persoon verbergen + Alle berichten van deze persoon tonen Vermelden - U kunt deze veranderingen niet ongedaan maken aangezien u de gebruiker tot hetzelfde niveau als uzelf promoveert. + U kunt deze veranderingen niet ongedaan maken aangezien u de persoon tot hetzelfde niveau als uzelf promoveert. \nWeet u het zeker\? %s is aan het typen… %1$s en %2$s zijn aan het typen… @@ -214,7 +204,6 @@ Het certificaat is veranderd van één dat door uw telefoon werd vertrouwd naar een ander. Dit is HEEL ONGEBRUIKELIJK. Het wordt aangeraden om dit nieuwe certificaat NIET TE AANVAARDEN. Het certificaat is veranderd van een vertrouwd naar een onvertrouwd certificaat. De server heeft misschien zijn certificaat vernieuwd. Contacteer de serverbeheerder voor de verwachte vingerafdruk. Aanvaard het certificaat alleen als de serverbeheerder een vingerafdruk heeft gepubliceerd die overeenkomt met degene hierboven. - Zoeken Gespreksleden filteren Geen resultaten @@ -241,9 +230,9 @@ Copyright Privacybeleid Cache wissen - Gebruikersinstellingen + Persoonsinstellingen Meldingen - Genegeerde gebruikers + Genegeerde personen Overige Geavanceerd Cryptografie @@ -259,10 +248,9 @@ Publieke naam bijwerken Laatst gezien %1$s @ %2$s - Authenticatie Aangemeld als - Thuisserver + Server Identiteitsserver Bekijk uw e-mail en tik op de koppeling erin. Tik zodra dit gedaan is op Verdergaan. Dit e-mailadres is al in gebruik. @@ -283,14 +271,13 @@ Alleen deelnemers (vanaf het moment dat deze optie wordt geselecteerd) Alleen deelnemers (vanaf het moment dat ze worden uitgenodigd) Alleen deelnemers (vanaf het moment dat ze toetreden) - Verbannen gebruikers + Verbannen personen Geavanceerd Interne ID van dit gesprek Experimenteel Dit zijn experimentele functies die zich op onverwachte manieren kunnen gedragen. Wees behoedzaam bij het gebruik van deze functies. Instellen als hoofdadres Niet instellen als hoofdadres - Ontsleutelingsfout Publieke naam Sessie ID @@ -301,7 +288,6 @@ Exporteren Voer wachtwoord in Wachtwoord bevestigen - E2E-gesprekssleutels importeren Gesprekssleutels importeren Importeer de sleutels uit een lokaal bestand @@ -311,11 +297,10 @@ NIET geverifieerd Geverifieerd Verifiëren - Om te verifiëren dat deze sessie vertrouwd kan worden, contacteert u de eigenaar via een andere methode (bv. persoonlijk of via een telefoontje) en vraagt u hem/haar of de sleutel die hij/zij ziet in zijn/haar Gebruikersinstellingen van deze sessie overeenkomt met de sleutel hieronder: + Om te verifiëren dat deze sessie vertrouwd kan worden, contacteert u de eigenaar via een andere methode (bv. persoonlijk of via een telefoontje) en vraagt u hem/haar of de sleutel die hij/zij ziet in zijn/haar persoonsinstellingen van deze sessie overeenkomt met de sleutel hieronder: Als het overeenkomt, drukt u op de knop ‘Verifiëren’ hieronder. Als het niet overeenkomt, dan onderschept iemand anders deze sessie en zou u het beter blokkeren. In de toekomst zal dit verificatieproces verbeterd worden. - Kies een gesprekscatalogus - Thuisserver-naam + Servernaam Alle gesprekken op server %s Alle lokale gesprekken op %s Starten bij opstarten @@ -361,7 +346,7 @@ Video maken Bellen Berichten die mijn weergavenaam bevatten - Berichten die mijn gebruikersnaam bevatten + Berichten die mijn inlognaam bevatten Statistische gegevens Systeemcamera gebruiken U heeft een nieuwe sessie ‘%s’ toegevoegd, die versleutelingssleutels aanvraagt. @@ -381,25 +366,21 @@ %d verandering in lidmaatschap %d veranderingen in lidmaatschap - Ledenlijst - + Leden %d deelnemer %d deelnemers - Als een gebruiker wordt verbannen, wordt deze uit deze kamer verwijderd en wordt er voorkomen dat hij opnieuw lid wordt. + Als een persoon wordt verbannen, wordt deze uit deze kamer verwijderd en wordt er voorkomen dat hij opnieuw lid wordt. %d nieuw bericht %d nieuwe berichten - - Alle berichten Snelkoppeling aan thuisscherm toevoegen Inline URL-voorvertoning - Trillen bij vermelden van een gebruiker + Trillen bij vermelden van een persoon Badge - %d gesprek %d gesprekken @@ -431,15 +412,15 @@ Statistische gegevens (analytics) versturen ${app_name} verzamelt anonieme statistische gegevens (analytics) om het voor ons mogelijk te maken om de app te verbeteren. Er ontbreekt een vereiste parameter. - Om de %1$s-thuisserver verder te blijven gebruiken, dient u de voorwaarden te lezen en ermee akkoord te gaan. + Om de %1$s-server verder te blijven gebruiken, dient u de voorwaarden te lezen en ermee akkoord te gaan. Nu doorlezen Account deactiveren - Dit zal uw account voorgoed onbruikbaar maken. U zult zich niet meer kunnen aanmelden, en niemand anders zal met dezelfde gebruikers-ID kunnen registreren. Dit zal er voor zorgen dat uw account alle gesprekken verlaat waar deze momenteel lid van is, en het verwijdert de accountgegevens van de identiteitsserver. Deze actie is onomkeerbaar. -\n -\nHet deactiveren van uw account zal er niet standaard voor zorgen dat de berichten die u hebt verzonden worden vergeten. Indien u wilt dat wij de berichten vergeten, vinkt u het vakje hieronder aan. -\n + Dit zal uw account voorgoed onbruikbaar maken. U zult zich niet meer kunnen aanmelden, en niemand anders zal met dezelfde persoon-ID kunnen registreren. Dit zal er voor zorgen dat uw account alle gesprekken verlaat waar deze momenteel lid van is, en het verwijdert de accountgegevens van de identiteitsserver. Deze actie is onomkeerbaar. +\n +\nHet deactiveren van uw account zal er niet standaard voor zorgen dat de berichten die u hebt verzonden worden vergeten. Indien u wilt dat wij de berichten vergeten, vinkt u het vakje hieronder aan. +\n \nDe zichtbaarheid van berichten in Matrix is gelijkaardig aan e-mails. Het vergeten van uw berichten betekent dat berichten die u verstuurd heeft niet meer gedeeld worden met nieuwe of ongeregistreerde gebruikers, maar geregistreerde gebruikers die al toegang hebben tot deze berichten zullen alsnog toegang hebben tot hun eigen kopie ervan. - Vergeet alle berichten die ik heb verstuurd wanneer mijn account gedeactiveerd is (Let op: dit zal er voor zorgen dat toekomstige gebruikers een onvolledig beeld krijgen van gesprekken) + Vergeet alle berichten die ik heb verstuurd wanneer mijn account gedeactiveerd is (Let op: dit zal er voor zorgen dat toekomstige personen een onvolledig beeld krijgen van gesprekken) Account deactiveren Downloaden Beveiligingssleutels van uw sessies opnieuw aanvragen. @@ -450,15 +431,15 @@ Beschrijf het probleem in het Engels, indien mogelijk. Media bekijken vóór het versturen Toont een actie - Verbant gebruiker met gegeven ID - Heft verbanning van gebruiker met gegeven ID op - Stel het machtsniveau van een gebruiker in - Neemt rechten van gebruiker met gegeven ID af - Nodigt gebruiker met gegeven ID uit in het huidige gesprek + Verbant persoon met gegeven ID + Heft verbanning van persoon met gegeven ID op + Stel het machtsniveau van een persoon in + Neemt rechten van persoon met gegeven ID af + Nodigt persoon met gegeven ID uit in het huidige gesprek Voegt een kamer toe met het opgegeven adres Gesprek verlaten Onderwerp van het gesprek instellen - Stuurt gebruiker met gegeven ID eruit + Stuurt persoon met gegeven ID eruit Wijzigt uw weergavenaam Markdown aan/uit Dit gesprek is vervangen en is niet langer actief. @@ -466,35 +447,29 @@ Dit gesprek is een voortzetting van een ander gesprek Klik hier om oudere berichten te zien Systeemmeldingen - - - - %d geselecteerd %d geselecteerd Om Matrix-appbeheer te herstellen - - contact op te nemen met uw dienstbeheerder - Deze thuisserver heeft een van zijn bronlimieten overschreden, dus sommige gebruikers zullen zich niet kunnen aanmelden. - Deze thuisserver heeft een van zijn bronlimieten overschreden. - Deze thuisserver heeft zijn limiet voor maandelijks actieve gebruikers overschreden, dus sommige gebruikers zullen zich niet kunnen aanmelden. - Deze thuisserver heeft zijn limiet voor maandelijks actieve gebruikers overschreden. + Deze server heeft een van zijn bronlimieten overschreden, dus sommige personen zullen zich niet kunnen aanmelden. + Deze server heeft een van zijn bronlimieten overschreden. + Deze server heeft zijn limiet voor maandelijks actieve personen overschreden, dus sommige personen zullen zich niet kunnen aanmelden. + Deze server heeft zijn limiet voor maandelijks actieve personen overschreden. Gelieve %s om deze limiet te verhogen. Gelieve %s om deze dienst te blijven gebruiken. Foutmelding Aanvaarden - Gelieve het beleid van deze thuisserver te lezen en aanvaarden: + Gelieve het beleid van deze server te lezen en aanvaarden: Oproepen Gebruik de standaardbeltoon van ${app_name} voor inkomende oproepen Beltoon voor inkomende oproepen Selecteer beltoon voor oproepen: Eruit sturen - Voorvertoning van koppelingen in het gesprek tonen (als uw thuisserver deze functie ondersteunt). + Voorvertoning van koppelingen in het gesprek tonen (als uw server deze functie ondersteunt). Typmeldingen versturen - Laat andere gebruikers weten dat u aan het typen bent. + Laat andere personen weten dat u aan het typen bent. Markdown-opmaak Maak berichten op met Markdown-syntax voordat ze verstuurd worden. Hiermee kunt u uitgebreide opmaak gebruiken, zoals sterretjes voor schuingedrukte tekst. Leesbevestigingen weergeven @@ -558,15 +533,15 @@ Het FCM-bewijs is niet opgehaald: \n%1$s [%1$s] -\nDeze fout is onafhankelijk van ${app_name}. Volgens Google betekent deze fout dat het apparaat te veel apps heeft geregistreerd met FCM. De fout treedt enkel op ingeval er een enorm aantal apps is, dus zou dit de gemiddelde gebruiker niet mogen hinderen. +\nDeze fout is onafhankelijk van ${app_name}. Volgens Google betekent deze fout dat het apparaat te veel apps heeft geregistreerd met FCM. De fout treedt enkel op ingeval er een enorm aantal apps is, dus zou dit de gemiddelde persoon niet mogen hinderen. [%1$s] \nDeze fout is onafhankelijk van ${app_name}. Ze kan verschillende oorzaken hebben. Misschien werkt het als u het later opnieuw probeert. U kunt ook controleren of het gegevensverbruik van Google Play Services niet wordt beperkt in de systeeminstellingen, of dat de klok van uw apparaat wel juist staat, of dat het misschien aan een aangepaste ROM ligt. [%1$s] \nDeze fout is onafhankelijk van ${app_name}. Er is geen Google-account verbonden met de telefoon. Open het accountbeheer en voeg er een Google-account toe. Account toevoegen Bewijsregistratie - FCM-bewijs geregistreerd bij thuisserver. - FCM-bewijs niet geregistreerd bij thuisserver: + FCM-bewijs geregistreerd bij server. + FCM-bewijs niet geregistreerd bij server: \n%1$s Starten bij opstarten van apparaat De dienst zal starten wanneer het apparaat wordt herstart. @@ -581,7 +556,7 @@ Beperkingen uitschakelen Accuoptimalisatie ${app_name} wordt niet beperkt door accuoptimalisatie. - Als een gebruiker een apparaat los van de oplader een tijd laat stilliggen, met het scherm uitgeschakeld, gaat het apparaat in slaapmodus. Dit verhindert apps de toegang tot het netwerk, en stelt hun taken, synchronisaties en standaardalarmen uit. + Als een persoon een apparaat los van de oplader een tijd laat stilliggen, met het scherm uitgeschakeld, gaat het apparaat in slaapmodus. Dit verhindert apps de toegang tot het netwerk, en stelt hun taken, synchronisaties en standaardalarmen uit. Optimalisatie negeren Lawaaiierige meldingen configureren Oproepmeldingen configureren @@ -590,7 +565,6 @@ Beheer van cryptografische sleutels Berichten versturen met Enter De Enter-knop van het toetsenbord zal berichten versturen in plaats van een regeleinde in te voegen - Wachtwoord Het wachtwoord is ongeldig Media @@ -621,7 +595,7 @@ Markdown is ingeschakeld. Markdown is uitgeschakeld. Stil - Voer een gebruikersnaam in. + Voer een inlognaam in. Sorry, er is een fout opgetreden uitvouwen invouwen @@ -641,7 +615,7 @@ (Geavanceerd) Sleutels handmatig exporteren Beveilig uw back-up met een wachtwoord. - We bewaren een versleutelde kopie van uw sleutels op onze thuisserver. Bescherm uw back-up met een wachtwoord om deze veilig te houden. + We bewaren een versleutelde kopie van uw sleutels op onze server. Bescherm uw back-up met een wachtwoord om deze veilig te houden. \n \nVoor een maximale beveiliging zou deze sleutel moeten verschillen van uw accountwachtwoord. Wachtwoord instellen @@ -658,7 +632,6 @@ Herstelsleutel opslaan Delen Opslaan als bestand - Gelieve er een kopie van te maken Herstelsleutel delen met… Herstelsleutel wordt gegenereerd met wachtwoord, dit proces kan enkele seconden duren. @@ -706,7 +679,6 @@ Back-up wordt verwijderd… Back-up verwijderen Uw geback-upte versleutelingssleutels verwijderen van de server\? U zult uw herstelsleutel niet meer kunnen gebruiken om de versleutelde berichtgeschiedenis te lezen. - Verlies nooit uw versleutelde berichten Sleutelback-up gebruiken Nieuwe sleutels voor versleutelde berichten @@ -720,7 +692,6 @@ Versie Algoritme Ondertekening - Sorry, vergadergesprekken met Jitsi worden nog niet ondersteund op oudere apparaten (met een Android-versie lager dan 6.0) onbekend IP-adres Een nieuwe sessie vraagt versleutelingssleutels aan. @@ -736,8 +707,6 @@ Negeren Geverifieerd! Ik snap het - - Verificatieverzoek %s wil uw sessie verifiëren Onbekende fout @@ -745,9 +714,8 @@ Intrekken Verbinding verbreken Weigeren - Dit is geen geldig Matrix-serveradres - Kan geen verbinding maken met een thuisserver op deze URL, controleer de URL + Kan geen verbinding maken met een server op deze URL, controleer de URL Synchroniseren op de achtergrond Geoptimaliseerd voor batterij ${app_name} zal op een batterijzuinige manier synchroniseren op de achtergrond. @@ -757,7 +725,6 @@ \nDit heeft een negatieve impact op uw batterij- en datagebruik. Er zal een melding getoond worden ter informatie. Geen achtergrondssynchronisatie U zal geen melding van berichten ontvangen als de app zich in de achtergrond bevindt. - Integraties Gebruik een integratiebeheerder om bots, bruggen, widgets en stickerpakketten te beheren. \nIntegratiebeheerders ontvangen configuratiedata en kunnen widgets aanpassen, gespreksuitnodigingen versturen en bestuursniveaus instellen namens u. @@ -777,7 +744,7 @@ Toegang intrekken voor mij Uw weergavenaam Uw profielfoto-URL - Uw gebruikers-ID + Uw persoon-ID Uw thema Widget-ID Gespreks-ID @@ -788,13 +755,13 @@ Microfoon gebruiken DRM-beschermde media lezen Om verder te gaan dient u de dienstvoorwaarden te aanvaarden. - Er bestaat al een back-up op uw thuisserver + Er bestaat al een back-up op uw server Het lijkt erop dat u al een back-up van uw herstelsleutel heeft uit een andere sessie. Wilt u deze vervangen door degene die u nu aanmaakt\? Vervangen Stoppen Back-upstatus wordt gecontroleerd U gebruikt geen identiteitsserver - Het lijkt er op dat u probeert verbinding te maken met een andere thuisserver. Wil je uitloggen\? + Het lijkt er op dat u probeert verbinding te maken met een andere server. Wil je uitloggen\? Bewerken Beantwoorden Opnieuw proberen @@ -811,7 +778,7 @@ Reactie Toevoegen Reacties Bekijken Reacties - Gebeurtenis verwijderd door gebruiker + Gebeurtenis verwijderd door persoon Gebeurtenis gemodereerd door gesprek beheerder Niet correcte gebeurtenis, kan niet weergeven Maak een nieuw gesprek aan @@ -914,7 +881,7 @@ %1$s sluit aan U heeft de kamer betreden Druk op uw opname om te stoppen of om te luisteren - Houd ingedrukt om op te nemen, laat los om te verzenden + Houd ingedrukt om op te nemen, laat los om te versturen Verwijder opname Stembericht aan het opnemen Pauzeer stembericht @@ -989,8 +956,8 @@ Rol instellen %1$s gebruiken Huidige taal - Gebruikers Uitnodigen - Gebruikers uitnodigen… + Personen uitnodigen + Personen uitnodigen… Leden toevoegen Login bevestigen Bestand Gebruiken @@ -1045,9 +1012,9 @@ Inloggen Gezien door Matrix-ID - Verouderde thuisserver + Verouderde server Selecteer matrix.org - Opnieuw verzenden + Opnieuw versturen Code invoeren Telefoonnummer Email (optioneel) @@ -1058,23 +1025,23 @@ Ongelezen berichten Alleen vermeldingen Beveiligde Backup - Verbanning gebruiker ongedaan maken - Gebruiker verbannen - Gebruiker verwijderen + Verbanning persoon ongedaan maken + Persoon verbannen + Persoon verwijderen Uitnodiging annuleren - Gebruiker niet meer negeren + Persoon niet meer negeren Stem onstabiel stabiel Alle berichten - Gebruiker negeren + Persoon negeren Inhoud gerapporteerd - GEBRUIKER NEGEREN + PERSOON NEGEREN Aangepast rapport… Dit is ongepast Dit is spam Gelezen door %s - Bijlage verzenden + Bijlage versturen Identiteitsserver Kamer aanmaken… Gesprekken filteren… @@ -1095,7 +1062,7 @@ \@room Overige Geen - Gebruiker negeren + Persoon negeren Uzelf degraderen\? Uitnodiging annuleren In de wacht zetten @@ -1113,7 +1080,7 @@ Publiek Mislukt Verzonden - Verzenden + Versturen Type Ongecontroleerd Gecontroleerd @@ -1121,7 +1088,7 @@ Video Afbeelding Schermafbeelding - Gebruikers + Personen Overdragen Verbinden Onderwerp @@ -1159,7 +1126,7 @@ Gekruist Ondertekenen Tijdlijn Negeren opheffen - Gebruikers + Personen Genodigden Aangepast Moderatoren @@ -1181,7 +1148,7 @@ Waarschuwing Volgende Wachtwoord - Gebruikersnaam + Inlognaam Volgende Volgende Volgende @@ -1265,30 +1232,30 @@ Aan de slag Spacerechten Gespreksrechten - Door deze gebruiker niet meer de verbannen kan hij/zij opnieuw toetreden tot de space. - Door deze gebruiker niet meer de verbannen kan hij/zij opnieuw toetreden tot het gesprek. - Door deze gebruiker te verbannen zal hij/zij verwijderd worden uit deze space en voorkomen dat hij/zij opnieuw toetreedt. + Door deze persoon niet meer de verbannen kan hij/zij opnieuw toetreden tot de space. + Door deze persoon niet meer de verbannen kan hij/zij opnieuw toetreden tot het gesprek. + Door deze persoon te verbannen zal hij/zij verwijderd worden uit deze space en voorkomen dat hij/zij opnieuw toetreedt. Reden voor verbanning - door deze gebruiker de verwijderen zal hij/zij niet meer in deze space zitten. + Door deze persoon de verwijderen zal hij/zij niet meer in deze space zitten. \n \nOm te voorkomen dat hij/zij opnieuw toetreedt, kunt u hem/haar ook verbannen. - door deze gebruiker te verwijderen zal hij/zij niet meer in dit gesprek zitten. + Door deze persoon te verwijderen zal hij/zij niet meer in dit gesprek zitten. \n \nOm te voorkomen dat hij/zij opnieuw toetreedt, kun je hem/haar ook verbannen. Reden voor verwijdering - Weet u zeker dat u uitnodiging voor deze gebruiker wilt annuleren\? - Het niet meer negeren van deze gebruiker zal al zijn/haar berichten opnieuw doen weergeven. - Door deze gebruiker te negeren worden zijn/haar berichten verwijderd uit gesprekken die jullie delen. + Weet u zeker dat u uitnodiging voor deze persoon wilt annuleren\? + Het niet meer negeren van deze persoon zal al zijn/haar berichten opnieuw doen weergeven. + Door deze persoon te negeren worden zijn/haar berichten verwijderd uit gesprekken die jullie delen. \n \nU kunt deze actie op elk moment ongedaan maken in de algemene instellingen. - U kunt deze wijziging niet ongedaan maken omdat uzelf degradeert, als u de laatste gebruiker met rechten bent in het gesprek zal het onmogelijk zijn om opnieuw rechten te krijgen. + U kunt deze wijziging niet ongedaan maken omdat uzelf degradeert, als u de laatste persoon met rechten bent in het gesprek zal het onmogelijk zijn om opnieuw rechten te krijgen. Dit gesprek is niet publiek. U kunt niet opnieuw toetreden zonder uitnodiging. Toegang verlenen tot uw contactpersonen. Om de QR-code te scannen moet u toegang verlenen tot de camera. Oproep beëindigen… Geen antwoord - De gebruiker die u heeft gebeld is bezig. - Gebruiker bezig + De persoon die u heeft gebeld is bezet. + Persoon bezet U heeft de oproep in de wacht gezet %s heeft de oproep in de wacht gezet Bellen met %s @@ -1313,10 +1280,10 @@ HD uitschakelen Geluidsapparaat Selecteren Kan geen realtime verbinding tot stand brengen. -\nVraag de beheerder van uw thuisserver om een TURN-server te configureren om gesprekken betrouwbaar te laten werken. +\nVraag de beheerder van uw server om een TURN-server te configureren om gesprekken betrouwbaar te laten werken. ${app_name} Oproep Mislukt - Thuisserver API URL - Sleutel deelverzoekgeschiedenis verzenden + Server API URL + Sleutel deelverzoekgeschiedenis versturen Alle gesprekken in de lijst tonen, waaronder gesprekken met expliciete inhoud. Gesprekken tonen met expliciete inhoud Gesprekslijst @@ -1345,11 +1312,11 @@ Er wordt een verificatie-e-mail naar uw inbox gestuurd om het instellen van uw nieuwe wachtwoord te bevestigen. Wachtwoord opnieuw instellen op %1$s Dit e-mailadres is niet gekoppeld aan een account. - De applicatie kan geen account aanmaken op deze thuisserver. + De applicatie kan geen account aanmaken op deze server. \n \nWilt u zich aanmelden met een webclient\? Sorry, deze server accepteert geen nieuwe accounts. - De applicatie kan niet inloggen op deze thuisserver. De thuisserver ondersteunt de volgende aanmeldingstype(s): %1$s. + De applicatie kan niet inloggen op deze server. De thuisserver ondersteunt de volgende aanmeldingstype(s): %1$s. \n \nWil je inloggen met een webclient\? Er is een fout opgetreden bij het laden van de pagina: %1$s (%2$d) @@ -1381,7 +1348,7 @@ Je hebt de kamer alleen op uitnodiging gemaakt. %1$s heeft de kamer alleen voor uitnodigingen ingesteld. U heeft de kamer openbaar gemaakt voor iedereen die de link kent. - U negeert geen enkele gebruiker + U negeert geen enkele persoon %1$s heeft de kamer openbaar gemaakt voor iedereen die de link kent. Klik lang op een kamer om meer opties te zien Schrijf trefwoorden om een reactie te vinden. @@ -1395,18 +1362,17 @@ Verwijder van favorieten Toevoegen aan favorieten Alle berichten (luidruchtig) - Deze inhoud is als ongepast gerapporteerd. \n -\nAls u geen inhoud van deze gebruiker meer wilt zien, kunt u deze negeren om hun berichten te verbergen. +\nAls u geen inhoud van deze persoon meer wilt zien, kunt u deze negeren om hun berichten te verbergen. Gemeld als ongepast Deze inhoud is gerapporteerd als spam. \n -\nAls u geen inhoud van deze gebruiker meer wilt zien, kunt u deze negeren om hun berichten te verbergen. +\nAls u geen inhoud van deze persoon meer wilt zien, kunt u deze negeren om hun berichten te verbergen. Gerapporteerd als spam Deze inhoud is gemeld. \n -\nAls u geen inhoud van deze gebruiker meer wilt zien, kunt u deze negeren om hun berichten te verbergen. +\nAls u geen inhoud van deze persoon meer wilt zien, kunt u deze negeren om hun berichten te verbergen. Reden voor het rapporteren van deze inhoud Deze inhoud rapporteren Er zijn geen bestanden in deze kamer @@ -1420,8 +1386,8 @@ Er is een fout opgetreden bij het ophalen van de bijlage. Het bestand is te groot om te uploaden. - %d gebruiker gelezen - %d gebruikers gelezen + %d persoon gelezen + %d personen gelezen %1$s en %2$s gelezen %1$s, %2$s en %3$s gelezen @@ -1449,16 +1415,14 @@ Voer de URL van de identiteitsserver in Kan geen verbinding maken met identiteitsserver Voer een identiteitsserver URL in - Gaat u akkoord met het verzenden van deze informatie\? + Gaat u akkoord met het versturen van deze informatie\? Om bestaande contacten te ontdekken, moet u contactgegevens (e-mailadressen en telefoonnummers) naar uw identiteitsserver sturen. We hashen uw gegevens voordat ze worden verzonden vanwege privacy. - - Stuur e-mailadressen en telefoonnummers naar %s Toestemming geven Mijn toestemming intrekken - Uw thuisserver-beleid - Kan geen thuisserver bereiken op de URL %s. Controleer uw link of kies handmatig een thuisserver. - Uw contacten zijn privé. Om gebruikers van uw contacten te ontdekken, hebben we uw toestemming nodig om contactgegevens naar uw identiteitsserver te sturen. + Uw server-beleid + Kan geen server bereiken op de URL %s. Controleer uw link of kies handmatig een server. + Uw contacten zijn privé. Om personen van uw contacten te ontdekken, hebben we uw toestemming nodig om contactgegevens naar uw identiteitsserver te sturen. We hebben u een bevestigingsmail gestuurd naar %s, controleer eerst uw e-mail en klik op de bevestigingslink We hebben u een bevestigingsmail gestuurd naar %s, controleer uw e-mail en klik op de bevestigingslink Ontdekkingsopties verschijnen zodra u een e-mail heeft toegevoegd. @@ -1471,14 +1435,14 @@ Verander uw schermnaam alleen in de huidige kamer Andere spaces of kamers die u misschien niet kent Space die u kent die deze kamer bevat - Stel adressen in voor deze kamer zodat gebruikers deze kamer kunnen vinden via uw thuisserver (%1$s) + Stel adressen in voor deze kamer zodat personen deze kamer kunnen vinden via uw server (%1$s) U kunt dit op elk moment uitschakelen in de instellingen U krijgt geen meldingen voor vermeldingen en trefwoorden in versleutelde kamers op uw mobiel. Zorg ervoor dat u op de link heeft geklikt in de e-mail die we u hebben gestuurd. - U hebt uw toestemming gegeven om e-mails en telefoonnummers naar deze identiteitsserver te sturen om andere gebruikers van uw contacten te ontdekken. - E-mails en telefoonnummers verzenden + U hebt uw toestemming gegeven om e-mails en telefoonnummers naar deze identiteitsserver te sturen om andere personen van uw contacten te ontdekken. + E-mailadressen en telefoonnummers versturen Vindbare telefoonnummers - Als u de verbinding met uw identiteitsserver verbreekt, betekent dit dat u niet door andere gebruikers kan worden gevonden en dat u anderen niet per e-mail of telefoon kunt uitnodigen. + Als u de verbinding met uw identiteitsserver verbreekt, betekent dit dat u niet door andere personen kan worden gevonden en dat u anderen niet per e-mail of telefoon kunt uitnodigen. Ontdekkingsopties verschijnen zodra u een telefoonnummer heeft toegevoegd. Vindbare e-mailadressen U gebruikt momenteel geen identiteitsserver. Om te ontdekken en vindbaar te zijn door bestaande contacten die u kent, configureert u er een hieronder. @@ -1493,7 +1457,7 @@ Vindbaar zijn voor anderen Servicevoorwaarden Bekijken Bewerken Geschiedenis - Bekende gebruikers + Bekende personen QR-code Toevoegen via QR-code Link gekopieerd naar klembord @@ -1503,22 +1467,22 @@ Zoeken op naam, ID of e-mail Naam of ID (#voorbeeld:matrix.org) Bekijk de kamer directory - Een nieuw privébericht verzenden + Een nieuw privébericht versturen Nieuwe kamer aanmaken Kunt u niet vinden wat u zoekt\? Geen bewerkingen gevonden Bestand %1$s is gedownload! Video comprimeren %d%% Afbeelding comprimeren… - Bestand verzenden (%1$s / %2$s) - Miniatuur verzenden (%1$s / %2$s) + Bestand versturen (%1$s / %2$s) + Miniatuur versturen (%1$s / %2$s) Toon volledige geschiedenis in versleutelde kamers Toon verborgen gebeurtenissen op de tijdlijn Geef feedback De feedback kan niet worden verzonden (%s) Bedankt, uw feedback is succesvol verzonden U kunt contact met mij opnemen als u vervolgvragen heeft - U gebruikt een bètaversie van spaces. Uw feedback zal helpen bij het informeren van de volgende versies. Uw platform en gebruikersnaam worden genoteerd om ons te helpen uw feedback zoveel mogelijk te gebruiken. + U gebruikt een bètaversie van spaces. Uw feedback zal helpen bij het informeren van de volgende versies. Uw platform en inlognaam worden genoteerd om ons te helpen uw feedback zoveel mogelijk te gebruiken. Spaces feedback De suggestie kan niet worden verzonden (%s) Bedankt, de suggestie is succesvol verzonden @@ -1551,11 +1515,11 @@ Beveiligde back-up instellen Beveiliging tegen verlies van toegang tot versleutelde berichten en gegevens De herstelsleutel is opgeslagen. - Toont informatie over een gebruiker + Toont informatie over een persoon Verandert de avatar van de huidige kamer Stelt de kamernaam in - Stopt met het negeren van een gebruiker, toon hun berichten in de toekomst - Negeer een gebruiker en verberg hun berichten voor jou + Stopt met het negeren van een persoon, toon hun berichten in de toekomst + Negeer een persoon en verberg hun berichten voor jou Geen actieve widgets De huidige conferentie verlaten en naar de andere overschakelen\? Sorry, er is een fout opgetreden bij het deelnemen aan de conferentie @@ -1574,8 +1538,8 @@ Sleutels succesvol geëxporteerd Kamer versie - %d verbannen gebruiker - %d verbannen gebruikers + %d verbannen persoon + %d verbannen personen Bepaal wie deze kamer kan vinden en er lid van kan worden. Tik om spaces te bewerken @@ -1654,7 +1618,7 @@ Groepsberichten Versleutelde directe berichten Directe berichten - Mijn gebruikersnaam + Mijn inlognaam Mijn weergavenaam Berichten bevatten @room Wanneer kamers worden opgewaardeerd @@ -1681,7 +1645,7 @@ De sessie is afgemeld! De kamer is verlaten! Alleen vermeldingen en trefwoorden - Filter verbannen gebruikers + Filter verbannen personen Verander onderwerp Space upgraden Kamer upgraden @@ -1699,10 +1663,10 @@ Widgets wijzigen Iedereen informeren Berichten verwijderen die door anderen zijn verzonden - Gebruikers verbannen - Kick gebruikers + Personen verbannen + Kick personen Instellingen veranderen - Gebruikers uitnodigen + Personen uitnodigen Berichten sturen Standaardrol U bent niet gemachtigd om de rollen bij te werken die nodig zijn om verschillende delen van deze space te wijzigen @@ -1711,7 +1675,7 @@ Selecteer de rollen die nodig zijn om verschillende delen van de kamer te veranderen Bekijk en update de rollen die nodig zijn om verschillende delen van de kamer te veranderen. Bekijk en update de rollen die nodig zijn om verschillende delen van de kamer te veranderen. - Kies thuisserver + Kies server Niet nu Inschakelen Luisteren naar notificaties @@ -1723,12 +1687,12 @@ Geen content Event inhoud Statussleutel - Aangepaste statusgebeurtenis verzenden + Aangepaste statusgebeurtenis versturen Inhoud bewerken Staat gebeurtenissen - Statusgebeurtenis verzenden - Aangepaste gebeurtenis verzenden - Kamerstatus verkennen + Statusgebeurtenis versturen + Aangepaste gebeurtenis versturen + Kamer status ontdekken Ontwikkel tools Niet beschikbaar Offline @@ -1765,8 +1729,6 @@ Actieve oproep · %1$d actieve gesprekken · - - Actieve oproep (%1$s) Er is een fout opgetreden bij het opzoeken van het telefoonnummer Toetsenblok @@ -1827,7 +1789,7 @@ Controleer uw instellingen om pushmeldingen in te schakelen Pushmeldingen zijn uitgeschakeld - Kan gebruiker verbanning niet opheffen + Kan persoon verbanning niet opheffen Verbannen door %1$s Uitnodiging voor %1$s intrekken\? Zoeken naar contacten op Matrix @@ -1863,14 +1825,14 @@ De microfoon dempen Voer de URL van een identiteitsserver in U kunt ook een andere identiteitsserver URL invoeren - Uw thuisserver (%1$s) stelt voor om %2$s te gebruiken voor uw identiteitsserver - De toestemming van de gebruiker is niet gegeven. + Uw server (%1$s) stelt voor om %2$s te gebruiken voor uw identiteitsserver + De toestemming van de persoon is niet gegeven. Er is geen huidige associatie met dit id. De associatie heeft gefaald. - Voor uw privacy ondersteunt ${app_name} alleen het verzenden van gehashte e-mailadressen en telefoonnummers van gebruikers. + Voor uw privacy ondersteunt ${app_name} alleen het versturen van gehashte e-mailadressen en telefoonnummers van personen. Accepteer eerst de voorwaarden van de identiteitsserver in de instellingen. Configureer eerst een identiteitsserver. - Deze operatie is niet mogelijk. De thuisserver is verouderd. + Deze operatie is niet mogelijk. De server is verouderd. Deze identiteitsserver is verouderd. ${app_name} ondersteunt alleen API V2. Verbinding met identiteitsserver %s verbreken\? Open voorwaarden van %s @@ -1880,7 +1842,7 @@ Mijn code Deel mijn code Scan een QR-code - We kunnen geen gebruikers uitnodigen. Controleer de gebruikers die u wilt uitnodigen en probeer het opnieuw. + We kunnen geen personen uitnodigen. Controleer de personen die u wilt uitnodigen en probeer het opnieuw. Uitnodigingen verzonden naar %1$s en nog één Uitnodigingen verzonden naar %1$s en %2$d meer @@ -1892,13 +1854,13 @@ Hé, praat met me op ${app_name}: %s Nodig vrienden uit Mensen toevoegen - We kunnen je DM niet maken. Controleer de gebruikers die u wilt uitnodigen en probeer het opnieuw. + We kunnen je DM niet maken. Controleer de personen die u wilt uitnodigen en probeer het opnieuw. De link %1$s brengt u naar een andere site: %2$s. \n \nWeet u zeker dat u door wilt gaan\? Dubbelcheck deze link Kies een wachtwoord. - Kies een gebruikersnaam. + Kies een inlognaam. Kan kruislingsondertekenen niet instellen Bevestig uw identiteit door deze login te verifiëren en deze toegang te verlenen tot versleutelde berichten. Bevestig uw identiteit door deze login van een van uw andere sessies te verifiëren en toegang te verlenen tot versleutelde berichten. @@ -1916,7 +1878,7 @@ Laat het apparaat zien waarmee u nu kunt verifiëren %d apparaten weergeven waarmee u nu kunt verifiëren - U start opnieuw op zonder geschiedenis, geen berichten, vertrouwde apparaten of vertrouwde gebruikers + U start opnieuw op zonder geschiedenis, geen berichten, vertrouwde apparaten of vertrouwde personen Als je alles reset Doe dit alleen als u geen ander apparaat heeft waarmee u dit apparaat kunt verifiëren. Alle herstelopties vergeten of verloren\? Alles resetten @@ -1954,7 +1916,7 @@ Verifieer uzelf en anderen om uw chats veilig te houden Encryptie upgrade beschikbaar Dit account is gedeactiveerd. - Onjuiste gebruikersnaam en/of wachtwoord. Het ingevoerde wachtwoord begint of eindigt met spaties, controleer dit alstublieft. + Onjuiste inlognaam en/of wachtwoord. Het ingevoerde wachtwoord begint of eindigt met spaties, controleer dit alstublieft. Verzendt een bericht als platte tekst, zonder het als markdown te interpreteren Kan sleutels niet importeren Wachten op %s… @@ -1970,11 +1932,10 @@ De versleuteling die door deze kamer wordt gebruikt, wordt niet ondersteund Versleuteling niet ingeschakeld Berichten in deze kamer zijn end-to-end-versleuteld. - Berichten in deze kamer zijn end-to-end-versleuteld. Lees meer en verifieer gebruikers in hun profiel. + Berichten in deze kamer zijn eind-tot-eind-versleuteld. Lees meer en verifieer persoon in hun profiel. Als u nu annuleert, kunt u versleutelde berichten en gegevens kwijtraken als u de toegang tot uw aanmeldingen verliest. \n \nU kunt ook Veilige back-up instellen en uw sleutels beheren in Instellingen. - Kopieer het naar uw persoonlijke cloudopslag Bewaar het op een USB-stick of back-upstation Print het uit en bewaar het ergens veilig @@ -1983,7 +1944,7 @@ \nHoud ze veilig! U heeft ze nodig om versleutelde berichten te ontgrendelen en informatie te beveiligen als u al uw actieve sessies verliest. Sleutelback-up instellen Zelfondertekenende sleutel synchroniseren - Gebruikerssleutel synchroniseren + Persoonssleutel synchroniseren Hoofdsleutel synchroniseren SSSS standaardsleutel definiëren Beveiligde sleutel genereren op basis van wachtwoordzin @@ -1998,14 +1959,14 @@ Een van de volgende zaken kan worden aangetast: \n \n- Uw wachtwoord -\n- Uw thuisserver +\n- Uw server \n- Dit apparaat, of het andere apparaat \n- De internetverbinding die elk apparaat gebruikt \n \nWe raden u aan uw wachtwoord en herstelsleutel onmiddellijk in Instellingen te wijzigen. - U verifieert %1$s (%2$s) niet als u nu annuleert. Begin opnieuw in hun gebruikersprofiel. - Als u annuleert, kunt u geen versleutelde berichten op dit apparaat lezen en zullen andere gebruikers het niet vertrouwen - Als u annuleert, kunt u geen versleutelde berichten lezen op je nieuwe apparaat en zullen andere gebruikers het niet vertrouwen + U verifieert %1$s (%2$s) niet als u nu annuleert. Begin opnieuw in hun profiel. + Als u annuleert, kunt u geen versleutelde berichten op dit apparaat lezen en zullen andere personen het niet vertrouwen + Als u annuleert, kunt u geen versleutelde berichten lezen op je nieuwe apparaat en zullen andere personen het niet vertrouwen Uw account is mogelijk gecompromitteerd Dit was ik niet Gebruik deze sessie om uw nieuwe te verifiëren en deze toegang te verlenen tot versleutelde berichten. @@ -2015,11 +1976,11 @@ ${app_name} Android Sleutels zijn al up-to-date! Gebeurtenis gemodereerd door kamer beheerder, reden: %1$s - Gebeurtenis verwijderd door gebruiker, reden: %1$s + Gebeurtenis verwijderd door persoon, reden: %1$s Reden voor redigeren Geef een reden op Weet u zeker dat u deze gebeurtenis wilt verwijderen (wissen)\? Houd er rekening mee dat als u een kamer naam of onderwerpwijziging verwijdert, de wijziging ongedaan kan worden gemaakt. - Media verzenden in het originele formaat + Media versturen in het originele formaat Stuur video in het originele formaat Stuur video\'s in het originele formaat @@ -2038,7 +1999,7 @@ Vliegtuigmodus is ingeschakeld Verbinding met de server is verbroken Bijna daar! Toont %s een vinkje\? - Totdat deze gebruiker deze sessie vertrouwt, worden berichten die van en naar de sessie worden verzonden, gelabeld met waarschuwingen. U kunt het ook handmatig verifiëren. + Totdat deze persoon deze sessie vertrouwt, worden berichten die van en naar de sessie worden verzonden, gelabeld met waarschuwingen. U kunt het ook handmatig verifiëren. %1$s (%2$s) aangemeld met een nieuwe sessie: Deze sessie wordt vertrouwd voor veilig berichtenverkeer omdat %1$s (%2$s) deze heeft geverifieerd: Kan geen sessies ophalen @@ -2054,7 +2015,7 @@ Standaardversie Kamerversies 👓 De limiet is onbekend. - Uw thuisserver accepteert bijlagen (bestanden, media, enz.) met een grootte tot %s. + Uw server accepteert bijlagen (bestanden, media, enz.) met een grootte tot %s. Server limiet voor het uploaden van bestanden Serverversie Server naam @@ -2069,9 +2030,9 @@ \nPrivésleutels zijn niet bekend Kruisondertekening is ingeschakeld \nPrivésleutels op het apparaat. - Uw nieuwe sessie is nu geverifieerd. Het heeft toegang tot uw gecodeerde berichten en andere gebruikers zullen het als vertrouwd zien. - Berichten met deze gebruiker zijn end-to-end-versleuteld en kunnen niet door derden worden gelezen. - Vergelijk de code met die op het scherm van de andere gebruiker. + Uw nieuwe sessie is nu geverifieerd. Het heeft toegang tot uw gecodeerde berichten en andere personen zullen het als vertrouwd zien. + Berichten met deze persoon zijn end-to-end-versleuteld en kunnen niet door derden worden gelezen. + Vergelijk de code met die op het scherm van de andere persoon. Vergelijk de unieke emoji en zorg ervoor dat ze in dezelfde volgorde verschijnen. Doe dit voor de zekerheid persoonlijk of gebruik een andere manier om te communiceren. Om veilig te zijn, verifieert u %s door een eenmalige code te controleren. @@ -2099,7 +2060,6 @@ \nUw berichten zijn beveiligd met sloten en alleen u en de ontvanger hebben de unieke sleutels om ze te ontgrendelen. Berichten hier zijn niet end-to-end-versleuteld. Berichten in deze kamer zijn niet end-to-end-versleuteld. - Wachten op %s… Verifieer door emoji\'s te vergelijken Verifieer door emoji te vergelijken @@ -2107,15 +2067,15 @@ Scannen met dit apparaat Scan hun code Scan de code met uw ander apparaat of wissel en scan met dit apparaat - Scan de code met het apparaat van de andere gebruiker om elkaar veilig te verifiëren + Scan de code met het apparaat van de andere persoon om elkaar veilig te verifiëren Deze sessie verifiëren Gereageerd met: %s "Een van de volgende zaken kan worden aangetast: \n -\n - Uw thuisserver -\n - De thuisserver waarmee de gebruiker die u verifieert is verbonden -\n - De internetverbinding van u of de andere gebruikers -\n - Het apparaat van u of van andere gebruikers" +\n - Uw server +\n - De server waarmee de gebruiker die u verifieert is verbonden +\n - De internetverbinding van u of de andere personen +\n - Het apparaat van u of van andere personen" Ze komen niet overeen Niet-vertrouwd inloggen Uw e-maildomein is niet geautoriseerd om op deze server te registreren @@ -2125,7 +2085,7 @@ Geef een kameradres op Dit adres is al in gebruik Space adres - U kunt dit inschakelen als de kamer alleen wordt gebruikt voor samenwerking met interne teams op uw thuisserver. Dit kan later niet meer worden gewijzigd. + U kunt dit inschakelen als de kamer alleen wordt gebruikt voor samenwerking met interne teams op uw server. Dit kan later niet meer worden gewijzigd. Blokkeer iedereen die geen deel uitmaakt van %s om ooit deel te nemen aan deze kamer Verberg geavanceerd Toon geavanceerd @@ -2140,7 +2100,7 @@ De ontwikkelaarsmodus activeert verborgen functies en kan de applicatie ook minder stabiel maken. Alleen voor ontwikkelaars! De beschrijving is te kort Uw matrix.to link is onjuist opgemaakt - De huidige sessie is voor gebruiker %1$s en u geeft inloggegevens op voor gebruiker %2$s. Dit wordt niet ondersteund door ${app_name}. + De huidige sessie is voor gebruiker %1$s en u geeft inloggegevens op voor persoon %2$s. Dit wordt niet ondersteund door ${app_name}. \nWis eerst de gegevens en meld u vervolgens opnieuw aan met een ander account. U raakt de toegang tot beveiligde berichten kwijt, tenzij u zich aanmeldt om uw versleutelingssleutels te herstellen. Alle gegevens wissen die momenteel op dit apparaat zijn opgeslagen\? @@ -2151,7 +2111,7 @@ \nWis het als u klaar bent met het gebruik van dit apparaat of als u zich wilt aanmelden bij een ander account. Persoonlijke gegevens wissen Log in om versleutelingssleutels te herstellen die exclusief op dit apparaat zijn opgeslagen. Je hebt ze nodig om al uw beveiligde berichten op elk apparaat te lezen. - Uw thuisserver (%1$s) beheerder heeft u uitgelogd van uw account %2$s (%3$s). + Uw server (%1$s) beheerder heeft u uitgelogd van uw account %2$s (%3$s). Je bent uitgelogd Opnieuw inloggen Het kan verschillende redenen hebben: @@ -2162,30 +2122,30 @@ \n \n• De beheerder van uw server heeft uw toegang om veiligheidsredenen ongeldig gemaakt. Je bent uitgelogd - Kan geen geldige thuisserver vinden. Controleer uw ID a.u.b. - Dit is geen geldige gebruikers-ID. Verwacht formaat: \'@gebruiker:thuisserver.org\' + Kan geen geldige server vinden. Controleer uw ID a.u.b. + Dit is geen geldige persoon-ID. Verwacht formaat: \'@persoon:server.org\' Als u uw wachtwoord niet weet, gaat u terug om het opnieuw in te stellen. - Als je een account aanmaakt op een thuisserver, gebruik dan je Matrix ID (bijv. @gebruiker:domein.nl) en wachtwoord hieronder. + Als je een account aanmaakt op een server, gebruik dan je Matrix ID (bijv. @persoon:domein.nl) en wachtwoord hieronder. Aanmelden met Matrix ID Aanmelden met Matrix ID Er zijn te veel verzoeken verzonden. Je kunt het over %1$d seconde opnieuw proberen… Er zijn te veel verzoeken verzonden. Je kunt het over %1$d seconden opnieuw proberen… - Deze thuisserver draait op een oude versie. Vraag uw thuisserver beheerder om te upgraden. U kunt doorgaan, maar sommige functies werken mogelijk niet correct. + Deze server draait op een oude versie. Vraag uw server beheerder om te upgraden. U kunt doorgaan, maar sommige functies werken mogelijk niet correct. De ingevoerde code is niet correct. Gelieve dit te controleren. We hebben zojuist een e-mail gestuurd naar %1$s. \nKlik op de link die deze bevat om door te gaan met het aanmaken van een account. Controleer uw e-mail Accepteer de voorwaarden om door te gaan Voer de captcha uitdaging uit - Selecteer een aangepaste thuisserver + Selecteer een aangepaste server Selecteer Element Matrix Services Uw account is nog niet aangemaakt. \n \nHet registratieproces stoppen\? - Die gebruikersnaam is in gebruik - Gebruikersnaam of e-mail + Deze inlognaam is in gebruik + Inlognaam of e-mailadres Meld u aan bij %1$s Telefoonnummer lijkt ongeldig. Controleer het alstublieft Internationale telefoonnummers moeten beginnen met \'+\' @@ -2216,7 +2176,6 @@ Iedereen in een ouderkamer kan deze kamer vinden en er lid van worden. Het is niet nodig om iedereen handmatig uit te nodigen. U kunt dit op elk moment wijzigen in de kamer instellingen. Het upgraden van een kamer is een geavanceerde actie en wordt meestal aanbevolen wanneer een kamer onstabiel is vanwege bugs, ontbrekende functies of beveiligingsproblemen. \nDit heeft meestal alleen invloed op hoe de kamer op de server wordt verwerkt. - Beheer kamers U bent de enige beheerder van deze kamer. Als u het verlaat, betekent dit dat niemand er controle over heeft. Deze alias is momenteel niet toegankelijk. @@ -2229,7 +2188,7 @@ Contacten openen Stuur sticker Upload bestand - Afbeeldingen en video\'s verzenden + Afbeeldingen en video\'s versturen Open camera Weet u zeker dat u deze poll wilt verwijderen\? U kunt het niet meer herstellen nadat het is verwijderd. Poll verwijderen @@ -2279,10 +2238,10 @@ Spraakbericht opnemen Sorry, er is een fout opgetreden bij het proberen deel te nemen aan: %s Upgrade naar de aanbevolen kamerversie - In deze kamer wordt versie %s gebruikt, die door deze thuisserver als onstabiel is gemarkeerd. + In deze kamer wordt versie %s gebruikt, die door deze server als onstabiel is gemarkeerd. U heeft toestemming nodig om een kamer te upgraden Bovenliggende space automatisch bijwerken - Gebruikers automatisch uitnodigen + Personen automatisch uitnodigen U update de kamer van %1$s naar %2$s. Upgrade privékamer Upgrade openbare kamer @@ -2294,8 +2253,8 @@ Sommige kamers zijn mogelijk verborgen omdat ze privé zijn en u een uitnodiging nodig heeft. \nU heeft geen rechten om kamers toe te voegen. Deze space heeft geen kamers - Neem contact op met uw thuisserver beheerder voor meer informatie - Het lijkt erop dat je thuisserver nog geen Spaces ondersteunt + Neem contact op met uw server beheerder voor meer informatie + Het lijkt erop dat je server nog geen Spaces ondersteunt Experimenteel voelen\? \nU kunt bestaande spaces aan een space toevoegen. Alle kamers waarin u deelneemt, worden weergegeven in Home. @@ -2319,9 +2278,9 @@ U kunt pas weer deelnemen als u opnieuw wordt uitgenodigd. U bent de enige persoon hier. Als u weggaat, kan niemand meer meedoen, ook u niet. Weet u zeker dat u %s wilt verlaten\? - Verlaat Space + Verlaat Kamers toevoegen - Kamers verkennen + Kamers ontdekken %d persoon die u kent is al lid geworden %d mensen die u kent zijn al lid geworden @@ -2336,10 +2295,10 @@ Voor nu overslaan Ze zullen geen deel uitmaken van %s Alleen voor deze kamer - Ze kunnen %s verkennen + Ze kunnen %s ontdekken Uitnodigen voor %s Deel link - Uitnodigen via gebruikersnaam of e-mail + Uitnodigen via inlognaam of e-mailadres uitnodiging via e-mail Het is alleen u op dit moment. %s zal nog beter zijn met anderen. Uitnodigen voor %s @@ -2360,10 +2319,10 @@ Ik en teamgenoten Een privé space om je kamers te organiseren Alleen ik - Zorg ervoor dat de juiste mensen toegang hebben tot %s. U kunt dit later wijzigen. + Zorg ervoor dat de juiste mensen toegang hebben tot %s. Met wie werkt u samen\? U kunt dit later wijzigen - Wat voor soort space wilt u creëren\? + Wat voor soort space wilt u aanmaken\? Uw privé space Uw openbare space Space toevoegen @@ -2371,7 +2330,7 @@ Openbare space Niet verzonden berichten verwijderen Berichten kunnen niet worden verzonden - Wilt u het verzenden van een bericht annuleren\? + Wilt u het versturen van een bericht annuleren\? Alle mislukte berichten verwijderen Upgrade een kamer naar een nieuwe versie Verlaat kamer met gegeven id (of huidige kamer indien leeg) @@ -2383,7 +2342,7 @@ Veilig berichtenverkeer. U heeft de controle. Deel locatie - Gebruikerslocaties in de tijdlijn weergeven + Persoonslocaties in de tijdlijn weergeven Eenmaal ingeschakeld, kun je je locatie naar elke kamer sturen Locatie delen inschakelen Open met @@ -2411,8 +2370,8 @@ Kies waar je gesprekken worden bewaard, zodat u controle en onafhankelijkheid heeft. Verbonden via Matrix. Veilige en onafhankelijke communicatie die u dezelfde mate van privacy geeft als een persoonlijk gesprek in uw eigen huis. Locatie - De versleuteling is verkeerd geconfigureerd, zodat u geen berichten kunt verzenden. Klik om instellingen te openen. - De versleuteling is verkeerd geconfigureerd, zodat u geen berichten kunt verzenden. Neem contact op met een beheerder om de versleuteling in een geldige staat te herstellen. + De versleuteling is verkeerd geconfigureerd, zodat u geen berichten kunt versturen. Klik om instellingen te openen. + De versleuteling is verkeerd geconfigureerd, zodat u geen berichten kunt versturen. Neem contact op met een beheerder om de versleuteling in een geldige staat te herstellen. Toon bericht bubbels Kan kaart niet laden Kaart @@ -2446,4 +2405,56 @@ Kopieer link naar discussie Bekijk in kamer Discussies bekijken + Personen + De server accepteert geen inlognaam met alleen cijfers. + Kamer notificatie + Breng de hele kamer op de hoogte + + %1$d meer + %1$d meer + + Toon minder + Locatie delen is bezig + ${app_name} Live locatie + Stop + Live locatie ingeschakeld + Als u de Live-locatie wilt delen, heeft ${app_name} altijd locatietoegang nodig als de app op de achtergrond actief is. +\nWe hebben alleen toegang tot uw locatie voor de duur die u kiest. + Toegang te verlenen + Deel deze locatie + Deel deze locatie + Live locatie delen + Live locatie delen + Deel mijn huidige locatie + Deel mijn huidige locatie + Zoom naar huidige locatie + Pin van geselecteerde locatie op kaart + Sla deze stap over + Opslaan en doorgaan + Je voorkeuren zijn opgeslagen. + Alles gereed! + Laten we beginnen + U kunt dit op elk moment wijzigen. + Voeg een profielfoto toe + U kunt dit later wijzigen + Weergavenaam + Dit wordt weergegeven wanneer u berichten verzendt. + Kies een weergavenaam + Uw account %s is aangemaakt. + Gefeliciteerd! + Breng me naar het begin + Personaliseer profiel + We komen dichter bij het uitbrengen van een openbare bèta voor Discussies. +\n +\nTerwijl we ons erop voorbereiden, moeten we enkele wijzigingen aanbrengen: discussies die vóór dit punt zijn gemaakt, worden weergegeven als gewone antwoorden. +\n +\nDit zal een eenmalige overgang zijn, aangezien Discussies nu deel uitmaken van de Matrix-specificatie. + Discussies die bèta naderen 🎉 + %1$s, %2$s en anderen + %1$s en %2$s + Uitzetten + + %d server ACL\'s veranderen + %d server ACL\'s wijzigingen + \ No newline at end of file From 4131465ff6f1f89724401217c2d382fcb0779333 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=AD=D0=B4=D1=83=D0=B0=D1=80=D0=B4=20=D0=93=D0=B5=D1=80?= =?UTF-8?q?=D0=B0?= Date: Sun, 10 Apr 2022 11:42:08 +0000 Subject: [PATCH 055/561] Translated using Weblate (Hebrew) Currently translated at 97.8% (2144 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/he/ --- vector/src/main/res/values-iw/strings.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/vector/src/main/res/values-iw/strings.xml b/vector/src/main/res/values-iw/strings.xml index 2e1f521ff1..d4eb42a095 100644 --- a/vector/src/main/res/values-iw/strings.xml +++ b/vector/src/main/res/values-iw/strings.xml @@ -1952,8 +1952,8 @@ שיחה שלא נענתה - "%d שיחות שלא נענו" - "%d שיחות שלא נענו" + %d שיחות שלא נענו + %d שיחות שלא נענו שיחה שלא נענתה צלצול שיחה… @@ -2099,8 +2099,8 @@ שיחה פעילה · %1$d שיחות פעילות · - - + %1$d שיחות פעילות · + %1$d שיחות פעילות · שיחה פעילה (%1$s) אירעה שגיאה בחיפוש מספר הטלפון @@ -2132,9 +2132,9 @@ %1$s ו %2$s %d שינוי ברשימות ACL בשרתים - - - + %d שינוים ברשימות ACL בשרתים + %d שינוים ברשימות ACL בשרתים + %d שינוים ברשימות ACL בשרתים נהל חדרים החלט מי יכול לראות ולהצטרף לחדר זה. From eb3f70474580e69699026517096d1f9695c29a7c Mon Sep 17 00:00:00 2001 From: ericdecanini Date: Wed, 13 Apr 2022 12:42:21 +0200 Subject: [PATCH 056/561] Adds mkdirs to TemporaryFileCreator --- .../matrix/android/sdk/internal/util/TemporaryFileCreator.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/util/TemporaryFileCreator.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/util/TemporaryFileCreator.kt index 2790ffba36..c2705916e0 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/util/TemporaryFileCreator.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/util/TemporaryFileCreator.kt @@ -28,7 +28,10 @@ internal class TemporaryFileCreator @Inject constructor( ) { suspend fun create(): File { return withContext(Dispatchers.IO) { - File.createTempFile(UUID.randomUUID().toString(), null, context.cacheDir) + runCatching { + File.createTempFile(UUID.randomUUID().toString(), null, context.cacheDir) + .apply { mkdirs() } + }.getOrThrow() } } } From 8b66034af510fe6a017587d7261d92e222ab3f69 Mon Sep 17 00:00:00 2001 From: ericdecanini Date: Wed, 13 Apr 2022 15:16:34 +0200 Subject: [PATCH 057/561] Adds mkdirs fix to CameraPicker and CameraVideoPicker --- .../im/vector/lib/multipicker/CameraPicker.kt | 20 ++------- .../lib/multipicker/CameraVideoPicker.kt | 20 ++------- .../lib/multipicker/utils/MediaFileUtils.kt | 45 +++++++++++++++++++ 3 files changed, 53 insertions(+), 32 deletions(-) create mode 100644 library/multipicker/src/main/java/im/vector/lib/multipicker/utils/MediaFileUtils.kt diff --git a/library/multipicker/src/main/java/im/vector/lib/multipicker/CameraPicker.kt b/library/multipicker/src/main/java/im/vector/lib/multipicker/CameraPicker.kt index b1442a56e1..4b10a7ceae 100644 --- a/library/multipicker/src/main/java/im/vector/lib/multipicker/CameraPicker.kt +++ b/library/multipicker/src/main/java/im/vector/lib/multipicker/CameraPicker.kt @@ -23,11 +23,9 @@ import android.provider.MediaStore import androidx.activity.result.ActivityResultLauncher import androidx.core.content.FileProvider import im.vector.lib.multipicker.entity.MultiPickerImageType +import im.vector.lib.multipicker.utils.MediaFileUtils.MediaType.IMAGE +import im.vector.lib.multipicker.utils.MediaFileUtils.createTemporaryMediaFile import im.vector.lib.multipicker.utils.toMultiPickerImageType -import java.io.File -import java.text.SimpleDateFormat -import java.util.Date -import java.util.Locale /** * Implementation of taking a photo with Camera @@ -38,7 +36,7 @@ class CameraPicker { * Start camera by using a ActivityResultLauncher * @return Uri of taken photo or null if the operation is cancelled. */ - fun startWithExpectingFile(context: Context, activityResultLauncher: ActivityResultLauncher): Uri? { + fun startWithExpectingFile(context: Context, activityResultLauncher: ActivityResultLauncher): Uri { val photoUri = createPhotoUri(context) val intent = createIntent().apply { putExtra(MediaStore.EXTRA_OUTPUT, photoUri) @@ -63,19 +61,9 @@ class CameraPicker { companion object { fun createPhotoUri(context: Context): Uri { - val file = createImageFile(context) + val file = createTemporaryMediaFile(context, IMAGE) val authority = context.packageName + ".multipicker.fileprovider" return FileProvider.getUriForFile(context, authority, file) } - - private fun createImageFile(context: Context): File { - val timeStamp: String = SimpleDateFormat("yyyyMMdd_HHmmss", Locale.getDefault()).format(Date()) - val storageDir: File = context.filesDir - return File.createTempFile( - "${timeStamp}_", /* prefix */ - ".jpg", /* suffix */ - storageDir /* directory */ - ) - } } } diff --git a/library/multipicker/src/main/java/im/vector/lib/multipicker/CameraVideoPicker.kt b/library/multipicker/src/main/java/im/vector/lib/multipicker/CameraVideoPicker.kt index 76342b6e2e..2cf98e9638 100644 --- a/library/multipicker/src/main/java/im/vector/lib/multipicker/CameraVideoPicker.kt +++ b/library/multipicker/src/main/java/im/vector/lib/multipicker/CameraVideoPicker.kt @@ -23,11 +23,9 @@ import android.provider.MediaStore import androidx.activity.result.ActivityResultLauncher import androidx.core.content.FileProvider import im.vector.lib.multipicker.entity.MultiPickerVideoType +import im.vector.lib.multipicker.utils.MediaFileUtils.MediaType.VIDEO +import im.vector.lib.multipicker.utils.MediaFileUtils.createTemporaryMediaFile import im.vector.lib.multipicker.utils.toMultiPickerVideoType -import java.io.File -import java.text.SimpleDateFormat -import java.util.Date -import java.util.Locale /** * Implementation of taking a video with Camera @@ -38,7 +36,7 @@ class CameraVideoPicker { * Start camera by using a ActivityResultLauncher * @return Uri of taken photo or null if the operation is cancelled. */ - fun startWithExpectingFile(context: Context, activityResultLauncher: ActivityResultLauncher): Uri? { + fun startWithExpectingFile(context: Context, activityResultLauncher: ActivityResultLauncher): Uri { val videoUri = createVideoUri(context) val intent = createIntent().apply { putExtra(MediaStore.EXTRA_OUTPUT, videoUri) @@ -63,19 +61,9 @@ class CameraVideoPicker { companion object { fun createVideoUri(context: Context): Uri { - val file = createVideoFile(context) + val file = createTemporaryMediaFile(context, VIDEO) val authority = context.packageName + ".multipicker.fileprovider" return FileProvider.getUriForFile(context, authority, file) } - - private fun createVideoFile(context: Context): File { - val timeStamp: String = SimpleDateFormat("yyyyMMdd_HHmmss", Locale.getDefault()).format(Date()) - val storageDir: File = context.filesDir - return File.createTempFile( - "${timeStamp}_", /* prefix */ - ".mp4", /* suffix */ - storageDir /* directory */ - ) - } } } diff --git a/library/multipicker/src/main/java/im/vector/lib/multipicker/utils/MediaFileUtils.kt b/library/multipicker/src/main/java/im/vector/lib/multipicker/utils/MediaFileUtils.kt new file mode 100644 index 0000000000..f1dbfbbb33 --- /dev/null +++ b/library/multipicker/src/main/java/im/vector/lib/multipicker/utils/MediaFileUtils.kt @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2022 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package im.vector.lib.multipicker.utils + +import android.content.Context +import java.io.File +import java.text.SimpleDateFormat +import java.util.Date +import java.util.Locale + +object MediaFileUtils { + + fun createTemporaryMediaFile(context: Context, mediaType: MediaType): File { + val timeStamp: String = SimpleDateFormat("yyyyMMdd_HHmmss", Locale.getDefault()).format(Date()) + val storageDir: File = context.filesDir.also { it.mkdirs() } + val fileSuffix = when (mediaType) { + MediaType.IMAGE -> ".jpg" + MediaType.VIDEO -> ".mp4" + } + + return File.createTempFile( + "${timeStamp}_", + fileSuffix, + storageDir + ) + } + + enum class MediaType { + IMAGE, VIDEO + } +} From e7aaf12299076c755c51d49a4ef463ab93ea772c Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 13 Apr 2022 15:34:24 +0200 Subject: [PATCH 058/561] Add a paragraph about the target branch, and a word about `develop` branch content. --- docs/pull_request.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/pull_request.md b/docs/pull_request.md index b4dd0bd209..1aa034c6ce 100644 --- a/docs/pull_request.md +++ b/docs/pull_request.md @@ -30,6 +30,17 @@ In any case, it is better to explicitly declare in the description why the PR is Also, draft PR should not stay indefinitely in this state. It may be removed if it is the case and the submitter does not update it after a few days. +##### Base branch + +The `develop` branch is generally the base branch for every PRs. + +Exceptions can occur: + +- if a feature implementation is split into multiple PRs. We can have a chain of PRs in this case. PR can be merged one by one on develop, and GitHub change the target branch to `develop` for the next PR automatically. +- we want to merge a PR from the community, but there is still work to do, and the PR is not updated by the submitter. In this case, we can create a new branch, push it, and change the target branch of the PR to this new branch. The PR can then be merged, and we can add more commits to fix the issues. After that a new PR can be created with `develop` as a target branch. + +**Important notice:** Releases are created from the `develop` branch. So `develop` branch should always contain a "releasable" source code. So when a feature is being implemented with several PRs, it has to be disabled by default, until the feature is fully implemented. A last PR to enable the feature can then be created. + ##### PR Review Assignment We use automatic assignment for PR reviews. A PR is automatically routed by GitHub to a team member using the round robin algorithm. The process is the following: From 773b9b7764364acaf889e93a31ec2765c0fd73d3 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 13 Apr 2022 15:42:36 +0200 Subject: [PATCH 059/561] Add a notice about database migration --- docs/pull_request.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/pull_request.md b/docs/pull_request.md index 1aa034c6ce..e5c3e910f4 100644 --- a/docs/pull_request.md +++ b/docs/pull_request.md @@ -39,7 +39,9 @@ Exceptions can occur: - if a feature implementation is split into multiple PRs. We can have a chain of PRs in this case. PR can be merged one by one on develop, and GitHub change the target branch to `develop` for the next PR automatically. - we want to merge a PR from the community, but there is still work to do, and the PR is not updated by the submitter. In this case, we can create a new branch, push it, and change the target branch of the PR to this new branch. The PR can then be merged, and we can add more commits to fix the issues. After that a new PR can be created with `develop` as a target branch. -**Important notice:** Releases are created from the `develop` branch. So `develop` branch should always contain a "releasable" source code. So when a feature is being implemented with several PRs, it has to be disabled by default, until the feature is fully implemented. A last PR to enable the feature can then be created. +**Important notice 1:** Releases are created from the `develop` branch. So `develop` branch should always contain a "releasable" source code. So when a feature is being implemented with several PRs, it has to be disabled by default, until the feature is fully implemented. A last PR to enable the feature can then be created. + +**Important notice 2:** Database migration: some developers and some people from the community are using the nightly build from `develop`. Multiple database migrations should be properly handled for them. This is OK to have multiple migrations between 2 releases, this is not OK to add steps to the pending database migration on `develop`. So for instance `develop` users will migrate from version 11 to version 12, then 13, then 14, and `main` users will do all those steps after they get the app upgrade. ##### PR Review Assignment From da843443ef80424941310283a0180935ef8346e4 Mon Sep 17 00:00:00 2001 From: ericdecanini Date: Thu, 14 Apr 2022 11:28:14 +0200 Subject: [PATCH 060/561] Convert MediaFileUtils to a non-object --- .../im/vector/lib/multipicker/CameraPicker.kt | 6 ++-- .../lib/multipicker/utils/MediaFileUtils.kt | 33 +++++++++---------- 2 files changed, 18 insertions(+), 21 deletions(-) diff --git a/library/multipicker/src/main/java/im/vector/lib/multipicker/CameraPicker.kt b/library/multipicker/src/main/java/im/vector/lib/multipicker/CameraPicker.kt index 4b10a7ceae..785b9fae43 100644 --- a/library/multipicker/src/main/java/im/vector/lib/multipicker/CameraPicker.kt +++ b/library/multipicker/src/main/java/im/vector/lib/multipicker/CameraPicker.kt @@ -23,8 +23,8 @@ import android.provider.MediaStore import androidx.activity.result.ActivityResultLauncher import androidx.core.content.FileProvider import im.vector.lib.multipicker.entity.MultiPickerImageType -import im.vector.lib.multipicker.utils.MediaFileUtils.MediaType.IMAGE -import im.vector.lib.multipicker.utils.MediaFileUtils.createTemporaryMediaFile +import im.vector.lib.multipicker.utils.MediaType +import im.vector.lib.multipicker.utils.createTemporaryMediaFile import im.vector.lib.multipicker.utils.toMultiPickerImageType /** @@ -61,7 +61,7 @@ class CameraPicker { companion object { fun createPhotoUri(context: Context): Uri { - val file = createTemporaryMediaFile(context, IMAGE) + val file = createTemporaryMediaFile(context, MediaType.IMAGE) val authority = context.packageName + ".multipicker.fileprovider" return FileProvider.getUriForFile(context, authority, file) } diff --git a/library/multipicker/src/main/java/im/vector/lib/multipicker/utils/MediaFileUtils.kt b/library/multipicker/src/main/java/im/vector/lib/multipicker/utils/MediaFileUtils.kt index f1dbfbbb33..33cdab3ac2 100644 --- a/library/multipicker/src/main/java/im/vector/lib/multipicker/utils/MediaFileUtils.kt +++ b/library/multipicker/src/main/java/im/vector/lib/multipicker/utils/MediaFileUtils.kt @@ -22,24 +22,21 @@ import java.text.SimpleDateFormat import java.util.Date import java.util.Locale -object MediaFileUtils { - - fun createTemporaryMediaFile(context: Context, mediaType: MediaType): File { - val timeStamp: String = SimpleDateFormat("yyyyMMdd_HHmmss", Locale.getDefault()).format(Date()) - val storageDir: File = context.filesDir.also { it.mkdirs() } - val fileSuffix = when (mediaType) { - MediaType.IMAGE -> ".jpg" - MediaType.VIDEO -> ".mp4" - } - - return File.createTempFile( - "${timeStamp}_", - fileSuffix, - storageDir - ) +fun createTemporaryMediaFile(context: Context, mediaType: MediaType): File { + val timeStamp: String = SimpleDateFormat("yyyyMMdd_HHmmss", Locale.getDefault()).format(Date()) + val storageDir: File = context.filesDir.also { it.mkdirs() } + val fileSuffix = when (mediaType) { + MediaType.IMAGE -> ".jpg" + MediaType.VIDEO -> ".mp4" } - enum class MediaType { - IMAGE, VIDEO - } + return File.createTempFile( + "${timeStamp}_", + fileSuffix, + storageDir + ) +} + +enum class MediaType { + IMAGE, VIDEO } From b76ec78c5de3995a8c25978c25f4105685c4913c Mon Sep 17 00:00:00 2001 From: ericdecanini Date: Thu, 14 Apr 2022 11:46:59 +0200 Subject: [PATCH 061/561] Fixes build error in CameraVideoPicker --- .../java/im/vector/lib/multipicker/CameraVideoPicker.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/multipicker/src/main/java/im/vector/lib/multipicker/CameraVideoPicker.kt b/library/multipicker/src/main/java/im/vector/lib/multipicker/CameraVideoPicker.kt index 2cf98e9638..59601b30d9 100644 --- a/library/multipicker/src/main/java/im/vector/lib/multipicker/CameraVideoPicker.kt +++ b/library/multipicker/src/main/java/im/vector/lib/multipicker/CameraVideoPicker.kt @@ -23,8 +23,8 @@ import android.provider.MediaStore import androidx.activity.result.ActivityResultLauncher import androidx.core.content.FileProvider import im.vector.lib.multipicker.entity.MultiPickerVideoType -import im.vector.lib.multipicker.utils.MediaFileUtils.MediaType.VIDEO -import im.vector.lib.multipicker.utils.MediaFileUtils.createTemporaryMediaFile +import im.vector.lib.multipicker.utils.MediaType +import im.vector.lib.multipicker.utils.createTemporaryMediaFile import im.vector.lib.multipicker.utils.toMultiPickerVideoType /** @@ -61,7 +61,7 @@ class CameraVideoPicker { companion object { fun createVideoUri(context: Context): Uri { - val file = createTemporaryMediaFile(context, VIDEO) + val file = createTemporaryMediaFile(context, MediaType.VIDEO) val authority = context.packageName + ".multipicker.fileprovider" return FileProvider.getUriForFile(context, authority, file) } From 6cb4eb7d494faa3f036af62926c37231eefc3b83 Mon Sep 17 00:00:00 2001 From: Zet Date: Thu, 14 Apr 2022 00:19:06 +0000 Subject: [PATCH 062/561] Translated using Weblate (Arabic) Currently translated at 32.5% (713 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/ar/ --- vector/src/main/res/values-ar/strings.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/vector/src/main/res/values-ar/strings.xml b/vector/src/main/res/values-ar/strings.xml index 10c10b8062..8c1a582573 100644 --- a/vector/src/main/res/values-ar/strings.xml +++ b/vector/src/main/res/values-ar/strings.xml @@ -872,4 +872,14 @@ اعرض الانفعالات أضف انفعالًا الانفعالات + اختر من يمكنهم العثور على الغرفة والانضمام إليها. + اضغط لتعديل الفضاءات + اختر الفضاءات + أعضاء فضاء %s يمكنهم العثور على الغرفة ومعاينتها والانضمام إليها. + أعضاء الفضاء فقك + يمكن لأي كان العثور على الفضاء والانضمام إليه + يمكن لأي كان الانضمام للغرفة + علنيّة + خاصة (عبر الدعوة فقط) + خاصة \ No newline at end of file From ebb2c7a250edbe8e82bc90d20679b8d4a77ce785 Mon Sep 17 00:00:00 2001 From: Mawoka Date: Wed, 13 Apr 2022 19:42:30 +0000 Subject: [PATCH 063/561] Translated using Weblate (German) Currently translated at 98.3% (2153 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/de/ --- vector/src/main/res/values-de/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 866f05b3a6..d463276bb1 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2428,4 +2428,5 @@ Live-Standort teilen Live-Standort teilen Threads nähern sich der Beta 🎉 + Deaktivieren \ No newline at end of file From c8aaeea7f27248dbe6defb5a20e6573e8a052264 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Gr=C3=B6nroos?= Date: Wed, 13 Apr 2022 14:13:48 +0000 Subject: [PATCH 064/561] Translated using Weblate (Finnish) Currently translated at 84.2% (1844 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/fi/ --- vector/src/main/res/values-fi/strings.xml | 58 +++++++++++++++++++++-- 1 file changed, 54 insertions(+), 4 deletions(-) diff --git a/vector/src/main/res/values-fi/strings.xml b/vector/src/main/res/values-fi/strings.xml index c5e67771dd..9d084fa8ba 100644 --- a/vector/src/main/res/values-fi/strings.xml +++ b/vector/src/main/res/values-fi/strings.xml @@ -42,7 +42,7 @@ Alkusynkronointi: \nTuodaan tiliä… Alkusynkronointi: -\nTuodaan kryptoa +\nTuodaan krypto Alkusynkronointi: \nTuodaan huoneita Alkusynkronointi: @@ -267,7 +267,7 @@ Poista Liity Hylkää - Siirry ensimmäiseen lukemattomaan viestiin. + Siirry lukemattomaan Poistu huoneesta Haluatko varmasti poistua huoneesta? YKSITYISKESKUSTELUT @@ -516,7 +516,7 @@ Käytä ${app_name}in oletussoittoääntä saapuville puheluille Saapuvien puheluiden soittoääni Videopuhelu menossa… - Käyttäjälista + Jäsenet yksi jäsen %d jäsentä @@ -1562,7 +1562,7 @@ Et voi liittyä uudelleen, ellei sinua kutsuta uudelleen. Olet ainoa henkilö täällä. Jos poistut, kukaan ei voi liittyä tänne tulevaisuudessa, et edes sinä. Haluatko varmasti poistua avaruudesta %s\? - Poistu avaruudesta + Poistu Lisää huoneita Selaa huoneita @@ -2053,4 +2053,54 @@ %1$s lisäsi tälle huoneelle vaihtoehtoiset osoitteet %2$s. Sinulla ei ole lupaa liittyä tähän huoneeseen + Käyttäjät + + %1$d lisää + %1$d lisää + + Lähetä tiedosto + Pysäytä + Jaa tämä sijainti + Jaa tämä sijainti + Jaa nykyinen sijaintini + Jaa nykyinen sijaintini + Käynnistä sovellus uudelleen, jotta muutos tulee voimaan. + Lisää olemassa olevia huoneita ja avaruuksia + Älä poistu mistään huoneesta ja avaruudesta + Poistu kaikista huoneista ja avaruuksista + Käytä ${app_name}in uusinta versiota muilla laitteillasi: + Ohita tämä vaihe + Tallenna ja jatka + Asetukset on tallennettu. + Kaikki valmista! + Menoksi + Voit vaihtaa tämän milloin tahansa. + Lisää profiilikuva + Voit vaihtaa tämän myöhemmin + Näyttönimi + Tämä näytetään, kun lähetät viestejä. + Valitse näyttönimi + Tilisi %s on luotu. + Onnittelut! + Personoi profiili + ohittaa tämän kysymyksen + Ei varmuutta vielä\? Voit %s + Identiteettipalvelin ei tarjoa käytäntöä + Piilota identiteettipalvelimen käytäntö + Näytä identiteettipalvelimen käytäntö + Valitettavasti konfrenssiin liityttäessä ilmeni virhe + Tämä palvelin ei tarjoa mitään käytäntöä. + Identiteettipalvelimesi käytäntö + Kotipalvelimesi käytäntö + ${app_name}-käytäntö + Kopioi linkki ketjuun + Poista käytöstä + Järjestelmän asetukset + Apua ${app_name}in käyttöön + Lainopilliset asiat + tästä + Auta meitä tunnistamaan mahdollisia ongelmia ja parantamaan ${app_name}iä jakamalla anonyymia käyttödataa. Ymmärtääksemme miten ihmiset käyttävät useita laitteita, luomme satunnaisen tunnisteen, joka jaetaan kaikkien laitteidesi kesken. +\n +\nLue käyttöehdot %s. + Auta parantamaan ${app_name}iä \ No newline at end of file From 7441dad1c091607bfdc45e220f3eec3caa05837a Mon Sep 17 00:00:00 2001 From: Jeanne Lavoie Date: Wed, 13 Apr 2022 23:57:22 +0000 Subject: [PATCH 065/561] Translated using Weblate (French) Currently translated at 99.7% (2185 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/fr/ --- vector/src/main/res/values-fr/strings.xml | 33 +++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/vector/src/main/res/values-fr/strings.xml b/vector/src/main/res/values-fr/strings.xml index c9230ec49e..a790263666 100644 --- a/vector/src/main/res/values-fr/strings.xml +++ b/vector/src/main/res/values-fr/strings.xml @@ -2419,4 +2419,37 @@ %d changement des ACL du serveur %d changements des ACL du serveur + Partage de la position en cours + Position en temps réel de ${app_name} + Arrêter + Position en temps réel activée + Si vous souhaitez partager votre position en temps réel, ${app_name} a besoin de l’autorisation d’accès permanent à la position quand l’application est en arrière-plan. +\nNous accèderons à votre position seulement pendant la durée que vous définissez. + Autoriser l’accès + Partager cet emplacement + Partager cet emplacement + Partager la position en temps réel + Partager la position en temps réel + Partager ma position actuelle + Partager ma position actuelle + Agrandir jusqu’à l’emplacement actuel + Épingle de l’emplacement sélectionné sur la carte + Le serveur hôte n’accepte pas de nom d’utilisateur avec seulement des chiffres. + Ignorer cette étape + Enregistrer et continuer + Vos préférences ont été enregistrées. + Tout est prêt ! + Allons-y + Vous pouvez la changer à tout moment. + Ajouter une photo de profil + Vous pourrez le changer plus tard + Nom d’affichage + Il sera affiché quand vous enverrez des messages. + Choisissez un nom d’affichage + Votre compte %s a été créé. + Félicitations ! + Aller à l’accueil + Personnaliser le profil + Les fils de discussion se rapproche de la bêta 🎉 + Désactiver \ No newline at end of file From d1db9a70f3d8d44186b6e8400a364d04515d0098 Mon Sep 17 00:00:00 2001 From: Szimszon Date: Thu, 14 Apr 2022 09:32:27 +0000 Subject: [PATCH 066/561] Translated using Weblate (Hungarian) Currently translated at 100.0% (2190 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/hu/ --- vector/src/main/res/values-hu/strings.xml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/vector/src/main/res/values-hu/strings.xml b/vector/src/main/res/values-hu/strings.xml index f13a97d216..33bde2944e 100644 --- a/vector/src/main/res/values-hu/strings.xml +++ b/vector/src/main/res/values-hu/strings.xml @@ -2438,4 +2438,23 @@ A Visszaállítási Kulcsot tartsd biztonságos helyen, mint pl. egy jelszókeze Ugrás a jelenlegi pozícióra Kiválasztott hely rögzítése a térképen Üzenetszálak lassan béta állapotba kerülnek 🎉 + Helymeghatározás folyamatban + ${app_name} Folyamatos helymeghatározás + A matrix szerver nem fogad el olyan felhasználói nevet ami csak számokból áll. + Lépés kihagyása + Mentés és tovább + A beállítások elmentve. + Minden kész! + Gyerünk + Bármikor megváltoztatható. + Profilkép hozzáadása + Ezt később meg lehet változtatni + Megjelenítendő név + Ez fog megjelenni amikor üzenetet küldesz. + Válassz egy megjelenítési nevet + A fiókod elkészült: %s. + Gratulálunk! + Vigyél haza + Profil személyre szabása + Tiltás \ No newline at end of file From 8a83064f5af5374ba05415556bff05bfdfd9af13 Mon Sep 17 00:00:00 2001 From: Szimszon Date: Thu, 14 Apr 2022 09:27:35 +0000 Subject: [PATCH 067/561] Translated using Weblate (Hungarian) Currently translated at 100.0% (55 of 55 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/hu/ --- fastlane/metadata/android/hu-HU/changelogs/40104040.txt | 2 ++ fastlane/metadata/android/hu-HU/changelogs/40104060.txt | 2 ++ fastlane/metadata/android/hu-HU/changelogs/40104070.txt | 2 ++ fastlane/metadata/android/hu-HU/changelogs/40104080.txt | 2 ++ 4 files changed, 8 insertions(+) create mode 100644 fastlane/metadata/android/hu-HU/changelogs/40104040.txt create mode 100644 fastlane/metadata/android/hu-HU/changelogs/40104060.txt create mode 100644 fastlane/metadata/android/hu-HU/changelogs/40104070.txt create mode 100644 fastlane/metadata/android/hu-HU/changelogs/40104080.txt diff --git a/fastlane/metadata/android/hu-HU/changelogs/40104040.txt b/fastlane/metadata/android/hu-HU/changelogs/40104040.txt new file mode 100644 index 0000000000..60ec5256aa --- /dev/null +++ b/fastlane/metadata/android/hu-HU/changelogs/40104040.txt @@ -0,0 +1,2 @@ +Fő változás ebben a verzióban: Gépelés visszajelzési frissítések a felületen. További hibajavítások egy stabilitást növelő fejlesztések. +Teljes változásnapló: https://github.com/vector-im/element-android/releases/tag/v1.4.4 diff --git a/fastlane/metadata/android/hu-HU/changelogs/40104060.txt b/fastlane/metadata/android/hu-HU/changelogs/40104060.txt new file mode 100644 index 0000000000..a3f4b89d92 --- /dev/null +++ b/fastlane/metadata/android/hu-HU/changelogs/40104060.txt @@ -0,0 +1,2 @@ +Fő változás ebben a verzióban: Megjelentek az üzenetszálak az idővonalon és gyorsak. További hibajavítások és stabilitási fejlesztések. +Teljes változásnapló: https://github.com/vector-im/element-android/releases/tag/v1.4.6 diff --git a/fastlane/metadata/android/hu-HU/changelogs/40104070.txt b/fastlane/metadata/android/hu-HU/changelogs/40104070.txt new file mode 100644 index 0000000000..0f969fb577 --- /dev/null +++ b/fastlane/metadata/android/hu-HU/changelogs/40104070.txt @@ -0,0 +1,2 @@ +Fő változás ebben a verzióban: Hibajavítások és stabilizációs fejlesztések. +Teljes változásnapló: https://github.com/vector-im/element-android/releases/tag/v1.4.7 diff --git a/fastlane/metadata/android/hu-HU/changelogs/40104080.txt b/fastlane/metadata/android/hu-HU/changelogs/40104080.txt new file mode 100644 index 0000000000..c29b20c216 --- /dev/null +++ b/fastlane/metadata/android/hu-HU/changelogs/40104080.txt @@ -0,0 +1,2 @@ +Fő változás ebben a verzióban: Megjelentek az üzenetszálak az idővonalon és gyorsak. További hibajavítások és stabilitási fejlesztések. +Teljes változásnapló: https://github.com/vector-im/element-android/releases From b6f345aec2ed862f30f04005f3a162d99c5fb644 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 15 Apr 2022 10:18:30 +0200 Subject: [PATCH 068/561] Format --- .../android/sdk/api/session/room/timeline/TimelineSettings.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/timeline/TimelineSettings.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/timeline/TimelineSettings.kt index 6548453c8a..b45f3ecb71 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/timeline/TimelineSettings.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/timeline/TimelineSettings.kt @@ -31,7 +31,8 @@ data class TimelineSettings( /** * The root thread eventId if this is a thread timeline, or null if this is NOT a thread timeline */ - val rootThreadEventId: String? = null) { + val rootThreadEventId: String? = null, +) { /** * Returns true if this is a thread timeline or false otherwise From ff28cb434937480b63c32ee11cc18854de441fe1 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 15 Apr 2022 10:41:09 +0200 Subject: [PATCH 069/561] Add TODO --- .../sdk/api/session/room/timeline/TimelineEventFilters.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/timeline/TimelineEventFilters.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/timeline/TimelineEventFilters.kt index 4415c8e4b3..a35a291d9b 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/timeline/TimelineEventFilters.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/timeline/TimelineEventFilters.kt @@ -16,6 +16,7 @@ package org.matrix.android.sdk.api.session.room.timeline +// TODO Move to internal, strange? data class TimelineEventFilters( /** * A flag to filter edit events From 6ed1516d90dc7567fa69db2509739f71f5ff9326 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 15 Apr 2022 10:57:04 +0200 Subject: [PATCH 070/561] Delete messages from just ignored users from our database (#1899) --- .../sync/handler/UserAccountDataSyncHandler.kt | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/UserAccountDataSyncHandler.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/UserAccountDataSyncHandler.kt index 7f80486c70..c7d7dce17a 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/UserAccountDataSyncHandler.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/UserAccountDataSyncHandler.kt @@ -39,6 +39,8 @@ import org.matrix.android.sdk.internal.database.model.IgnoredUserEntity import org.matrix.android.sdk.internal.database.model.PushRulesEntity import org.matrix.android.sdk.internal.database.model.RoomSummaryEntity import org.matrix.android.sdk.internal.database.model.RoomSummaryEntityFields +import org.matrix.android.sdk.internal.database.model.TimelineEventEntity +import org.matrix.android.sdk.internal.database.model.TimelineEventEntityFields import org.matrix.android.sdk.internal.database.model.UserAccountDataEntity import org.matrix.android.sdk.internal.database.model.UserAccountDataEntityFields import org.matrix.android.sdk.internal.database.model.deleteOnCascade @@ -189,7 +191,19 @@ internal class UserAccountDataSyncHandler @Inject constructor( .deleteAllFromRealm() // And save the new received list userIds.forEach { realm.createObject(IgnoredUserEntity::class.java).apply { userId = it } } - // TODO If not initial sync, we should execute a init sync + + // Delete all the TimelineEvents for all the ignored users + // See https://spec.matrix.org/latest/client-server-api/#client-behaviour-22 : + // "Once ignored, the client will no longer receive events sent by that user, with the exception of state events" + // So just delete all non-state events from our local storage. + realm.where(TimelineEventEntity::class.java) + .`in`(TimelineEventEntityFields.ROOT.SENDER, userIds.toTypedArray()) + .isNull(TimelineEventEntityFields.ROOT.STATE_KEY) + .findAll() + .also { Timber.d("Deleting ${it.size} TimelineEventEntity from ignored users") } + .forEach { + it.deleteOnCascade(true) + } } private fun handleBreadcrumbs(realm: Realm, event: UserAccountDataEvent) { From 6b9f2965da790a887e5d45a1085d1ac9c4c00a7f Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 15 Apr 2022 12:07:28 +0200 Subject: [PATCH 071/561] Request an initial sync when a user is unignored (#1899) --- .../android/sdk/api/failure/GlobalError.kt | 5 +++ .../api/failure/InitialSyncRequestReason.kt | 27 ++++++++++++++++ .../matrix/android/sdk/api/session/Session.kt | 1 + .../handler/UserAccountDataSyncHandler.kt | 32 ++++++++++++++++--- .../app/core/platform/VectorBaseActivity.kt | 20 ++++++++++++ vector/src/main/res/values/strings.xml | 3 ++ 6 files changed, 84 insertions(+), 4 deletions(-) create mode 100644 matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/failure/InitialSyncRequestReason.kt diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/failure/GlobalError.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/failure/GlobalError.kt index b5165b6687..5b4896f95f 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/failure/GlobalError.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/failure/GlobalError.kt @@ -23,5 +23,10 @@ sealed class GlobalError { data class InvalidToken(val softLogout: Boolean) : GlobalError() data class ConsentNotGivenError(val consentUri: String) : GlobalError() data class CertificateError(val fingerprint: Fingerprint) : GlobalError() + + /** + * The SDK requires the app (which should request the user) to perform an initial sync. + */ + data class InitialSyncRequest(val reason: InitialSyncRequestReason) : GlobalError() object ExpiredAccount : GlobalError() } diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/failure/InitialSyncRequestReason.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/failure/InitialSyncRequestReason.kt new file mode 100644 index 0000000000..5717f41f43 --- /dev/null +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/failure/InitialSyncRequestReason.kt @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2022 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.matrix.android.sdk.api.failure + +/** + * This enum provide the reason why the SDK request an initial sync to the application + */ +enum class InitialSyncRequestReason { + /** + * The list of ignored users has changed, and at least one user who was ignored is not ignored anymore + */ + IGNORED_USERS_LIST_CHANGE, +} diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/Session.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/Session.kt index be924e2063..2ad0ae9e0d 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/Session.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/Session.kt @@ -298,6 +298,7 @@ interface Session : * Possible cases: * - The access token is not valid anymore, * - a M_CONSENT_NOT_GIVEN error has been received from the homeserver + * See [GlobalError] for all the possible cases */ fun onGlobalError(session: Session, globalError: GlobalError) = Unit } diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/UserAccountDataSyncHandler.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/UserAccountDataSyncHandler.kt index c7d7dce17a..ce827c2311 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/UserAccountDataSyncHandler.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/UserAccountDataSyncHandler.kt @@ -20,6 +20,8 @@ import com.zhuinden.monarchy.Monarchy import io.realm.Realm import io.realm.RealmList import io.realm.kotlin.where +import org.matrix.android.sdk.api.failure.GlobalError +import org.matrix.android.sdk.api.failure.InitialSyncRequestReason import org.matrix.android.sdk.api.pushrules.RuleScope import org.matrix.android.sdk.api.pushrules.RuleSetKey import org.matrix.android.sdk.api.pushrules.rest.GetPushRulesResponse @@ -31,6 +33,7 @@ import org.matrix.android.sdk.api.session.room.model.RoomMemberContent import org.matrix.android.sdk.api.session.room.model.RoomSummary import org.matrix.android.sdk.api.session.sync.model.InvitedRoomSync import org.matrix.android.sdk.api.session.sync.model.UserAccountDataSync +import org.matrix.android.sdk.internal.SessionManager import org.matrix.android.sdk.internal.database.mapper.ContentMapper import org.matrix.android.sdk.internal.database.mapper.PushRulesMapper import org.matrix.android.sdk.internal.database.mapper.asDomain @@ -48,7 +51,10 @@ import org.matrix.android.sdk.internal.database.query.getDirectRooms import org.matrix.android.sdk.internal.database.query.getOrCreate import org.matrix.android.sdk.internal.database.query.where import org.matrix.android.sdk.internal.di.SessionDatabase +import org.matrix.android.sdk.internal.di.SessionId import org.matrix.android.sdk.internal.di.UserId +import org.matrix.android.sdk.internal.session.SessionListeners +import org.matrix.android.sdk.internal.session.dispatchTo import org.matrix.android.sdk.internal.session.room.RoomAvatarResolver import org.matrix.android.sdk.internal.session.room.membership.RoomDisplayNameResolver import org.matrix.android.sdk.internal.session.room.membership.RoomMemberHelper @@ -67,7 +73,10 @@ internal class UserAccountDataSyncHandler @Inject constructor( private val directChatsHelper: DirectChatsHelper, private val updateUserAccountDataTask: UpdateUserAccountDataTask, private val roomAvatarResolver: RoomAvatarResolver, - private val roomDisplayNameResolver: RoomDisplayNameResolver + private val roomDisplayNameResolver: RoomDisplayNameResolver, + @SessionId private val sessionId: String, + private val sessionManager: SessionManager, + private val sessionListeners: SessionListeners ) { fun handle(realm: Realm, accountData: UserAccountDataSync?) { @@ -186,9 +195,10 @@ internal class UserAccountDataSyncHandler @Inject constructor( private fun handleIgnoredUsers(realm: Realm, event: UserAccountDataEvent) { val userIds = event.content.toModel()?.ignoredUsers?.keys ?: return - realm.where(IgnoredUserEntity::class.java) - .findAll() - .deleteAllFromRealm() + val currentIgnoredUsers = realm.where(IgnoredUserEntity::class.java).findAll() + val currentIgnoredUserIds = currentIgnoredUsers.map { it.userId } + // Delete the previous list + currentIgnoredUsers.deleteAllFromRealm() // And save the new received list userIds.forEach { realm.createObject(IgnoredUserEntity::class.java).apply { userId = it } } @@ -204,6 +214,20 @@ internal class UserAccountDataSyncHandler @Inject constructor( .forEach { it.deleteOnCascade(true) } + + // Handle the case when some users are unignored from another session + val mustRefreshCache = currentIgnoredUserIds.any { currentIgnoredUserId -> currentIgnoredUserId !in userIds } + if (mustRefreshCache) { + Timber.d("A user has been unignored from another session, an initial sync should be performed") + dispatchMustRefresh() + } + } + + private fun dispatchMustRefresh() { + val session = sessionManager.getSessionComponent(sessionId)?.session() + session.dispatchTo(sessionListeners) { safeSession, listener -> + listener.onGlobalError(safeSession, GlobalError.InitialSyncRequest(InitialSyncRequestReason.IGNORED_USERS_LIST_CHANGE)) + } } private fun handleBreadcrumbs(realm: Realm, event: UserAccountDataEvent) { diff --git a/vector/src/main/java/im/vector/app/core/platform/VectorBaseActivity.kt b/vector/src/main/java/im/vector/app/core/platform/VectorBaseActivity.kt index 4796022856..febcfc5ef2 100644 --- a/vector/src/main/java/im/vector/app/core/platform/VectorBaseActivity.kt +++ b/vector/src/main/java/im/vector/app/core/platform/VectorBaseActivity.kt @@ -46,6 +46,7 @@ import androidx.viewbinding.ViewBinding import com.airbnb.mvrx.MavericksView import com.bumptech.glide.util.Util import com.google.android.material.appbar.MaterialToolbar +import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.snackbar.Snackbar import dagger.hilt.android.EntryPointAccessors import im.vector.app.BuildConfig @@ -86,6 +87,7 @@ import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.onEach import org.matrix.android.sdk.api.extensions.tryOrNull import org.matrix.android.sdk.api.failure.GlobalError +import org.matrix.android.sdk.api.failure.InitialSyncRequestReason import reactivecircus.flowbinding.android.view.clicks import timber.log.Timber import javax.inject.Inject @@ -266,9 +268,27 @@ abstract class VectorBaseActivity : AppCompatActivity(), Maver is GlobalError.CertificateError -> handleCertificateError(globalError) GlobalError.ExpiredAccount -> Unit // TODO Handle account expiration + is GlobalError.InitialSyncRequest -> handleInitialSyncRequest(globalError) } } + private fun handleInitialSyncRequest(initialSyncRequest: GlobalError.InitialSyncRequest) { + MaterialAlertDialogBuilder(this) + .setTitle(R.string.initial_sync_request_title) + .setMessage( + getString(R.string.initial_sync_request_content, getString( + when (initialSyncRequest.reason) { + InitialSyncRequestReason.IGNORED_USERS_LIST_CHANGE -> R.string.initial_sync_request_reason_unignored_users + } + )) + ) + .setPositiveButton(R.string.ok) { _, _ -> + MainActivity.restartApp(this, MainActivityArgs(clearCache = true)) + } + .setNegativeButton(R.string.later, null) + .show() + } + private fun handleCertificateError(certificateError: GlobalError.CertificateError) { singletonEntryPoint() .unrecognizedCertificateDialog() diff --git a/vector/src/main/res/values/strings.xml b/vector/src/main/res/values/strings.xml index ffd4333071..89ed125afd 100644 --- a/vector/src/main/res/values/strings.xml +++ b/vector/src/main/res/values/strings.xml @@ -176,6 +176,9 @@ Initial sync:\nImporting communities Initial sync:\nImporting account data + Initial sync request + ${app_name} needs to perform a clear cache to be up to date, for the following reason:\n%s\n\nNote that this action will restart the app and it may take some time. + - Some users have been unignored Message sent Sending message… From a39516534ac5c8b5d852902c0d6407496194d80c Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 15 Apr 2022 12:43:57 +0200 Subject: [PATCH 072/561] Initial sync dialog will now come later. It allows to unignore several user without performing an initial sync each time. --- .../app/features/home/room/detail/TimelineFragment.kt | 10 ++-------- .../roommemberprofile/RoomMemberProfileFragment.kt | 11 +---------- .../roommemberprofile/RoomMemberProfileViewEvents.kt | 2 +- .../roommemberprofile/RoomMemberProfileViewModel.kt | 2 +- .../ignored/VectorSettingsIgnoredUsersFragment.kt | 7 +------ vector/src/main/res/values/strings.xml | 4 ++-- 6 files changed, 8 insertions(+), 28 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineFragment.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineFragment.kt index 32f0e46eac..4603793bd5 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineFragment.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineFragment.kt @@ -119,8 +119,6 @@ import im.vector.app.core.utils.startInstallFromSourceIntent import im.vector.app.core.utils.toast import im.vector.app.databinding.DialogReportContentBinding import im.vector.app.databinding.FragmentTimelineBinding -import im.vector.app.features.MainActivity -import im.vector.app.features.MainActivityArgs import im.vector.app.features.analytics.extensions.toAnalyticsInteraction import im.vector.app.features.analytics.plan.Interaction import im.vector.app.features.analytics.plan.MobileScreen @@ -1730,14 +1728,10 @@ class TimelineFragment @Inject constructor( dismissLoadingDialog() views.composerLayout.setTextIfDifferent("") when (parsedCommand) { - is ParsedCommand.SetMarkdown -> { + is ParsedCommand.SetMarkdown -> { showSnackWithMessage(getString(if (parsedCommand.enable) R.string.markdown_has_been_enabled else R.string.markdown_has_been_disabled)) } - is ParsedCommand.UnignoreUser -> { - // A user has been un-ignored, perform a initial sync - MainActivity.restartApp(requireActivity(), MainActivityArgs(clearCache = true)) - } - else -> Unit + else -> Unit } } diff --git a/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileFragment.kt b/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileFragment.kt index 5fee420b21..760bbe9353 100644 --- a/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileFragment.kt +++ b/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileFragment.kt @@ -47,8 +47,6 @@ import im.vector.app.databinding.DialogBaseEditTextBinding import im.vector.app.databinding.DialogShareQrCodeBinding import im.vector.app.databinding.FragmentMatrixProfileBinding import im.vector.app.databinding.ViewStubRoomMemberProfileHeaderBinding -import im.vector.app.features.MainActivity -import im.vector.app.features.MainActivityArgs import im.vector.app.features.analytics.plan.MobileScreen import im.vector.app.features.crypto.verification.VerificationBottomSheet import im.vector.app.features.displayname.getBestName @@ -133,20 +131,13 @@ class RoomMemberProfileFragment @Inject constructor( is RoomMemberProfileViewEvents.OnKickActionSuccess -> Unit is RoomMemberProfileViewEvents.OnSetPowerLevelSuccess -> Unit is RoomMemberProfileViewEvents.OnBanActionSuccess -> Unit - is RoomMemberProfileViewEvents.OnIgnoreActionSuccess -> handleOnIgnoreActionSuccess(it) + is RoomMemberProfileViewEvents.OnIgnoreActionSuccess -> Unit is RoomMemberProfileViewEvents.OnInviteActionSuccess -> Unit } } setupLongClicks() } - private fun handleOnIgnoreActionSuccess(action: RoomMemberProfileViewEvents.OnIgnoreActionSuccess) { - if (action.shouldPerformInitialSync) { - // A user has been un-ignored, perform a initial sync - MainActivity.restartApp(requireActivity(), MainActivityArgs(clearCache = true)) - } - } - private fun setupLongClicks() { headerViews.memberProfileNameView.copyOnLongClick() headerViews.memberProfileIdView.copyOnLongClick() diff --git a/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileViewEvents.kt b/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileViewEvents.kt index 1857f5cdc4..efe23eeff0 100644 --- a/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileViewEvents.kt +++ b/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileViewEvents.kt @@ -25,7 +25,7 @@ sealed class RoomMemberProfileViewEvents : VectorViewEvents { data class Loading(val message: CharSequence? = null) : RoomMemberProfileViewEvents() data class Failure(val throwable: Throwable) : RoomMemberProfileViewEvents() - data class OnIgnoreActionSuccess(val shouldPerformInitialSync: Boolean) : RoomMemberProfileViewEvents() + object OnIgnoreActionSuccess : RoomMemberProfileViewEvents() object OnSetPowerLevelSuccess : RoomMemberProfileViewEvents() object OnInviteActionSuccess : RoomMemberProfileViewEvents() object OnKickActionSuccess : RoomMemberProfileViewEvents() diff --git a/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileViewModel.kt b/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileViewModel.kt index addc2c71ef..4bcf9ef55d 100644 --- a/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileViewModel.kt @@ -390,7 +390,7 @@ class RoomMemberProfileViewModel @AssistedInject constructor( } else { session.ignoreUserIds(listOf(state.userId)) } - RoomMemberProfileViewEvents.OnIgnoreActionSuccess(isIgnored) + RoomMemberProfileViewEvents.OnIgnoreActionSuccess } catch (failure: Throwable) { RoomMemberProfileViewEvents.Failure(failure) } diff --git a/vector/src/main/java/im/vector/app/features/settings/ignored/VectorSettingsIgnoredUsersFragment.kt b/vector/src/main/java/im/vector/app/features/settings/ignored/VectorSettingsIgnoredUsersFragment.kt index 66fa690b82..2ae7ba0a8d 100644 --- a/vector/src/main/java/im/vector/app/features/settings/ignored/VectorSettingsIgnoredUsersFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/ignored/VectorSettingsIgnoredUsersFragment.kt @@ -62,16 +62,11 @@ class VectorSettingsIgnoredUsersFragment @Inject constructor( when (it) { is IgnoredUsersViewEvents.Loading -> showLoading(it.message) is IgnoredUsersViewEvents.Failure -> showFailure(it.throwable) - IgnoredUsersViewEvents.Success -> handleSuccess() + IgnoredUsersViewEvents.Success -> Unit } } } - private fun handleSuccess() { - // A user has been un-ignored, perform a initial sync - MainActivity.restartApp(requireActivity(), MainActivityArgs(clearCache = true)) - } - override fun onDestroyView() { ignoredUsersController.callback = null views.genericRecyclerView.cleanup() diff --git a/vector/src/main/res/values/strings.xml b/vector/src/main/res/values/strings.xml index 89ed125afd..1a9634ff90 100644 --- a/vector/src/main/res/values/strings.xml +++ b/vector/src/main/res/values/strings.xml @@ -637,7 +637,7 @@ Ignore Unignore user - Unignoring this user will show all messages from them again.\n\nNote that this action will restart the app and it may take some time. + Unignoring this user will show all messages from them again. Unignore Cancel invite @@ -1035,7 +1035,7 @@ Failed to update password The password is not valid Your password has been updated - Show all messages from %s?\n\nNote that this action will restart the app and it may take some time. + Show all messages from %s? Emails and phone numbers Manage emails and phone numbers linked to your Matrix account From cdcf57659fcb58071941cbaf9f79ca345ad54fda Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 15 Apr 2022 12:53:40 +0200 Subject: [PATCH 073/561] Do not update the cache manually, else the initial sync request will not be triggered. --- .../sdk/internal/session/user/UserModule.kt | 5 -- .../user/accountdata/SaveIgnoredUsersTask.kt | 47 ------------------- .../accountdata/UpdateIgnoredUserIdsTask.kt | 4 -- 3 files changed, 56 deletions(-) delete mode 100644 matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/user/accountdata/SaveIgnoredUsersTask.kt diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/user/UserModule.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/user/UserModule.kt index 4dfc7586ae..c205c4f1c6 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/user/UserModule.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/user/UserModule.kt @@ -21,9 +21,7 @@ import dagger.Module import dagger.Provides import org.matrix.android.sdk.api.session.user.UserService import org.matrix.android.sdk.internal.session.SessionScope -import org.matrix.android.sdk.internal.session.user.accountdata.DefaultSaveIgnoredUsersTask import org.matrix.android.sdk.internal.session.user.accountdata.DefaultUpdateIgnoredUserIdsTask -import org.matrix.android.sdk.internal.session.user.accountdata.SaveIgnoredUsersTask import org.matrix.android.sdk.internal.session.user.accountdata.UpdateIgnoredUserIdsTask import org.matrix.android.sdk.internal.session.user.model.DefaultSearchUserTask import org.matrix.android.sdk.internal.session.user.model.SearchUserTask @@ -48,9 +46,6 @@ internal abstract class UserModule { @Binds abstract fun bindSearchUserTask(task: DefaultSearchUserTask): SearchUserTask - @Binds - abstract fun bindSaveIgnoredUsersTask(task: DefaultSaveIgnoredUsersTask): SaveIgnoredUsersTask - @Binds abstract fun bindUpdateIgnoredUserIdsTask(task: DefaultUpdateIgnoredUserIdsTask): UpdateIgnoredUserIdsTask diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/user/accountdata/SaveIgnoredUsersTask.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/user/accountdata/SaveIgnoredUsersTask.kt deleted file mode 100644 index 63c0ce645e..0000000000 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/user/accountdata/SaveIgnoredUsersTask.kt +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2020 The Matrix.org Foundation C.I.C. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.matrix.android.sdk.internal.session.user.accountdata - -import com.zhuinden.monarchy.Monarchy -import org.matrix.android.sdk.internal.database.model.IgnoredUserEntity -import org.matrix.android.sdk.internal.di.SessionDatabase -import org.matrix.android.sdk.internal.task.Task -import org.matrix.android.sdk.internal.util.awaitTransaction -import javax.inject.Inject - -/** - * Save the ignored users list in DB - */ -internal interface SaveIgnoredUsersTask : Task { - data class Params( - val userIds: List - ) -} - -internal class DefaultSaveIgnoredUsersTask @Inject constructor(@SessionDatabase private val monarchy: Monarchy) : SaveIgnoredUsersTask { - - override suspend fun execute(params: SaveIgnoredUsersTask.Params) { - monarchy.awaitTransaction { realm -> - // clear current ignored users - realm.where(IgnoredUserEntity::class.java) - .findAll() - .deleteAllFromRealm() - - // And save the new received list - params.userIds.forEach { realm.createObject(IgnoredUserEntity::class.java).apply { userId = it } } - } - } -} diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/user/accountdata/UpdateIgnoredUserIdsTask.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/user/accountdata/UpdateIgnoredUserIdsTask.kt index 445b78104c..173161f8ae 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/user/accountdata/UpdateIgnoredUserIdsTask.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/user/accountdata/UpdateIgnoredUserIdsTask.kt @@ -38,7 +38,6 @@ internal interface UpdateIgnoredUserIdsTask : Task Date: Fri, 15 Apr 2022 13:06:53 +0200 Subject: [PATCH 074/561] ktlint --- .../settings/ignored/VectorSettingsIgnoredUsersFragment.kt | 2 -- 1 file changed, 2 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/settings/ignored/VectorSettingsIgnoredUsersFragment.kt b/vector/src/main/java/im/vector/app/features/settings/ignored/VectorSettingsIgnoredUsersFragment.kt index 2ae7ba0a8d..3cb1e29016 100644 --- a/vector/src/main/java/im/vector/app/features/settings/ignored/VectorSettingsIgnoredUsersFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/ignored/VectorSettingsIgnoredUsersFragment.kt @@ -30,8 +30,6 @@ import im.vector.app.core.extensions.cleanup import im.vector.app.core.extensions.configureWith import im.vector.app.core.platform.VectorBaseFragment import im.vector.app.databinding.FragmentGenericRecyclerBinding -import im.vector.app.features.MainActivity -import im.vector.app.features.MainActivityArgs import im.vector.app.features.analytics.plan.MobileScreen import javax.inject.Inject From a50bf4582caf5b68ac7662cc9a3a32ece8a1cce1 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 15 Apr 2022 13:14:03 +0200 Subject: [PATCH 075/561] Move "Ignored users" setting section into "Security & Privacy", as per Element Web --- .../src/main/res/values/config-settings.xml | 5 ++--- vector/src/main/res/xml/vector_settings_root.xml | 6 ------ .../res/xml/vector_settings_security_privacy.xml | 13 +++++++++++++ 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/vector-config/src/main/res/values/config-settings.xml b/vector-config/src/main/res/values/config-settings.xml index b6d1c6676c..0a4da4c98e 100755 --- a/vector-config/src/main/res/values/config-settings.xml +++ b/vector-config/src/main/res/values/config-settings.xml @@ -13,7 +13,6 @@ true true true - true true true true @@ -33,10 +32,10 @@ - - + true + false diff --git a/vector/src/main/res/xml/vector_settings_root.xml b/vector/src/main/res/xml/vector_settings_root.xml index 744694cf5f..0c50083d53 100644 --- a/vector/src/main/res/xml/vector_settings_root.xml +++ b/vector/src/main/res/xml/vector_settings_root.xml @@ -32,12 +32,6 @@ app:fragment="im.vector.app.features.settings.VectorSettingsVoiceVideoFragment" app:isPreferenceVisible="@bool/settings_root_voice_video_visible" /> - - + + + + + + From d24ba65b5bb5b43693a9547d4b138bb579b8a098 Mon Sep 17 00:00:00 2001 From: ariskotsomitopoulos Date: Fri, 15 Apr 2022 14:18:38 +0300 Subject: [PATCH 076/561] Enhance user experience when home servers do not support threads. --- changelog.d/5761.feature | 1 + .../action/MessageActionsViewModel.kt | 4 ++ .../home/room/threads/ThreadsManager.kt | 11 +++- .../settings/VectorSettingsLabsFragment.kt | 57 ++++++++++++++++--- vector/src/main/res/values/strings.xml | 3 + 5 files changed, 66 insertions(+), 10 deletions(-) create mode 100644 changelog.d/5761.feature diff --git a/changelog.d/5761.feature b/changelog.d/5761.feature new file mode 100644 index 0000000000..3d30864e24 --- /dev/null +++ b/changelog.d/5761.feature @@ -0,0 +1 @@ +Improve user experience when home servers do not yet support threads \ No newline at end of file diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/action/MessageActionsViewModel.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/action/MessageActionsViewModel.kt index 9a73afd897..99c36d1190 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/action/MessageActionsViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/action/MessageActionsViewModel.kt @@ -452,6 +452,10 @@ class MessageActionsViewModel @AssistedInject constructor( actionPermissions: ActionPermissions): Boolean { // We let reply in thread visible even if threads are not enabled, with an enhanced flow to attract users // if (!vectorPreferences.areThreadMessagesEnabled()) return false + // Disable beta prompt if the homeserver do not support threads + if (!vectorPreferences.areThreadMessagesEnabled() && + !session.getHomeServerCapabilities().canUseThreading) return false + if (initialState.isFromThreadTimeline) return false if (event.root.isThread()) return false if (event.root.getClearType() != EventType.MESSAGE && diff --git a/vector/src/main/java/im/vector/app/features/home/room/threads/ThreadsManager.kt b/vector/src/main/java/im/vector/app/features/home/room/threads/ThreadsManager.kt index 29f7df2439..545077b550 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/threads/ThreadsManager.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/threads/ThreadsManager.kt @@ -18,6 +18,7 @@ package im.vector.app.features.home.room.threads import android.app.Activity import android.text.Spanned +import androidx.annotation.StringRes import androidx.core.text.HtmlCompat import im.vector.app.R import im.vector.app.core.resources.StringProvider @@ -49,11 +50,17 @@ class ThreadsManager @Inject constructor( /** * Generates and return an Html spanned string to be rendered especially in dialogs */ - fun getBetaEnableThreadsMessage(): Spanned { + private fun generateLearnMoreHtmlString(@StringRes messageId: Int): Spanned { val learnMore = stringProvider.getString(R.string.action_learn_more) val learnMoreUrl = stringProvider.getString(R.string.threads_learn_more_url) val href = "$learnMore.

" - val message = stringProvider.getString(R.string.threads_beta_enable_notice_message, href) + val message = stringProvider.getString(messageId, href) return HtmlCompat.fromHtml(message, HtmlCompat.FROM_HTML_MODE_LEGACY) } + + fun getBetaEnableThreadsMessage(): Spanned = + generateLearnMoreHtmlString(R.string.threads_beta_enable_notice_message) + + fun getLabsEnableThreadsMessage(): Spanned = + generateLearnMoreHtmlString(R.string.threads_labs_enable_notice_message) } diff --git a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsLabsFragment.kt b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsLabsFragment.kt index 0ef8e51429..c46a64ad31 100644 --- a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsLabsFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsLabsFragment.kt @@ -17,18 +17,23 @@ package im.vector.app.features.settings import android.os.Bundle +import android.text.method.LinkMovementMethod +import android.widget.TextView import androidx.preference.Preference +import com.google.android.material.dialog.MaterialAlertDialogBuilder import im.vector.app.R import im.vector.app.core.preference.VectorSwitchPreference import im.vector.app.features.MainActivity import im.vector.app.features.MainActivityArgs import im.vector.app.features.analytics.plan.MobileScreen +import im.vector.app.features.home.room.threads.ThreadsManager import org.matrix.android.sdk.api.settings.LightweightSettingsStorage import javax.inject.Inject class VectorSettingsLabsFragment @Inject constructor( private val vectorPreferences: VectorPreferences, - private val lightweightSettingsStorage: LightweightSettingsStorage + private val lightweightSettingsStorage: LightweightSettingsStorage, + private val threadsManager: ThreadsManager ) : VectorSettingsBaseFragment() { override var titleRes = R.string.room_settings_labs_pref_title @@ -46,15 +51,51 @@ class VectorSettingsLabsFragment @Inject constructor( } // clear cache - findPreference(VectorPreferences.SETTINGS_LABS_ENABLE_THREAD_MESSAGES)?.let { - it.onPreferenceClickListener = Preference.OnPreferenceClickListener { - // We should migrate threads only if threads are disabled - vectorPreferences.setShouldMigrateThreads(!vectorPreferences.areThreadMessagesEnabled()) - lightweightSettingsStorage.setThreadMessagesEnabled(vectorPreferences.areThreadMessagesEnabled()) - displayLoadingView() - MainActivity.restartApp(requireActivity(), MainActivityArgs(clearCache = true)) + findPreference(VectorPreferences.SETTINGS_LABS_ENABLE_THREAD_MESSAGES)?.let { vectorPref -> + vectorPref.onPreferenceClickListener = Preference.OnPreferenceClickListener { + onThreadsPreferenceClickedInterceptor(vectorPref) false } } } + + /** + * Intercept the click to display a user friendly dialog when their homeserver do not support threads + */ + private fun onThreadsPreferenceClickedInterceptor(vectorSwitchPreference: VectorSwitchPreference) { + val userEnabledThreads = vectorPreferences.areThreadMessagesEnabled() + if (!session.getHomeServerCapabilities().canUseThreading && userEnabledThreads) { + activity?.let { + MaterialAlertDialogBuilder(it) + .setTitle(R.string.threads_labs_enable_notice_title) + .setMessage(threadsManager.getLabsEnableThreadsMessage()) + .setCancelable(true) + .setNegativeButton(R.string.action_not_now) { _, _ -> + vectorSwitchPreference.isChecked = false + } + .setPositiveButton(R.string.action_try_it_out) { _, _ -> + onThreadsPreferenceClicked() + } + .show() + ?.findViewById(android.R.id.message) + ?.apply { + linksClickable = true + movementMethod = LinkMovementMethod.getInstance() + } + } + } else { + onThreadsPreferenceClicked() + } + } + + /** + * Action when threads preference switch is actually clicked + */ + private fun onThreadsPreferenceClicked() { + // We should migrate threads only if threads are disabled + vectorPreferences.setShouldMigrateThreads(!vectorPreferences.areThreadMessagesEnabled()) + lightweightSettingsStorage.setThreadMessagesEnabled(vectorPreferences.areThreadMessagesEnabled()) + displayLoadingView() + MainActivity.restartApp(requireActivity(), MainActivityArgs(clearCache = true)) + } } diff --git a/vector/src/main/res/values/strings.xml b/vector/src/main/res/values/strings.xml index 551983637c..59a78affa2 100644 --- a/vector/src/main/res/values/strings.xml +++ b/vector/src/main/res/values/strings.xml @@ -739,6 +739,9 @@ Threads Beta Threads help keep your conversations on-topic and easy to track. %sEnabling threads will refresh the app. This may take longer for some accounts. + Threads Beta + Your homeserver does not currently support threads, so this feature may be unreliable. Some threaded messages may not be reliably available. %sDo you want to enable threads anyway? + Search From 68fe0516eb73777ca9c6a7ede83a8c7d3ddcf280 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 15 Apr 2022 13:18:55 +0200 Subject: [PATCH 077/561] improve preview of this vector drawable --- vector/src/main/res/drawable/ic_secure_backup.xml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/vector/src/main/res/drawable/ic_secure_backup.xml b/vector/src/main/res/drawable/ic_secure_backup.xml index 899bb8d2ae..78bb71e829 100644 --- a/vector/src/main/res/drawable/ic_secure_backup.xml +++ b/vector/src/main/res/drawable/ic_secure_backup.xml @@ -1,4 +1,5 @@ + android:fillColor="#2E2F32" + tools:fillColor="#FF0000"/> + android:fillColor="#2E2F32" + tools:fillColor="#FF0000"/> + android:fillType="evenOdd" + tools:fillColor="#FF0000"/> From 2fdf71db64db0f700a1d2d22198151a45dcfa549 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 15 Apr 2022 13:27:23 +0200 Subject: [PATCH 078/561] Tint the icon --- .../settings/VectorSettingsSecurityPrivacyFragment.kt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsSecurityPrivacyFragment.kt b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsSecurityPrivacyFragment.kt index 1581bb4676..70ed3f441e 100644 --- a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsSecurityPrivacyFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsSecurityPrivacyFragment.kt @@ -186,6 +186,10 @@ class VectorSettingsSecurityPrivacyFragment @Inject constructor( private val secureBackupPreference by lazy { findPreference("SETTINGS_SECURE_BACKUP_RECOVERY_PREFERENCE_KEY")!! } + + private val ignoredUsersPreference by lazy { + findPreference("SETTINGS_IGNORED_USERS_PREFERENCE_KEY")!! + } // private val secureBackupResetPreference by lazy { // findPreference(VectorPreferences.SETTINGS_SECURE_BACKUP_RESET_PREFERENCE_KEY) // } @@ -275,6 +279,11 @@ class VectorSettingsSecurityPrivacyFragment @Inject constructor( ContextCompat.getDrawable(it, R.drawable.ic_secure_backup)!!, R.attr.vctr_content_primary) } + ignoredUsersPreference.icon = activity?.let { + ThemeUtils.tintDrawable(it, + ContextCompat.getDrawable(it, R.drawable.ic_settings_root_ignored_users)!!, R.attr.vctr_content_primary) + } + findPreference(VectorPreferences.SETTINGS_CRYPTOGRAPHY_HS_ADMIN_DISABLED_E2E_DEFAULT)?.let { it.icon = ThemeUtils.tintDrawableWithColor( ContextCompat.getDrawable(requireContext(), R.drawable.ic_notification_privacy_warning)!!, From cf31381b6075c8468beed371ebd86ebee71457ff Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 15 Apr 2022 13:30:02 +0200 Subject: [PATCH 079/561] changelog --- changelog.d/5773.misc | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/5773.misc diff --git a/changelog.d/5773.misc b/changelog.d/5773.misc new file mode 100644 index 0000000000..39c8b42073 --- /dev/null +++ b/changelog.d/5773.misc @@ -0,0 +1 @@ +Move "Ignored users" setting section into "Security & Privacy" \ No newline at end of file From 749976a9cd427e79caf00e2e26ec121d4db8f92c Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 15 Apr 2022 13:31:49 +0200 Subject: [PATCH 080/561] changelog --- changelog.d/5772.feature | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/5772.feature diff --git a/changelog.d/5772.feature b/changelog.d/5772.feature new file mode 100644 index 0000000000..85eec0a1ad --- /dev/null +++ b/changelog.d/5772.feature @@ -0,0 +1 @@ +Improve management of ignored users \ No newline at end of file From cc8f086cc3974f6d1fc690ece7ee7f1cce02d14a Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 15 Apr 2022 13:32:30 +0200 Subject: [PATCH 081/561] copyright --- .../matrix/android/sdk/api/failure/InitialSyncRequestReason.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/failure/InitialSyncRequestReason.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/failure/InitialSyncRequestReason.kt index 5717f41f43..ebe07823f4 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/failure/InitialSyncRequestReason.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/failure/InitialSyncRequestReason.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 New Vector Ltd + * Copyright (c) 2022 The Matrix.org Foundation C.I.C. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From 09abab6ce371c7bae2977edc38f53a74eca99f7c Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 15 Apr 2022 14:12:57 +0200 Subject: [PATCH 082/561] Add a picto for ignored users in the room member list screen (#5764) --- changelog.d/5774.misc | 1 + .../core/epoxy/profiles/ProfileMatrixItem.kt | 1 + .../ProfileMatrixItemWithPowerLevel.kt | 2 ++ .../members/RoomMemberListController.kt | 1 + .../members/RoomMemberListViewModel.kt | 11 +++++++++++ .../members/RoomMemberListViewState.kt | 1 + .../res/layout/item_profile_matrix_item.xml | 18 ++++++++++++++++-- 7 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 changelog.d/5774.misc diff --git a/changelog.d/5774.misc b/changelog.d/5774.misc new file mode 100644 index 0000000000..795106381b --- /dev/null +++ b/changelog.d/5774.misc @@ -0,0 +1 @@ +Add a picto for ignored users in the room member list screen \ No newline at end of file diff --git a/vector/src/main/java/im/vector/app/core/epoxy/profiles/ProfileMatrixItem.kt b/vector/src/main/java/im/vector/app/core/epoxy/profiles/ProfileMatrixItem.kt index 0af342641e..90e81ceb26 100644 --- a/vector/src/main/java/im/vector/app/core/epoxy/profiles/ProfileMatrixItem.kt +++ b/vector/src/main/java/im/vector/app/core/epoxy/profiles/ProfileMatrixItem.kt @@ -32,6 +32,7 @@ abstract class ProfileMatrixItem : BaseProfileMatrixItem(R.id.matrixItemTitle) val subtitleView by bind(R.id.matrixItemSubtitle) + val ignoredUserView by bind(R.id.matrixItemIgnored) val powerLabel by bind(R.id.matrixItemPowerLevelLabel) val presenceImageView by bind(R.id.matrixItemPresenceImageView) val avatarImageView by bind(R.id.matrixItemAvatar) diff --git a/vector/src/main/java/im/vector/app/core/epoxy/profiles/ProfileMatrixItemWithPowerLevel.kt b/vector/src/main/java/im/vector/app/core/epoxy/profiles/ProfileMatrixItemWithPowerLevel.kt index 12189dc8f4..453f402496 100644 --- a/vector/src/main/java/im/vector/app/core/epoxy/profiles/ProfileMatrixItemWithPowerLevel.kt +++ b/vector/src/main/java/im/vector/app/core/epoxy/profiles/ProfileMatrixItemWithPowerLevel.kt @@ -26,11 +26,13 @@ import im.vector.app.core.extensions.setTextOrHide @EpoxyModelClass(layout = R.layout.item_profile_matrix_item) abstract class ProfileMatrixItemWithPowerLevel : ProfileMatrixItem() { + @EpoxyAttribute var ignoredUser: Boolean = false @EpoxyAttribute var powerLevelLabel: CharSequence? = null override fun bind(holder: Holder) { super.bind(holder) holder.editableView.isVisible = false + holder.ignoredUserView.isVisible = ignoredUser holder.powerLabel.setTextOrHide(powerLevelLabel) } } diff --git a/vector/src/main/java/im/vector/app/features/roomprofile/members/RoomMemberListController.kt b/vector/src/main/java/im/vector/app/features/roomprofile/members/RoomMemberListController.kt index 07236fb397..ebcebfa470 100644 --- a/vector/src/main/java/im/vector/app/features/roomprofile/members/RoomMemberListController.kt +++ b/vector/src/main/java/im/vector/app/features/roomprofile/members/RoomMemberListController.kt @@ -133,6 +133,7 @@ class RoomMemberListController @Inject constructor( } showPresence(true) userPresence(roomMember.userPresence) + ignoredUser(roomMember.userId in data.ignoredUserIds) powerLevelLabel( span { span(powerLabel) { diff --git a/vector/src/main/java/im/vector/app/features/roomprofile/members/RoomMemberListViewModel.kt b/vector/src/main/java/im/vector/app/features/roomprofile/members/RoomMemberListViewModel.kt index 1adf35a098..7a9dcb7178 100644 --- a/vector/src/main/java/im/vector/app/features/roomprofile/members/RoomMemberListViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/roomprofile/members/RoomMemberListViewModel.kt @@ -69,6 +69,7 @@ class RoomMemberListViewModel @AssistedInject constructor(@Assisted initialState observeThirdPartyInvites() observeRoomSummary() observePowerLevel() + observeIgnoredUsers() } private fun observeRoomMemberSummaries() { @@ -148,6 +149,16 @@ class RoomMemberListViewModel @AssistedInject constructor(@Assisted initialState } } + private fun observeIgnoredUsers() { + session.flow() + .liveIgnoredUsers() + .execute { async -> + copy( + ignoredUserIds = async.invoke().orEmpty().map { it.userId } + ) + } + } + private fun buildRoomMemberSummaries(powerLevelsContent: PowerLevelsContent, roomMembers: List): RoomMemberSummaries { val admins = ArrayList() val moderators = ArrayList() diff --git a/vector/src/main/java/im/vector/app/features/roomprofile/members/RoomMemberListViewState.kt b/vector/src/main/java/im/vector/app/features/roomprofile/members/RoomMemberListViewState.kt index 93ed7fa719..47a89b523a 100644 --- a/vector/src/main/java/im/vector/app/features/roomprofile/members/RoomMemberListViewState.kt +++ b/vector/src/main/java/im/vector/app/features/roomprofile/members/RoomMemberListViewState.kt @@ -32,6 +32,7 @@ data class RoomMemberListViewState( val roomId: String, val roomSummary: Async = Uninitialized, val roomMemberSummaries: Async = Uninitialized, + val ignoredUserIds: List = emptyList(), val filter: String = "", val threePidInvites: Async> = Uninitialized, val trustLevelMap: Async> = Uninitialized, diff --git a/vector/src/main/res/layout/item_profile_matrix_item.xml b/vector/src/main/res/layout/item_profile_matrix_item.xml index c9354dec9a..85e3c2babb 100644 --- a/vector/src/main/res/layout/item_profile_matrix_item.xml +++ b/vector/src/main/res/layout/item_profile_matrix_item.xml @@ -64,7 +64,7 @@ android:textColor="?vctr_content_primary" app:layout_constrainedWidth="true" app:layout_constraintBottom_toTopOf="@id/matrixItemSubtitle" - app:layout_constraintEnd_toStartOf="@id/matrixItemPowerLevelLabel" + app:layout_constraintEnd_toStartOf="@id/matrixItemIgnored" app:layout_constraintStart_toEndOf="@id/matrixItemAvatarDecoration" app:layout_constraintTop_toTopOf="parent" app:layout_goneMarginEnd="80dp" @@ -83,12 +83,26 @@ android:textColor="?vctr_content_secondary" app:layout_constrainedWidth="true" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintEnd_toStartOf="@id/matrixItemPowerLevelLabel" + app:layout_constraintEnd_toStartOf="@id/matrixItemIgnored" app:layout_constraintStart_toEndOf="@id/matrixItemAvatar" app:layout_constraintTop_toBottomOf="@id/matrixItemTitle" app:layout_goneMarginEnd="8dp" tools:text="@sample/users.json/data/id" /> + + Date: Fri, 15 Apr 2022 16:32:48 +0300 Subject: [PATCH 083/561] Replace var with val --- .../sdk/api/session/homeserver/HomeServerCapabilities.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/homeserver/HomeServerCapabilities.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/homeserver/HomeServerCapabilities.kt index 9db3876b74..597c1a0ca8 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/homeserver/HomeServerCapabilities.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/homeserver/HomeServerCapabilities.kt @@ -54,7 +54,7 @@ data class HomeServerCapabilities( /** * True if the home server support threading */ - var canUseThreading: Boolean = false + val canUseThreading: Boolean = false ) { enum class RoomCapabilitySupport { From 903e226e5934a852f910ea5861de357bb33b4e2b Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 15 Apr 2022 16:30:09 +0200 Subject: [PATCH 084/561] Restart the timeline when some Event are deleted, for instance when ignoring a user, for the change to take effect --- .../session/room/timeline/DefaultTimeline.kt | 7 +++++++ .../session/room/timeline/LoadTimelineStrategy.kt | 4 +++- .../session/room/timeline/TimelineChunk.kt | 14 +++++++++++--- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/DefaultTimeline.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/DefaultTimeline.kt index 5064ebf49b..08b2700a43 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/DefaultTimeline.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/DefaultTimeline.kt @@ -100,6 +100,7 @@ internal class DefaultTimeline(private val roomId: String, threadsAwarenessHandler = threadsAwarenessHandler, lightweightSettingsStorage = lightweightSettingsStorage, onEventsUpdated = this::sendSignalToPostSnapshot, + onEventsDeleted = this::onEventsDeleted, onLimitedTimeline = this::onLimitedTimeline, onNewTimelineEvents = this::onNewTimelineEvents ) @@ -304,6 +305,12 @@ internal class DefaultTimeline(private val roomId: String, } } + private fun onEventsDeleted() { + // Some event have been deleted, for instance when a user has been ignored. + // Restart the timeline (live) + restartWithEventId(null) + } + private suspend fun postSnapshot() { val snapshot = strategy.buildSnapshot() Timber.v("Post snapshot of ${snapshot.size} events") diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/LoadTimelineStrategy.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/LoadTimelineStrategy.kt index ff986d04af..8819ffe69f 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/LoadTimelineStrategy.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/LoadTimelineStrategy.kt @@ -95,6 +95,7 @@ internal class LoadTimelineStrategy( val threadsAwarenessHandler: ThreadsAwarenessHandler, val lightweightSettingsStorage: LightweightSettingsStorage, val onEventsUpdated: (Boolean) -> Unit, + val onEventsDeleted: () -> Unit, val onLimitedTimeline: () -> Unit, val onNewTimelineEvents: (List) -> Unit ) @@ -302,7 +303,8 @@ internal class LoadTimelineStrategy( threadsAwarenessHandler = dependencies.threadsAwarenessHandler, lightweightSettingsStorage = dependencies.lightweightSettingsStorage, initialEventId = mode.originEventId(), - onBuiltEvents = dependencies.onEventsUpdated + onBuiltEvents = dependencies.onEventsUpdated, + onEventsDeleted = dependencies.onEventsDeleted, ) } } diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/TimelineChunk.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/TimelineChunk.kt index 4ead1d4ecb..ca7bf8a0ac 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/TimelineChunk.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/TimelineChunk.kt @@ -59,11 +59,13 @@ internal class TimelineChunk(private val chunkEntity: ChunkEntity, private val realmConfiguration: RealmConfiguration, private val fetchTokenAndPaginateTask: FetchTokenAndPaginateTask, private val timelineEventMapper: TimelineEventMapper, - private val uiEchoManager: UIEchoManager? = null, + private val uiEchoManager: UIEchoManager?, private val threadsAwarenessHandler: ThreadsAwarenessHandler, private val lightweightSettingsStorage: LightweightSettingsStorage, private val initialEventId: String?, - private val onBuiltEvents: (Boolean) -> Unit) { + private val onBuiltEvents: (Boolean) -> Unit, + private val onEventsDeleted: () -> Unit, +) { private val isLastForward = AtomicBoolean(chunkEntity.isLastForward) private val isLastBackward = AtomicBoolean(chunkEntity.isLastBackward) @@ -505,6 +507,11 @@ internal class TimelineChunk(private val chunkEntity: ChunkEntity, if (insertions.isNotEmpty() || modifications.isNotEmpty()) { onBuiltEvents(true) } + + val deletions = changeSet.deletions + if (deletions.isNotEmpty()) { + onEventsDeleted() + } } private fun getNextDisplayIndex(direction: Timeline.Direction): Int? { @@ -543,7 +550,8 @@ internal class TimelineChunk(private val chunkEntity: ChunkEntity, threadsAwarenessHandler = threadsAwarenessHandler, lightweightSettingsStorage = lightweightSettingsStorage, initialEventId = null, - onBuiltEvents = this.onBuiltEvents + onBuiltEvents = this.onBuiltEvents, + onEventsDeleted = this.onEventsDeleted ) } From e1bb4da9787d538819e26d7dc990fdb0c8f848a1 Mon Sep 17 00:00:00 2001 From: Zet Date: Thu, 14 Apr 2022 21:24:20 +0000 Subject: [PATCH 085/561] Translated using Weblate (Arabic) Currently translated at 32.8% (719 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/ar/ --- vector/src/main/res/values-ar/strings.xml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/vector/src/main/res/values-ar/strings.xml b/vector/src/main/res/values-ar/strings.xml index 8c1a582573..8e439940f4 100644 --- a/vector/src/main/res/values-ar/strings.xml +++ b/vector/src/main/res/values-ar/strings.xml @@ -882,4 +882,17 @@ علنيّة خاصة (عبر الدعوة فقط) خاصة + أظهر حدثيْ الانضمام والمغادرة + أعلم المستخدمين أنك تكتب. + أرسل إخطارات عند الكتابة + إدارة مفاتيح التعميّة + تَكامُل + + الآن + ثانية واحدة + ثانيتان + %d ثوان + %d ثانية + %d ثانية + \ No newline at end of file From a17e5010f082e6bab129bdccedb7b9ae129c8a31 Mon Sep 17 00:00:00 2001 From: Lucas Date: Thu, 14 Apr 2022 21:15:04 +0000 Subject: [PATCH 086/561] Translated using Weblate (French) Currently translated at 99.9% (2189 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/fr/ --- vector/src/main/res/values-fr/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vector/src/main/res/values-fr/strings.xml b/vector/src/main/res/values-fr/strings.xml index a790263666..6e4af7d08d 100644 --- a/vector/src/main/res/values-fr/strings.xml +++ b/vector/src/main/res/values-fr/strings.xml @@ -501,7 +501,7 @@ %d nouveau message %d nouveaux messages
- Liste les membres + Membres %d message notifié non lu %d messages notifiés non lus @@ -1978,7 +1978,7 @@ Vous êtes invité Les espaces sont une nouvelle manière de regrouper les salons et les gens. Ajouter des salons et espaces existants - Quitter l’espace + Quitter Ajouter des salons Parcourir les salons From f8a2b6cdf4ca242d6059c9644e5876713989c355 Mon Sep 17 00:00:00 2001 From: Zet Date: Sat, 16 Apr 2022 22:13:36 +0000 Subject: [PATCH 087/561] Translated using Weblate (Arabic) Currently translated at 35.9% (787 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/ar/ --- vector/src/main/res/values-ar/strings.xml | 68 +++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/vector/src/main/res/values-ar/strings.xml b/vector/src/main/res/values-ar/strings.xml index 8e439940f4..32b37a6d42 100644 --- a/vector/src/main/res/values-ar/strings.xml +++ b/vector/src/main/res/values-ar/strings.xml @@ -895,4 +895,72 @@ %d ثانية %d ثانية + العنوان + امسح التأريخ + لِج + سجّل + لج عبر %1$s + اتص بخادم مخصص + اتصل بخدمات مايتركس لـ Element + اتصل بـ %1$s + تابع + لِج عبر %s + سجل في %s + تابع بـ %s + أخرى + انضم لأكبر خادم علني مجانًا + مثل البريد الالكتروني لن تحتاج سوى لحساب واحد للتواصل مع الجميع + اختر خادمًا + لدي حساب سلفًا + أنشئ حسابًا + ابدأ + حافظ على خصوصية محادثاتك بالتعميّة + تراسل مع أفراد أو مجموعات + تحكم في محادثاتك. + تخط هذه الخطوة + احفظ وتابع + حُفظت تفضيلاتك. + كل شيئ جاهز! + لننطلق + يمكنك تغييرها في أي وقت. + أضف صورة لللاحة + يمكنك تغييره لاحقًا + الاسم العلني + سيظهر هذا الاسم مع رسائلك. + اختر الاسم العلني + أُنشئ حسابك %s. + مبارك! + انقلني للمنزل + خصص لاحتك + اتصل بخادم + ترغب في الانضمام لخادم موجودٍ سلفًا؟ + تخط هذا السؤال + مجتمعات + فِرق + الأصدقاء والعائلة + من أكثر من تحادثهم؟ + مراسلات آمنة. + أنت المتحكم. + تحكم في محادثاتك. + رسائل غير مقروءة + جعلتَ الغرفة للمدعووين فقط. + جعل %1$s الغرفة للمدعوين فقط. + جعلتَ الغرفة علنيّة لمن يملك رابطها. + جعل %1$s الغرفة علنيّة لمن يملك رابطها. + اضغط مطولًا على الغرفة لتظهر مزيد من الخيارات + لا تتجاهل أي مستخدم + اكتب كلمة مفتاحيّة لتعثر على تفاعل. + لم تقم بأي تغيير + لم يقم %1$s بأي تغيير + إعدادات الغرفة + غادر الغرفة + أزل من المفضلة + أضف للمفضلة + الإعدادات + اكتم + الذكر فقط + كل الرسائل + كل الرسائل (مزعج) + تجاهل مستخدم + أَو \ No newline at end of file From fb3e037ed5a8ece9ffe8b61ce5c0b723733bf57a Mon Sep 17 00:00:00 2001 From: Glandos Date: Sat, 16 Apr 2022 12:35:50 +0000 Subject: [PATCH 088/561] Translated using Weblate (French) Currently translated at 100.0% (2190 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/fr/ --- vector/src/main/res/values-fr/strings.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vector/src/main/res/values-fr/strings.xml b/vector/src/main/res/values-fr/strings.xml index 6e4af7d08d..ce69d574ba 100644 --- a/vector/src/main/res/values-fr/strings.xml +++ b/vector/src/main/res/values-fr/strings.xml @@ -2452,4 +2452,9 @@ Personnaliser le profil Les fils de discussion se rapproche de la bêta 🎉 Désactiver + Nous nous approchons d’une publication en bêta des fils de discussions. +\n +\nPour nous y préparer, nous avons besoin de faire certains changements : les fils créés avant maintenant seront affichés comme des réponses classiques. +\n +\nCette transition sera unique, maintenant que les fils de discussions ont intégré la spécification de Matrix. \ No newline at end of file From dc4f11a613baae14c59b4154f4a0da5722ea5b0c Mon Sep 17 00:00:00 2001 From: Suguru Hirahara Date: Sun, 17 Apr 2022 06:18:56 +0000 Subject: [PATCH 089/561] Translated using Weblate (Japanese) Currently translated at 98.2% (2151 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/ja/ --- vector/src/main/res/values-ja/strings.xml | 34 +++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/vector/src/main/res/values-ja/strings.xml b/vector/src/main/res/values-ja/strings.xml index e87e5653ca..672e2472bb 100644 --- a/vector/src/main/res/values-ja/strings.xml +++ b/vector/src/main/res/values-ja/strings.xml @@ -355,7 +355,7 @@ %d個のメンバーシップの変更 - メンバーを表示 + メンバー %d名のメンバー @@ -1520,7 +1520,7 @@ アンケートを削除 スペースを作成 スペースに参加 - スペースを退出 + 退出 ルームを管理 このスペースにはルームがありません 音声メッセージを再生できません @@ -2342,4 +2342,34 @@ あなたしか知らないセキュリティーフレーズを入力してください。サーバーで機密情報を保護するために使用します。 詳細を非表示 他の参加者はいません。%sに招待しましょう。 + 位置情報(ライブ)が有効です + アクセスを許可 + 現在の位置情報を共有 + 現在の位置情報を共有 + ルームを作成します。後から追加できます。 + + %d個のエントリー + + 保存して続行 + 設定を保存しました。 + これは後から変更できます。 + プロフィール画像を追加 + これは後から変更できます + 表示名 + メッセージを送信する際に表示されます。 + この位置情報を共有 + この位置情報を共有 + 位置情報(ライブ)を共有 + 位置情報(ライブ)を共有 + 中止 + 表示名を選択 + あなたのアカウント %s が作成されました。 + おめでとうございます! + 近日中にスレッドはベータ版となります。 +\n +\nその準備として、この時点以前に作成されたスレッドは、通常の返信として表示するように変更します。 +\n +\nスレッドはMatrixの仕様の一部になったため、これは一度限りの変更です。 + スレッドはベータ版になります 🎉 + 無効にする \ No newline at end of file From cb577756f97a140550bfbcf27a06510d2199eddc Mon Sep 17 00:00:00 2001 From: Jozef Gaal Date: Sat, 16 Apr 2022 08:52:38 +0000 Subject: [PATCH 090/561] Translated using Weblate (Slovak) Currently translated at 100.0% (2190 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/sk/ --- vector/src/main/res/values-sk/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vector/src/main/res/values-sk/strings.xml b/vector/src/main/res/values-sk/strings.xml index 0807657f8e..eee10d9c4c 100644 --- a/vector/src/main/res/values-sk/strings.xml +++ b/vector/src/main/res/values-sk/strings.xml @@ -667,7 +667,7 @@ [%1$s] \nNa zariadení máte množstvo aplikácií zaregistrovaných na doručovanie okamžitých oznámení cez služby Google play. Konfigurácia ${app_name} nemá vplyv na výskyt tejto chyby. Podľa Google sa môže vyskytovať len pri veľmi vysokom počte nainštalovaných aplikácií. Bežní používatelia by týmto nemali byť postihnutí. [%1$s] -\nKonfigurácia ${app_name} nemá vplyv na zobrazenie tejto chyby. Táto chyba sa môže zobraziť z niekoľkých dôvodov. Uistite sa že máte správne nastavený systémový čas a že ste v nastaveniach systému aplikácii služby Google play neobmedzili používanie prístupu na internet. Chyba sa tiež môže zobrazovať na vlastných zostaveniach (ROM), alebo sa chyba môže samovoľne prestať zobrazovať neskôr. +\nTáto chyba sa vymkla spod kontroly aplikácie ${app_name}. Môže sa vyskytnúť z niekoľkých dôvodov. Možno to bude fungovať, ak to neskôr skúsite znova, môžete tiež skontrolovať, či služba Google Play nemá v systémových nastaveniach obmedzené používanie dát, alebo či sú hodiny vášho zariadenia správne, prípadne sa to môže stať na vlastnej ROM. [%1$s] \nV zariadení nemáte nastavený účet Google. Prosím, pridajte si účet cez správcu účtov. Konfigurácia ${app_name} nemá vplyv na zobrazenie tejto chyby. Pridať účet @@ -1005,7 +1005,7 @@ Url: Formát: Zvuk a video - Pomoc a O aplikácii + Pomoc a o aplikácii Zaregistrovať token Poslať návrh Nižšie napíšte obsah návrhu. From 765bfd0570044d92fe8ac17bee80a37b6f98adc6 Mon Sep 17 00:00:00 2001 From: Glandos Date: Sat, 16 Apr 2022 12:34:06 +0000 Subject: [PATCH 091/561] Translated using Weblate (French) Currently translated at 100.0% (55 of 55 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/fr/ --- fastlane/metadata/android/fr-FR/changelogs/40104040.txt | 2 ++ fastlane/metadata/android/fr-FR/changelogs/40104060.txt | 2 ++ fastlane/metadata/android/fr-FR/changelogs/40104070.txt | 2 ++ fastlane/metadata/android/fr-FR/changelogs/40104080.txt | 2 ++ 4 files changed, 8 insertions(+) create mode 100644 fastlane/metadata/android/fr-FR/changelogs/40104040.txt create mode 100644 fastlane/metadata/android/fr-FR/changelogs/40104060.txt create mode 100644 fastlane/metadata/android/fr-FR/changelogs/40104070.txt create mode 100644 fastlane/metadata/android/fr-FR/changelogs/40104080.txt diff --git a/fastlane/metadata/android/fr-FR/changelogs/40104040.txt b/fastlane/metadata/android/fr-FR/changelogs/40104040.txt new file mode 100644 index 0000000000..af2d7bb086 --- /dev/null +++ b/fastlane/metadata/android/fr-FR/changelogs/40104040.txt @@ -0,0 +1,2 @@ +Principaux changements pour cette version : Mise-à-jour de l’interface de notification de rédaction en cours. Plusieurs corrections de bogues et d’améliorations de stabilité. +Intégralité des changements : https://github.com/vector-im/element-android/releases/tag/v1.4.4 diff --git a/fastlane/metadata/android/fr-FR/changelogs/40104060.txt b/fastlane/metadata/android/fr-FR/changelogs/40104060.txt new file mode 100644 index 0000000000..24e0fde3f3 --- /dev/null +++ b/fastlane/metadata/android/fr-FR/changelogs/40104060.txt @@ -0,0 +1,2 @@ +Principaux changements pour cette version : Les fils de discussion sont officiellement disponibles, et plus rapides. Plusieurs corrections de bogues et d’améliorations de stabilité. +Intégralité des changements : https://github.com/vector-im/element-android/releases/tag/v1.4.6 diff --git a/fastlane/metadata/android/fr-FR/changelogs/40104070.txt b/fastlane/metadata/android/fr-FR/changelogs/40104070.txt new file mode 100644 index 0000000000..3f9879d917 --- /dev/null +++ b/fastlane/metadata/android/fr-FR/changelogs/40104070.txt @@ -0,0 +1,2 @@ +Principaux changements pour cette version : Plusieurs corrections de bogues et d’améliorations de stabilité. +Intégralité des changements : https://github.com/vector-im/element-android/releases/tag/v1.4.7 diff --git a/fastlane/metadata/android/fr-FR/changelogs/40104080.txt b/fastlane/metadata/android/fr-FR/changelogs/40104080.txt new file mode 100644 index 0000000000..84f92c18e2 --- /dev/null +++ b/fastlane/metadata/android/fr-FR/changelogs/40104080.txt @@ -0,0 +1,2 @@ +Principaux changements pour cette version : Les fils de discussion sont officiellement disponibles, et plus rapides. Plusieurs corrections de bogues et d’améliorations de stabilité. +Intégralité des changements : https://github.com/vector-im/element-android/releases From 48680c3e2d5d0b67d304d5cebf3be26a4f8335ca Mon Sep 17 00:00:00 2001 From: fedrunov <66663241+fedrunov@users.noreply.github.com> Date: Tue, 19 Apr 2022 09:27:17 +0200 Subject: [PATCH 092/561] remove spaces feedback from left panel (#5686) --- changelog.d/5486.misc | 1 + .../app/features/spaces/SpaceBetaHeaderItem.kt | 17 +---------------- .../features/spaces/SpaceSummaryController.kt | 3 --- vector/src/main/res/drawable/ic_feedback.xml | 14 -------------- .../main/res/layout/item_space_beta_header.xml | 15 +-------------- vector/src/main/res/values/strings.xml | 3 ++- 6 files changed, 5 insertions(+), 48 deletions(-) create mode 100644 changelog.d/5486.misc delete mode 100644 vector/src/main/res/drawable/ic_feedback.xml diff --git a/changelog.d/5486.misc b/changelog.d/5486.misc new file mode 100644 index 0000000000..82571af37b --- /dev/null +++ b/changelog.d/5486.misc @@ -0,0 +1 @@ +Spaces feedback section is removed from left panel \ No newline at end of file diff --git a/vector/src/main/java/im/vector/app/features/spaces/SpaceBetaHeaderItem.kt b/vector/src/main/java/im/vector/app/features/spaces/SpaceBetaHeaderItem.kt index abe7e8d2a8..667f895d4d 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/SpaceBetaHeaderItem.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/SpaceBetaHeaderItem.kt @@ -16,27 +16,12 @@ package im.vector.app.features.spaces -import android.view.View -import com.airbnb.epoxy.EpoxyAttribute import com.airbnb.epoxy.EpoxyModelClass import im.vector.app.R -import im.vector.app.core.epoxy.ClickListener import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyModel -import im.vector.app.core.epoxy.onClick @EpoxyModelClass(layout = R.layout.item_space_beta_header) abstract class SpaceBetaHeaderItem : VectorEpoxyModel() { - - @EpoxyAttribute(EpoxyAttribute.Option.DoNotHash) - var clickAction: ClickListener? = null - - override fun bind(holder: Holder) { - super.bind(holder) - holder.feedBackAction.onClick(clickAction) - } - - class Holder : VectorEpoxyHolder() { - val feedBackAction by bind(R.id.spaceBetaFeedbackAction) - } + class Holder : VectorEpoxyHolder() } diff --git a/vector/src/main/java/im/vector/app/features/spaces/SpaceSummaryController.kt b/vector/src/main/java/im/vector/app/features/spaces/SpaceSummaryController.kt index 95e4405da5..e88af19263 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/SpaceSummaryController.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/SpaceSummaryController.kt @@ -109,9 +109,6 @@ class SpaceSummaryController @Inject constructor( val host = this spaceBetaHeaderItem { id("beta_header") - clickAction { - host.callback?.sendFeedBack() - } } // show invites on top diff --git a/vector/src/main/res/drawable/ic_feedback.xml b/vector/src/main/res/drawable/ic_feedback.xml deleted file mode 100644 index e774a8ab5c..0000000000 --- a/vector/src/main/res/drawable/ic_feedback.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - diff --git a/vector/src/main/res/layout/item_space_beta_header.xml b/vector/src/main/res/layout/item_space_beta_header.xml index 943b5671ff..3ccc541371 100644 --- a/vector/src/main/res/layout/item_space_beta_header.xml +++ b/vector/src/main/res/layout/item_space_beta_header.xml @@ -8,6 +8,7 @@ android:paddingStart="16dp" android:paddingTop="8dp" android:paddingEnd="16dp" + android:paddingBottom="16dp" tools:viewBindingIgnore="true"> - - diff --git a/vector/src/main/res/values/strings.xml b/vector/src/main/res/values/strings.xml index ffd4333071..96ccef92f1 100644 --- a/vector/src/main/res/values/strings.xml +++ b/vector/src/main/res/values/strings.xml @@ -1660,7 +1660,8 @@ You may contact me if you have any follow up questions Thanks, your feedback has been successfully sent The feedback failed to be sent (%s) - Give Feedback + + Give Feedback Give Feedback Threads Beta feedback Threads are a work in progress with new, exciting upcoming features, such as improved notifications. We’d love to hear your feedback! From 8a2cd97df0034808e9834e766bc2864f22a53fbf Mon Sep 17 00:00:00 2001 From: ariskotsomitopoulos Date: Tue, 19 Apr 2022 11:12:28 +0300 Subject: [PATCH 093/561] Resolve merge conflicts --- .../auth/registration => api/session/uia}/UiaResult.kt | 2 +- .../org/matrix/android/sdk/internal/auth/registration/UIAExt.kt | 1 + .../android/sdk/internal/crypto/tasks/DeleteDeviceTask.kt | 2 +- .../sdk/internal/crypto/tasks/InitializeCrossSigningTask.kt | 2 +- .../sdk/internal/session/account/DeactivateAccountTask.kt | 2 +- .../sdk/internal/session/profile/FinalizeAddingThreePidTask.kt | 2 +- 6 files changed, 6 insertions(+), 5 deletions(-) rename matrix-sdk-android/src/main/java/org/matrix/android/sdk/{internal/auth/registration => api/session/uia}/UiaResult.kt (92%) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/registration/UiaResult.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/uia/UiaResult.kt similarity index 92% rename from matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/registration/UiaResult.kt rename to matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/uia/UiaResult.kt index d0665b0e37..ee4a180dea 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/registration/UiaResult.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/uia/UiaResult.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.matrix.android.sdk.internal.auth.registration +package org.matrix.android.sdk.api.session.uia enum class UiaResult { SUCCESS, diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/registration/UIAExt.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/registration/UIAExt.kt index 8c97cbde27..530c42eb25 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/registration/UIAExt.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/registration/UIAExt.kt @@ -20,6 +20,7 @@ import org.matrix.android.sdk.api.auth.UIABaseAuth import org.matrix.android.sdk.api.auth.UserInteractiveAuthInterceptor import org.matrix.android.sdk.api.failure.Failure import org.matrix.android.sdk.api.failure.toRegistrationFlowResponse +import org.matrix.android.sdk.api.session.uia.UiaResult import org.matrix.android.sdk.internal.util.exceptions.UiaCancelledException import timber.log.Timber import kotlin.coroutines.suspendCoroutine diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/tasks/DeleteDeviceTask.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/tasks/DeleteDeviceTask.kt index cf10625327..0a77d33acc 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/tasks/DeleteDeviceTask.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/tasks/DeleteDeviceTask.kt @@ -18,7 +18,7 @@ package org.matrix.android.sdk.internal.crypto.tasks import org.matrix.android.sdk.api.auth.UIABaseAuth import org.matrix.android.sdk.api.auth.UserInteractiveAuthInterceptor -import org.matrix.android.sdk.internal.auth.registration.UiaResult +import org.matrix.android.sdk.api.session.uia.UiaResult import org.matrix.android.sdk.internal.auth.registration.handleUIA import org.matrix.android.sdk.internal.crypto.api.CryptoApi import org.matrix.android.sdk.internal.crypto.model.rest.DeleteDeviceParams diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/tasks/InitializeCrossSigningTask.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/tasks/InitializeCrossSigningTask.kt index 2f2b09f91c..53190c43ff 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/tasks/InitializeCrossSigningTask.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/tasks/InitializeCrossSigningTask.kt @@ -18,9 +18,9 @@ package org.matrix.android.sdk.internal.crypto.tasks import dagger.Lazy import org.matrix.android.sdk.api.auth.UserInteractiveAuthInterceptor -import org.matrix.android.sdk.internal.auth.registration.UiaResult import org.matrix.android.sdk.api.session.crypto.crosssigning.CryptoCrossSigningKey import org.matrix.android.sdk.api.session.crypto.crosssigning.KeyUsage +import org.matrix.android.sdk.api.session.uia.UiaResult import org.matrix.android.sdk.api.util.toBase64NoPadding import org.matrix.android.sdk.internal.auth.registration.handleUIA import org.matrix.android.sdk.internal.crypto.MXOlmDevice diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/account/DeactivateAccountTask.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/account/DeactivateAccountTask.kt index 9c3402d0e3..b35929e5c2 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/account/DeactivateAccountTask.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/account/DeactivateAccountTask.kt @@ -18,7 +18,7 @@ package org.matrix.android.sdk.internal.session.account import org.matrix.android.sdk.api.auth.UIABaseAuth import org.matrix.android.sdk.api.auth.UserInteractiveAuthInterceptor -import org.matrix.android.sdk.internal.auth.registration.UiaResult +import org.matrix.android.sdk.api.session.uia.UiaResult import org.matrix.android.sdk.internal.auth.registration.handleUIA import org.matrix.android.sdk.internal.network.GlobalErrorReceiver import org.matrix.android.sdk.internal.network.executeRequest diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/profile/FinalizeAddingThreePidTask.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/profile/FinalizeAddingThreePidTask.kt index 5b640cea73..501aff63bd 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/profile/FinalizeAddingThreePidTask.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/profile/FinalizeAddingThreePidTask.kt @@ -22,7 +22,7 @@ import org.matrix.android.sdk.api.auth.UserInteractiveAuthInterceptor import org.matrix.android.sdk.api.failure.Failure import org.matrix.android.sdk.api.failure.toRegistrationFlowResponse import org.matrix.android.sdk.api.session.identity.ThreePid -import org.matrix.android.sdk.internal.auth.registration.UiaResult +import org.matrix.android.sdk.api.session.uia.UiaResult import org.matrix.android.sdk.internal.auth.registration.handleUIA import org.matrix.android.sdk.internal.database.model.PendingThreePidEntity import org.matrix.android.sdk.internal.database.model.PendingThreePidEntityFields From 459ae7276d52d5ea4cefa04cf5bc67747628f80c Mon Sep 17 00:00:00 2001 From: ariskotsomitopoulos Date: Tue, 19 Apr 2022 11:36:59 +0300 Subject: [PATCH 094/561] Refactor packages --- .../session/uia}/exceptions/UiaCancelledException.kt | 2 +- .../org/matrix/android/sdk/internal/auth/registration/UIAExt.kt | 2 +- .../sdk/internal/session/account/DeactivateAccountTask.kt | 2 +- .../settings/account/deactivation/DeactivateAccountFragment.kt | 2 +- .../settings/account/deactivation/DeactivateAccountViewModel.kt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) rename matrix-sdk-android/src/main/java/org/matrix/android/sdk/{internal/util => api/session/uia}/exceptions/UiaCancelledException.kt (92%) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/util/exceptions/UiaCancelledException.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/uia/exceptions/UiaCancelledException.kt similarity index 92% rename from matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/util/exceptions/UiaCancelledException.kt rename to matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/uia/exceptions/UiaCancelledException.kt index 56971bc44b..d5f9d72efe 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/util/exceptions/UiaCancelledException.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/uia/exceptions/UiaCancelledException.kt @@ -14,6 +14,6 @@ * limitations under the License. */ -package org.matrix.android.sdk.internal.util.exceptions +package org.matrix.android.sdk.api.session.uia.exceptions class UiaCancelledException(message: String? = null) : Exception(message) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/registration/UIAExt.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/registration/UIAExt.kt index 530c42eb25..7dafacb3c0 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/registration/UIAExt.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/registration/UIAExt.kt @@ -21,7 +21,7 @@ import org.matrix.android.sdk.api.auth.UserInteractiveAuthInterceptor import org.matrix.android.sdk.api.failure.Failure import org.matrix.android.sdk.api.failure.toRegistrationFlowResponse import org.matrix.android.sdk.api.session.uia.UiaResult -import org.matrix.android.sdk.internal.util.exceptions.UiaCancelledException +import org.matrix.android.sdk.api.session.uia.exceptions.UiaCancelledException import timber.log.Timber import kotlin.coroutines.suspendCoroutine diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/account/DeactivateAccountTask.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/account/DeactivateAccountTask.kt index b35929e5c2..181f65d2b3 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/account/DeactivateAccountTask.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/account/DeactivateAccountTask.kt @@ -25,7 +25,7 @@ import org.matrix.android.sdk.internal.network.executeRequest import org.matrix.android.sdk.internal.session.cleanup.CleanupSession import org.matrix.android.sdk.internal.session.identity.IdentityDisconnectTask import org.matrix.android.sdk.internal.task.Task -import org.matrix.android.sdk.internal.util.exceptions.UiaCancelledException +import org.matrix.android.sdk.api.session.uia.exceptions.UiaCancelledException import timber.log.Timber import javax.inject.Inject diff --git a/vector/src/main/java/im/vector/app/features/settings/account/deactivation/DeactivateAccountFragment.kt b/vector/src/main/java/im/vector/app/features/settings/account/deactivation/DeactivateAccountFragment.kt index d0e1247ee2..ea182e7d6b 100644 --- a/vector/src/main/java/im/vector/app/features/settings/account/deactivation/DeactivateAccountFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/account/deactivation/DeactivateAccountFragment.kt @@ -34,7 +34,7 @@ import im.vector.app.features.analytics.plan.MobileScreen import im.vector.app.features.auth.ReAuthActivity import im.vector.app.features.settings.VectorSettingsActivity import org.matrix.android.sdk.api.auth.data.LoginFlowTypes -import org.matrix.android.sdk.internal.util.exceptions.UiaCancelledException +import org.matrix.android.sdk.api.session.uia.exceptions.UiaCancelledException import javax.inject.Inject class DeactivateAccountFragment @Inject constructor() : VectorBaseFragment() { diff --git a/vector/src/main/java/im/vector/app/features/settings/account/deactivation/DeactivateAccountViewModel.kt b/vector/src/main/java/im/vector/app/features/settings/account/deactivation/DeactivateAccountViewModel.kt index ec12602cf9..6714ca5dba 100644 --- a/vector/src/main/java/im/vector/app/features/settings/account/deactivation/DeactivateAccountViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/settings/account/deactivation/DeactivateAccountViewModel.kt @@ -33,7 +33,7 @@ import org.matrix.android.sdk.api.failure.isInvalidUIAAuth import org.matrix.android.sdk.api.session.Session import org.matrix.android.sdk.api.session.uia.DefaultBaseAuth import org.matrix.android.sdk.api.util.fromBase64 -import org.matrix.android.sdk.internal.util.exceptions.UiaCancelledException +import org.matrix.android.sdk.api.session.uia.exceptions.UiaCancelledException import timber.log.Timber import kotlin.coroutines.Continuation import kotlin.coroutines.resume From 945d0ce0356487f7ee290c83960a3aa50bb4b53a Mon Sep 17 00:00:00 2001 From: ariskotsomitopoulos Date: Tue, 19 Apr 2022 11:50:50 +0300 Subject: [PATCH 095/561] Fix import ordering --- .../sdk/internal/session/account/DeactivateAccountTask.kt | 2 +- .../account/deactivation/DeactivateAccountViewModel.kt | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/account/DeactivateAccountTask.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/account/DeactivateAccountTask.kt index 181f65d2b3..9f3f1f649e 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/account/DeactivateAccountTask.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/account/DeactivateAccountTask.kt @@ -19,13 +19,13 @@ package org.matrix.android.sdk.internal.session.account import org.matrix.android.sdk.api.auth.UIABaseAuth import org.matrix.android.sdk.api.auth.UserInteractiveAuthInterceptor import org.matrix.android.sdk.api.session.uia.UiaResult +import org.matrix.android.sdk.api.session.uia.exceptions.UiaCancelledException import org.matrix.android.sdk.internal.auth.registration.handleUIA import org.matrix.android.sdk.internal.network.GlobalErrorReceiver import org.matrix.android.sdk.internal.network.executeRequest import org.matrix.android.sdk.internal.session.cleanup.CleanupSession import org.matrix.android.sdk.internal.session.identity.IdentityDisconnectTask import org.matrix.android.sdk.internal.task.Task -import org.matrix.android.sdk.api.session.uia.exceptions.UiaCancelledException import timber.log.Timber import javax.inject.Inject diff --git a/vector/src/main/java/im/vector/app/features/settings/account/deactivation/DeactivateAccountViewModel.kt b/vector/src/main/java/im/vector/app/features/settings/account/deactivation/DeactivateAccountViewModel.kt index 6714ca5dba..19337608db 100644 --- a/vector/src/main/java/im/vector/app/features/settings/account/deactivation/DeactivateAccountViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/settings/account/deactivation/DeactivateAccountViewModel.kt @@ -32,8 +32,8 @@ import org.matrix.android.sdk.api.auth.registration.RegistrationFlowResponse import org.matrix.android.sdk.api.failure.isInvalidUIAAuth import org.matrix.android.sdk.api.session.Session import org.matrix.android.sdk.api.session.uia.DefaultBaseAuth -import org.matrix.android.sdk.api.util.fromBase64 import org.matrix.android.sdk.api.session.uia.exceptions.UiaCancelledException +import org.matrix.android.sdk.api.util.fromBase64 import timber.log.Timber import kotlin.coroutines.Continuation import kotlin.coroutines.resume @@ -45,7 +45,7 @@ data class DeactivateAccountViewState( class DeactivateAccountViewModel @AssistedInject constructor(@Assisted private val initialState: DeactivateAccountViewState, private val session: Session) : - VectorViewModel(initialState) { + VectorViewModel(initialState) { @AssistedFactory interface Factory : MavericksAssistedViewModelFactory { @@ -58,7 +58,7 @@ class DeactivateAccountViewModel @AssistedInject constructor(@Assisted private v override fun handle(action: DeactivateAccountAction) { when (action) { is DeactivateAccountAction.DeactivateAccount -> handleDeactivateAccount(action) - DeactivateAccountAction.SsoAuthDone -> { + DeactivateAccountAction.SsoAuthDone -> { Timber.d("## UIA - FallBack success") _viewEvents.post(DeactivateAccountViewEvents.Loading()) if (pendingAuth != null) { @@ -67,7 +67,7 @@ class DeactivateAccountViewModel @AssistedInject constructor(@Assisted private v uiaContinuation?.resumeWithException(IllegalArgumentException()) } } - is DeactivateAccountAction.PasswordAuthDone -> { + is DeactivateAccountAction.PasswordAuthDone -> { _viewEvents.post(DeactivateAccountViewEvents.Loading()) val decryptedPass = session.loadSecureSecret(action.password.fromBase64().inputStream(), ReAuthActivity.DEFAULT_RESULT_KEYSTORE_ALIAS) uiaContinuation?.resume( From 98dc4a57fc5a4adb9409019d4a41f0c792374766 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Tue, 19 Apr 2022 11:26:20 +0100 Subject: [PATCH 096/561] using unix end of line character instead of windows as *nix OSes are more common dev environments --- .editorconfig | 1802 ++++++++++++++++++++++++------------------------- 1 file changed, 901 insertions(+), 901 deletions(-) diff --git a/.editorconfig b/.editorconfig index 60d4fd6cae..140cc085c5 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,901 +1,901 @@ -[*] -charset = utf-8 -end_of_line = crlf -indent_size = 4 -indent_style = space -insert_final_newline = true -max_line_length = 160 -tab_width = 4 -ij_continuation_indent_size = 8 -ij_formatter_off_tag = @formatter:off -ij_formatter_on_tag = @formatter:on -ij_formatter_tags_enabled = false -ij_smart_tabs = false -ij_visual_guides = none -ij_wrap_on_typing = false - -[*.java] -ij_java_align_consecutive_assignments = false -ij_java_align_consecutive_variable_declarations = false -ij_java_align_group_field_declarations = false -ij_java_align_multiline_annotation_parameters = false -ij_java_align_multiline_array_initializer_expression = false -ij_java_align_multiline_assignment = false -ij_java_align_multiline_binary_operation = false -ij_java_align_multiline_chained_methods = false -ij_java_align_multiline_extends_list = false -ij_java_align_multiline_for = true -ij_java_align_multiline_method_parentheses = false -ij_java_align_multiline_parameters = true -ij_java_align_multiline_parameters_in_calls = false -ij_java_align_multiline_parenthesized_expression = false -ij_java_align_multiline_records = true -ij_java_align_multiline_resources = true -ij_java_align_multiline_ternary_operation = false -ij_java_align_multiline_text_blocks = false -ij_java_align_multiline_throws_list = false -ij_java_align_subsequent_simple_methods = false -ij_java_align_throws_keyword = false -ij_java_annotation_parameter_wrap = off -ij_java_array_initializer_new_line_after_left_brace = false -ij_java_array_initializer_right_brace_on_new_line = false -ij_java_array_initializer_wrap = off -ij_java_assert_statement_colon_on_next_line = false -ij_java_assert_statement_wrap = off -ij_java_assignment_wrap = off -ij_java_binary_operation_sign_on_next_line = false -ij_java_binary_operation_wrap = off -ij_java_blank_lines_after_anonymous_class_header = 0 -ij_java_blank_lines_after_class_header = 0 -ij_java_blank_lines_after_imports = 1 -ij_java_blank_lines_after_package = 1 -ij_java_blank_lines_around_class = 1 -ij_java_blank_lines_around_field = 0 -ij_java_blank_lines_around_field_in_interface = 0 -ij_java_blank_lines_around_initializer = 1 -ij_java_blank_lines_around_method = 1 -ij_java_blank_lines_around_method_in_interface = 1 -ij_java_blank_lines_before_class_end = 0 -ij_java_blank_lines_before_imports = 1 -ij_java_blank_lines_before_method_body = 0 -ij_java_blank_lines_before_package = 0 -ij_java_block_brace_style = end_of_line -ij_java_block_comment_at_first_column = true -ij_java_builder_methods = none -ij_java_call_parameters_new_line_after_left_paren = false -ij_java_call_parameters_right_paren_on_new_line = false -ij_java_call_parameters_wrap = off -ij_java_case_statement_on_separate_line = true -ij_java_catch_on_new_line = false -ij_java_class_annotation_wrap = split_into_lines -ij_java_class_brace_style = end_of_line -ij_java_class_count_to_use_import_on_demand = 99 -ij_java_class_names_in_javadoc = 1 -ij_java_do_not_indent_top_level_class_members = false -ij_java_do_not_wrap_after_single_annotation = false -ij_java_do_while_brace_force = never -ij_java_doc_add_blank_line_after_description = true -ij_java_doc_add_blank_line_after_param_comments = false -ij_java_doc_add_blank_line_after_return = false -ij_java_doc_add_p_tag_on_empty_lines = true -ij_java_doc_align_exception_comments = true -ij_java_doc_align_param_comments = true -ij_java_doc_do_not_wrap_if_one_line = false -ij_java_doc_enable_formatting = true -ij_java_doc_enable_leading_asterisks = true -ij_java_doc_indent_on_continuation = false -ij_java_doc_keep_empty_lines = true -ij_java_doc_keep_empty_parameter_tag = true -ij_java_doc_keep_empty_return_tag = true -ij_java_doc_keep_empty_throws_tag = true -ij_java_doc_keep_invalid_tags = true -ij_java_doc_param_description_on_new_line = false -ij_java_doc_preserve_line_breaks = false -ij_java_doc_use_throws_not_exception_tag = true -ij_java_else_on_new_line = false -ij_java_enum_constants_wrap = off -ij_java_extends_keyword_wrap = off -ij_java_extends_list_wrap = off -ij_java_field_annotation_wrap = split_into_lines -ij_java_finally_on_new_line = false -ij_java_for_brace_force = never -ij_java_for_statement_new_line_after_left_paren = false -ij_java_for_statement_right_paren_on_new_line = false -ij_java_for_statement_wrap = off -ij_java_generate_final_locals = false -ij_java_generate_final_parameters = false -ij_java_if_brace_force = never -ij_java_imports_layout = $android.**,$androidx.**,$com.**,$junit.**,$net.**,$org.**,$java.**,$javax.**,$*,|,android.**,|,androidx.**,|,com.**,|,junit.**,|,net.**,|,org.**,|,java.**,|,javax.**,|,*,| -ij_java_indent_case_from_switch = true -ij_java_insert_inner_class_imports = false -ij_java_insert_override_annotation = true -ij_java_keep_blank_lines_before_right_brace = 2 -ij_java_keep_blank_lines_between_package_declaration_and_header = 2 -ij_java_keep_blank_lines_in_code = 2 -ij_java_keep_blank_lines_in_declarations = 2 -ij_java_keep_builder_methods_indents = false -ij_java_keep_control_statement_in_one_line = true -ij_java_keep_first_column_comment = true -ij_java_keep_indents_on_empty_lines = false -ij_java_keep_line_breaks = true -ij_java_keep_multiple_expressions_in_one_line = false -ij_java_keep_simple_blocks_in_one_line = false -ij_java_keep_simple_classes_in_one_line = false -ij_java_keep_simple_lambdas_in_one_line = false -ij_java_keep_simple_methods_in_one_line = false -ij_java_label_indent_absolute = false -ij_java_label_indent_size = 0 -ij_java_lambda_brace_style = end_of_line -ij_java_layout_static_imports_separately = true -ij_java_line_comment_add_space = false -ij_java_line_comment_at_first_column = true -ij_java_method_annotation_wrap = split_into_lines -ij_java_method_brace_style = end_of_line -ij_java_method_call_chain_wrap = off -ij_java_method_parameters_new_line_after_left_paren = false -ij_java_method_parameters_right_paren_on_new_line = false -ij_java_method_parameters_wrap = off -ij_java_modifier_list_wrap = false -ij_java_names_count_to_use_import_on_demand = 99 -ij_java_new_line_after_lparen_in_record_header = false -ij_java_parameter_annotation_wrap = off -ij_java_parentheses_expression_new_line_after_left_paren = false -ij_java_parentheses_expression_right_paren_on_new_line = false -ij_java_place_assignment_sign_on_next_line = false -ij_java_prefer_longer_names = true -ij_java_prefer_parameters_wrap = false -ij_java_record_components_wrap = normal -ij_java_repeat_synchronized = true -ij_java_replace_instanceof_and_cast = false -ij_java_replace_null_check = true -ij_java_replace_sum_lambda_with_method_ref = true -ij_java_resource_list_new_line_after_left_paren = false -ij_java_resource_list_right_paren_on_new_line = false -ij_java_resource_list_wrap = off -ij_java_rparen_on_new_line_in_record_header = false -ij_java_space_after_closing_angle_bracket_in_type_argument = false -ij_java_space_after_colon = true -ij_java_space_after_comma = true -ij_java_space_after_comma_in_type_arguments = true -ij_java_space_after_for_semicolon = true -ij_java_space_after_quest = true -ij_java_space_after_type_cast = true -ij_java_space_before_annotation_array_initializer_left_brace = false -ij_java_space_before_annotation_parameter_list = false -ij_java_space_before_array_initializer_left_brace = false -ij_java_space_before_catch_keyword = true -ij_java_space_before_catch_left_brace = true -ij_java_space_before_catch_parentheses = true -ij_java_space_before_class_left_brace = true -ij_java_space_before_colon = true -ij_java_space_before_colon_in_foreach = true -ij_java_space_before_comma = false -ij_java_space_before_do_left_brace = true -ij_java_space_before_else_keyword = true -ij_java_space_before_else_left_brace = true -ij_java_space_before_finally_keyword = true -ij_java_space_before_finally_left_brace = true -ij_java_space_before_for_left_brace = true -ij_java_space_before_for_parentheses = true -ij_java_space_before_for_semicolon = false -ij_java_space_before_if_left_brace = true -ij_java_space_before_if_parentheses = true -ij_java_space_before_method_call_parentheses = false -ij_java_space_before_method_left_brace = true -ij_java_space_before_method_parentheses = false -ij_java_space_before_opening_angle_bracket_in_type_parameter = false -ij_java_space_before_quest = true -ij_java_space_before_switch_left_brace = true -ij_java_space_before_switch_parentheses = true -ij_java_space_before_synchronized_left_brace = true -ij_java_space_before_synchronized_parentheses = true -ij_java_space_before_try_left_brace = true -ij_java_space_before_try_parentheses = true -ij_java_space_before_type_parameter_list = false -ij_java_space_before_while_keyword = true -ij_java_space_before_while_left_brace = true -ij_java_space_before_while_parentheses = true -ij_java_space_inside_one_line_enum_braces = false -ij_java_space_within_empty_array_initializer_braces = false -ij_java_space_within_empty_method_call_parentheses = false -ij_java_space_within_empty_method_parentheses = false -ij_java_spaces_around_additive_operators = true -ij_java_spaces_around_assignment_operators = true -ij_java_spaces_around_bitwise_operators = true -ij_java_spaces_around_equality_operators = true -ij_java_spaces_around_lambda_arrow = true -ij_java_spaces_around_logical_operators = true -ij_java_spaces_around_method_ref_dbl_colon = false -ij_java_spaces_around_multiplicative_operators = true -ij_java_spaces_around_relational_operators = true -ij_java_spaces_around_shift_operators = true -ij_java_spaces_around_type_bounds_in_type_parameters = true -ij_java_spaces_around_unary_operator = false -ij_java_spaces_within_angle_brackets = false -ij_java_spaces_within_annotation_parentheses = false -ij_java_spaces_within_array_initializer_braces = false -ij_java_spaces_within_braces = false -ij_java_spaces_within_brackets = false -ij_java_spaces_within_cast_parentheses = false -ij_java_spaces_within_catch_parentheses = false -ij_java_spaces_within_for_parentheses = false -ij_java_spaces_within_if_parentheses = false -ij_java_spaces_within_method_call_parentheses = false -ij_java_spaces_within_method_parentheses = false -ij_java_spaces_within_parentheses = false -ij_java_spaces_within_record_header = false -ij_java_spaces_within_switch_parentheses = false -ij_java_spaces_within_synchronized_parentheses = false -ij_java_spaces_within_try_parentheses = false -ij_java_spaces_within_while_parentheses = false -ij_java_special_else_if_treatment = true -ij_java_subclass_name_suffix = Impl -ij_java_ternary_operation_signs_on_next_line = false -ij_java_ternary_operation_wrap = off -ij_java_test_name_suffix = Test -ij_java_throws_keyword_wrap = off -ij_java_throws_list_wrap = off -ij_java_use_external_annotations = false -ij_java_use_fq_class_names = false -ij_java_use_relative_indents = false -ij_java_use_single_class_imports = true -ij_java_variable_annotation_wrap = off -ij_java_visibility = public -ij_java_while_brace_force = never -ij_java_while_on_new_line = false -ij_java_wrap_comments = false -ij_java_wrap_first_method_in_call_chain = false -ij_java_wrap_long_lines = false - -[*.properties] -ij_properties_align_group_field_declarations = false -ij_properties_keep_blank_lines = false -ij_properties_key_value_delimiter = equals -ij_properties_spaces_around_key_value_delimiter = false - -[.editorconfig] -ij_editorconfig_align_group_field_declarations = false -ij_editorconfig_space_after_colon = false -ij_editorconfig_space_after_comma = true -ij_editorconfig_space_before_colon = false -ij_editorconfig_space_before_comma = false -ij_editorconfig_spaces_around_assignment_operators = true - -[{*.ant,*.fxml,*.jhm,*.jnlp,*.jrxml,*.rng,*.tld,*.wsdl,*.xml,*.xsd,*.xsl,*.xslt,*.xul}] -ij_continuation_indent_size = 4 -ij_xml_align_attributes = false -ij_xml_align_text = false -ij_xml_attribute_wrap = normal -ij_xml_block_comment_at_first_column = true -ij_xml_keep_blank_lines = 2 -ij_xml_keep_indents_on_empty_lines = false -ij_xml_keep_line_breaks = false -ij_xml_keep_line_breaks_in_text = true -ij_xml_keep_whitespaces = false -ij_xml_keep_whitespaces_around_cdata = preserve -ij_xml_keep_whitespaces_inside_cdata = false -ij_xml_line_comment_at_first_column = true -ij_xml_space_after_tag_name = false -ij_xml_space_around_equals_in_attribute = false -ij_xml_space_inside_empty_tag = true -ij_xml_text_wrap = normal -ij_xml_use_custom_settings = true - -[{*.bash,*.sh,*.zsh}] -indent_size = 2 -tab_width = 2 -ij_shell_binary_ops_start_line = false -ij_shell_keep_column_alignment_padding = false -ij_shell_minify_program = false -ij_shell_redirect_followed_by_space = false -ij_shell_switch_cases_indented = false -ij_shell_use_unix_line_separator = true - -[{*.c,*.c++,*.cc,*.cp,*.cpp,*.cu,*.cuh,*.cxx,*.h,*.h++,*.hh,*.hp,*.hpp,*.hxx,*.i,*.icc,*.ii,*.inl,*.ino,*.ipp,*.m,*.mm,*.pch,*.tcc,*.tpp}] -ij_c_add_brief_tag = false -ij_c_add_getter_prefix = true -ij_c_add_setter_prefix = true -ij_c_align_dictionary_pair_values = false -ij_c_align_group_field_declarations = false -ij_c_align_init_list_in_columns = true -ij_c_align_multiline_array_initializer_expression = true -ij_c_align_multiline_assignment = true -ij_c_align_multiline_binary_operation = true -ij_c_align_multiline_chained_methods = false -ij_c_align_multiline_for = true -ij_c_align_multiline_ternary_operation = true -ij_c_array_initializer_comma_on_next_line = false -ij_c_array_initializer_new_line_after_left_brace = false -ij_c_array_initializer_right_brace_on_new_line = false -ij_c_array_initializer_wrap = normal -ij_c_assignment_wrap = off -ij_c_binary_operation_sign_on_next_line = false -ij_c_binary_operation_wrap = normal -ij_c_blank_lines_after_class_header = 0 -ij_c_blank_lines_after_imports = 1 -ij_c_blank_lines_around_class = 1 -ij_c_blank_lines_around_field = 0 -ij_c_blank_lines_around_field_in_interface = 0 -ij_c_blank_lines_around_method = 1 -ij_c_blank_lines_around_method_in_interface = 1 -ij_c_blank_lines_around_namespace = 0 -ij_c_blank_lines_around_properties_in_declaration = 0 -ij_c_blank_lines_around_properties_in_interface = 0 -ij_c_blank_lines_before_imports = 1 -ij_c_blank_lines_before_method_body = 0 -ij_c_block_brace_placement = end_of_line -ij_c_block_brace_style = end_of_line -ij_c_block_comment_at_first_column = true -ij_c_catch_on_new_line = false -ij_c_class_brace_style = end_of_line -ij_c_class_constructor_init_list_align_multiline = true -ij_c_class_constructor_init_list_comma_on_next_line = false -ij_c_class_constructor_init_list_new_line_after_colon = never -ij_c_class_constructor_init_list_new_line_before_colon = if_long -ij_c_class_constructor_init_list_wrap = normal -ij_c_copy_is_deep = false -ij_c_create_interface_for_categories = true -ij_c_declare_generated_methods = true -ij_c_description_include_member_names = true -ij_c_discharged_short_ternary_operator = false -ij_c_do_not_add_breaks = false -ij_c_do_while_brace_force = never -ij_c_else_on_new_line = false -ij_c_enum_constants_comma_on_next_line = false -ij_c_enum_constants_wrap = on_every_item -ij_c_for_brace_force = never -ij_c_for_statement_new_line_after_left_paren = false -ij_c_for_statement_right_paren_on_new_line = false -ij_c_for_statement_wrap = off -ij_c_function_brace_placement = end_of_line -ij_c_function_call_arguments_align_multiline = true -ij_c_function_call_arguments_align_multiline_pars = false -ij_c_function_call_arguments_comma_on_next_line = false -ij_c_function_call_arguments_new_line_after_lpar = false -ij_c_function_call_arguments_new_line_before_rpar = false -ij_c_function_call_arguments_wrap = normal -ij_c_function_non_top_after_return_type_wrap = normal -ij_c_function_parameters_align_multiline = true -ij_c_function_parameters_align_multiline_pars = false -ij_c_function_parameters_comma_on_next_line = false -ij_c_function_parameters_new_line_after_lpar = false -ij_c_function_parameters_new_line_before_rpar = false -ij_c_function_parameters_wrap = normal -ij_c_function_top_after_return_type_wrap = normal -ij_c_generate_additional_eq_operators = true -ij_c_generate_additional_rel_operators = true -ij_c_generate_class_constructor = true -ij_c_generate_comparison_operators_use_std_tie = false -ij_c_generate_instance_variables_for_properties = ask -ij_c_generate_operators_as_members = true -ij_c_header_guard_style_pattern = ${PROJECT_NAME}_${FILE_NAME}_${EXT} -ij_c_if_brace_force = never -ij_c_in_line_short_ternary_operator = true -ij_c_indent_block_comment = true -ij_c_indent_c_struct_members = 4 -ij_c_indent_case_from_switch = true -ij_c_indent_class_members = 4 -ij_c_indent_directive_as_code = false -ij_c_indent_implementation_members = 0 -ij_c_indent_inside_code_block = 4 -ij_c_indent_interface_members = 0 -ij_c_indent_interface_members_except_ivars_block = false -ij_c_indent_namespace_members = 4 -ij_c_indent_preprocessor_directive = 0 -ij_c_indent_visibility_keywords = 0 -ij_c_insert_override = true -ij_c_insert_virtual_with_override = false -ij_c_introduce_auto_vars = false -ij_c_introduce_const_params = false -ij_c_introduce_const_vars = false -ij_c_introduce_generate_property = false -ij_c_introduce_generate_synthesize = true -ij_c_introduce_globals_to_header = true -ij_c_introduce_prop_to_private_category = false -ij_c_introduce_static_consts = true -ij_c_introduce_use_ns_types = false -ij_c_ivars_prefix = _ -ij_c_keep_blank_lines_before_end = 2 -ij_c_keep_blank_lines_before_right_brace = 2 -ij_c_keep_blank_lines_in_code = 2 -ij_c_keep_blank_lines_in_declarations = 2 -ij_c_keep_case_expressions_in_one_line = false -ij_c_keep_control_statement_in_one_line = true -ij_c_keep_directive_at_first_column = true -ij_c_keep_first_column_comment = true -ij_c_keep_line_breaks = true -ij_c_keep_nested_namespaces_in_one_line = false -ij_c_keep_simple_blocks_in_one_line = true -ij_c_keep_simple_methods_in_one_line = true -ij_c_keep_structures_in_one_line = false -ij_c_lambda_capture_list_align_multiline = false -ij_c_lambda_capture_list_align_multiline_bracket = false -ij_c_lambda_capture_list_comma_on_next_line = false -ij_c_lambda_capture_list_new_line_after_lbracket = false -ij_c_lambda_capture_list_new_line_before_rbracket = false -ij_c_lambda_capture_list_wrap = off -ij_c_line_comment_add_space = false -ij_c_line_comment_at_first_column = true -ij_c_method_brace_placement = end_of_line -ij_c_method_call_arguments_align_by_colons = true -ij_c_method_call_arguments_align_multiline = false -ij_c_method_call_arguments_special_dictionary_pairs_treatment = true -ij_c_method_call_arguments_wrap = off -ij_c_method_call_chain_wrap = off -ij_c_method_parameters_align_by_colons = true -ij_c_method_parameters_align_multiline = false -ij_c_method_parameters_wrap = off -ij_c_namespace_brace_placement = end_of_line -ij_c_parentheses_expression_new_line_after_left_paren = false -ij_c_parentheses_expression_right_paren_on_new_line = false -ij_c_place_assignment_sign_on_next_line = false -ij_c_property_nonatomic = true -ij_c_put_ivars_to_implementation = true -ij_c_refactor_compatibility_aliases_and_classes = true -ij_c_refactor_properties_and_ivars = true -ij_c_release_style = ivar -ij_c_retain_object_parameters_in_constructor = true -ij_c_semicolon_after_method_signature = false -ij_c_shift_operation_align_multiline = true -ij_c_shift_operation_wrap = normal -ij_c_show_non_virtual_functions = false -ij_c_space_after_colon = true -ij_c_space_after_colon_in_selector = false -ij_c_space_after_comma = true -ij_c_space_after_cup_in_blocks = false -ij_c_space_after_dictionary_literal_colon = true -ij_c_space_after_for_semicolon = true -ij_c_space_after_init_list_colon = true -ij_c_space_after_method_parameter_type_parentheses = false -ij_c_space_after_method_return_type_parentheses = false -ij_c_space_after_pointer_in_declaration = false -ij_c_space_after_quest = true -ij_c_space_after_reference_in_declaration = false -ij_c_space_after_reference_in_rvalue = false -ij_c_space_after_structures_rbrace = true -ij_c_space_after_superclass_colon = true -ij_c_space_after_type_cast = true -ij_c_space_after_visibility_sign_in_method_declaration = true -ij_c_space_before_autorelease_pool_lbrace = true -ij_c_space_before_catch_keyword = true -ij_c_space_before_catch_left_brace = true -ij_c_space_before_catch_parentheses = true -ij_c_space_before_category_parentheses = true -ij_c_space_before_chained_send_message = true -ij_c_space_before_class_left_brace = true -ij_c_space_before_colon = true -ij_c_space_before_comma = false -ij_c_space_before_dictionary_literal_colon = false -ij_c_space_before_do_left_brace = true -ij_c_space_before_else_keyword = true -ij_c_space_before_else_left_brace = true -ij_c_space_before_for_left_brace = true -ij_c_space_before_for_parentheses = true -ij_c_space_before_for_semicolon = false -ij_c_space_before_if_left_brace = true -ij_c_space_before_if_parentheses = true -ij_c_space_before_init_list = false -ij_c_space_before_init_list_colon = true -ij_c_space_before_method_call_parentheses = false -ij_c_space_before_method_left_brace = true -ij_c_space_before_method_parentheses = false -ij_c_space_before_namespace_lbrace = true -ij_c_space_before_pointer_in_declaration = true -ij_c_space_before_property_attributes_parentheses = false -ij_c_space_before_protocols_brackets = true -ij_c_space_before_quest = true -ij_c_space_before_reference_in_declaration = true -ij_c_space_before_superclass_colon = true -ij_c_space_before_switch_left_brace = true -ij_c_space_before_switch_parentheses = true -ij_c_space_before_template_call_lt = false -ij_c_space_before_template_declaration_lt = false -ij_c_space_before_try_left_brace = true -ij_c_space_before_while_keyword = true -ij_c_space_before_while_left_brace = true -ij_c_space_before_while_parentheses = true -ij_c_space_between_adjacent_brackets = false -ij_c_space_between_operator_and_punctuator = false -ij_c_space_within_empty_array_initializer_braces = false -ij_c_spaces_around_additive_operators = true -ij_c_spaces_around_assignment_operators = true -ij_c_spaces_around_bitwise_operators = true -ij_c_spaces_around_equality_operators = true -ij_c_spaces_around_lambda_arrow = true -ij_c_spaces_around_logical_operators = true -ij_c_spaces_around_multiplicative_operators = true -ij_c_spaces_around_pm_operators = false -ij_c_spaces_around_relational_operators = true -ij_c_spaces_around_shift_operators = true -ij_c_spaces_around_unary_operator = false -ij_c_spaces_within_array_initializer_braces = false -ij_c_spaces_within_braces = true -ij_c_spaces_within_brackets = false -ij_c_spaces_within_cast_parentheses = false -ij_c_spaces_within_catch_parentheses = false -ij_c_spaces_within_category_parentheses = false -ij_c_spaces_within_empty_braces = false -ij_c_spaces_within_empty_function_call_parentheses = false -ij_c_spaces_within_empty_function_declaration_parentheses = false -ij_c_spaces_within_empty_lambda_capture_list_bracket = false -ij_c_spaces_within_empty_template_call_ltgt = false -ij_c_spaces_within_empty_template_declaration_ltgt = false -ij_c_spaces_within_for_parentheses = false -ij_c_spaces_within_function_call_parentheses = false -ij_c_spaces_within_function_declaration_parentheses = false -ij_c_spaces_within_if_parentheses = false -ij_c_spaces_within_lambda_capture_list_bracket = false -ij_c_spaces_within_method_parameter_type_parentheses = false -ij_c_spaces_within_method_return_type_parentheses = false -ij_c_spaces_within_parentheses = false -ij_c_spaces_within_property_attributes_parentheses = false -ij_c_spaces_within_protocols_brackets = false -ij_c_spaces_within_send_message_brackets = false -ij_c_spaces_within_switch_parentheses = false -ij_c_spaces_within_template_call_ltgt = false -ij_c_spaces_within_template_declaration_ltgt = false -ij_c_spaces_within_template_double_gt = true -ij_c_spaces_within_while_parentheses = false -ij_c_special_else_if_treatment = true -ij_c_superclass_list_after_colon = never -ij_c_superclass_list_align_multiline = true -ij_c_superclass_list_before_colon = if_long -ij_c_superclass_list_comma_on_next_line = false -ij_c_superclass_list_wrap = on_every_item -ij_c_tag_prefix_of_block_comment = at -ij_c_tag_prefix_of_line_comment = back_slash -ij_c_template_call_arguments_align_multiline = false -ij_c_template_call_arguments_align_multiline_pars = false -ij_c_template_call_arguments_comma_on_next_line = false -ij_c_template_call_arguments_new_line_after_lt = false -ij_c_template_call_arguments_new_line_before_gt = false -ij_c_template_call_arguments_wrap = off -ij_c_template_declaration_function_body_indent = false -ij_c_template_declaration_function_wrap = split_into_lines -ij_c_template_declaration_struct_body_indent = false -ij_c_template_declaration_struct_wrap = split_into_lines -ij_c_template_parameters_align_multiline = false -ij_c_template_parameters_align_multiline_pars = false -ij_c_template_parameters_comma_on_next_line = false -ij_c_template_parameters_new_line_after_lt = false -ij_c_template_parameters_new_line_before_gt = false -ij_c_template_parameters_wrap = off -ij_c_ternary_operation_signs_on_next_line = true -ij_c_ternary_operation_wrap = normal -ij_c_type_qualifiers_placement = before -ij_c_use_modern_casts = true -ij_c_use_setters_in_constructor = true -ij_c_while_brace_force = never -ij_c_while_on_new_line = false -ij_c_wrap_property_declaration = off - -[{*.cmake,CMakeLists.txt}] -ij_cmake_align_multiline_parameters_in_calls = false -ij_cmake_force_commands_case = 2 -ij_cmake_keep_blank_lines_in_code = 2 -ij_cmake_space_before_for_parentheses = true -ij_cmake_space_before_if_parentheses = true -ij_cmake_space_before_method_call_parentheses = false -ij_cmake_space_before_method_parentheses = false -ij_cmake_space_before_while_parentheses = true -ij_cmake_spaces_within_for_parentheses = false -ij_cmake_spaces_within_if_parentheses = false -ij_cmake_spaces_within_method_call_parentheses = false -ij_cmake_spaces_within_method_parentheses = false -ij_cmake_spaces_within_while_parentheses = false - -[{*.gant,*.gradle,*.groovy,*.gy}] -ij_groovy_align_group_field_declarations = false -ij_groovy_align_multiline_array_initializer_expression = false -ij_groovy_align_multiline_assignment = false -ij_groovy_align_multiline_binary_operation = false -ij_groovy_align_multiline_chained_methods = false -ij_groovy_align_multiline_extends_list = false -ij_groovy_align_multiline_for = true -ij_groovy_align_multiline_list_or_map = true -ij_groovy_align_multiline_method_parentheses = false -ij_groovy_align_multiline_parameters = true -ij_groovy_align_multiline_parameters_in_calls = false -ij_groovy_align_multiline_resources = true -ij_groovy_align_multiline_ternary_operation = false -ij_groovy_align_multiline_throws_list = false -ij_groovy_align_named_args_in_map = true -ij_groovy_align_throws_keyword = false -ij_groovy_array_initializer_new_line_after_left_brace = false -ij_groovy_array_initializer_right_brace_on_new_line = false -ij_groovy_array_initializer_wrap = off -ij_groovy_assert_statement_wrap = off -ij_groovy_assignment_wrap = off -ij_groovy_binary_operation_wrap = off -ij_groovy_blank_lines_after_class_header = 0 -ij_groovy_blank_lines_after_imports = 1 -ij_groovy_blank_lines_after_package = 1 -ij_groovy_blank_lines_around_class = 1 -ij_groovy_blank_lines_around_field = 0 -ij_groovy_blank_lines_around_field_in_interface = 0 -ij_groovy_blank_lines_around_method = 1 -ij_groovy_blank_lines_around_method_in_interface = 1 -ij_groovy_blank_lines_before_imports = 1 -ij_groovy_blank_lines_before_method_body = 0 -ij_groovy_blank_lines_before_package = 0 -ij_groovy_block_brace_style = end_of_line -ij_groovy_block_comment_at_first_column = true -ij_groovy_call_parameters_new_line_after_left_paren = false -ij_groovy_call_parameters_right_paren_on_new_line = false -ij_groovy_call_parameters_wrap = off -ij_groovy_catch_on_new_line = false -ij_groovy_class_annotation_wrap = split_into_lines -ij_groovy_class_brace_style = end_of_line -ij_groovy_class_count_to_use_import_on_demand = 5 -ij_groovy_do_while_brace_force = never -ij_groovy_else_on_new_line = false -ij_groovy_enum_constants_wrap = off -ij_groovy_extends_keyword_wrap = off -ij_groovy_extends_list_wrap = off -ij_groovy_field_annotation_wrap = split_into_lines -ij_groovy_finally_on_new_line = false -ij_groovy_for_brace_force = never -ij_groovy_for_statement_new_line_after_left_paren = false -ij_groovy_for_statement_right_paren_on_new_line = false -ij_groovy_for_statement_wrap = off -ij_groovy_if_brace_force = never -ij_groovy_import_annotation_wrap = 2 -ij_groovy_imports_layout = *,|,javax.**,java.**,|,$* -ij_groovy_indent_case_from_switch = true -ij_groovy_indent_label_blocks = true -ij_groovy_insert_inner_class_imports = false -ij_groovy_keep_blank_lines_before_right_brace = 2 -ij_groovy_keep_blank_lines_in_code = 2 -ij_groovy_keep_blank_lines_in_declarations = 2 -ij_groovy_keep_control_statement_in_one_line = true -ij_groovy_keep_first_column_comment = true -ij_groovy_keep_indents_on_empty_lines = false -ij_groovy_keep_line_breaks = true -ij_groovy_keep_multiple_expressions_in_one_line = false -ij_groovy_keep_simple_blocks_in_one_line = false -ij_groovy_keep_simple_classes_in_one_line = true -ij_groovy_keep_simple_lambdas_in_one_line = true -ij_groovy_keep_simple_methods_in_one_line = true -ij_groovy_label_indent_absolute = false -ij_groovy_label_indent_size = 0 -ij_groovy_lambda_brace_style = end_of_line -ij_groovy_layout_static_imports_separately = true -ij_groovy_line_comment_add_space = false -ij_groovy_line_comment_at_first_column = true -ij_groovy_method_annotation_wrap = split_into_lines -ij_groovy_method_brace_style = end_of_line -ij_groovy_method_call_chain_wrap = off -ij_groovy_method_parameters_new_line_after_left_paren = false -ij_groovy_method_parameters_right_paren_on_new_line = false -ij_groovy_method_parameters_wrap = off -ij_groovy_modifier_list_wrap = false -ij_groovy_names_count_to_use_import_on_demand = 3 -ij_groovy_parameter_annotation_wrap = off -ij_groovy_parentheses_expression_new_line_after_left_paren = false -ij_groovy_parentheses_expression_right_paren_on_new_line = false -ij_groovy_prefer_parameters_wrap = false -ij_groovy_resource_list_new_line_after_left_paren = false -ij_groovy_resource_list_right_paren_on_new_line = false -ij_groovy_resource_list_wrap = off -ij_groovy_space_after_assert_separator = true -ij_groovy_space_after_colon = true -ij_groovy_space_after_comma = true -ij_groovy_space_after_comma_in_type_arguments = true -ij_groovy_space_after_for_semicolon = true -ij_groovy_space_after_quest = true -ij_groovy_space_after_type_cast = true -ij_groovy_space_before_annotation_parameter_list = false -ij_groovy_space_before_array_initializer_left_brace = false -ij_groovy_space_before_assert_separator = false -ij_groovy_space_before_catch_keyword = true -ij_groovy_space_before_catch_left_brace = true -ij_groovy_space_before_catch_parentheses = true -ij_groovy_space_before_class_left_brace = true -ij_groovy_space_before_closure_left_brace = true -ij_groovy_space_before_colon = true -ij_groovy_space_before_comma = false -ij_groovy_space_before_do_left_brace = true -ij_groovy_space_before_else_keyword = true -ij_groovy_space_before_else_left_brace = true -ij_groovy_space_before_finally_keyword = true -ij_groovy_space_before_finally_left_brace = true -ij_groovy_space_before_for_left_brace = true -ij_groovy_space_before_for_parentheses = true -ij_groovy_space_before_for_semicolon = false -ij_groovy_space_before_if_left_brace = true -ij_groovy_space_before_if_parentheses = true -ij_groovy_space_before_method_call_parentheses = false -ij_groovy_space_before_method_left_brace = true -ij_groovy_space_before_method_parentheses = false -ij_groovy_space_before_quest = true -ij_groovy_space_before_switch_left_brace = true -ij_groovy_space_before_switch_parentheses = true -ij_groovy_space_before_synchronized_left_brace = true -ij_groovy_space_before_synchronized_parentheses = true -ij_groovy_space_before_try_left_brace = true -ij_groovy_space_before_try_parentheses = true -ij_groovy_space_before_while_keyword = true -ij_groovy_space_before_while_left_brace = true -ij_groovy_space_before_while_parentheses = true -ij_groovy_space_in_named_argument = true -ij_groovy_space_in_named_argument_before_colon = false -ij_groovy_space_within_empty_array_initializer_braces = false -ij_groovy_space_within_empty_method_call_parentheses = false -ij_groovy_spaces_around_additive_operators = true -ij_groovy_spaces_around_assignment_operators = true -ij_groovy_spaces_around_bitwise_operators = true -ij_groovy_spaces_around_equality_operators = true -ij_groovy_spaces_around_lambda_arrow = true -ij_groovy_spaces_around_logical_operators = true -ij_groovy_spaces_around_multiplicative_operators = true -ij_groovy_spaces_around_regex_operators = true -ij_groovy_spaces_around_relational_operators = true -ij_groovy_spaces_around_shift_operators = true -ij_groovy_spaces_within_annotation_parentheses = false -ij_groovy_spaces_within_array_initializer_braces = false -ij_groovy_spaces_within_braces = true -ij_groovy_spaces_within_brackets = false -ij_groovy_spaces_within_cast_parentheses = false -ij_groovy_spaces_within_catch_parentheses = false -ij_groovy_spaces_within_for_parentheses = false -ij_groovy_spaces_within_gstring_injection_braces = false -ij_groovy_spaces_within_if_parentheses = false -ij_groovy_spaces_within_list_or_map = false -ij_groovy_spaces_within_method_call_parentheses = false -ij_groovy_spaces_within_method_parentheses = false -ij_groovy_spaces_within_parentheses = false -ij_groovy_spaces_within_switch_parentheses = false -ij_groovy_spaces_within_synchronized_parentheses = false -ij_groovy_spaces_within_try_parentheses = false -ij_groovy_spaces_within_tuple_expression = false -ij_groovy_spaces_within_while_parentheses = false -ij_groovy_special_else_if_treatment = true -ij_groovy_ternary_operation_wrap = off -ij_groovy_throws_keyword_wrap = off -ij_groovy_throws_list_wrap = off -ij_groovy_use_flying_geese_braces = false -ij_groovy_use_fq_class_names = false -ij_groovy_use_fq_class_names_in_javadoc = true -ij_groovy_use_relative_indents = false -ij_groovy_use_single_class_imports = true -ij_groovy_variable_annotation_wrap = off -ij_groovy_while_brace_force = never -ij_groovy_while_on_new_line = false -ij_groovy_wrap_long_lines = false - -[{*.gradle.kts,*.kt,*.kts,*.main.kts}] -ij_kotlin_align_in_columns_case_branch = true -ij_kotlin_align_multiline_binary_operation = false -ij_kotlin_align_multiline_extends_list = false -ij_kotlin_align_multiline_method_parentheses = false -ij_kotlin_align_multiline_parameters = true -ij_kotlin_align_multiline_parameters_in_calls = false -ij_kotlin_allow_trailing_comma = false -ij_kotlin_allow_trailing_comma_on_call_site = false -ij_kotlin_assignment_wrap = off -ij_kotlin_blank_lines_after_class_header = 0 -ij_kotlin_blank_lines_around_block_when_branches = 0 -ij_kotlin_blank_lines_before_declaration_with_comment_or_annotation_on_separate_line = 1 -ij_kotlin_block_comment_at_first_column = true -ij_kotlin_call_parameters_new_line_after_left_paren = false -ij_kotlin_call_parameters_right_paren_on_new_line = false -ij_kotlin_call_parameters_wrap = off -ij_kotlin_catch_on_new_line = false -ij_kotlin_class_annotation_wrap = off -ij_kotlin_code_style_defaults = KOTLIN_OFFICIAL -ij_kotlin_continuation_indent_for_chained_calls = true -ij_kotlin_continuation_indent_for_expression_bodies = true -ij_kotlin_continuation_indent_in_argument_lists = true -ij_kotlin_continuation_indent_in_elvis = true -ij_kotlin_continuation_indent_in_if_conditions = true -ij_kotlin_continuation_indent_in_parameter_lists = true -ij_kotlin_continuation_indent_in_supertype_lists = true -ij_kotlin_else_on_new_line = false -ij_kotlin_enum_constants_wrap = off -ij_kotlin_extends_list_wrap = off -ij_kotlin_field_annotation_wrap = normal -ij_kotlin_finally_on_new_line = false -ij_kotlin_if_rparen_on_new_line = false -ij_kotlin_import_nested_classes = false -ij_kotlin_imports_layout = *,java.**,javax.**,kotlin.**,^ -ij_kotlin_insert_whitespaces_in_simple_one_line_method = true -ij_kotlin_keep_blank_lines_before_right_brace = 0 -ij_kotlin_keep_blank_lines_in_code = 1 -ij_kotlin_keep_blank_lines_in_declarations = 1 -ij_kotlin_keep_first_column_comment = true -ij_kotlin_keep_indents_on_empty_lines = false -ij_kotlin_keep_line_breaks = true -ij_kotlin_lbrace_on_next_line = false -ij_kotlin_line_comment_add_space = false -ij_kotlin_line_comment_at_first_column = true -ij_kotlin_method_annotation_wrap = split_into_lines -ij_kotlin_method_call_chain_wrap = off -ij_kotlin_method_parameters_new_line_after_left_paren = false -ij_kotlin_method_parameters_right_paren_on_new_line = false -ij_kotlin_method_parameters_wrap = off -ij_kotlin_name_count_to_use_star_import = 2147483647 -ij_kotlin_name_count_to_use_star_import_for_members = 2147483647 -ij_kotlin_packages_to_use_import_on_demand = kotlinx.android.synthetic.** -ij_kotlin_parameter_annotation_wrap = off -ij_kotlin_space_after_comma = true -ij_kotlin_space_after_extend_colon = true -ij_kotlin_space_after_type_colon = true -ij_kotlin_space_before_catch_parentheses = true -ij_kotlin_space_before_comma = false -ij_kotlin_space_before_extend_colon = true -ij_kotlin_space_before_for_parentheses = true -ij_kotlin_space_before_if_parentheses = true -ij_kotlin_space_before_lambda_arrow = true -ij_kotlin_space_before_type_colon = false -ij_kotlin_space_before_when_parentheses = true -ij_kotlin_space_before_while_parentheses = true -ij_kotlin_spaces_around_additive_operators = true -ij_kotlin_spaces_around_assignment_operators = true -ij_kotlin_spaces_around_equality_operators = true -ij_kotlin_spaces_around_function_type_arrow = true -ij_kotlin_spaces_around_logical_operators = true -ij_kotlin_spaces_around_multiplicative_operators = true -ij_kotlin_spaces_around_range = false -ij_kotlin_spaces_around_relational_operators = true -ij_kotlin_spaces_around_unary_operator = false -ij_kotlin_spaces_around_when_arrow = true -ij_kotlin_use_custom_formatting_for_modifiers = true -ij_kotlin_variable_annotation_wrap = off -ij_kotlin_while_on_new_line = false -ij_kotlin_wrap_elvis_expressions = 1 -ij_kotlin_wrap_expression_body_functions = 0 -ij_kotlin_wrap_first_method_in_call_chain = false - -[{*.har,*.json}] -indent_size = 2 -ij_json_keep_blank_lines_in_code = 0 -ij_json_keep_indents_on_empty_lines = false -ij_json_keep_line_breaks = true -ij_json_space_after_colon = true -ij_json_space_after_comma = true -ij_json_space_before_colon = true -ij_json_space_before_comma = false -ij_json_spaces_within_braces = false -ij_json_spaces_within_brackets = false -ij_json_wrap_long_lines = false - -[{*.htm,*.html,*.sht,*.shtm,*.shtml}] -ij_html_add_new_line_before_tags = body,div,p,form,h1,h2,h3 -ij_html_align_attributes = true -ij_html_align_text = false -ij_html_attribute_wrap = normal -ij_html_block_comment_at_first_column = true -ij_html_do_not_align_children_of_min_lines = 0 -ij_html_do_not_break_if_inline_tags = title,h1,h2,h3,h4,h5,h6,p -ij_html_do_not_indent_children_of_tags = html,body,thead,tbody,tfoot -ij_html_enforce_quotes = false -ij_html_inline_tags = a,abbr,acronym,b,basefont,bdo,big,br,cite,cite,code,dfn,em,font,i,img,input,kbd,label,q,s,samp,select,small,span,strike,strong,sub,sup,textarea,tt,u,var -ij_html_keep_blank_lines = 2 -ij_html_keep_indents_on_empty_lines = false -ij_html_keep_line_breaks = true -ij_html_keep_line_breaks_in_text = true -ij_html_keep_whitespaces = false -ij_html_keep_whitespaces_inside = span,pre,textarea -ij_html_line_comment_at_first_column = true -ij_html_new_line_after_last_attribute = never -ij_html_new_line_before_first_attribute = never -ij_html_quote_style = double -ij_html_remove_new_line_before_tags = br -ij_html_space_after_tag_name = false -ij_html_space_around_equality_in_attribute = false -ij_html_space_inside_empty_tag = false -ij_html_text_wrap = normal -ij_html_uniform_ident = false - -[{*.yaml,*.yml}] -indent_size = 2 -ij_yaml_align_values_properties = do_not_align -ij_yaml_autoinsert_sequence_marker = true -ij_yaml_block_mapping_on_new_line = false -ij_yaml_indent_sequence_value = true -ij_yaml_keep_indents_on_empty_lines = false -ij_yaml_keep_line_breaks = true -ij_yaml_sequence_on_new_line = false -ij_yaml_space_before_colon = false -ij_yaml_spaces_within_braces = true -ij_yaml_spaces_within_brackets = true +[*] +charset = utf-8 +end_of_line = lf +indent_size = 4 +indent_style = space +insert_final_newline = true +max_line_length = 160 +tab_width = 4 +ij_continuation_indent_size = 8 +ij_formatter_off_tag = @formatter:off +ij_formatter_on_tag = @formatter:on +ij_formatter_tags_enabled = false +ij_smart_tabs = false +ij_visual_guides = none +ij_wrap_on_typing = false + +[*.java] +ij_java_align_consecutive_assignments = false +ij_java_align_consecutive_variable_declarations = false +ij_java_align_group_field_declarations = false +ij_java_align_multiline_annotation_parameters = false +ij_java_align_multiline_array_initializer_expression = false +ij_java_align_multiline_assignment = false +ij_java_align_multiline_binary_operation = false +ij_java_align_multiline_chained_methods = false +ij_java_align_multiline_extends_list = false +ij_java_align_multiline_for = true +ij_java_align_multiline_method_parentheses = false +ij_java_align_multiline_parameters = true +ij_java_align_multiline_parameters_in_calls = false +ij_java_align_multiline_parenthesized_expression = false +ij_java_align_multiline_records = true +ij_java_align_multiline_resources = true +ij_java_align_multiline_ternary_operation = false +ij_java_align_multiline_text_blocks = false +ij_java_align_multiline_throws_list = false +ij_java_align_subsequent_simple_methods = false +ij_java_align_throws_keyword = false +ij_java_annotation_parameter_wrap = off +ij_java_array_initializer_new_line_after_left_brace = false +ij_java_array_initializer_right_brace_on_new_line = false +ij_java_array_initializer_wrap = off +ij_java_assert_statement_colon_on_next_line = false +ij_java_assert_statement_wrap = off +ij_java_assignment_wrap = off +ij_java_binary_operation_sign_on_next_line = false +ij_java_binary_operation_wrap = off +ij_java_blank_lines_after_anonymous_class_header = 0 +ij_java_blank_lines_after_class_header = 0 +ij_java_blank_lines_after_imports = 1 +ij_java_blank_lines_after_package = 1 +ij_java_blank_lines_around_class = 1 +ij_java_blank_lines_around_field = 0 +ij_java_blank_lines_around_field_in_interface = 0 +ij_java_blank_lines_around_initializer = 1 +ij_java_blank_lines_around_method = 1 +ij_java_blank_lines_around_method_in_interface = 1 +ij_java_blank_lines_before_class_end = 0 +ij_java_blank_lines_before_imports = 1 +ij_java_blank_lines_before_method_body = 0 +ij_java_blank_lines_before_package = 0 +ij_java_block_brace_style = end_of_line +ij_java_block_comment_at_first_column = true +ij_java_builder_methods = none +ij_java_call_parameters_new_line_after_left_paren = false +ij_java_call_parameters_right_paren_on_new_line = false +ij_java_call_parameters_wrap = off +ij_java_case_statement_on_separate_line = true +ij_java_catch_on_new_line = false +ij_java_class_annotation_wrap = split_into_lines +ij_java_class_brace_style = end_of_line +ij_java_class_count_to_use_import_on_demand = 99 +ij_java_class_names_in_javadoc = 1 +ij_java_do_not_indent_top_level_class_members = false +ij_java_do_not_wrap_after_single_annotation = false +ij_java_do_while_brace_force = never +ij_java_doc_add_blank_line_after_description = true +ij_java_doc_add_blank_line_after_param_comments = false +ij_java_doc_add_blank_line_after_return = false +ij_java_doc_add_p_tag_on_empty_lines = true +ij_java_doc_align_exception_comments = true +ij_java_doc_align_param_comments = true +ij_java_doc_do_not_wrap_if_one_line = false +ij_java_doc_enable_formatting = true +ij_java_doc_enable_leading_asterisks = true +ij_java_doc_indent_on_continuation = false +ij_java_doc_keep_empty_lines = true +ij_java_doc_keep_empty_parameter_tag = true +ij_java_doc_keep_empty_return_tag = true +ij_java_doc_keep_empty_throws_tag = true +ij_java_doc_keep_invalid_tags = true +ij_java_doc_param_description_on_new_line = false +ij_java_doc_preserve_line_breaks = false +ij_java_doc_use_throws_not_exception_tag = true +ij_java_else_on_new_line = false +ij_java_enum_constants_wrap = off +ij_java_extends_keyword_wrap = off +ij_java_extends_list_wrap = off +ij_java_field_annotation_wrap = split_into_lines +ij_java_finally_on_new_line = false +ij_java_for_brace_force = never +ij_java_for_statement_new_line_after_left_paren = false +ij_java_for_statement_right_paren_on_new_line = false +ij_java_for_statement_wrap = off +ij_java_generate_final_locals = false +ij_java_generate_final_parameters = false +ij_java_if_brace_force = never +ij_java_imports_layout = $android.**,$androidx.**,$com.**,$junit.**,$net.**,$org.**,$java.**,$javax.**,$*,|,android.**,|,androidx.**,|,com.**,|,junit.**,|,net.**,|,org.**,|,java.**,|,javax.**,|,*,| +ij_java_indent_case_from_switch = true +ij_java_insert_inner_class_imports = false +ij_java_insert_override_annotation = true +ij_java_keep_blank_lines_before_right_brace = 2 +ij_java_keep_blank_lines_between_package_declaration_and_header = 2 +ij_java_keep_blank_lines_in_code = 2 +ij_java_keep_blank_lines_in_declarations = 2 +ij_java_keep_builder_methods_indents = false +ij_java_keep_control_statement_in_one_line = true +ij_java_keep_first_column_comment = true +ij_java_keep_indents_on_empty_lines = false +ij_java_keep_line_breaks = true +ij_java_keep_multiple_expressions_in_one_line = false +ij_java_keep_simple_blocks_in_one_line = false +ij_java_keep_simple_classes_in_one_line = false +ij_java_keep_simple_lambdas_in_one_line = false +ij_java_keep_simple_methods_in_one_line = false +ij_java_label_indent_absolute = false +ij_java_label_indent_size = 0 +ij_java_lambda_brace_style = end_of_line +ij_java_layout_static_imports_separately = true +ij_java_line_comment_add_space = false +ij_java_line_comment_at_first_column = true +ij_java_method_annotation_wrap = split_into_lines +ij_java_method_brace_style = end_of_line +ij_java_method_call_chain_wrap = off +ij_java_method_parameters_new_line_after_left_paren = false +ij_java_method_parameters_right_paren_on_new_line = false +ij_java_method_parameters_wrap = off +ij_java_modifier_list_wrap = false +ij_java_names_count_to_use_import_on_demand = 99 +ij_java_new_line_after_lparen_in_record_header = false +ij_java_parameter_annotation_wrap = off +ij_java_parentheses_expression_new_line_after_left_paren = false +ij_java_parentheses_expression_right_paren_on_new_line = false +ij_java_place_assignment_sign_on_next_line = false +ij_java_prefer_longer_names = true +ij_java_prefer_parameters_wrap = false +ij_java_record_components_wrap = normal +ij_java_repeat_synchronized = true +ij_java_replace_instanceof_and_cast = false +ij_java_replace_null_check = true +ij_java_replace_sum_lambda_with_method_ref = true +ij_java_resource_list_new_line_after_left_paren = false +ij_java_resource_list_right_paren_on_new_line = false +ij_java_resource_list_wrap = off +ij_java_rparen_on_new_line_in_record_header = false +ij_java_space_after_closing_angle_bracket_in_type_argument = false +ij_java_space_after_colon = true +ij_java_space_after_comma = true +ij_java_space_after_comma_in_type_arguments = true +ij_java_space_after_for_semicolon = true +ij_java_space_after_quest = true +ij_java_space_after_type_cast = true +ij_java_space_before_annotation_array_initializer_left_brace = false +ij_java_space_before_annotation_parameter_list = false +ij_java_space_before_array_initializer_left_brace = false +ij_java_space_before_catch_keyword = true +ij_java_space_before_catch_left_brace = true +ij_java_space_before_catch_parentheses = true +ij_java_space_before_class_left_brace = true +ij_java_space_before_colon = true +ij_java_space_before_colon_in_foreach = true +ij_java_space_before_comma = false +ij_java_space_before_do_left_brace = true +ij_java_space_before_else_keyword = true +ij_java_space_before_else_left_brace = true +ij_java_space_before_finally_keyword = true +ij_java_space_before_finally_left_brace = true +ij_java_space_before_for_left_brace = true +ij_java_space_before_for_parentheses = true +ij_java_space_before_for_semicolon = false +ij_java_space_before_if_left_brace = true +ij_java_space_before_if_parentheses = true +ij_java_space_before_method_call_parentheses = false +ij_java_space_before_method_left_brace = true +ij_java_space_before_method_parentheses = false +ij_java_space_before_opening_angle_bracket_in_type_parameter = false +ij_java_space_before_quest = true +ij_java_space_before_switch_left_brace = true +ij_java_space_before_switch_parentheses = true +ij_java_space_before_synchronized_left_brace = true +ij_java_space_before_synchronized_parentheses = true +ij_java_space_before_try_left_brace = true +ij_java_space_before_try_parentheses = true +ij_java_space_before_type_parameter_list = false +ij_java_space_before_while_keyword = true +ij_java_space_before_while_left_brace = true +ij_java_space_before_while_parentheses = true +ij_java_space_inside_one_line_enum_braces = false +ij_java_space_within_empty_array_initializer_braces = false +ij_java_space_within_empty_method_call_parentheses = false +ij_java_space_within_empty_method_parentheses = false +ij_java_spaces_around_additive_operators = true +ij_java_spaces_around_assignment_operators = true +ij_java_spaces_around_bitwise_operators = true +ij_java_spaces_around_equality_operators = true +ij_java_spaces_around_lambda_arrow = true +ij_java_spaces_around_logical_operators = true +ij_java_spaces_around_method_ref_dbl_colon = false +ij_java_spaces_around_multiplicative_operators = true +ij_java_spaces_around_relational_operators = true +ij_java_spaces_around_shift_operators = true +ij_java_spaces_around_type_bounds_in_type_parameters = true +ij_java_spaces_around_unary_operator = false +ij_java_spaces_within_angle_brackets = false +ij_java_spaces_within_annotation_parentheses = false +ij_java_spaces_within_array_initializer_braces = false +ij_java_spaces_within_braces = false +ij_java_spaces_within_brackets = false +ij_java_spaces_within_cast_parentheses = false +ij_java_spaces_within_catch_parentheses = false +ij_java_spaces_within_for_parentheses = false +ij_java_spaces_within_if_parentheses = false +ij_java_spaces_within_method_call_parentheses = false +ij_java_spaces_within_method_parentheses = false +ij_java_spaces_within_parentheses = false +ij_java_spaces_within_record_header = false +ij_java_spaces_within_switch_parentheses = false +ij_java_spaces_within_synchronized_parentheses = false +ij_java_spaces_within_try_parentheses = false +ij_java_spaces_within_while_parentheses = false +ij_java_special_else_if_treatment = true +ij_java_subclass_name_suffix = Impl +ij_java_ternary_operation_signs_on_next_line = false +ij_java_ternary_operation_wrap = off +ij_java_test_name_suffix = Test +ij_java_throws_keyword_wrap = off +ij_java_throws_list_wrap = off +ij_java_use_external_annotations = false +ij_java_use_fq_class_names = false +ij_java_use_relative_indents = false +ij_java_use_single_class_imports = true +ij_java_variable_annotation_wrap = off +ij_java_visibility = public +ij_java_while_brace_force = never +ij_java_while_on_new_line = false +ij_java_wrap_comments = false +ij_java_wrap_first_method_in_call_chain = false +ij_java_wrap_long_lines = false + +[*.properties] +ij_properties_align_group_field_declarations = false +ij_properties_keep_blank_lines = false +ij_properties_key_value_delimiter = equals +ij_properties_spaces_around_key_value_delimiter = false + +[.editorconfig] +ij_editorconfig_align_group_field_declarations = false +ij_editorconfig_space_after_colon = false +ij_editorconfig_space_after_comma = true +ij_editorconfig_space_before_colon = false +ij_editorconfig_space_before_comma = false +ij_editorconfig_spaces_around_assignment_operators = true + +[{*.ant,*.fxml,*.jhm,*.jnlp,*.jrxml,*.rng,*.tld,*.wsdl,*.xml,*.xsd,*.xsl,*.xslt,*.xul}] +ij_continuation_indent_size = 4 +ij_xml_align_attributes = false +ij_xml_align_text = false +ij_xml_attribute_wrap = normal +ij_xml_block_comment_at_first_column = true +ij_xml_keep_blank_lines = 2 +ij_xml_keep_indents_on_empty_lines = false +ij_xml_keep_line_breaks = false +ij_xml_keep_line_breaks_in_text = true +ij_xml_keep_whitespaces = false +ij_xml_keep_whitespaces_around_cdata = preserve +ij_xml_keep_whitespaces_inside_cdata = false +ij_xml_line_comment_at_first_column = true +ij_xml_space_after_tag_name = false +ij_xml_space_around_equals_in_attribute = false +ij_xml_space_inside_empty_tag = true +ij_xml_text_wrap = normal +ij_xml_use_custom_settings = true + +[{*.bash,*.sh,*.zsh}] +indent_size = 2 +tab_width = 2 +ij_shell_binary_ops_start_line = false +ij_shell_keep_column_alignment_padding = false +ij_shell_minify_program = false +ij_shell_redirect_followed_by_space = false +ij_shell_switch_cases_indented = false +ij_shell_use_unix_line_separator = true + +[{*.c,*.c++,*.cc,*.cp,*.cpp,*.cu,*.cuh,*.cxx,*.h,*.h++,*.hh,*.hp,*.hpp,*.hxx,*.i,*.icc,*.ii,*.inl,*.ino,*.ipp,*.m,*.mm,*.pch,*.tcc,*.tpp}] +ij_c_add_brief_tag = false +ij_c_add_getter_prefix = true +ij_c_add_setter_prefix = true +ij_c_align_dictionary_pair_values = false +ij_c_align_group_field_declarations = false +ij_c_align_init_list_in_columns = true +ij_c_align_multiline_array_initializer_expression = true +ij_c_align_multiline_assignment = true +ij_c_align_multiline_binary_operation = true +ij_c_align_multiline_chained_methods = false +ij_c_align_multiline_for = true +ij_c_align_multiline_ternary_operation = true +ij_c_array_initializer_comma_on_next_line = false +ij_c_array_initializer_new_line_after_left_brace = false +ij_c_array_initializer_right_brace_on_new_line = false +ij_c_array_initializer_wrap = normal +ij_c_assignment_wrap = off +ij_c_binary_operation_sign_on_next_line = false +ij_c_binary_operation_wrap = normal +ij_c_blank_lines_after_class_header = 0 +ij_c_blank_lines_after_imports = 1 +ij_c_blank_lines_around_class = 1 +ij_c_blank_lines_around_field = 0 +ij_c_blank_lines_around_field_in_interface = 0 +ij_c_blank_lines_around_method = 1 +ij_c_blank_lines_around_method_in_interface = 1 +ij_c_blank_lines_around_namespace = 0 +ij_c_blank_lines_around_properties_in_declaration = 0 +ij_c_blank_lines_around_properties_in_interface = 0 +ij_c_blank_lines_before_imports = 1 +ij_c_blank_lines_before_method_body = 0 +ij_c_block_brace_placement = end_of_line +ij_c_block_brace_style = end_of_line +ij_c_block_comment_at_first_column = true +ij_c_catch_on_new_line = false +ij_c_class_brace_style = end_of_line +ij_c_class_constructor_init_list_align_multiline = true +ij_c_class_constructor_init_list_comma_on_next_line = false +ij_c_class_constructor_init_list_new_line_after_colon = never +ij_c_class_constructor_init_list_new_line_before_colon = if_long +ij_c_class_constructor_init_list_wrap = normal +ij_c_copy_is_deep = false +ij_c_create_interface_for_categories = true +ij_c_declare_generated_methods = true +ij_c_description_include_member_names = true +ij_c_discharged_short_ternary_operator = false +ij_c_do_not_add_breaks = false +ij_c_do_while_brace_force = never +ij_c_else_on_new_line = false +ij_c_enum_constants_comma_on_next_line = false +ij_c_enum_constants_wrap = on_every_item +ij_c_for_brace_force = never +ij_c_for_statement_new_line_after_left_paren = false +ij_c_for_statement_right_paren_on_new_line = false +ij_c_for_statement_wrap = off +ij_c_function_brace_placement = end_of_line +ij_c_function_call_arguments_align_multiline = true +ij_c_function_call_arguments_align_multiline_pars = false +ij_c_function_call_arguments_comma_on_next_line = false +ij_c_function_call_arguments_new_line_after_lpar = false +ij_c_function_call_arguments_new_line_before_rpar = false +ij_c_function_call_arguments_wrap = normal +ij_c_function_non_top_after_return_type_wrap = normal +ij_c_function_parameters_align_multiline = true +ij_c_function_parameters_align_multiline_pars = false +ij_c_function_parameters_comma_on_next_line = false +ij_c_function_parameters_new_line_after_lpar = false +ij_c_function_parameters_new_line_before_rpar = false +ij_c_function_parameters_wrap = normal +ij_c_function_top_after_return_type_wrap = normal +ij_c_generate_additional_eq_operators = true +ij_c_generate_additional_rel_operators = true +ij_c_generate_class_constructor = true +ij_c_generate_comparison_operators_use_std_tie = false +ij_c_generate_instance_variables_for_properties = ask +ij_c_generate_operators_as_members = true +ij_c_header_guard_style_pattern = ${PROJECT_NAME}_${FILE_NAME}_${EXT} +ij_c_if_brace_force = never +ij_c_in_line_short_ternary_operator = true +ij_c_indent_block_comment = true +ij_c_indent_c_struct_members = 4 +ij_c_indent_case_from_switch = true +ij_c_indent_class_members = 4 +ij_c_indent_directive_as_code = false +ij_c_indent_implementation_members = 0 +ij_c_indent_inside_code_block = 4 +ij_c_indent_interface_members = 0 +ij_c_indent_interface_members_except_ivars_block = false +ij_c_indent_namespace_members = 4 +ij_c_indent_preprocessor_directive = 0 +ij_c_indent_visibility_keywords = 0 +ij_c_insert_override = true +ij_c_insert_virtual_with_override = false +ij_c_introduce_auto_vars = false +ij_c_introduce_const_params = false +ij_c_introduce_const_vars = false +ij_c_introduce_generate_property = false +ij_c_introduce_generate_synthesize = true +ij_c_introduce_globals_to_header = true +ij_c_introduce_prop_to_private_category = false +ij_c_introduce_static_consts = true +ij_c_introduce_use_ns_types = false +ij_c_ivars_prefix = _ +ij_c_keep_blank_lines_before_end = 2 +ij_c_keep_blank_lines_before_right_brace = 2 +ij_c_keep_blank_lines_in_code = 2 +ij_c_keep_blank_lines_in_declarations = 2 +ij_c_keep_case_expressions_in_one_line = false +ij_c_keep_control_statement_in_one_line = true +ij_c_keep_directive_at_first_column = true +ij_c_keep_first_column_comment = true +ij_c_keep_line_breaks = true +ij_c_keep_nested_namespaces_in_one_line = false +ij_c_keep_simple_blocks_in_one_line = true +ij_c_keep_simple_methods_in_one_line = true +ij_c_keep_structures_in_one_line = false +ij_c_lambda_capture_list_align_multiline = false +ij_c_lambda_capture_list_align_multiline_bracket = false +ij_c_lambda_capture_list_comma_on_next_line = false +ij_c_lambda_capture_list_new_line_after_lbracket = false +ij_c_lambda_capture_list_new_line_before_rbracket = false +ij_c_lambda_capture_list_wrap = off +ij_c_line_comment_add_space = false +ij_c_line_comment_at_first_column = true +ij_c_method_brace_placement = end_of_line +ij_c_method_call_arguments_align_by_colons = true +ij_c_method_call_arguments_align_multiline = false +ij_c_method_call_arguments_special_dictionary_pairs_treatment = true +ij_c_method_call_arguments_wrap = off +ij_c_method_call_chain_wrap = off +ij_c_method_parameters_align_by_colons = true +ij_c_method_parameters_align_multiline = false +ij_c_method_parameters_wrap = off +ij_c_namespace_brace_placement = end_of_line +ij_c_parentheses_expression_new_line_after_left_paren = false +ij_c_parentheses_expression_right_paren_on_new_line = false +ij_c_place_assignment_sign_on_next_line = false +ij_c_property_nonatomic = true +ij_c_put_ivars_to_implementation = true +ij_c_refactor_compatibility_aliases_and_classes = true +ij_c_refactor_properties_and_ivars = true +ij_c_release_style = ivar +ij_c_retain_object_parameters_in_constructor = true +ij_c_semicolon_after_method_signature = false +ij_c_shift_operation_align_multiline = true +ij_c_shift_operation_wrap = normal +ij_c_show_non_virtual_functions = false +ij_c_space_after_colon = true +ij_c_space_after_colon_in_selector = false +ij_c_space_after_comma = true +ij_c_space_after_cup_in_blocks = false +ij_c_space_after_dictionary_literal_colon = true +ij_c_space_after_for_semicolon = true +ij_c_space_after_init_list_colon = true +ij_c_space_after_method_parameter_type_parentheses = false +ij_c_space_after_method_return_type_parentheses = false +ij_c_space_after_pointer_in_declaration = false +ij_c_space_after_quest = true +ij_c_space_after_reference_in_declaration = false +ij_c_space_after_reference_in_rvalue = false +ij_c_space_after_structures_rbrace = true +ij_c_space_after_superclass_colon = true +ij_c_space_after_type_cast = true +ij_c_space_after_visibility_sign_in_method_declaration = true +ij_c_space_before_autorelease_pool_lbrace = true +ij_c_space_before_catch_keyword = true +ij_c_space_before_catch_left_brace = true +ij_c_space_before_catch_parentheses = true +ij_c_space_before_category_parentheses = true +ij_c_space_before_chained_send_message = true +ij_c_space_before_class_left_brace = true +ij_c_space_before_colon = true +ij_c_space_before_comma = false +ij_c_space_before_dictionary_literal_colon = false +ij_c_space_before_do_left_brace = true +ij_c_space_before_else_keyword = true +ij_c_space_before_else_left_brace = true +ij_c_space_before_for_left_brace = true +ij_c_space_before_for_parentheses = true +ij_c_space_before_for_semicolon = false +ij_c_space_before_if_left_brace = true +ij_c_space_before_if_parentheses = true +ij_c_space_before_init_list = false +ij_c_space_before_init_list_colon = true +ij_c_space_before_method_call_parentheses = false +ij_c_space_before_method_left_brace = true +ij_c_space_before_method_parentheses = false +ij_c_space_before_namespace_lbrace = true +ij_c_space_before_pointer_in_declaration = true +ij_c_space_before_property_attributes_parentheses = false +ij_c_space_before_protocols_brackets = true +ij_c_space_before_quest = true +ij_c_space_before_reference_in_declaration = true +ij_c_space_before_superclass_colon = true +ij_c_space_before_switch_left_brace = true +ij_c_space_before_switch_parentheses = true +ij_c_space_before_template_call_lt = false +ij_c_space_before_template_declaration_lt = false +ij_c_space_before_try_left_brace = true +ij_c_space_before_while_keyword = true +ij_c_space_before_while_left_brace = true +ij_c_space_before_while_parentheses = true +ij_c_space_between_adjacent_brackets = false +ij_c_space_between_operator_and_punctuator = false +ij_c_space_within_empty_array_initializer_braces = false +ij_c_spaces_around_additive_operators = true +ij_c_spaces_around_assignment_operators = true +ij_c_spaces_around_bitwise_operators = true +ij_c_spaces_around_equality_operators = true +ij_c_spaces_around_lambda_arrow = true +ij_c_spaces_around_logical_operators = true +ij_c_spaces_around_multiplicative_operators = true +ij_c_spaces_around_pm_operators = false +ij_c_spaces_around_relational_operators = true +ij_c_spaces_around_shift_operators = true +ij_c_spaces_around_unary_operator = false +ij_c_spaces_within_array_initializer_braces = false +ij_c_spaces_within_braces = true +ij_c_spaces_within_brackets = false +ij_c_spaces_within_cast_parentheses = false +ij_c_spaces_within_catch_parentheses = false +ij_c_spaces_within_category_parentheses = false +ij_c_spaces_within_empty_braces = false +ij_c_spaces_within_empty_function_call_parentheses = false +ij_c_spaces_within_empty_function_declaration_parentheses = false +ij_c_spaces_within_empty_lambda_capture_list_bracket = false +ij_c_spaces_within_empty_template_call_ltgt = false +ij_c_spaces_within_empty_template_declaration_ltgt = false +ij_c_spaces_within_for_parentheses = false +ij_c_spaces_within_function_call_parentheses = false +ij_c_spaces_within_function_declaration_parentheses = false +ij_c_spaces_within_if_parentheses = false +ij_c_spaces_within_lambda_capture_list_bracket = false +ij_c_spaces_within_method_parameter_type_parentheses = false +ij_c_spaces_within_method_return_type_parentheses = false +ij_c_spaces_within_parentheses = false +ij_c_spaces_within_property_attributes_parentheses = false +ij_c_spaces_within_protocols_brackets = false +ij_c_spaces_within_send_message_brackets = false +ij_c_spaces_within_switch_parentheses = false +ij_c_spaces_within_template_call_ltgt = false +ij_c_spaces_within_template_declaration_ltgt = false +ij_c_spaces_within_template_double_gt = true +ij_c_spaces_within_while_parentheses = false +ij_c_special_else_if_treatment = true +ij_c_superclass_list_after_colon = never +ij_c_superclass_list_align_multiline = true +ij_c_superclass_list_before_colon = if_long +ij_c_superclass_list_comma_on_next_line = false +ij_c_superclass_list_wrap = on_every_item +ij_c_tag_prefix_of_block_comment = at +ij_c_tag_prefix_of_line_comment = back_slash +ij_c_template_call_arguments_align_multiline = false +ij_c_template_call_arguments_align_multiline_pars = false +ij_c_template_call_arguments_comma_on_next_line = false +ij_c_template_call_arguments_new_line_after_lt = false +ij_c_template_call_arguments_new_line_before_gt = false +ij_c_template_call_arguments_wrap = off +ij_c_template_declaration_function_body_indent = false +ij_c_template_declaration_function_wrap = split_into_lines +ij_c_template_declaration_struct_body_indent = false +ij_c_template_declaration_struct_wrap = split_into_lines +ij_c_template_parameters_align_multiline = false +ij_c_template_parameters_align_multiline_pars = false +ij_c_template_parameters_comma_on_next_line = false +ij_c_template_parameters_new_line_after_lt = false +ij_c_template_parameters_new_line_before_gt = false +ij_c_template_parameters_wrap = off +ij_c_ternary_operation_signs_on_next_line = true +ij_c_ternary_operation_wrap = normal +ij_c_type_qualifiers_placement = before +ij_c_use_modern_casts = true +ij_c_use_setters_in_constructor = true +ij_c_while_brace_force = never +ij_c_while_on_new_line = false +ij_c_wrap_property_declaration = off + +[{*.cmake,CMakeLists.txt}] +ij_cmake_align_multiline_parameters_in_calls = false +ij_cmake_force_commands_case = 2 +ij_cmake_keep_blank_lines_in_code = 2 +ij_cmake_space_before_for_parentheses = true +ij_cmake_space_before_if_parentheses = true +ij_cmake_space_before_method_call_parentheses = false +ij_cmake_space_before_method_parentheses = false +ij_cmake_space_before_while_parentheses = true +ij_cmake_spaces_within_for_parentheses = false +ij_cmake_spaces_within_if_parentheses = false +ij_cmake_spaces_within_method_call_parentheses = false +ij_cmake_spaces_within_method_parentheses = false +ij_cmake_spaces_within_while_parentheses = false + +[{*.gant,*.gradle,*.groovy,*.gy}] +ij_groovy_align_group_field_declarations = false +ij_groovy_align_multiline_array_initializer_expression = false +ij_groovy_align_multiline_assignment = false +ij_groovy_align_multiline_binary_operation = false +ij_groovy_align_multiline_chained_methods = false +ij_groovy_align_multiline_extends_list = false +ij_groovy_align_multiline_for = true +ij_groovy_align_multiline_list_or_map = true +ij_groovy_align_multiline_method_parentheses = false +ij_groovy_align_multiline_parameters = true +ij_groovy_align_multiline_parameters_in_calls = false +ij_groovy_align_multiline_resources = true +ij_groovy_align_multiline_ternary_operation = false +ij_groovy_align_multiline_throws_list = false +ij_groovy_align_named_args_in_map = true +ij_groovy_align_throws_keyword = false +ij_groovy_array_initializer_new_line_after_left_brace = false +ij_groovy_array_initializer_right_brace_on_new_line = false +ij_groovy_array_initializer_wrap = off +ij_groovy_assert_statement_wrap = off +ij_groovy_assignment_wrap = off +ij_groovy_binary_operation_wrap = off +ij_groovy_blank_lines_after_class_header = 0 +ij_groovy_blank_lines_after_imports = 1 +ij_groovy_blank_lines_after_package = 1 +ij_groovy_blank_lines_around_class = 1 +ij_groovy_blank_lines_around_field = 0 +ij_groovy_blank_lines_around_field_in_interface = 0 +ij_groovy_blank_lines_around_method = 1 +ij_groovy_blank_lines_around_method_in_interface = 1 +ij_groovy_blank_lines_before_imports = 1 +ij_groovy_blank_lines_before_method_body = 0 +ij_groovy_blank_lines_before_package = 0 +ij_groovy_block_brace_style = end_of_line +ij_groovy_block_comment_at_first_column = true +ij_groovy_call_parameters_new_line_after_left_paren = false +ij_groovy_call_parameters_right_paren_on_new_line = false +ij_groovy_call_parameters_wrap = off +ij_groovy_catch_on_new_line = false +ij_groovy_class_annotation_wrap = split_into_lines +ij_groovy_class_brace_style = end_of_line +ij_groovy_class_count_to_use_import_on_demand = 5 +ij_groovy_do_while_brace_force = never +ij_groovy_else_on_new_line = false +ij_groovy_enum_constants_wrap = off +ij_groovy_extends_keyword_wrap = off +ij_groovy_extends_list_wrap = off +ij_groovy_field_annotation_wrap = split_into_lines +ij_groovy_finally_on_new_line = false +ij_groovy_for_brace_force = never +ij_groovy_for_statement_new_line_after_left_paren = false +ij_groovy_for_statement_right_paren_on_new_line = false +ij_groovy_for_statement_wrap = off +ij_groovy_if_brace_force = never +ij_groovy_import_annotation_wrap = 2 +ij_groovy_imports_layout = *,|,javax.**,java.**,|,$* +ij_groovy_indent_case_from_switch = true +ij_groovy_indent_label_blocks = true +ij_groovy_insert_inner_class_imports = false +ij_groovy_keep_blank_lines_before_right_brace = 2 +ij_groovy_keep_blank_lines_in_code = 2 +ij_groovy_keep_blank_lines_in_declarations = 2 +ij_groovy_keep_control_statement_in_one_line = true +ij_groovy_keep_first_column_comment = true +ij_groovy_keep_indents_on_empty_lines = false +ij_groovy_keep_line_breaks = true +ij_groovy_keep_multiple_expressions_in_one_line = false +ij_groovy_keep_simple_blocks_in_one_line = false +ij_groovy_keep_simple_classes_in_one_line = true +ij_groovy_keep_simple_lambdas_in_one_line = true +ij_groovy_keep_simple_methods_in_one_line = true +ij_groovy_label_indent_absolute = false +ij_groovy_label_indent_size = 0 +ij_groovy_lambda_brace_style = end_of_line +ij_groovy_layout_static_imports_separately = true +ij_groovy_line_comment_add_space = false +ij_groovy_line_comment_at_first_column = true +ij_groovy_method_annotation_wrap = split_into_lines +ij_groovy_method_brace_style = end_of_line +ij_groovy_method_call_chain_wrap = off +ij_groovy_method_parameters_new_line_after_left_paren = false +ij_groovy_method_parameters_right_paren_on_new_line = false +ij_groovy_method_parameters_wrap = off +ij_groovy_modifier_list_wrap = false +ij_groovy_names_count_to_use_import_on_demand = 3 +ij_groovy_parameter_annotation_wrap = off +ij_groovy_parentheses_expression_new_line_after_left_paren = false +ij_groovy_parentheses_expression_right_paren_on_new_line = false +ij_groovy_prefer_parameters_wrap = false +ij_groovy_resource_list_new_line_after_left_paren = false +ij_groovy_resource_list_right_paren_on_new_line = false +ij_groovy_resource_list_wrap = off +ij_groovy_space_after_assert_separator = true +ij_groovy_space_after_colon = true +ij_groovy_space_after_comma = true +ij_groovy_space_after_comma_in_type_arguments = true +ij_groovy_space_after_for_semicolon = true +ij_groovy_space_after_quest = true +ij_groovy_space_after_type_cast = true +ij_groovy_space_before_annotation_parameter_list = false +ij_groovy_space_before_array_initializer_left_brace = false +ij_groovy_space_before_assert_separator = false +ij_groovy_space_before_catch_keyword = true +ij_groovy_space_before_catch_left_brace = true +ij_groovy_space_before_catch_parentheses = true +ij_groovy_space_before_class_left_brace = true +ij_groovy_space_before_closure_left_brace = true +ij_groovy_space_before_colon = true +ij_groovy_space_before_comma = false +ij_groovy_space_before_do_left_brace = true +ij_groovy_space_before_else_keyword = true +ij_groovy_space_before_else_left_brace = true +ij_groovy_space_before_finally_keyword = true +ij_groovy_space_before_finally_left_brace = true +ij_groovy_space_before_for_left_brace = true +ij_groovy_space_before_for_parentheses = true +ij_groovy_space_before_for_semicolon = false +ij_groovy_space_before_if_left_brace = true +ij_groovy_space_before_if_parentheses = true +ij_groovy_space_before_method_call_parentheses = false +ij_groovy_space_before_method_left_brace = true +ij_groovy_space_before_method_parentheses = false +ij_groovy_space_before_quest = true +ij_groovy_space_before_switch_left_brace = true +ij_groovy_space_before_switch_parentheses = true +ij_groovy_space_before_synchronized_left_brace = true +ij_groovy_space_before_synchronized_parentheses = true +ij_groovy_space_before_try_left_brace = true +ij_groovy_space_before_try_parentheses = true +ij_groovy_space_before_while_keyword = true +ij_groovy_space_before_while_left_brace = true +ij_groovy_space_before_while_parentheses = true +ij_groovy_space_in_named_argument = true +ij_groovy_space_in_named_argument_before_colon = false +ij_groovy_space_within_empty_array_initializer_braces = false +ij_groovy_space_within_empty_method_call_parentheses = false +ij_groovy_spaces_around_additive_operators = true +ij_groovy_spaces_around_assignment_operators = true +ij_groovy_spaces_around_bitwise_operators = true +ij_groovy_spaces_around_equality_operators = true +ij_groovy_spaces_around_lambda_arrow = true +ij_groovy_spaces_around_logical_operators = true +ij_groovy_spaces_around_multiplicative_operators = true +ij_groovy_spaces_around_regex_operators = true +ij_groovy_spaces_around_relational_operators = true +ij_groovy_spaces_around_shift_operators = true +ij_groovy_spaces_within_annotation_parentheses = false +ij_groovy_spaces_within_array_initializer_braces = false +ij_groovy_spaces_within_braces = true +ij_groovy_spaces_within_brackets = false +ij_groovy_spaces_within_cast_parentheses = false +ij_groovy_spaces_within_catch_parentheses = false +ij_groovy_spaces_within_for_parentheses = false +ij_groovy_spaces_within_gstring_injection_braces = false +ij_groovy_spaces_within_if_parentheses = false +ij_groovy_spaces_within_list_or_map = false +ij_groovy_spaces_within_method_call_parentheses = false +ij_groovy_spaces_within_method_parentheses = false +ij_groovy_spaces_within_parentheses = false +ij_groovy_spaces_within_switch_parentheses = false +ij_groovy_spaces_within_synchronized_parentheses = false +ij_groovy_spaces_within_try_parentheses = false +ij_groovy_spaces_within_tuple_expression = false +ij_groovy_spaces_within_while_parentheses = false +ij_groovy_special_else_if_treatment = true +ij_groovy_ternary_operation_wrap = off +ij_groovy_throws_keyword_wrap = off +ij_groovy_throws_list_wrap = off +ij_groovy_use_flying_geese_braces = false +ij_groovy_use_fq_class_names = false +ij_groovy_use_fq_class_names_in_javadoc = true +ij_groovy_use_relative_indents = false +ij_groovy_use_single_class_imports = true +ij_groovy_variable_annotation_wrap = off +ij_groovy_while_brace_force = never +ij_groovy_while_on_new_line = false +ij_groovy_wrap_long_lines = false + +[{*.gradle.kts,*.kt,*.kts,*.main.kts}] +ij_kotlin_align_in_columns_case_branch = true +ij_kotlin_align_multiline_binary_operation = false +ij_kotlin_align_multiline_extends_list = false +ij_kotlin_align_multiline_method_parentheses = false +ij_kotlin_align_multiline_parameters = true +ij_kotlin_align_multiline_parameters_in_calls = false +ij_kotlin_allow_trailing_comma = false +ij_kotlin_allow_trailing_comma_on_call_site = false +ij_kotlin_assignment_wrap = off +ij_kotlin_blank_lines_after_class_header = 0 +ij_kotlin_blank_lines_around_block_when_branches = 0 +ij_kotlin_blank_lines_before_declaration_with_comment_or_annotation_on_separate_line = 1 +ij_kotlin_block_comment_at_first_column = true +ij_kotlin_call_parameters_new_line_after_left_paren = false +ij_kotlin_call_parameters_right_paren_on_new_line = false +ij_kotlin_call_parameters_wrap = off +ij_kotlin_catch_on_new_line = false +ij_kotlin_class_annotation_wrap = off +ij_kotlin_code_style_defaults = KOTLIN_OFFICIAL +ij_kotlin_continuation_indent_for_chained_calls = true +ij_kotlin_continuation_indent_for_expression_bodies = true +ij_kotlin_continuation_indent_in_argument_lists = true +ij_kotlin_continuation_indent_in_elvis = true +ij_kotlin_continuation_indent_in_if_conditions = true +ij_kotlin_continuation_indent_in_parameter_lists = true +ij_kotlin_continuation_indent_in_supertype_lists = true +ij_kotlin_else_on_new_line = false +ij_kotlin_enum_constants_wrap = off +ij_kotlin_extends_list_wrap = off +ij_kotlin_field_annotation_wrap = normal +ij_kotlin_finally_on_new_line = false +ij_kotlin_if_rparen_on_new_line = false +ij_kotlin_import_nested_classes = false +ij_kotlin_imports_layout = *,java.**,javax.**,kotlin.**,^ +ij_kotlin_insert_whitespaces_in_simple_one_line_method = true +ij_kotlin_keep_blank_lines_before_right_brace = 0 +ij_kotlin_keep_blank_lines_in_code = 1 +ij_kotlin_keep_blank_lines_in_declarations = 1 +ij_kotlin_keep_first_column_comment = true +ij_kotlin_keep_indents_on_empty_lines = false +ij_kotlin_keep_line_breaks = true +ij_kotlin_lbrace_on_next_line = false +ij_kotlin_line_comment_add_space = false +ij_kotlin_line_comment_at_first_column = true +ij_kotlin_method_annotation_wrap = split_into_lines +ij_kotlin_method_call_chain_wrap = off +ij_kotlin_method_parameters_new_line_after_left_paren = false +ij_kotlin_method_parameters_right_paren_on_new_line = false +ij_kotlin_method_parameters_wrap = off +ij_kotlin_name_count_to_use_star_import = 2147483647 +ij_kotlin_name_count_to_use_star_import_for_members = 2147483647 +ij_kotlin_packages_to_use_import_on_demand = kotlinx.android.synthetic.** +ij_kotlin_parameter_annotation_wrap = off +ij_kotlin_space_after_comma = true +ij_kotlin_space_after_extend_colon = true +ij_kotlin_space_after_type_colon = true +ij_kotlin_space_before_catch_parentheses = true +ij_kotlin_space_before_comma = false +ij_kotlin_space_before_extend_colon = true +ij_kotlin_space_before_for_parentheses = true +ij_kotlin_space_before_if_parentheses = true +ij_kotlin_space_before_lambda_arrow = true +ij_kotlin_space_before_type_colon = false +ij_kotlin_space_before_when_parentheses = true +ij_kotlin_space_before_while_parentheses = true +ij_kotlin_spaces_around_additive_operators = true +ij_kotlin_spaces_around_assignment_operators = true +ij_kotlin_spaces_around_equality_operators = true +ij_kotlin_spaces_around_function_type_arrow = true +ij_kotlin_spaces_around_logical_operators = true +ij_kotlin_spaces_around_multiplicative_operators = true +ij_kotlin_spaces_around_range = false +ij_kotlin_spaces_around_relational_operators = true +ij_kotlin_spaces_around_unary_operator = false +ij_kotlin_spaces_around_when_arrow = true +ij_kotlin_use_custom_formatting_for_modifiers = true +ij_kotlin_variable_annotation_wrap = off +ij_kotlin_while_on_new_line = false +ij_kotlin_wrap_elvis_expressions = 1 +ij_kotlin_wrap_expression_body_functions = 0 +ij_kotlin_wrap_first_method_in_call_chain = false + +[{*.har,*.json}] +indent_size = 2 +ij_json_keep_blank_lines_in_code = 0 +ij_json_keep_indents_on_empty_lines = false +ij_json_keep_line_breaks = true +ij_json_space_after_colon = true +ij_json_space_after_comma = true +ij_json_space_before_colon = true +ij_json_space_before_comma = false +ij_json_spaces_within_braces = false +ij_json_spaces_within_brackets = false +ij_json_wrap_long_lines = false + +[{*.htm,*.html,*.sht,*.shtm,*.shtml}] +ij_html_add_new_line_before_tags = body,div,p,form,h1,h2,h3 +ij_html_align_attributes = true +ij_html_align_text = false +ij_html_attribute_wrap = normal +ij_html_block_comment_at_first_column = true +ij_html_do_not_align_children_of_min_lines = 0 +ij_html_do_not_break_if_inline_tags = title,h1,h2,h3,h4,h5,h6,p +ij_html_do_not_indent_children_of_tags = html,body,thead,tbody,tfoot +ij_html_enforce_quotes = false +ij_html_inline_tags = a,abbr,acronym,b,basefont,bdo,big,br,cite,cite,code,dfn,em,font,i,img,input,kbd,label,q,s,samp,select,small,span,strike,strong,sub,sup,textarea,tt,u,var +ij_html_keep_blank_lines = 2 +ij_html_keep_indents_on_empty_lines = false +ij_html_keep_line_breaks = true +ij_html_keep_line_breaks_in_text = true +ij_html_keep_whitespaces = false +ij_html_keep_whitespaces_inside = span,pre,textarea +ij_html_line_comment_at_first_column = true +ij_html_new_line_after_last_attribute = never +ij_html_new_line_before_first_attribute = never +ij_html_quote_style = double +ij_html_remove_new_line_before_tags = br +ij_html_space_after_tag_name = false +ij_html_space_around_equality_in_attribute = false +ij_html_space_inside_empty_tag = false +ij_html_text_wrap = normal +ij_html_uniform_ident = false + +[{*.yaml,*.yml}] +indent_size = 2 +ij_yaml_align_values_properties = do_not_align +ij_yaml_autoinsert_sequence_marker = true +ij_yaml_block_mapping_on_new_line = false +ij_yaml_indent_sequence_value = true +ij_yaml_keep_indents_on_empty_lines = false +ij_yaml_keep_line_breaks = true +ij_yaml_sequence_on_new_line = false +ij_yaml_space_before_colon = false +ij_yaml_spaces_within_braces = true +ij_yaml_spaces_within_brackets = true From 5b01290057aa218c1e9d8cb16cc03d43a371afd7 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Tue, 19 Apr 2022 11:41:17 +0100 Subject: [PATCH 097/561] extracting registration flow handling to its own function - flattening nested ifs - formatting --- .../onboarding/ftueauth/FtueAuthVariant.kt | 99 +++++++++++-------- 1 file changed, 58 insertions(+), 41 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthVariant.kt b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthVariant.kt index d5816762df..abf42f8329 100644 --- a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthVariant.kt +++ b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthVariant.kt @@ -131,24 +131,7 @@ class FtueAuthVariant( private fun handleOnboardingViewEvents(viewEvents: OnboardingViewEvents) { when (viewEvents) { is OnboardingViewEvents.RegistrationFlowResult -> { - if (registrationShouldFallback(viewEvents)) { - // Display a popup to propose use web fallback - onRegistrationStageNotSupported() - } else { - if (viewEvents.isRegistrationStarted) { - // Go on with registration flow - handleRegistrationNavigation(viewEvents.flowResult) - } else { - if (vectorFeatures.isOnboardingCombinedRegisterEnabled()) { - openCombinedRegister() - } else { - // First ask for login and password - // I add a tag to indicate that this fragment is a registration stage. - // This way it will be automatically popped in when starting the next registration stage - openAuthLoginFragmentWithTag(FRAGMENT_REGISTRATION_STAGE_TAG) - } - } - } + onRegistrationFlow(viewEvents) } is OnboardingViewEvents.OutdatedHomeserver -> { MaterialAlertDialogBuilder(activity) @@ -176,25 +159,33 @@ class FtueAuthVariant( is OnboardingViewEvents.OnServerSelectionDone -> onServerSelectionDone(viewEvents) is OnboardingViewEvents.OnSignModeSelected -> onSignModeSelected(viewEvents) is OnboardingViewEvents.OnLoginFlowRetrieved -> - activity.addFragmentToBackstack(views.loginFragmentContainer, + activity.addFragmentToBackstack( + views.loginFragmentContainer, FtueAuthSignUpSignInSelectionFragment::class.java, - option = commonOption) + option = commonOption + ) is OnboardingViewEvents.OnWebLoginError -> onWebLoginError(viewEvents) is OnboardingViewEvents.OnForgetPasswordClicked -> - activity.addFragmentToBackstack(views.loginFragmentContainer, + activity.addFragmentToBackstack( + views.loginFragmentContainer, FtueAuthResetPasswordFragment::class.java, - option = commonOption) + option = commonOption + ) is OnboardingViewEvents.OnResetPasswordSendThreePidDone -> { supportFragmentManager.popBackStack(FRAGMENT_LOGIN_TAG, POP_BACK_STACK_EXCLUSIVE) - activity.addFragmentToBackstack(views.loginFragmentContainer, + activity.addFragmentToBackstack( + views.loginFragmentContainer, FtueAuthResetPasswordMailConfirmationFragment::class.java, - option = commonOption) + option = commonOption + ) } is OnboardingViewEvents.OnResetPasswordMailConfirmationSuccess -> { supportFragmentManager.popBackStack(FRAGMENT_LOGIN_TAG, POP_BACK_STACK_EXCLUSIVE) - activity.addFragmentToBackstack(views.loginFragmentContainer, + activity.addFragmentToBackstack( + views.loginFragmentContainer, FtueAuthResetPasswordSuccessFragment::class.java, - option = commonOption) + option = commonOption + ) } is OnboardingViewEvents.OnResetPasswordMailConfirmationSuccessDone -> { // Go back to the login fragment @@ -221,11 +212,13 @@ class FtueAuthVariant( // This is handled by the Fragments Unit OnboardingViewEvents.OpenUseCaseSelection -> { - activity.addFragmentToBackstack(views.loginFragmentContainer, + activity.addFragmentToBackstack( + views.loginFragmentContainer, FtueAuthUseCaseFragment::class.java, - option = commonOption) + option = commonOption + ) } - OnboardingViewEvents.OpenCombinedRegister -> openCombinedRegister() + OnboardingViewEvents.OpenCombinedRegister -> openStartCombinedRegister() is OnboardingViewEvents.OnAccountCreated -> onAccountCreated() OnboardingViewEvents.OnAccountSignedIn -> onAccountSignedIn() OnboardingViewEvents.OnChooseDisplayName -> onChooseDisplayName() @@ -244,7 +237,21 @@ class FtueAuthVariant( } } - private fun openCombinedRegister() { + private fun onRegistrationFlow(viewEvents: OnboardingViewEvents.RegistrationFlowResult) { + when { + registrationShouldFallback(viewEvents) -> displayFallbackWebDialog() + viewEvents.isRegistrationStarted -> handleRegistrationNavigation(viewEvents.flowResult) + vectorFeatures.isOnboardingCombinedRegisterEnabled() -> openStartCombinedRegister() + else -> { + // First ask for login and password + // I add a tag to indicate that this fragment is a registration stage. + // This way it will be automatically popped in when starting the next registration stage + openAuthLoginFragmentWithTag(FRAGMENT_REGISTRATION_STAGE_TAG) + } + } + } + + private fun openStartCombinedRegister() { addRegistrationStageFragmentToBackstack(FtueAuthCombinedRegisterFragment::class.java) } @@ -254,14 +261,16 @@ class FtueAuthVariant( private fun OnboardingViewEvents.RegistrationFlowResult.containsUnsupportedRegistrationFlow() = flowResult.missingStages.any { !it.isSupported() } - private fun onRegistrationStageNotSupported() { + private fun displayFallbackWebDialog() { MaterialAlertDialogBuilder(activity) .setTitle(R.string.app_name) .setMessage(activity.getString(R.string.login_registration_not_supported)) .setPositiveButton(R.string.yes) { _, _ -> - activity.addFragmentToBackstack(views.loginFragmentContainer, + activity.addFragmentToBackstack( + views.loginFragmentContainer, FtueAuthWebFragment::class.java, - option = commonOption) + option = commonOption + ) } .setNegativeButton(R.string.no, null) .show() @@ -283,9 +292,11 @@ class FtueAuthVariant( when (OnboardingViewEvents.serverType) { ServerType.MatrixOrg -> Unit // In this case, we wait for the login flow ServerType.EMS, - ServerType.Other -> activity.addFragmentToBackstack(views.loginFragmentContainer, + ServerType.Other -> activity.addFragmentToBackstack( + views.loginFragmentContainer, FtueAuthServerUrlFormFragment::class.java, - option = commonOption) + option = commonOption + ) ServerType.Unknown -> Unit /* Should not happen */ } } @@ -317,10 +328,12 @@ class FtueAuthVariant( } private fun openAuthLoginFragmentWithTag(tag: String) { - activity.addFragmentToBackstack(views.loginFragmentContainer, + activity.addFragmentToBackstack( + views.loginFragmentContainer, FtueAuthLoginFragment::class.java, tag = tag, - option = commonOption) + option = commonOption + ) } private fun onLoginModeNotSupported(supportedTypes: List) { @@ -341,9 +354,11 @@ class FtueAuthVariant( } private fun openAuthWebFragment() { - activity.addFragmentToBackstack(views.loginFragmentContainer, + activity.addFragmentToBackstack( + views.loginFragmentContainer, FtueAuthWebFragment::class.java, - option = commonOption) + option = commonOption + ) } /** @@ -437,14 +452,16 @@ class FtueAuthVariant( } private fun onChooseDisplayName() { - activity.addFragmentToBackstack(views.loginFragmentContainer, + activity.addFragmentToBackstack( + views.loginFragmentContainer, FtueAuthChooseDisplayNameFragment::class.java, option = commonOption ) } private fun onChooseProfilePicture() { - activity.addFragmentToBackstack(views.loginFragmentContainer, + activity.addFragmentToBackstack( + views.loginFragmentContainer, FtueAuthChooseProfilePictureFragment::class.java, option = commonOption ) From 1a76b4d6806bafb903a9be0ebd6f1653fe88e47c Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Tue, 19 Apr 2022 11:56:13 +0100 Subject: [PATCH 098/561] ordering the ftue onboarding steps to match the design flow - only applied when the combined register flag is enabled --- .../onboarding/ftueauth/FtueAuthVariant.kt | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthVariant.kt b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthVariant.kt index abf42f8329..00e96295be 100644 --- a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthVariant.kt +++ b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthVariant.kt @@ -239,10 +239,10 @@ class FtueAuthVariant( private fun onRegistrationFlow(viewEvents: OnboardingViewEvents.RegistrationFlowResult) { when { - registrationShouldFallback(viewEvents) -> displayFallbackWebDialog() - viewEvents.isRegistrationStarted -> handleRegistrationNavigation(viewEvents.flowResult) + registrationShouldFallback(viewEvents) -> displayFallbackWebDialog() + viewEvents.isRegistrationStarted -> handleRegistrationNavigation(viewEvents.flowResult.orderedStages()) vectorFeatures.isOnboardingCombinedRegisterEnabled() -> openStartCombinedRegister() - else -> { + else -> { // First ask for login and password // I add a tag to indicate that this fragment is a registration stage. // This way it will be automatically popped in when starting the next registration stage @@ -251,6 +251,20 @@ class FtueAuthVariant( } } + private fun FlowResult.orderedStages() = when { + vectorFeatures.isOnboardingCombinedRegisterEnabled() -> missingStages.sortedBy { + when (it) { + is Stage.Email -> 0 + is Stage.Msisdn -> 1 + is Stage.Terms -> 2 + is Stage.ReCaptcha -> 3 + is Stage.Other -> 4 + is Stage.Dummy -> 5 + } + } + else -> missingStages + } + private fun openStartCombinedRegister() { addRegistrationStageFragmentToBackstack(FtueAuthCombinedRegisterFragment::class.java) } @@ -370,15 +384,15 @@ class FtueAuthVariant( ?.let { onboardingViewModel.handle(OnboardingAction.LoginWithToken(it)) } } - private fun handleRegistrationNavigation(flowResult: FlowResult) { + private fun handleRegistrationNavigation(remainingStages: List) { // Complete all mandatory stages first - val mandatoryStage = flowResult.missingStages.firstOrNull { it.mandatory } + val mandatoryStage = remainingStages.firstOrNull { it.mandatory } if (mandatoryStage != null) { doStage(mandatoryStage) } else { // Consider optional stages - val optionalStage = flowResult.missingStages.firstOrNull { !it.mandatory && it !is Stage.Dummy } + val optionalStage = remainingStages.firstOrNull { !it.mandatory && it !is Stage.Dummy } if (optionalStage == null) { // Should not happen... } else { From 2d7b71f70d94970aa53eccb20704f9856245c866 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Tue, 19 Apr 2022 12:30:33 +0100 Subject: [PATCH 099/561] extracting stage ordering to its own class with test --- .../onboarding/ftueauth/FtueAuthVariant.kt | 11 +--- ...FtueMissingRegistrationStagesComparator.kt | 35 +++++++++++++ ...MissingRegistrationStagesComparatorTest.kt | 52 +++++++++++++++++++ .../vector/app/test/fixtures/StageFixtures.kt | 26 ++++++++++ 4 files changed, 114 insertions(+), 10 deletions(-) create mode 100644 vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueMissingRegistrationStagesComparator.kt create mode 100644 vector/src/test/java/im/vector/app/features/onboarding/ftueauth/FtueMissingRegistrationStagesComparatorTest.kt create mode 100644 vector/src/test/java/im/vector/app/test/fixtures/StageFixtures.kt diff --git a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthVariant.kt b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthVariant.kt index 00e96295be..b73d0c7997 100644 --- a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthVariant.kt +++ b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthVariant.kt @@ -252,16 +252,7 @@ class FtueAuthVariant( } private fun FlowResult.orderedStages() = when { - vectorFeatures.isOnboardingCombinedRegisterEnabled() -> missingStages.sortedBy { - when (it) { - is Stage.Email -> 0 - is Stage.Msisdn -> 1 - is Stage.Terms -> 2 - is Stage.ReCaptcha -> 3 - is Stage.Other -> 4 - is Stage.Dummy -> 5 - } - } + vectorFeatures.isOnboardingCombinedRegisterEnabled() -> missingStages.sortedWith(FtueMissingRegistrationStagesComparator()) else -> missingStages } diff --git a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueMissingRegistrationStagesComparator.kt b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueMissingRegistrationStagesComparator.kt new file mode 100644 index 0000000000..6a6326625e --- /dev/null +++ b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueMissingRegistrationStagesComparator.kt @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2022 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package im.vector.app.features.onboarding.ftueauth + +import org.matrix.android.sdk.api.auth.registration.Stage + +class FtueMissingRegistrationStagesComparator : Comparator { + + override fun compare(a: Stage?, b: Stage?): Int { + return (a?.toPriority() ?: 0) - (b?.toPriority() ?: 0) + } + + private fun Stage.toPriority() = when (this) { + is Stage.Email -> 0 + is Stage.Msisdn -> 1 + is Stage.Terms -> 2 + is Stage.ReCaptcha -> 3 + is Stage.Other -> 4 + is Stage.Dummy -> 5 + } +} diff --git a/vector/src/test/java/im/vector/app/features/onboarding/ftueauth/FtueMissingRegistrationStagesComparatorTest.kt b/vector/src/test/java/im/vector/app/features/onboarding/ftueauth/FtueMissingRegistrationStagesComparatorTest.kt new file mode 100644 index 0000000000..010cf5de60 --- /dev/null +++ b/vector/src/test/java/im/vector/app/features/onboarding/ftueauth/FtueMissingRegistrationStagesComparatorTest.kt @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2022 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package im.vector.app.features.onboarding.ftueauth + +import im.vector.app.test.fixtures.aDummyStage +import im.vector.app.test.fixtures.aMsisdnStage +import im.vector.app.test.fixtures.aRecaptchaStage +import im.vector.app.test.fixtures.aTermsStage +import im.vector.app.test.fixtures.anEmailStage +import im.vector.app.test.fixtures.anOtherStage +import org.amshove.kluent.shouldBeEqualTo +import org.junit.Test + +class FtueMissingRegistrationStagesComparatorTest { + + @Test + fun `when ordering stages, then prioritizes email`() { + val input = listOf( + aDummyStage(), + anOtherStage(), + aMsisdnStage(), + anEmailStage(), + aRecaptchaStage(), + aTermsStage() + ) + + val result = input.sortedWith(FtueMissingRegistrationStagesComparator()) + + result shouldBeEqualTo listOf( + anEmailStage(), + aMsisdnStage(), + aTermsStage(), + aRecaptchaStage(), + anOtherStage(), + aDummyStage() + ) + } +} diff --git a/vector/src/test/java/im/vector/app/test/fixtures/StageFixtures.kt b/vector/src/test/java/im/vector/app/test/fixtures/StageFixtures.kt new file mode 100644 index 0000000000..e06993523c --- /dev/null +++ b/vector/src/test/java/im/vector/app/test/fixtures/StageFixtures.kt @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2022 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package im.vector.app.test.fixtures + +import org.matrix.android.sdk.api.auth.registration.Stage + +fun aDummyStage() = Stage.Dummy(mandatory = true) +fun anEmailStage() = Stage.Email(mandatory = true) +fun aMsisdnStage() = Stage.Msisdn(mandatory = true) +fun aTermsStage() = Stage.Terms(mandatory = true, policies = emptyMap()) +fun aRecaptchaStage() = Stage.ReCaptcha(mandatory = true, publicKey = "any-key") +fun anOtherStage() = Stage.Other(mandatory = true, type = "raw-type", params = emptyMap()) From 4a010a7a2af513bb9e5e6bea68d97e0565d6630e Mon Sep 17 00:00:00 2001 From: ericdecanini Date: Tue, 19 Apr 2022 13:31:13 +0200 Subject: [PATCH 100/561] Removes runCatching from TemporaryFileCreator --- .../android/sdk/internal/util/TemporaryFileCreator.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/util/TemporaryFileCreator.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/util/TemporaryFileCreator.kt index c2705916e0..dddd789212 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/util/TemporaryFileCreator.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/util/TemporaryFileCreator.kt @@ -28,10 +28,8 @@ internal class TemporaryFileCreator @Inject constructor( ) { suspend fun create(): File { return withContext(Dispatchers.IO) { - runCatching { - File.createTempFile(UUID.randomUUID().toString(), null, context.cacheDir) - .apply { mkdirs() } - }.getOrThrow() + File.createTempFile(UUID.randomUUID().toString(), null, context.cacheDir) + .apply { mkdirs() } } } } From 0556a3d0886dc90f6fa3e3061fdd67f1b2799025 Mon Sep 17 00:00:00 2001 From: ericdecanini Date: Tue, 19 Apr 2022 13:31:37 +0200 Subject: [PATCH 101/561] Makes MediaFileUtils function internal --- .../main/java/im/vector/lib/multipicker/utils/MediaFileUtils.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/multipicker/src/main/java/im/vector/lib/multipicker/utils/MediaFileUtils.kt b/library/multipicker/src/main/java/im/vector/lib/multipicker/utils/MediaFileUtils.kt index 33cdab3ac2..e97b019c69 100644 --- a/library/multipicker/src/main/java/im/vector/lib/multipicker/utils/MediaFileUtils.kt +++ b/library/multipicker/src/main/java/im/vector/lib/multipicker/utils/MediaFileUtils.kt @@ -22,7 +22,7 @@ import java.text.SimpleDateFormat import java.util.Date import java.util.Locale -fun createTemporaryMediaFile(context: Context, mediaType: MediaType): File { +internal fun createTemporaryMediaFile(context: Context, mediaType: MediaType): File { val timeStamp: String = SimpleDateFormat("yyyyMMdd_HHmmss", Locale.getDefault()).format(Date()) val storageDir: File = context.filesDir.also { it.mkdirs() } val fileSuffix = when (mediaType) { From e736bc73f476bcd2f7ed7323bfc3bb63a24e921d Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Tue, 19 Apr 2022 12:41:13 +0100 Subject: [PATCH 102/561] adding changelog entry --- changelog.d/5783.wip | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/5783.wip diff --git a/changelog.d/5783.wip b/changelog.d/5783.wip new file mode 100644 index 0000000000..e306c0f217 --- /dev/null +++ b/changelog.d/5783.wip @@ -0,0 +1 @@ +Reorders the registration steps to prioritise email, then terms for the FTUE onboarding From 00bbb94b3be2592b3cc4eed625a18dc5b2b3a9fe Mon Sep 17 00:00:00 2001 From: Onuray Sahin Date: Tue, 19 Apr 2022 17:42:38 +0300 Subject: [PATCH 103/561] Add screen sharing option to call menu. --- vector/src/main/res/drawable/ic_share_screen.xml | 10 ++++++++++ .../src/main/res/layout/bottom_sheet_call_controls.xml | 9 +++++++++ vector/src/main/res/values/strings.xml | 1 + 3 files changed, 20 insertions(+) create mode 100644 vector/src/main/res/drawable/ic_share_screen.xml diff --git a/vector/src/main/res/drawable/ic_share_screen.xml b/vector/src/main/res/drawable/ic_share_screen.xml new file mode 100644 index 0000000000..5e3caa6987 --- /dev/null +++ b/vector/src/main/res/drawable/ic_share_screen.xml @@ -0,0 +1,10 @@ + + + diff --git a/vector/src/main/res/layout/bottom_sheet_call_controls.xml b/vector/src/main/res/layout/bottom_sheet_call_controls.xml index e751ac412a..0b67059dd8 100644 --- a/vector/src/main/res/layout/bottom_sheet_call_controls.xml +++ b/vector/src/main/res/layout/bottom_sheet_call_controls.xml @@ -7,6 +7,15 @@ android:background="?colorSurface" android:orientation="vertical"> + + Back Turn HD off Turn HD on + Share screen Send files Send sticker From 99cab794c4221dec6a022f4bfa229c4132b2d215 Mon Sep 17 00:00:00 2001 From: Onuray Sahin Date: Tue, 19 Apr 2022 17:47:06 +0300 Subject: [PATCH 104/561] Show screen sharing permission dialog. --- .../features/call/CallControlsBottomSheet.kt | 5 +++ .../app/features/call/VectorCallActivity.kt | 24 ++++++++--- .../features/call/VectorCallViewActions.kt | 2 + .../app/features/call/VectorCallViewEvents.kt | 1 + .../app/features/call/VectorCallViewModel.kt | 40 +++++++++++-------- .../app/features/call/webrtc/WebRtcCall.kt | 4 ++ .../features/navigation/DefaultNavigator.kt | 5 +++ .../app/features/navigation/Navigator.kt | 5 +++ 8 files changed, 65 insertions(+), 21 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/call/CallControlsBottomSheet.kt b/vector/src/main/java/im/vector/app/features/call/CallControlsBottomSheet.kt index e38b53c858..32d32c9fa6 100644 --- a/vector/src/main/java/im/vector/app/features/call/CallControlsBottomSheet.kt +++ b/vector/src/main/java/im/vector/app/features/call/CallControlsBottomSheet.kt @@ -66,6 +66,11 @@ class CallControlsBottomSheet : VectorBaseBottomSheetDialogFragment(), CallContro private fun handleViewEvents(event: VectorCallViewEvents?) { Timber.tag(loggerTag.value).v("handleViewEvents $event") when (event) { - is VectorCallViewEvents.ConnectionTimeout -> { + is VectorCallViewEvents.ConnectionTimeout -> { onErrorTimoutConnect(event.turn) } - is VectorCallViewEvents.ShowDialPad -> { + is VectorCallViewEvents.ShowDialPad -> { CallDialPadBottomSheet.newInstance(false).apply { callback = dialPadCallback }.show(supportFragmentManager, FRAGMENT_DIAL_PAD_TAG) } - is VectorCallViewEvents.ShowCallTransferScreen -> { + is VectorCallViewEvents.ShowCallTransferScreen -> { val callId = withState(callViewModel) { it.callId } navigator.openCallTransfer(this, callTransferActivityResultLauncher, callId) } - is VectorCallViewEvents.FailToTransfer -> showSnackbar(getString(R.string.call_transfer_failure)) - else -> Unit + is VectorCallViewEvents.FailToTransfer -> showSnackbar(getString(R.string.call_transfer_failure)) + is VectorCallViewEvents.ShowScreenSharingPermissionDialog -> handleShowScreenSharingPermissionDialog() + else -> Unit } } @@ -628,6 +630,18 @@ class VectorCallActivity : VectorBaseActivity(), CallContro } } + private val screenSharingPermissionActivityResultLauncher = registerStartForActivityResult { activityResult -> + if (activityResult.resultCode == Activity.RESULT_OK) { + callViewModel.handle(VectorCallViewActions.StartScreenSharing) + } + } + + private fun handleShowScreenSharingPermissionDialog() { + getSystemService()?.let { + navigator.openScreenSharingPermissionDialog(it.createScreenCaptureIntent(), screenSharingPermissionActivityResultLauncher) + } + } + companion object { private const val EXTRA_MODE = "EXTRA_MODE" private const val FRAGMENT_DIAL_PAD_TAG = "FRAGMENT_DIAL_PAD_TAG" diff --git a/vector/src/main/java/im/vector/app/features/call/VectorCallViewActions.kt b/vector/src/main/java/im/vector/app/features/call/VectorCallViewActions.kt index d1ed961814..daad8a2332 100644 --- a/vector/src/main/java/im/vector/app/features/call/VectorCallViewActions.kt +++ b/vector/src/main/java/im/vector/app/features/call/VectorCallViewActions.kt @@ -40,4 +40,6 @@ sealed class VectorCallViewActions : VectorViewModelAction { object CallTransferSelectionCancelled : VectorCallViewActions() data class CallTransferSelectionResult(val callTransferResult: CallTransferResult) : VectorCallViewActions() object TransferCall : VectorCallViewActions() + object InitiateScreenSharing : VectorCallViewActions() + object StartScreenSharing : VectorCallViewActions() } diff --git a/vector/src/main/java/im/vector/app/features/call/VectorCallViewEvents.kt b/vector/src/main/java/im/vector/app/features/call/VectorCallViewEvents.kt index 7c29d7eea3..a2b6fbaf92 100644 --- a/vector/src/main/java/im/vector/app/features/call/VectorCallViewEvents.kt +++ b/vector/src/main/java/im/vector/app/features/call/VectorCallViewEvents.kt @@ -30,6 +30,7 @@ sealed class VectorCallViewEvents : VectorViewEvents { object ShowDialPad : VectorCallViewEvents() object ShowCallTransferScreen : VectorCallViewEvents() object FailToTransfer : VectorCallViewEvents() + object ShowScreenSharingPermissionDialog : VectorCallViewEvents() // data class CallAnswered(val content: CallAnswerContent) : VectorCallViewEvents() // data class CallHangup(val content: CallHangupContent) : VectorCallViewEvents() // object CallAccepted : VectorCallViewEvents() diff --git a/vector/src/main/java/im/vector/app/features/call/VectorCallViewModel.kt b/vector/src/main/java/im/vector/app/features/call/VectorCallViewModel.kt index b9bf578daa..4e622c4ab3 100644 --- a/vector/src/main/java/im/vector/app/features/call/VectorCallViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/call/VectorCallViewModel.kt @@ -256,27 +256,27 @@ class VectorCallViewModel @AssistedInject constructor( override fun handle(action: VectorCallViewActions) = withState { state -> when (action) { - VectorCallViewActions.EndCall -> call?.endCall() - VectorCallViewActions.AcceptCall -> { + VectorCallViewActions.EndCall -> call?.endCall() + VectorCallViewActions.AcceptCall -> { setState { copy(callState = Loading()) } call?.acceptIncomingCall() } - VectorCallViewActions.DeclineCall -> { + VectorCallViewActions.DeclineCall -> { setState { copy(callState = Loading()) } call?.endCall() } - VectorCallViewActions.ToggleMute -> { + VectorCallViewActions.ToggleMute -> { val muted = state.isAudioMuted call?.muteCall(!muted) setState { copy(isAudioMuted = !muted) } } - VectorCallViewActions.ToggleVideo -> { + VectorCallViewActions.ToggleVideo -> { if (state.isVideoCall) { val videoEnabled = state.isVideoEnabled call?.enableVideo(!videoEnabled) @@ -286,19 +286,19 @@ class VectorCallViewModel @AssistedInject constructor( } Unit } - VectorCallViewActions.ToggleHoldResume -> { + VectorCallViewActions.ToggleHoldResume -> { val isRemoteOnHold = state.isRemoteOnHold call?.updateRemoteOnHold(!isRemoteOnHold) } - is VectorCallViewActions.ChangeAudioDevice -> { + is VectorCallViewActions.ChangeAudioDevice -> { callManager.audioManager.setAudioDevice(action.device) } - VectorCallViewActions.SwitchSoundDevice -> { + VectorCallViewActions.SwitchSoundDevice -> { _viewEvents.post( VectorCallViewEvents.ShowSoundDeviceChooser(state.availableDevices, state.device) ) } - VectorCallViewActions.HeadSetButtonPressed -> { + VectorCallViewActions.HeadSetButtonPressed -> { if (state.callState.invoke() is CallState.LocalRinging) { // accept call call?.acceptIncomingCall() @@ -309,20 +309,20 @@ class VectorCallViewModel @AssistedInject constructor( } Unit } - VectorCallViewActions.ToggleCamera -> { + VectorCallViewActions.ToggleCamera -> { call?.switchCamera() } - VectorCallViewActions.ToggleHDSD -> { + VectorCallViewActions.ToggleHDSD -> { if (!state.isVideoCall) return@withState call?.setCaptureFormat(if (state.isHD) CaptureFormat.SD else CaptureFormat.HD) } - VectorCallViewActions.OpenDialPad -> { + VectorCallViewActions.OpenDialPad -> { _viewEvents.post(VectorCallViewEvents.ShowDialPad) } - is VectorCallViewActions.SendDtmfDigit -> { + is VectorCallViewActions.SendDtmfDigit -> { call?.sendDtmfDigit(action.digit) } - VectorCallViewActions.InitiateCallTransfer -> { + VectorCallViewActions.InitiateCallTransfer -> { call?.updateRemoteOnHold(true) _viewEvents.post( VectorCallViewEvents.ShowCallTransferScreen @@ -334,13 +334,21 @@ class VectorCallViewModel @AssistedInject constructor( is VectorCallViewActions.CallTransferSelectionResult -> { handleCallTransferSelectionResult(action.callTransferResult) } - VectorCallViewActions.TransferCall -> { + VectorCallViewActions.TransferCall -> { handleCallTransfer() } - is VectorCallViewActions.SwitchCall -> { + is VectorCallViewActions.SwitchCall -> { setState { VectorCallViewState(action.callArgs) } setupCallWithCurrentState() } + is VectorCallViewActions.InitiateScreenSharing -> { + _viewEvents.post( + VectorCallViewEvents.ShowScreenSharingPermissionDialog + ) + } + is VectorCallViewActions.StartScreenSharing -> { + call?.shareScreen() + } } } diff --git a/vector/src/main/java/im/vector/app/features/call/webrtc/WebRtcCall.kt b/vector/src/main/java/im/vector/app/features/call/webrtc/WebRtcCall.kt index 90088c8475..c744f317ab 100644 --- a/vector/src/main/java/im/vector/app/features/call/webrtc/WebRtcCall.kt +++ b/vector/src/main/java/im/vector/app/features/call/webrtc/WebRtcCall.kt @@ -770,6 +770,10 @@ class WebRtcCall( return currentCaptureFormat } + fun shareScreen() { + // TODO. Will be handled within the next PR. + } + private suspend fun release() { listeners.clear() mxCall.removeListener(this) diff --git a/vector/src/main/java/im/vector/app/features/navigation/DefaultNavigator.kt b/vector/src/main/java/im/vector/app/features/navigation/DefaultNavigator.kt index 6122cf1eee..864b5f76bb 100644 --- a/vector/src/main/java/im/vector/app/features/navigation/DefaultNavigator.kt +++ b/vector/src/main/java/im/vector/app/features/navigation/DefaultNavigator.kt @@ -600,4 +600,9 @@ class DefaultNavigator @Inject constructor( roomEncryptionTrustLevel = threadTimelineArgs.roomEncryptionTrustLevel ))) } + + override fun openScreenSharingPermissionDialog(screenCaptureIntent: Intent, + activityResultLauncher: ActivityResultLauncher) { + activityResultLauncher.launch(screenCaptureIntent) + } } diff --git a/vector/src/main/java/im/vector/app/features/navigation/Navigator.kt b/vector/src/main/java/im/vector/app/features/navigation/Navigator.kt index 310105bd95..41b5374168 100644 --- a/vector/src/main/java/im/vector/app/features/navigation/Navigator.kt +++ b/vector/src/main/java/im/vector/app/features/navigation/Navigator.kt @@ -168,4 +168,9 @@ interface Navigator { fun openThread(context: Context, threadTimelineArgs: ThreadTimelineArgs, eventIdToNavigate: String? = null) fun openThreadList(context: Context, threadTimelineArgs: ThreadTimelineArgs) + + fun openScreenSharingPermissionDialog( + screenCaptureIntent: Intent, + activityResultLauncher: ActivityResultLauncher + ) } From ebf821011b33051c15bc3d0d6a3b6bca2b79da69 Mon Sep 17 00:00:00 2001 From: Zet Date: Mon, 18 Apr 2022 16:58:50 +0000 Subject: [PATCH 105/561] Translated using Weblate (Arabic) Currently translated at 37.6% (825 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/ar/ --- vector/src/main/res/values-ar/strings.xml | 38 +++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/vector/src/main/res/values-ar/strings.xml b/vector/src/main/res/values-ar/strings.xml index 32b37a6d42..fe3abdcf80 100644 --- a/vector/src/main/res/values-ar/strings.xml +++ b/vector/src/main/res/values-ar/strings.xml @@ -963,4 +963,42 @@ كل الرسائل (مزعج) تجاهل مستخدم أَو + هذا العنوان الرئيسي + العناوين المنشورة + عناوين الفضاء + عناوين الغرفة + اسمح للزوار الانضمام + النفاذ للفضاء + النفاذ للغرفة + من له النفاذ؟ + إعدادات الحساب + يمكنك إدارة الإخطارات في %1$s. + أخطرني بـ + لم أكن أنا + استعمل هذه الجلسة لاستيثاق جلسة جديدة، مما يمنحها نفاذًا للرسائل المعماة. + ولوج جديد، أنت من قمت به؟ + أنعش + فك قفل تأريخ الرسائل المعماة + المفاتيح محدثة سلفًا! + أدر النسخ الاحتياكي للمفاتيح + استعادة الرسائل المعماة + نجح استيراد المفاتيح + أتريد تفعيل التعميّة؟ + ليس لديك إذن لتفعيل التعميّة في هذه الغرفة. + محرر الرسائل + يرسل الرسالة المعطاة ملونة بألوان قوس قزح + ${app_name} واجه مشكلة في تصيير الحدث ذو المعرف \'%1$s\' + ${app_name} لا يستطيع التعامل مع ملفات من نوع \'%1$s\' + رسالة مباشرة + مشرف لـ %1$s + مدير لـ %1$s + المستخدمون + الدعوات + مخصص + المشرفون + المديرون + يغادر الغرفة.… + غادر + غادر الغرفة + المرفوعات \ No newline at end of file From e0556cd5e6013da204d03bad7324477c7ef7ad3d Mon Sep 17 00:00:00 2001 From: ClaireG Date: Wed, 20 Apr 2022 09:17:16 +0200 Subject: [PATCH 106/561] Crash: open private room by link. Use RoomId instead of the alias. --- changelog.d/5786.bugfix | 2 ++ .../app/features/matrixto/MatrixToAction.kt | 2 +- .../matrixto/MatrixToBottomSheetViewModel.kt | 15 +++++++++++++-- 3 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 changelog.d/5786.bugfix diff --git a/changelog.d/5786.bugfix b/changelog.d/5786.bugfix new file mode 100644 index 0000000000..90c937961e --- /dev/null +++ b/changelog.d/5786.bugfix @@ -0,0 +1,2 @@ +Open a room by link: use the actual roomId instead of the alias + diff --git a/vector/src/main/java/im/vector/app/features/matrixto/MatrixToAction.kt b/vector/src/main/java/im/vector/app/features/matrixto/MatrixToAction.kt index f38049640d..25db811600 100644 --- a/vector/src/main/java/im/vector/app/features/matrixto/MatrixToAction.kt +++ b/vector/src/main/java/im/vector/app/features/matrixto/MatrixToAction.kt @@ -24,7 +24,7 @@ sealed class MatrixToAction : VectorViewModelAction { object FailedToResolveUser : MatrixToAction() object FailedToStartChatting : MatrixToAction() data class JoinSpace(val spaceID: String, val viaServers: List?) : MatrixToAction() - data class JoinRoom(val roomId: String, val viaServers: List?) : MatrixToAction() + data class JoinRoom(val roomIdOrAlias: String, val viaServers: List?) : MatrixToAction() data class OpenSpace(val spaceID: String) : MatrixToAction() data class OpenRoom(val roomId: String) : MatrixToAction() } diff --git a/vector/src/main/java/im/vector/app/features/matrixto/MatrixToBottomSheetViewModel.kt b/vector/src/main/java/im/vector/app/features/matrixto/MatrixToBottomSheetViewModel.kt index 04c2c8dd44..6d0e380bc9 100644 --- a/vector/src/main/java/im/vector/app/features/matrixto/MatrixToBottomSheetViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/matrixto/MatrixToBottomSheetViewModel.kt @@ -33,6 +33,7 @@ import im.vector.app.core.resources.StringProvider import im.vector.app.features.createdirect.DirectRoomHelper import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch +import org.matrix.android.sdk.api.MatrixPatterns import org.matrix.android.sdk.api.extensions.tryOrNull import org.matrix.android.sdk.api.session.Session import org.matrix.android.sdk.api.session.permalinks.PermalinkData @@ -296,8 +297,12 @@ class MatrixToBottomSheetViewModel @AssistedInject constructor( } viewModelScope.launch { try { - session.joinRoom(action.roomId, null, action.viaServers?.take(3) ?: emptyList()) - _viewEvents.post(MatrixToViewEvents.NavigateToRoom(action.roomId)) + session.joinRoom( + roomIdOrAlias = action.roomIdOrAlias, + reason = null, + viaServers = action.viaServers?.take(3) ?: emptyList() + ) + _viewEvents.post(MatrixToViewEvents.NavigateToRoom(getRoomIdFromRoomIdOrAlias(action.roomIdOrAlias))) } catch (failure: Throwable) { _viewEvents.post(MatrixToViewEvents.ShowModalError(errorFormatter.toHumanReadable(failure))) } finally { @@ -309,6 +314,12 @@ class MatrixToBottomSheetViewModel @AssistedInject constructor( } } + private suspend fun getRoomIdFromRoomIdOrAlias(roomIdOrAlias: String): String { + return if (MatrixPatterns.isRoomAlias(roomIdOrAlias)) { + session.getRoomIdByAlias(roomIdOrAlias, true).get().roomId + } else roomIdOrAlias + } + private fun handleStartChatting(action: MatrixToAction.StartChattingWithUser) { setState { copy(startChattingState = Loading()) From 7d4e647b3b2b74a849324e239514b5389213d3ea Mon Sep 17 00:00:00 2001 From: Jozef Gaal Date: Wed, 20 Apr 2022 01:01:29 +0000 Subject: [PATCH 107/561] Translated using Weblate (Slovak) Currently translated at 100.0% (2190 of 2190 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/sk/ --- vector/src/main/res/values-sk/strings.xml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/vector/src/main/res/values-sk/strings.xml b/vector/src/main/res/values-sk/strings.xml index eee10d9c4c..ff1089caa0 100644 --- a/vector/src/main/res/values-sk/strings.xml +++ b/vector/src/main/res/values-sk/strings.xml @@ -129,8 +129,8 @@ Predvolený Vlastná úroveň (%1$d) Vlastná úroveň - Zmenili ste úroveň moci používateľa %1$s. - %1$s zmenil úroveň moci používateľa %2$s. + Zmenili ste úroveň oprávnenia používateľa %1$s. + %1$s zmenil úroveň oprávnenia používateľa %2$s. %1$s z %2$s na %3$s Pozvanie od vás. Dôvod: %1$s Pozvali ste %1$s. Dôvod: %2$s @@ -284,7 +284,7 @@ Skryť všetky správy od tohoto používateľa Zobraziť všetky správy od tohoto používateľa Zmieniť sa - Túto zmenu nebudete môcť vrátiť späť, pretože tomuto používateľovi udeľujete rovnakú úroveň moci, akú máte vy. + Túto zmenu nebudete môcť vrátiť späť, pretože tomuto používateľovi udeľujete rovnakú úroveň oprávnenia, akú máte vy. \nSte si istí\? %s píše… %1$s a %2$s píšu… @@ -427,7 +427,7 @@ Ste si istí, že chcete odstrániť widget z tejto miestnosti? Nie je možné vytvoriť widget. Nepodarilo sa odoslať požiadavku. - Úroveň moci musí byť kladné celé číslo. + Úroveň oprávnenia musí byť kladné celé číslo. Nenachádzate sa v tejto miestnosti. V tejto miestnosti nemáte oprávnenie na vykonanie takejto akcie. V požiadavke chýba room_id. @@ -536,8 +536,8 @@ Zobrazí akciu Zakáže vstup zadanému používateľovi Povolí vstup zadanému používateľovi - Určuje úroveň moci pre zadaného používateľa - Znižuje úroveň moci pre zadaného používateľa + Určuje úroveň oprávnenia pre zadaného používateľa + Odstráni používateľa s daným ID Pozve zadaného používateľa do aktuálnej miestnosti Pripojí sa do miestnosti s danou adresou Opustí aktuálnu miestnosť @@ -743,8 +743,8 @@ Zabrániť neúmyselnému telefonovaniu Žiadať potvrdenie pred uskutočnením hovoru Zrušiť pozvanie - Znížiť vlastnú úroveň moci\? - Túto zmenu nebudete môcť vrátiť späť, pretože znižujete vašu vlastnú úroveň moci. Ak ste jediný poverený používateľ v miestnosti, nebudete môcť znovu získať úroveň, akú máte teraz. + Znížiť vlastnú úroveň oprávnenia\? + Túto zmenu nebudete môcť vrátiť späť, pretože znižujete vašu vlastnú úroveň oprávnenia. Ak ste jediný poverený používateľ v miestnosti, nebudete môcť znovu získať úroveň, akú máte teraz. Znížiť Ignorovať používateľa Ignorovaním tohoto používateľa odstránite všetky jeho správy vo vašich spoločných miestnostiach. @@ -900,7 +900,7 @@ Záloha s %d kľúčom obnovená. Záloha s %d kľúčmi obnovená. - Záloha s %d kľúčami obnovená. + Záloha s %d kľúčmi obnovená. %d nový kľúč bol pridaný do tejto relácie. @@ -1652,8 +1652,8 @@ Overiť porovnaním emotikonov Namiesto toho overte porovnaním emotikonov Ak nie ste osobne, porovnajte namiesto toho emotikony - Skenovať pomocou tohto zariadenia - Naskenujte kód pomocou iného zariadenia alebo prepnite a skenujte pomocou tohto zariadenia + Naskenovať pomocou tohto zariadenia + Naskenujte kód pomocou iného zariadenia alebo prepnite a naskenujte pomocou tohto zariadenia Naskenujte kód pomocou zariadenia druhého používateľa, aby ste sa navzájom bezpečne overili Záver overovania Môže byť narušená jedna z nasledujúcich vecí: From 73754993a53e1375561ade5e9be7c3748ee15efe Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Wed, 20 Apr 2022 08:36:41 +0000 Subject: [PATCH 108/561] Translated using Weblate (Polish) Currently translated at 38.5% (22 of 57 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/pl/ --- fastlane/metadata/android/pl-PL/title.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane/metadata/android/pl-PL/title.txt b/fastlane/metadata/android/pl-PL/title.txt index 500e9c04e8..907f907f99 100644 --- a/fastlane/metadata/android/pl-PL/title.txt +++ b/fastlane/metadata/android/pl-PL/title.txt @@ -1 +1 @@ -Element - Bezpieczny komunikator +Element From 90b063f0de921232a252d6ae7708431495aa5643 Mon Sep 17 00:00:00 2001 From: ericdecanini Date: Wed, 20 Apr 2022 10:55:06 +0200 Subject: [PATCH 109/561] Replaces doWithRealm with writeAsync --- .../sync/handler/SyncResponsePostTreatmentAggregatorHandler.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/SyncResponsePostTreatmentAggregatorHandler.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/SyncResponsePostTreatmentAggregatorHandler.kt index 25de05602a..ed8f88dfdd 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/SyncResponsePostTreatmentAggregatorHandler.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/SyncResponsePostTreatmentAggregatorHandler.kt @@ -93,7 +93,7 @@ internal class SyncResponsePostTreatmentAggregatorHandler @Inject constructor( private fun List.saveLocally() { val userEntities = map { user -> UserEntityFactory.create(user) } - monarchy.doWithRealm { + monarchy.writeAsync { it.insertOrUpdate(userEntities) } } From 8eab24c53dd2f641fc660d03d338c0565e77f752 Mon Sep 17 00:00:00 2001 From: ericdecanini Date: Wed, 20 Apr 2022 11:10:01 +0200 Subject: [PATCH 110/561] Replaces writeAsync with awaitTransaction --- .../handler/SyncResponsePostTreatmentAggregatorHandler.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/SyncResponsePostTreatmentAggregatorHandler.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/SyncResponsePostTreatmentAggregatorHandler.kt index ed8f88dfdd..c638ed4f80 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/SyncResponsePostTreatmentAggregatorHandler.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/SyncResponsePostTreatmentAggregatorHandler.kt @@ -28,6 +28,7 @@ import org.matrix.android.sdk.internal.session.sync.model.accountdata.toMutable import org.matrix.android.sdk.internal.session.user.UserEntityFactory import org.matrix.android.sdk.internal.session.user.accountdata.DirectChatsHelper import org.matrix.android.sdk.internal.session.user.accountdata.UpdateUserAccountDataTask +import org.matrix.android.sdk.internal.util.awaitTransaction import javax.inject.Inject internal class SyncResponsePostTreatmentAggregatorHandler @Inject constructor( @@ -91,9 +92,9 @@ internal class SyncResponsePostTreatmentAggregatorHandler @Inject constructor( } } - private fun List.saveLocally() { + private suspend fun List.saveLocally() { val userEntities = map { user -> UserEntityFactory.create(user) } - monarchy.writeAsync { + monarchy.awaitTransaction { it.insertOrUpdate(userEntities) } } From 3ac99fd4e4665349f6a735c4e160438dd3defdae Mon Sep 17 00:00:00 2001 From: Ihor Hordiichuk Date: Wed, 20 Apr 2022 09:21:33 +0000 Subject: [PATCH 111/561] Translated using Weblate (Ukrainian) Currently translated at 100.0% (57 of 57 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/uk/ --- fastlane/metadata/android/uk/changelogs/40104100.txt | 2 ++ fastlane/metadata/android/uk/changelogs/40104110.txt | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 fastlane/metadata/android/uk/changelogs/40104100.txt create mode 100644 fastlane/metadata/android/uk/changelogs/40104110.txt diff --git a/fastlane/metadata/android/uk/changelogs/40104100.txt b/fastlane/metadata/android/uk/changelogs/40104100.txt new file mode 100644 index 0000000000..93c9fe4b70 --- /dev/null +++ b/fastlane/metadata/android/uk/changelogs/40104100.txt @@ -0,0 +1,2 @@ +Основні зміни в цій версії: Прокручування в голосових повідомленнях. Усунуто різні вади й поліпшено стабільність. +Вичерпний перелік змін: https://github.com/vector-im/element-android/releases diff --git a/fastlane/metadata/android/uk/changelogs/40104110.txt b/fastlane/metadata/android/uk/changelogs/40104110.txt new file mode 100644 index 0000000000..252a57c9d9 --- /dev/null +++ b/fastlane/metadata/android/uk/changelogs/40104110.txt @@ -0,0 +1,2 @@ +Основні зміни в цій версії: Усунуто різні вади й поліпшено стабільність. +Вичерпний перелік змін: https://github.com/vector-im/element-android/releases From 7c1aca8703885cd315f8bc3ccde5b106653eafa2 Mon Sep 17 00:00:00 2001 From: random Date: Wed, 20 Apr 2022 09:30:33 +0000 Subject: [PATCH 112/561] Translated using Weblate (Italian) Currently translated at 100.0% (57 of 57 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/it/ --- fastlane/metadata/android/it-IT/changelogs/40104100.txt | 2 ++ fastlane/metadata/android/it-IT/changelogs/40104110.txt | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 fastlane/metadata/android/it-IT/changelogs/40104100.txt create mode 100644 fastlane/metadata/android/it-IT/changelogs/40104110.txt diff --git a/fastlane/metadata/android/it-IT/changelogs/40104100.txt b/fastlane/metadata/android/it-IT/changelogs/40104100.txt new file mode 100644 index 0000000000..6376e6c45a --- /dev/null +++ b/fastlane/metadata/android/it-IT/changelogs/40104100.txt @@ -0,0 +1,2 @@ +Modifiche principali in questa versione: scorrimento nei vocali. Varie correzioni e miglioramenti della stabilità. +Cronologia completa: https://github.com/vector-im/element-android/releases diff --git a/fastlane/metadata/android/it-IT/changelogs/40104110.txt b/fastlane/metadata/android/it-IT/changelogs/40104110.txt new file mode 100644 index 0000000000..556a6fc7ea --- /dev/null +++ b/fastlane/metadata/android/it-IT/changelogs/40104110.txt @@ -0,0 +1,2 @@ +Modifiche principali in questa versione: varie correzioni di errori e miglioramenti della stabilità. +Cronologia completa: https://github.com/vector-im/element-android/releases From fa3476d6cdbf810e5ebf1413e1ae859579a75562 Mon Sep 17 00:00:00 2001 From: Onuray Sahin Date: Wed, 20 Apr 2022 13:33:35 +0300 Subject: [PATCH 113/561] Create a foreground service during screen sharing. --- vector/src/main/AndroidManifest.xml | 6 +++ .../app/features/call/VectorCallActivity.kt | 8 +++ .../call/webrtc/ScreenCaptureService.kt | 53 +++++++++++++++++++ .../notifications/NotificationUtils.kt | 14 +++++ vector/src/main/res/values/strings.xml | 4 ++ 5 files changed, 85 insertions(+) create mode 100644 vector/src/main/java/im/vector/app/features/call/webrtc/ScreenCaptureService.kt diff --git a/vector/src/main/AndroidManifest.xml b/vector/src/main/AndroidManifest.xml index eada664216..20b7c4908a 100644 --- a/vector/src/main/AndroidManifest.xml +++ b/vector/src/main/AndroidManifest.xml @@ -375,6 +375,12 @@ android:exported="false" android:foregroundServiceType="location" /> + + (), CallContro private val screenSharingPermissionActivityResultLauncher = registerStartForActivityResult { activityResult -> if (activityResult.resultCode == Activity.RESULT_OK) { callViewModel.handle(VectorCallViewActions.StartScreenSharing) + // We need to start a foreground service with a sticky notification during screen sharing + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { + ContextCompat.startForegroundService( + this, + Intent(this, ScreenCaptureService::class.java) + ) + } } } diff --git a/vector/src/main/java/im/vector/app/features/call/webrtc/ScreenCaptureService.kt b/vector/src/main/java/im/vector/app/features/call/webrtc/ScreenCaptureService.kt new file mode 100644 index 0000000000..7626e8178c --- /dev/null +++ b/vector/src/main/java/im/vector/app/features/call/webrtc/ScreenCaptureService.kt @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2022 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package im.vector.app.features.call.webrtc + +import android.content.Intent +import android.os.Binder +import android.os.IBinder +import dagger.hilt.android.AndroidEntryPoint +import im.vector.app.core.services.VectorService +import im.vector.app.features.notifications.NotificationUtils +import javax.inject.Inject + +@AndroidEntryPoint +class ScreenCaptureService : VectorService() { + + @Inject lateinit var notificationUtils: NotificationUtils + private val binder = LocalBinder() + + override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int { + // Show a sticky notification + val notificationId = System.currentTimeMillis().toInt() + val notification = notificationUtils.buildScreenSharingNotification() + startForeground(notificationId, notification) + + return START_STICKY + } + + override fun onBind(intent: Intent?): IBinder { + return binder + } + + fun stopService() { + stopSelf() + } + + inner class LocalBinder : Binder() { + fun getService(): ScreenCaptureService = this@ScreenCaptureService + } +} diff --git a/vector/src/main/java/im/vector/app/features/notifications/NotificationUtils.kt b/vector/src/main/java/im/vector/app/features/notifications/NotificationUtils.kt index 161b58d53d..e44f42d5cd 100755 --- a/vector/src/main/java/im/vector/app/features/notifications/NotificationUtils.kt +++ b/vector/src/main/java/im/vector/app/features/notifications/NotificationUtils.kt @@ -535,6 +535,20 @@ class NotificationUtils @Inject constructor(private val context: Context, .build() } + /** + * Creates a notification that indicates the application is capturing the screen. + */ + fun buildScreenSharingNotification(): Notification { + return NotificationCompat.Builder(context, SILENT_NOTIFICATION_CHANNEL_ID) + .setContentTitle(stringProvider.getString(R.string.screen_sharing_notification_title)) + .setContentText(stringProvider.getString(R.string.screen_sharing_notification_description)) + .setSmallIcon(R.drawable.ic_share_screen) + .setColor(ThemeUtils.getColor(context, android.R.attr.colorPrimary)) + .setCategory(NotificationCompat.CATEGORY_SERVICE) + .setContentIntent(buildOpenHomePendingIntentForSummary()) + .build() + } + fun buildDownloadFileNotification(uri: Uri, fileName: String, mimeType: String): Notification { return NotificationCompat.Builder(context, SILENT_NOTIFICATION_CHANNEL_ID) .setGroup(stringProvider.getString(R.string.app_name)) diff --git a/vector/src/main/res/values/strings.xml b/vector/src/main/res/values/strings.xml index 42f85832d4..4b8009d10b 100644 --- a/vector/src/main/res/values/strings.xml +++ b/vector/src/main/res/values/strings.xml @@ -3024,4 +3024,8 @@ Notify the whole room Users Room notification + + + ${app_name} Screen Sharing + Screen sharing is in progress From 903c402cf5f3d163b0150534992177ee5777d67f Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Wed, 20 Apr 2022 14:08:58 +0100 Subject: [PATCH 114/561] generating changelog --- CHANGES.md | 62 +++++++++++++++++++ changelog.d/2396.wip | 1 - changelog.d/4305.bugfix | 1 - changelog.d/5079.misc | 1 - changelog.d/5262.bugfix | 1 - changelog.d/5279.wip | 1 - changelog.d/5475.bugfix | 1 - changelog.d/5481.bugfix | 1 - changelog.d/5486.misc | 1 - changelog.d/5554.bugfix | 1 - changelog.d/5570.bugfix | 1 - changelog.d/5582.feature | 1 - changelog.d/5586.feature | 1 - changelog.d/5596.bugfix | 1 - changelog.d/5609.bugfix | 1 - changelog.d/5618.bugfix | 1 - changelog.d/5639.sdk | 1 - changelog.d/5659.bugfix | 1 - changelog.d/5697.feature | 1 - changelog.d/5703.misc | 1 - changelog.d/5703.sdk | 1 - changelog.d/5707.bugfix | 1 - changelog.d/5710.feature | 1 - changelog.d/5711.feature | 1 - changelog.d/5719.feature | 1 - changelog.d/5727.misc | 1 - changelog.d/5731.bugfix | 1 - changelog.d/5732.misc | 1 - changelog.d/5735.bugfix | 1 - changelog.d/5744.misc | 1 - changelog.d/5744.sdk | 3 - changelog.d/5746.bugfix | 1 - changelog.d/5749.wip | 1 - changelog.d/5757.bugfix | 1 - changelog.d/5758.feature | 1 - changelog.d/5761.feature | 1 - changelog.d/5762.sdk | 1 - changelog.d/5765.bugfix | 1 - changelog.d/5766.bugfix | 1 - changelog.d/5767.bugfix | 1 - changelog.d/5786.bugfix | 2 - .../android/en-US/changelogs/40104120.txt | 2 + 42 files changed, 64 insertions(+), 43 deletions(-) delete mode 100644 changelog.d/2396.wip delete mode 100644 changelog.d/4305.bugfix delete mode 100644 changelog.d/5079.misc delete mode 100644 changelog.d/5262.bugfix delete mode 100644 changelog.d/5279.wip delete mode 100644 changelog.d/5475.bugfix delete mode 100644 changelog.d/5481.bugfix delete mode 100644 changelog.d/5486.misc delete mode 100644 changelog.d/5554.bugfix delete mode 100644 changelog.d/5570.bugfix delete mode 100644 changelog.d/5582.feature delete mode 100644 changelog.d/5586.feature delete mode 100644 changelog.d/5596.bugfix delete mode 100644 changelog.d/5609.bugfix delete mode 100644 changelog.d/5618.bugfix delete mode 100644 changelog.d/5639.sdk delete mode 100644 changelog.d/5659.bugfix delete mode 100644 changelog.d/5697.feature delete mode 100644 changelog.d/5703.misc delete mode 100644 changelog.d/5703.sdk delete mode 100644 changelog.d/5707.bugfix delete mode 100644 changelog.d/5710.feature delete mode 100644 changelog.d/5711.feature delete mode 100644 changelog.d/5719.feature delete mode 100644 changelog.d/5727.misc delete mode 100644 changelog.d/5731.bugfix delete mode 100644 changelog.d/5732.misc delete mode 100644 changelog.d/5735.bugfix delete mode 100644 changelog.d/5744.misc delete mode 100644 changelog.d/5744.sdk delete mode 100644 changelog.d/5746.bugfix delete mode 100644 changelog.d/5749.wip delete mode 100644 changelog.d/5757.bugfix delete mode 100644 changelog.d/5758.feature delete mode 100644 changelog.d/5761.feature delete mode 100644 changelog.d/5762.sdk delete mode 100644 changelog.d/5765.bugfix delete mode 100644 changelog.d/5766.bugfix delete mode 100644 changelog.d/5767.bugfix delete mode 100644 changelog.d/5786.bugfix create mode 100644 fastlane/metadata/android/en-US/changelogs/40104120.txt diff --git a/CHANGES.md b/CHANGES.md index 47b8c57041..4728994d77 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,65 @@ +Changes in Element v1.4.12 (2022-04-20) +======================================= + +Features ✨ +---------- + - Add a setting to be able to always appear offline ([#5582](https://github.com/vector-im/element-android/issues/5582)) + - Adds the ability for audio attachments to be played in the timeline ([#5586](https://github.com/vector-im/element-android/issues/5586)) + - Do not cancel the current incremental sync request and treatment when the app goes to background ([#5719](https://github.com/vector-im/element-android/issues/5719)) + - Improve user experience when home servers do not yet support threads ([#5761](https://github.com/vector-im/element-android/issues/5761)) + +Bugfixes 🐛 +---------- + - Added text next to spinner when loading information after user is clicked on space members screen ([#4305](https://github.com/vector-im/element-android/issues/4305)) + - The string `ftue_auth_carousel_workplace_body` was declared not translatable by mistake ([#5262](https://github.com/vector-im/element-android/issues/5262)) + - Fix some cases where the read marker line would not show up ([#5475](https://github.com/vector-im/element-android/issues/5475)) + - Fix sometimes read marker not properly updating ([#5481](https://github.com/vector-im/element-android/issues/5481)) + - Fix sometimes endless loading timeline ([#5554](https://github.com/vector-im/element-android/issues/5554)) + - Use member name instead of room name in DM creation item ([#5570](https://github.com/vector-im/element-android/issues/5570)) + - Align auto-reporting of decryption errors implementation with web client. ([#5596](https://github.com/vector-im/element-android/issues/5596)) + - Choosing "leave all rooms and spaces" while leaving Space won't cause leaving DMs in this Space anymore ([#5609](https://github.com/vector-im/element-android/issues/5609)) + - Fixes display name being changed when using /myroomnick ([#5618](https://github.com/vector-im/element-android/issues/5618)) + - Fix endless loading if the event from a permalink is not found ([#5659](https://github.com/vector-im/element-android/issues/5659)) + - Redacted events are no longer visible. ([#5707](https://github.com/vector-im/element-android/issues/5707)) + - Don't wrongly show non-space invites in the space panel. ([#5731](https://github.com/vector-im/element-android/issues/5731)) + - Fixes the onboarding confetti rendering behind the content instead of in-front ([#5735](https://github.com/vector-im/element-android/issues/5735)) + - Fixes crash when navigating the app whilst processing new room keys ([#5746](https://github.com/vector-im/element-android/issues/5746)) + - Fix sorting of uploads in encrypted rooms ([#5757](https://github.com/vector-im/element-android/issues/5757)) + - Fixing setting transfer title in call transfer. ([#5765](https://github.com/vector-im/element-android/issues/5765)) + - Changes destination after joining a space to Explore Space Rooms screen ([#5766](https://github.com/vector-im/element-android/issues/5766)) + - Unignoring a user will perform an initial sync ([#5767](https://github.com/vector-im/element-android/issues/5767)) + - Open a room by link: use the actual roomId instead of the alias ([#5786](https://github.com/vector-im/element-android/issues/5786)) + +In development 🚧 +---------------- + - FTUE - Adds a new homeserver selection screen when creating an account ([#2396](https://github.com/vector-im/element-android/issues/2396)) + - FTUE - Updates the Captcha and T&Cs registration screens UI style ([#5279](https://github.com/vector-im/element-android/issues/5279)) + - FTUE - Adds error handling within the server selection screen ([#5749](https://github.com/vector-im/element-android/issues/5749)) + - Live Location Sharing - Send location data ([#5697](https://github.com/vector-im/element-android/issues/5697)) + - Live Location Sharing - Show message on start of a live ([#5710](https://github.com/vector-im/element-android/issues/5710)) + - Live Location Sharing - Attach location data to beacon info state event ([#5711](https://github.com/vector-im/element-android/issues/5711)) + - Live Location Sharing - Update beacon info state event when sharing is ended ([#5758](https://github.com/vector-im/element-android/issues/5758)) + + +SDK API changes ⚠️ +------------------ + - Include original event in live decryption listeners and update sync status naming to InitialSyncProgressing for clarity. ([#5639](https://github.com/vector-im/element-android/issues/5639)) + - KeysBackupService.getCurrentVersion takes a new type `KeysBackupLastVersionResult` in the callback. ([#5703](https://github.com/vector-im/element-android/issues/5703)) + - A lot of classes which were exposed to the clients and were located in the package `org.matrix.android.sdk.internal` have been moved to the package `org.matrix.android.sdk.api`. + All the classes which are in the package `org.matrix.android.sdk.internal` should now be declared `internal`. + Some unused code and classes have been removed. ([#5744](https://github.com/vector-im/element-android/issues/5744)) + - Some data classes are now immutable, using `val` instead of `var` ([#5762](https://github.com/vector-im/element-android/issues/5762)) + +Other changes +------------- + - Upgrade konfetti lib from 1.3.2 to 2.0.2 ([#5079](https://github.com/vector-im/element-android/issues/5079)) + - Spaces feedback section is removed from left panel ([#5486](https://github.com/vector-im/element-android/issues/5486)) + - Reduce error logs ([#5703](https://github.com/vector-im/element-android/issues/5703)) + - Adds a complete editor config file for our current code style ([#5727](https://github.com/vector-im/element-android/issues/5727)) + - Updates the posthog dev environment url and api key ([#5732](https://github.com/vector-im/element-android/issues/5732)) + - Setup Dokka to be able to generate documentation of the SDK module. Run `./gradlew matrix-sdk-android:dokkaHtml` to do it. ([#5744](https://github.com/vector-im/element-android/issues/5744)) + + Changes in Element v1.4.11 (2022-04-07) ======================================= diff --git a/changelog.d/2396.wip b/changelog.d/2396.wip deleted file mode 100644 index 9af8fa16c0..0000000000 --- a/changelog.d/2396.wip +++ /dev/null @@ -1 +0,0 @@ -Adds a new homeserver selection screen when creating an account \ No newline at end of file diff --git a/changelog.d/4305.bugfix b/changelog.d/4305.bugfix deleted file mode 100644 index 95e4a966fc..0000000000 --- a/changelog.d/4305.bugfix +++ /dev/null @@ -1 +0,0 @@ -Added text next to spinner when loading information after user is clicked on space members screen \ No newline at end of file diff --git a/changelog.d/5079.misc b/changelog.d/5079.misc deleted file mode 100644 index c38bf043ea..0000000000 --- a/changelog.d/5079.misc +++ /dev/null @@ -1 +0,0 @@ -Upgrade konfetti lib from 1.3.2 to 2.0.2 \ No newline at end of file diff --git a/changelog.d/5262.bugfix b/changelog.d/5262.bugfix deleted file mode 100644 index 389c1ed8fa..0000000000 --- a/changelog.d/5262.bugfix +++ /dev/null @@ -1 +0,0 @@ -The string `ftue_auth_carousel_workplace_body` was declared not translatable by mistake \ No newline at end of file diff --git a/changelog.d/5279.wip b/changelog.d/5279.wip deleted file mode 100644 index 0c08081cf9..0000000000 --- a/changelog.d/5279.wip +++ /dev/null @@ -1 +0,0 @@ -Updates the Captcha and T&Cs registration screens in the FTUE flow to match the updated UI style \ No newline at end of file diff --git a/changelog.d/5475.bugfix b/changelog.d/5475.bugfix deleted file mode 100644 index 03364f6a73..0000000000 --- a/changelog.d/5475.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fix some cases where the read marker line would not show up diff --git a/changelog.d/5481.bugfix b/changelog.d/5481.bugfix deleted file mode 100644 index 64891b503c..0000000000 --- a/changelog.d/5481.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fix sometimes read marker not properly updating diff --git a/changelog.d/5486.misc b/changelog.d/5486.misc deleted file mode 100644 index 82571af37b..0000000000 --- a/changelog.d/5486.misc +++ /dev/null @@ -1 +0,0 @@ -Spaces feedback section is removed from left panel \ No newline at end of file diff --git a/changelog.d/5554.bugfix b/changelog.d/5554.bugfix deleted file mode 100644 index ee69f0dbfe..0000000000 --- a/changelog.d/5554.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fix sometimes endless loading timeline diff --git a/changelog.d/5570.bugfix b/changelog.d/5570.bugfix deleted file mode 100644 index c3743d252f..0000000000 --- a/changelog.d/5570.bugfix +++ /dev/null @@ -1 +0,0 @@ -Use member name instead of room name in DM creation item \ No newline at end of file diff --git a/changelog.d/5582.feature b/changelog.d/5582.feature deleted file mode 100644 index e6e72c8e9d..0000000000 --- a/changelog.d/5582.feature +++ /dev/null @@ -1 +0,0 @@ -Add a setting to be able to always appear offline diff --git a/changelog.d/5586.feature b/changelog.d/5586.feature deleted file mode 100644 index 17d7bfce86..0000000000 --- a/changelog.d/5586.feature +++ /dev/null @@ -1 +0,0 @@ -Adds the ability for audio attachments to be played in the timeline diff --git a/changelog.d/5596.bugfix b/changelog.d/5596.bugfix deleted file mode 100644 index f51794c352..0000000000 --- a/changelog.d/5596.bugfix +++ /dev/null @@ -1 +0,0 @@ -Align auto-reporting of decryption errors implementation with web client. \ No newline at end of file diff --git a/changelog.d/5609.bugfix b/changelog.d/5609.bugfix deleted file mode 100644 index 001b4bf400..0000000000 --- a/changelog.d/5609.bugfix +++ /dev/null @@ -1 +0,0 @@ -Choosing "leave all rooms and spaces" while leaving Space won't cause leaving DMs in this Space anymore \ No newline at end of file diff --git a/changelog.d/5618.bugfix b/changelog.d/5618.bugfix deleted file mode 100644 index 8a839a2b4e..0000000000 --- a/changelog.d/5618.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fixes display name being changed when using /myroomnick diff --git a/changelog.d/5639.sdk b/changelog.d/5639.sdk deleted file mode 100644 index 66167273f9..0000000000 --- a/changelog.d/5639.sdk +++ /dev/null @@ -1 +0,0 @@ -Include original event in live decryption listeners and update sync status naming to InitialSyncProgressing for clarity. \ No newline at end of file diff --git a/changelog.d/5659.bugfix b/changelog.d/5659.bugfix deleted file mode 100644 index eec39a7738..0000000000 --- a/changelog.d/5659.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fix endless loading if the event from a permalink is not found diff --git a/changelog.d/5697.feature b/changelog.d/5697.feature deleted file mode 100644 index 47504084f4..0000000000 --- a/changelog.d/5697.feature +++ /dev/null @@ -1 +0,0 @@ -Live Location Sharing - Send location data \ No newline at end of file diff --git a/changelog.d/5703.misc b/changelog.d/5703.misc deleted file mode 100644 index 05e5080410..0000000000 --- a/changelog.d/5703.misc +++ /dev/null @@ -1 +0,0 @@ -Reduce error logs \ No newline at end of file diff --git a/changelog.d/5703.sdk b/changelog.d/5703.sdk deleted file mode 100644 index ece1fec8e8..0000000000 --- a/changelog.d/5703.sdk +++ /dev/null @@ -1 +0,0 @@ -KeysBackupService.getCurrentVersion takes a new type `KeysBackupLastVersionResult` in the callback. \ No newline at end of file diff --git a/changelog.d/5707.bugfix b/changelog.d/5707.bugfix deleted file mode 100644 index 66bd8f30b6..0000000000 --- a/changelog.d/5707.bugfix +++ /dev/null @@ -1 +0,0 @@ -Redacted events are no longer visible. \ No newline at end of file diff --git a/changelog.d/5710.feature b/changelog.d/5710.feature deleted file mode 100644 index d9b043bc32..0000000000 --- a/changelog.d/5710.feature +++ /dev/null @@ -1 +0,0 @@ -Live Location Sharing - Show message on start of a live \ No newline at end of file diff --git a/changelog.d/5711.feature b/changelog.d/5711.feature deleted file mode 100644 index 76c6b23b69..0000000000 --- a/changelog.d/5711.feature +++ /dev/null @@ -1 +0,0 @@ -Live Location Sharing - Attach location data to beacon info state event \ No newline at end of file diff --git a/changelog.d/5719.feature b/changelog.d/5719.feature deleted file mode 100644 index 7561dfd82f..0000000000 --- a/changelog.d/5719.feature +++ /dev/null @@ -1 +0,0 @@ -Do not cancel the current incremental sync request and treatment when the app goes to background \ No newline at end of file diff --git a/changelog.d/5727.misc b/changelog.d/5727.misc deleted file mode 100644 index fd90a08b17..0000000000 --- a/changelog.d/5727.misc +++ /dev/null @@ -1 +0,0 @@ -Adds a complete editor config file for our current code style diff --git a/changelog.d/5731.bugfix b/changelog.d/5731.bugfix deleted file mode 100644 index 5fb639b3ef..0000000000 --- a/changelog.d/5731.bugfix +++ /dev/null @@ -1 +0,0 @@ -Don't wrongly show non-space invites in the space panel. diff --git a/changelog.d/5732.misc b/changelog.d/5732.misc deleted file mode 100644 index 1b0f89e0c0..0000000000 --- a/changelog.d/5732.misc +++ /dev/null @@ -1 +0,0 @@ -Updates the posthog dev environment url and api key \ No newline at end of file diff --git a/changelog.d/5735.bugfix b/changelog.d/5735.bugfix deleted file mode 100644 index 99012f9254..0000000000 --- a/changelog.d/5735.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fixes the onboarding confetti rendering behind the content instead of in-front \ No newline at end of file diff --git a/changelog.d/5744.misc b/changelog.d/5744.misc deleted file mode 100644 index 0953eccd95..0000000000 --- a/changelog.d/5744.misc +++ /dev/null @@ -1 +0,0 @@ -Setup Dokka to be able to generate documentation of the SDK module. Run `./gradlew matrix-sdk-android:dokkaHtml` to do it. \ No newline at end of file diff --git a/changelog.d/5744.sdk b/changelog.d/5744.sdk deleted file mode 100644 index aced939e55..0000000000 --- a/changelog.d/5744.sdk +++ /dev/null @@ -1,3 +0,0 @@ -A lot of classes which were exposed to the clients and were located in the package `org.matrix.android.sdk.internal` have been moved to the package `org.matrix.android.sdk.api`. -All the classes which are in the package `org.matrix.android.sdk.internal` should now be declared `internal`. -Some unused code and classes have been removed. \ No newline at end of file diff --git a/changelog.d/5746.bugfix b/changelog.d/5746.bugfix deleted file mode 100644 index 975a75f70a..0000000000 --- a/changelog.d/5746.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fixes crash when navigating the app whilst processing new room keys \ No newline at end of file diff --git a/changelog.d/5749.wip b/changelog.d/5749.wip deleted file mode 100644 index a933f55cf5..0000000000 --- a/changelog.d/5749.wip +++ /dev/null @@ -1 +0,0 @@ -Adds error handling within the new FTUE server selection screen \ No newline at end of file diff --git a/changelog.d/5757.bugfix b/changelog.d/5757.bugfix deleted file mode 100644 index 089cc23b4c..0000000000 --- a/changelog.d/5757.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fix sorting of uploads in encrypted rooms \ No newline at end of file diff --git a/changelog.d/5758.feature b/changelog.d/5758.feature deleted file mode 100644 index 512b5c3868..0000000000 --- a/changelog.d/5758.feature +++ /dev/null @@ -1 +0,0 @@ -Live Location Sharing - Update beacon info state event when sharing is ended \ No newline at end of file diff --git a/changelog.d/5761.feature b/changelog.d/5761.feature deleted file mode 100644 index 3d30864e24..0000000000 --- a/changelog.d/5761.feature +++ /dev/null @@ -1 +0,0 @@ -Improve user experience when home servers do not yet support threads \ No newline at end of file diff --git a/changelog.d/5762.sdk b/changelog.d/5762.sdk deleted file mode 100644 index 0bb89d4f2f..0000000000 --- a/changelog.d/5762.sdk +++ /dev/null @@ -1 +0,0 @@ -Some data classes are now immutable, using `val` instead of `var` \ No newline at end of file diff --git a/changelog.d/5765.bugfix b/changelog.d/5765.bugfix deleted file mode 100644 index ccf8c1b2c2..0000000000 --- a/changelog.d/5765.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fixing setting transfer title in call transfer. diff --git a/changelog.d/5766.bugfix b/changelog.d/5766.bugfix deleted file mode 100644 index d3290decab..0000000000 --- a/changelog.d/5766.bugfix +++ /dev/null @@ -1 +0,0 @@ -Changes destination after joining a space to Explore Space Rooms screen diff --git a/changelog.d/5767.bugfix b/changelog.d/5767.bugfix deleted file mode 100644 index 2a34fbf4b3..0000000000 --- a/changelog.d/5767.bugfix +++ /dev/null @@ -1 +0,0 @@ -Unignoring a user will perform an initial sync \ No newline at end of file diff --git a/changelog.d/5786.bugfix b/changelog.d/5786.bugfix deleted file mode 100644 index 90c937961e..0000000000 --- a/changelog.d/5786.bugfix +++ /dev/null @@ -1,2 +0,0 @@ -Open a room by link: use the actual roomId instead of the alias - diff --git a/fastlane/metadata/android/en-US/changelogs/40104120.txt b/fastlane/metadata/android/en-US/changelogs/40104120.txt new file mode 100644 index 0000000000..ea188c101c --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/40104120.txt @@ -0,0 +1,2 @@ +Main changes in this version: Allows users to appear offline and adds an audio player for audio attachments +Full changelog: https://github.com/vector-im/element-android/releases From d240e3c453804d260aa81193c1e6945d147d8016 Mon Sep 17 00:00:00 2001 From: ariskotsomitopoulos Date: Wed, 20 Apr 2022 16:40:12 +0300 Subject: [PATCH 115/561] Enhance crypto posthog errors with more details --- .../analytics/DecryptionFailureTracker.kt | 20 +++++++++---------- .../timeline/factory/TimelineItemFactory.kt | 1 + 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/analytics/DecryptionFailureTracker.kt b/vector/src/main/java/im/vector/app/features/analytics/DecryptionFailureTracker.kt index 6b2ceb1444..308077810d 100644 --- a/vector/src/main/java/im/vector/app/features/analytics/DecryptionFailureTracker.kt +++ b/vector/src/main/java/im/vector/app/features/analytics/DecryptionFailureTracker.kt @@ -29,6 +29,7 @@ import kotlinx.coroutines.flow.onEach import kotlinx.coroutines.launch import org.matrix.android.sdk.api.session.crypto.MXCryptoError import org.matrix.android.sdk.api.session.room.timeline.TimelineEvent +import timber.log.Timber import javax.inject.Inject import javax.inject.Singleton @@ -38,7 +39,7 @@ private data class DecryptionFailure( val failedEventId: String, val error: MXCryptoError.ErrorType ) - +private typealias DetailedErrorName = Pair private const val GRACE_PERIOD_MILLIS = 4_000 private const val CHECK_INTERVAL = 2_000L @@ -112,7 +113,7 @@ class DecryptionFailureTracker @Inject constructor( private fun checkFailures() { val now = clock.epochMillis() - val aggregatedErrors: Map> + val aggregatedErrors: Map> synchronized(failures) { val toReport = mutableListOf() failures.removeAll { failure -> @@ -136,20 +137,19 @@ class DecryptionFailureTracker @Inject constructor( // for now we ignore events already reported even if displayed again? .filter { alreadyReported.contains(it).not() } .forEach { failedEventId -> - analyticsTracker.capture(Error(failedEventId, Error.Domain.E2EE, aggregation.key)) + analyticsTracker.capture(Error(aggregation.key.first, Error.Domain.E2EE, aggregation.key.second)) alreadyReported.add(failedEventId) } } } - private fun MXCryptoError.ErrorType.toAnalyticsErrorName(): Error.Name { + private fun MXCryptoError.ErrorType.toAnalyticsErrorName(): DetailedErrorName { + val detailed = "$name | mxc_crypto_error_type" return when (this) { - MXCryptoError.ErrorType.UNKNOWN_INBOUND_SESSION_ID -> Error.Name.OlmKeysNotSentError - MXCryptoError.ErrorType.OLM -> { - Error.Name.OlmUnspecifiedError - } - MXCryptoError.ErrorType.UNKNOWN_MESSAGE_INDEX -> Error.Name.OlmIndexError - else -> Error.Name.UnknownError + MXCryptoError.ErrorType.UNKNOWN_INBOUND_SESSION_ID -> Pair(detailed, Error.Name.OlmKeysNotSentError) + MXCryptoError.ErrorType.OLM -> Pair(detailed, Error.Name.OlmUnspecifiedError) + MXCryptoError.ErrorType.UNKNOWN_MESSAGE_INDEX -> Pair(detailed, Error.Name.OlmIndexError) + else -> Pair(detailed, Error.Name.UnknownError) } } } diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/TimelineItemFactory.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/TimelineItemFactory.kt index b5d620658e..45ab4e4ba3 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/TimelineItemFactory.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/TimelineItemFactory.kt @@ -138,6 +138,7 @@ class TimelineItemFactory @Inject constructor( } }.also { if (it != null && event.isEncrypted()) { +// Timber.i("----> ${event.eventId} encryption error found") decryptionFailureTracker.e2eEventDisplayedInTimeline(event) } } From 441751a6ec926eec0ff4bbb37ab393396987163e Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Wed, 20 Apr 2022 15:03:46 +0100 Subject: [PATCH 116/561] updating release version in preparation for next cycle --- matrix-sdk-android/build.gradle | 2 +- vector/build.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/matrix-sdk-android/build.gradle b/matrix-sdk-android/build.gradle index 0cffa4148e..9dd4d56da9 100644 --- a/matrix-sdk-android/build.gradle +++ b/matrix-sdk-android/build.gradle @@ -32,7 +32,7 @@ android { // that the app's state is completely cleared between tests. testInstrumentationRunnerArguments clearPackageData: 'true' - buildConfigField "String", "SDK_VERSION", "\"1.4.12\"" + buildConfigField "String", "SDK_VERSION", "\"1.4.14\"" buildConfigField "String", "GIT_SDK_REVISION", "\"${gitRevision()}\"" buildConfigField "String", "GIT_SDK_REVISION_UNIX_DATE", "\"${gitRevisionUnixDate()}\"" diff --git a/vector/build.gradle b/vector/build.gradle index c7950da28e..c414db0423 100644 --- a/vector/build.gradle +++ b/vector/build.gradle @@ -18,7 +18,7 @@ ext.versionMinor = 4 // Note: even values are reserved for regular release, odd values for hotfix release. // When creating a hotfix, you should decrease the value, since the current value // is the value for the next regular release. -ext.versionPatch = 12 +ext.versionPatch = 14 static def getGitTimestamp() { def cmd = 'git show -s --format=%ct' From ed0ef4ad81ec0008c1202f11c137a94d8f8ca82f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Apr 2022 23:08:25 +0000 Subject: [PATCH 117/561] Bump libphonenumber from 8.12.46 to 8.12.47 Bumps [libphonenumber](https://github.com/google/libphonenumber) from 8.12.46 to 8.12.47. - [Release notes](https://github.com/google/libphonenumber/releases) - [Changelog](https://github.com/google/libphonenumber/blob/master/making-metadata-changes.md) - [Commits](https://github.com/google/libphonenumber/compare/v8.12.46...v8.12.47) --- updated-dependencies: - dependency-name: com.googlecode.libphonenumber:libphonenumber dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- matrix-sdk-android/build.gradle | 2 +- vector/build.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/matrix-sdk-android/build.gradle b/matrix-sdk-android/build.gradle index 9dd4d56da9..3ee20b88c2 100644 --- a/matrix-sdk-android/build.gradle +++ b/matrix-sdk-android/build.gradle @@ -171,7 +171,7 @@ dependencies { implementation libs.apache.commonsImaging // Phone number https://github.com/google/libphonenumber - implementation 'com.googlecode.libphonenumber:libphonenumber:8.12.46' + implementation 'com.googlecode.libphonenumber:libphonenumber:8.12.47' testImplementation libs.tests.junit testImplementation 'org.robolectric:robolectric:4.7.3' diff --git a/vector/build.gradle b/vector/build.gradle index c414db0423..162d9fe81c 100644 --- a/vector/build.gradle +++ b/vector/build.gradle @@ -368,7 +368,7 @@ dependencies { implementation 'com.facebook.stetho:stetho:1.6.0' // Phone number https://github.com/google/libphonenumber - implementation 'com.googlecode.libphonenumber:libphonenumber:8.12.46' + implementation 'com.googlecode.libphonenumber:libphonenumber:8.12.47' // FlowBinding implementation libs.github.flowBinding From ef6c585503175483a4e4aade1edd1e097c1cb9ab Mon Sep 17 00:00:00 2001 From: Zet Date: Wed, 20 Apr 2022 21:03:50 +0000 Subject: [PATCH 118/561] Translated using Weblate (Arabic) Currently translated at 38.2% (847 of 2217 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/ar/ --- vector/src/main/res/values-ar/strings.xml | 25 +++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/vector/src/main/res/values-ar/strings.xml b/vector/src/main/res/values-ar/strings.xml index fe3abdcf80..3953a0d050 100644 --- a/vector/src/main/res/values-ar/strings.xml +++ b/vector/src/main/res/values-ar/strings.xml @@ -1001,4 +1001,29 @@ غادر غادر الغرفة المرفوعات + أنت تستعرض هذا النقاش سلفًا! + أنت تستعرض هذه الغرفة سلفًا! + منفصل عن الشبكة. تحقق من اتصالك. + حدث عالجه مدير الغرفة. + ستعرض غرفك هنا. لانضمام لغرفة أو لإنشاء واحدة اضغط زر +. + ستعرض رسائلك المباشرة هنا. لبدأ محادثات جديدة اضغط زر +. + المحادثات + الغُرف + جميع الريائل مقروءة + دعاه %s + أرسلَ لك طلبًا + أعد المحاولة + اعرضه في الغرفة + ردّ + حرّر + خطأ مجهول + يريد %s التحقق من جلستك + طلب تحقق + فهمتُ + مستوثق! + التوقيع + الخوارزمية + النسخة + يتحقق من حالة النسخ الاحتياطي + استعد من نسخ احتياطي \ No newline at end of file From 0367af218c24964084a226c2b0d6b5e63ad08669 Mon Sep 17 00:00:00 2001 From: waclaw66 Date: Wed, 20 Apr 2022 10:59:11 +0000 Subject: [PATCH 119/561] Translated using Weblate (Czech) Currently translated at 100.0% (2217 of 2217 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/cs/ --- vector/src/main/res/values-cs/strings.xml | 32 ++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/vector/src/main/res/values-cs/strings.xml b/vector/src/main/res/values-cs/strings.xml index 3121f859f3..61be21b7bf 100644 --- a/vector/src/main/res/values-cs/strings.xml +++ b/vector/src/main/res/values-cs/strings.xml @@ -1566,7 +1566,9 @@ \n \nMůžete tuto akci kdykoli zvrátit v obecných nastaveních. Odignorovat uživatele - Odignorování tohoto uživatele opět ukáže všechny jejich zprávy. + Zrušení ignorování tohoto uživatele opět ukáže všechny jejich zprávy. +\n +\nTato akce povede k restartování aplikace a může trvat nějakou dobu. Zrušit pozvánku Jste si jisti, že chcete zrušit pozvánku tomuto uživateli\? Vykopnout uživatele @@ -2504,4 +2506,32 @@ Vezmi mě domů Přizpůsobit profil Zakázat + Načítání polohy živě… + 8 hodin + 1 hodinu + 15 minut + Sdílet svoji polohu živě na + (%1$s) + %1$s (%2$s) + Nelze přehrát %1$s + Pozastavit %1$s + Přehrát %1$s + %1$d minut %2$d sekund + %1$s, %2$s, %3$s + Sdíleli svou polohu živě + ${app_name} se skvěle hodí i na pracoviště. Aplikaci důvěřují nejlépe zabezpečené organizace na světě. + BETA + Vlákna jsou ve fázi vývoje s novými zajímavými funkcemi, jako jsou například vylepšená oznámení. Rádi si vyslechneme vaši zpětnou vazbu! + Zpětná vazba k vláknům Beta + Poskytnout zpětnou vazbu + BETA + Pokud je tato funkce povolena, budete se ostatním uživatelům vždy jevit jako offline, a to i při používání aplikace. + Režim offline + Přítomnost + Váš domovský server v současné době vlákna nepodporuje, takže tato funkce může být nespolehlivá. Některé zprávy ve vláknech nemusí být spolehlivě dostupné. %sChcete přesto vlákna povolit\? + Vlákna Beta + Vlákna pomáhají udržovat konverzace k tématu a snadno je sledovat. %sPovolením vláken se aplikace restartuje. U některých účtů to může trvat déle. + Vlákna Beta + Zjistit více + Vyzkoušet to \ No newline at end of file From 24533cb12c58a99891cd54891b16d943e526917d Mon Sep 17 00:00:00 2001 From: Szimszon Date: Wed, 20 Apr 2022 15:40:44 +0000 Subject: [PATCH 120/561] Translated using Weblate (Hungarian) Currently translated at 100.0% (2217 of 2217 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/hu/ --- vector/src/main/res/values-hu/strings.xml | 32 ++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/vector/src/main/res/values-hu/strings.xml b/vector/src/main/res/values-hu/strings.xml index 33bde2944e..3a8184cef7 100644 --- a/vector/src/main/res/values-hu/strings.xml +++ b/vector/src/main/res/values-hu/strings.xml @@ -1486,7 +1486,9 @@ A Visszaállítási Kulcsot tartsd biztonságos helyen, mint pl. egy jelszókeze \n \nEzt a műveletet bármikor visszavonhatja az általános beállításokban. Felhasználó figyelembe vétele - A felhasználó figyelembe vétele után újra meg fog jelenni az összes üzenete. + A felhasználó figyelembe vétele után újra meg fog jelenni az összes üzenete. +\n +\nEz a művelet újraindítja az alkalmazást ami sokáig tarthat. Meghívás visszavonása Biztos, hogy visszavonja a felhasználó meghívását\? a felhasználó kirúgása eltávolítja a szobából. @@ -2457,4 +2459,32 @@ A Visszaállítási Kulcsot tartsd biztonságos helyen, mint pl. egy jelszókeze Vigyél haza Profil személyre szabása Tiltás + Élő földrajzi helyzet meghatározás betöltése… + 8 óra + 1 óra + 15 perc + Folyamatos helyzet megosztása ezért: + (%1$s) + %1$s (%2$s) + Nem lehet lejátszani ezt: %1$s + Megállít: %1$s + Lejátszás: %1$s + %1$d perc %2$d másodperc + %1$s, %2$s, %3$s + A földrajzi helyzetüket folyamatosan megosztják + ${app_name} megállja a helyét a munkahelyen is. A világ legbiztonságosabb szervezetei bíznak meg benne. + Béta + Üzenetszálak fejlesztése folyamatban van, új és izgalmas funkciókkal, mint a fejlesztett értesítések. Szeretnénk hallani a véleményed! + Béta Üzenetszálak visszajelzés + Visszajelzés adása + Béta + Ha engedélyezed úgy látszol majd mások számára, mintha nem kapcsolódnál a hálózathoz még akkor is amikor az alkalmazást használod. + Hálózati kapcsolat nélkül + Állapot + A Matrix szervered jelenleg nem támogatja az üzenetszálakat így ez a funkció nem lesz megbízható. Bizonyos üzenetszálas üzenetek nem jelennek meg megbízhatóan. %sBiztos, hogy így is engedélyezed az üzenetszálakat\? + Béta Üzenetszálak + Az üzenetszálak segítenek a különböző témájú beszélgetések figyelemmel kísérésében. %sÜzenetszálak engedélyezése újraindítja az alkalmazást. Ez néhány fióknál sokáig tarthat. + Béta Üzenetszálak + Tudj meg többet + Próbáld ki \ No newline at end of file From 20ee8437bdfe449a101802d2adb79931fb943438 Mon Sep 17 00:00:00 2001 From: Linerly Date: Wed, 20 Apr 2022 23:58:06 +0000 Subject: [PATCH 121/561] Translated using Weblate (Indonesian) Currently translated at 100.0% (2217 of 2217 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/id/ --- vector/src/main/res/values-in/strings.xml | 44 +++++++++++++++++++---- 1 file changed, 37 insertions(+), 7 deletions(-) diff --git a/vector/src/main/res/values-in/strings.xml b/vector/src/main/res/values-in/strings.xml index 5ca1a361d4..f0533eba10 100644 --- a/vector/src/main/res/values-in/strings.xml +++ b/vector/src/main/res/values-in/strings.xml @@ -72,7 +72,7 @@ Gabung Tolak Nanti - Kirim catat gangguan + Kirim catatan gangguan Raksasa Kecil Normal @@ -87,7 +87,7 @@ Gandakan ke clipboard Kirim tampilan layar Mohon uraikan kutu tersebut. Apa yang Anda lakukan\? Apa yang Anda harapkan terjadi\? Apa yang sebenarnya terjadi\? - Catat dari klien akan dikirim bersama laporan gangguan ini untuk mendalami kendala yang Anda temukan. Laporan gangguan ini, termasuk catat dan tangkapan layar, tidak akan terlihat secara umum. Jika Anda hanya ingin mengirimkan tulisan di atas, silakan hapus centang: + Catatan dari klien akan dikirim bersama laporan gangguan ini untuk mendalami kendala yang Anda temukan. Laporan gangguan ini, termasuk catatan dan tangkapan layar, tidak akan terlihat secara umum. Jika Anda hanya ingin mengirimkan tulisan di atas, silakan hapus centang: Sepertinya Anda mengguncang ponsel akibat frustrasi. Apakah Anda ingin membuka halaman laporan kutu\? Pengiriman laporan kutu gagal (%s) Kemajuan (%s%%) @@ -590,7 +590,9 @@ Di masa mendatang proses verifikasi ini akan dimutakhirkan. Keluarkan pengguna Apakah Anda yakin ingin membatalkan undangan untuk pengguna ini\? Batalkan undangan - Membatalkan abaian pengguna ini akan menampilkan semua pesan dari mereka. + Membatalkan abaian pengguna ini akan menampilkan semua pesan dari mereka. +\n +\nDicatat bahwa tindakan ini akan memulai ulang aplikasi dan mungkin membutuhkan beberapa waktu. Batal pengabaian pengguna Mengabaikan pengguna ini akan menghilangkan pesan mereka dari ruangan yang Anda bagikan. \n @@ -1179,8 +1181,8 @@ Di masa mendatang proses verifikasi ini akan dimutakhirkan. Kirim lampiran Sepertinya server terlalu lama merespons, hal ini dapat disebabkan oleh konektivitas yang buruk atau kesalahan pada server. Silakan coba lagi dalam beberapa saat. Silakan coba lagi setelah Anda menerima syarat dan ketentuan homeserver Anda. - Log verbose akan membantu pengembang dengan menyediakan lebih banyak catat saat Anda mengirim RageShake. Bahkan ketika diaktifkan, aplikasi tidak mencatat isi pesan atau data pribadi lainnya. - Aktifkan catat verbose. + Catatan verbose akan membantu pengembang dengan menyediakan lebih banyak catat saat Anda mengirim RageShake. Bahkan ketika diaktifkan, aplikasi tidak mencatat isi pesan atau data pribadi lainnya. + Aktifkan catatan verbose. Kode verifikasi salah. Kode Sebuah pesan teks telah dikirim ke %s. Silakan masukkan kode verifikasi yang ada di dalamnya. @@ -2285,7 +2287,7 @@ Di masa mendatang proses verifikasi ini akan dimutakhirkan. Mulai ulang aplikasi ini untuk menerapkan perubahan. Aktifkan matematika LaTeX Anda tidak diperbolehkan untuk bergabung ke ruangan ini - Sistem Anda akan mengirimkan catat secara otomatis ketika sebuah kesalahan dekripsi terjadi + Sistem Anda akan mengirimkan catatan secara otomatis ketika sebuah kesalahan dekripsi terjadi Buat poll Buka kontak Kirim stiker @@ -2345,7 +2347,7 @@ Di masa mendatang proses verifikasi ini akan dimutakhirkan. Siapa saja yang sering Anda chat\? Anda sudah menampilkan utasan ini! Tampilkan Di Ruangan - Balas Di Utasan + Balas di utasan Perintah \"%s\" dikenal tetapi tidak didukung dalam utasan. Dari sebuah Utasan Tip: Tekan lama pada sebuah pesan dan gunakan “%s”. @@ -2412,4 +2414,32 @@ Di masa mendatang proses verifikasi ini akan dimutakhirkan. Kembalikan saya ke beranda Ubah profil Nonaktifkan + Memuat lokasi langsung… + 8 jam + 1 jam + 15 menit + Bagikan lokasi langsung Anda untuk + (%1$s) + %1$s (%2$s) + Tidak dapat memainkan %1$s + Jeda %1$s + Mainkan %1$s + %1$d menit %2$d detik + %1$s, %2$s, %3$s + Membagikan lokasi langsungnya + ${app_name} juga baik untuk tempat kerja. Dipercayai oleh organisasi yang paling aman di dunia. + BETA + Utasan adalah fitur yang sedang dikerjakan dengan fitur baru dan asik. Kami ingin dengar masukan Anda! + Masukan Utasan Beta + Berikan masukan + BETA + Jika diaktifkan, Anda akan selalu terlihat luring kepada pengguna lain, bahkan ketika menggunakan aplikasi. + Mode luring + Presensi + Homeserver Anda saat ini tidak mendukung utasan, jadi fitur ini mungkin tidak andal. Beberapa pesan yang diutas mungkin tidak tersedia. %sApakah Anda ingin mengaktifkan utasan saja\? + Utasan Beta + Utasan membantu percakapan sesuai topik dan mudah untuk dilacak. %sMengaktifkan utasan akan memuat aplikasi ulang. Ini mungkin membutuhkan beberapa waktu untuk beberapa akun. + Utasan Beta + Pelajari lebih lanjut + Coba \ No newline at end of file From c48d04c48b78bfedd2a001b80418d0849abda202 Mon Sep 17 00:00:00 2001 From: Jozef Gaal Date: Wed, 20 Apr 2022 11:59:30 +0000 Subject: [PATCH 122/561] Translated using Weblate (Slovak) Currently translated at 100.0% (2217 of 2217 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/sk/ --- vector/src/main/res/values-sk/strings.xml | 32 ++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/vector/src/main/res/values-sk/strings.xml b/vector/src/main/res/values-sk/strings.xml index ff1089caa0..a2c1404d2f 100644 --- a/vector/src/main/res/values-sk/strings.xml +++ b/vector/src/main/res/values-sk/strings.xml @@ -751,7 +751,9 @@ \n \nTúto akciu môžete kedykoľvek zmeniť späť vo všeobecných nastaveniach. Neignorovať používateľa - Zrušením ignorovania si opäť zobrazíte všetky správy od tohoto používateľa. + Zrušením ignorovania tohto používateľa sa opäť zobrazia všetky správy od neho. +\n +\nUpozorňujeme, že táto akcia spôsobí reštart aplikácie a môže chvíľu trvať. Zrušiť pozvanie Ste si istí, že chcete zrušiť pozvanie tohoto používateľa\? Vykázať používateľa @@ -2504,4 +2506,32 @@ Zober ma domov Prispôsobiť profil Zakázať + %1$s, %2$s, %3$s + Prítomnosť + Načítavanie polohy v reálnom čase… + Zdieľajte svoju polohu v reálnom čase na + 8 hodín + 1 hodinu + 15 minút + (%1$s) + %1$s (%2$s) + Nie je možné prehrať %1$s + Pozastaviť %1$s + Prehrať %1$s + %1$d minút %2$d sekúnd + Zdieľali svoju polohu v reálnom čase + ${app_name} je skvelý aj na pracovisku. Dôverujú mu najbezpečnejšie organizácie na svete. + BETA + Na vláknach sa neustále pracuje a pripravujú sa nové, zaujímavé funkcie, ako napríklad vylepšené oznámenia. Radi si vypočujeme vašu spätnú väzbu! + Spätná väzba na Beta vlákna + Poskytnite spätnú väzbu + BETA + Ak je táto funkcia zapnutá, budete sa ostatným používateľom vždy javiť ako offline, a to aj pri používaní aplikácie. + Režim offline + Váš domovský server v súčasnosti nepodporuje vlákna, takže táto funkcia môže byť nespoľahlivá. Niektoré správy vo vláknach nemusia byť spoľahlivo dostupné. %sChcete aj tak povoliť vlákna\? + Vlákna Beta + Vlákna pomáhajú udržiavať vaše konverzácie v téme a ľahké sledovanie. %sZapnutím vlákien sa aplikácia obnoví. V prípade niektorých účtov to môže trvať dlhšie. + Vlákna Beta + Zistiť viac + Vyskúšajte si to \ No newline at end of file From 4c6b53eb8bf80ebf0bd3003285596abbdf720b2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Lindh=C3=A9?= Date: Wed, 20 Apr 2022 19:12:33 +0000 Subject: [PATCH 123/561] Translated using Weblate (Swedish) Currently translated at 100.0% (2217 of 2217 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/sv/ --- vector/src/main/res/values-sv/strings.xml | 32 ++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/vector/src/main/res/values-sv/strings.xml b/vector/src/main/res/values-sv/strings.xml index c6c8b45441..5e957d671c 100644 --- a/vector/src/main/res/values-sv/strings.xml +++ b/vector/src/main/res/values-sv/strings.xml @@ -837,7 +837,9 @@ Degradera Ignorera användare Avignorera användare - Att avignorera den här användaren kommer att visa alla meddelanden från hen igen. + Att avignorera den här användaren kommer att visa alla meddelanden från dem igen. +\n +\nNotera att detta kräver en omstart av appen och kan ta en stund. Avbryt inbjudan Är du säker på att du vill avbryta inbjudan för den här användaren\? Kicka användaren @@ -2457,4 +2459,32 @@ För mig hem Anpassa profil Inaktivera + Laddar realtidsposition… + 8 timmar + 1 timma + 15 minuter + Dela din position i realtid under + (%1$s) + %1$s (%2$s) + Kunde inte spela %1$s + Pausa %1$s + Spela %1$s + %1$d minuter och %2$d sekunder + %1$s, %2$s, %3$s + Delade sin position i realtid + ${app_name} är även perfekt för arbetet. Flera av världens mest säkra organisationer litar på den. + BETA + Trådar är ett work-in-progress med nya, spännande funktioner så som förbättrade notiser. Kom gärna med feedback! + Trådar Beta feedback + Ge feedback + BETA + Med detta aktiverat så kommer du alltid se offline ut för andra, även om du är aktiv i appen. + Offline-läge + Närvaro + Din hemserver stödjer för närvarande inte trådar, så denna funktionen kanske funkar dåligt. Vissa meddelanden i trådar kanske inte visas alltid. %sVill du ändå aktivera trådar\? + Trådar beta + Trådar hjälper till att hålla dina konversationer till ämnet och gör dem lättare att följa. %sFör att aktivera trådar måste appen ladda om. Detta kan ta lång tid för vissa konton. + Trådar Beta + Läs mer + Prova \ No newline at end of file From 220377fdbf10bc9a6b856ab3d3be0962ed379054 Mon Sep 17 00:00:00 2001 From: Ihor Hordiichuk Date: Wed, 20 Apr 2022 19:09:55 +0000 Subject: [PATCH 124/561] Translated using Weblate (Ukrainian) Currently translated at 100.0% (2217 of 2217 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/uk/ --- vector/src/main/res/values-uk/strings.xml | 32 ++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/vector/src/main/res/values-uk/strings.xml b/vector/src/main/res/values-uk/strings.xml index ce1781cb9c..45f509e0d8 100644 --- a/vector/src/main/res/values-uk/strings.xml +++ b/vector/src/main/res/values-uk/strings.xml @@ -1002,7 +1002,9 @@ Вилучити користувача Ви впевнені, що бажаєте скасувати запрошення для цього користувача\? Скасувати запрошення - Якщо перестати нехтувати цього користувача, усі його повідомлення стануть знову видимими. + Якщо перестати нехтувати цього користувача, усі його повідомлення стануть знову видимими. +\n +\nЗауважте, що ця дія перезапустить застосунок, а це може тривати деякий час. Рознехтувати користувача Нехтування цього користувача призведе до вилучення його повідомлень з усіх спільних кімнат. \n @@ -2549,4 +2551,32 @@ На головну Персоналізувати профіль Вимкнути + Завантаження місцеперебування наживо… + 8 годин + 1 годину + 15 хвилин + Ділитися своїм місцеперебуванням наживо + (%1$s) + %1$s (%2$s) + Неможливо відтворити %1$s + Зупинити %1$s + Відтворити %1$s + %1$d хвилин %2$d секунд + %1$s, %2$s, %3$s + Ділиться своїм місцеперебуванням наживо + ${app_name} також чудово підходить для роботи. Йому довіряють найтаємніші організації світу. + БЕТА + Треди — це поточна розробка з новими, захопливими майбутніми функціями, такими як вдосконалені сповіщення. Ми хотіли б почути ваш відгук! + Відгук про Треди бета + Надіслати відгук + БЕТА + Якщо ввімкнено, ви завжди будете видимі в режимі офлайн для інших користувачів, навіть коли користуєтеся застосунком. + Офлайн режим + Присутність + Ваш домашній сервер не підтримує тредів, тому ця функція може бути ненадійною. Деякі треди повідомлень можуть бути недоступними. %sУсе одно хочете ввімкнути треди\? + Треди бета + Треди допомагають упорядкувати свої розмови за темами та легко стежити за ними. %sУвімкнення тредів перезавантажить застосунок. Це може тривати більше часу для деяких облікових записів. + Треди бета + Докладніше + Спробувати \ No newline at end of file From 91d37ad093d4316aea61eec645503410cf31e3d1 Mon Sep 17 00:00:00 2001 From: Jozef Gaal Date: Wed, 20 Apr 2022 11:50:04 +0000 Subject: [PATCH 125/561] Translated using Weblate (Slovak) Currently translated at 100.0% (57 of 57 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/sk/ --- fastlane/metadata/android/sk/changelogs/40104100.txt | 2 ++ fastlane/metadata/android/sk/changelogs/40104110.txt | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 fastlane/metadata/android/sk/changelogs/40104100.txt create mode 100644 fastlane/metadata/android/sk/changelogs/40104110.txt diff --git a/fastlane/metadata/android/sk/changelogs/40104100.txt b/fastlane/metadata/android/sk/changelogs/40104100.txt new file mode 100644 index 0000000000..b96a539364 --- /dev/null +++ b/fastlane/metadata/android/sk/changelogs/40104100.txt @@ -0,0 +1,2 @@ +Hlavné zmeny v tejto verzii: Posúvanie v hlasovej správe. Rôzne opravy chýb a vylepšenia stability. +Úplný zoznam zmien: https://github.com/vector-im/element-android/releases diff --git a/fastlane/metadata/android/sk/changelogs/40104110.txt b/fastlane/metadata/android/sk/changelogs/40104110.txt new file mode 100644 index 0000000000..50670f18c2 --- /dev/null +++ b/fastlane/metadata/android/sk/changelogs/40104110.txt @@ -0,0 +1,2 @@ +Hlavné zmeny v tejto verzii: Rôzne opravy chýb a vylepšenia stability. +Úplný zoznam zmien: https://github.com/vector-im/element-android/releases From 42a90f6775d2f2910885d36bd6588856ba7716d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Lindh=C3=A9?= Date: Wed, 20 Apr 2022 18:58:45 +0000 Subject: [PATCH 126/561] Translated using Weblate (Swedish) Currently translated at 100.0% (57 of 57 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/sv/ --- fastlane/metadata/android/sv-SE/changelogs/40104100.txt | 2 ++ fastlane/metadata/android/sv-SE/changelogs/40104110.txt | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 fastlane/metadata/android/sv-SE/changelogs/40104100.txt create mode 100644 fastlane/metadata/android/sv-SE/changelogs/40104110.txt diff --git a/fastlane/metadata/android/sv-SE/changelogs/40104100.txt b/fastlane/metadata/android/sv-SE/changelogs/40104100.txt new file mode 100644 index 0000000000..20984d233b --- /dev/null +++ b/fastlane/metadata/android/sv-SE/changelogs/40104100.txt @@ -0,0 +1,2 @@ +Huvudsakliga ändringar i denna versionen: Scrolla i röstmeddelanden. Diverse buggfixar och förbättrad stabilitet. +Fullständig lista av ändringar: https://github.com/vector-im/element-android/releases diff --git a/fastlane/metadata/android/sv-SE/changelogs/40104110.txt b/fastlane/metadata/android/sv-SE/changelogs/40104110.txt new file mode 100644 index 0000000000..82c638b26a --- /dev/null +++ b/fastlane/metadata/android/sv-SE/changelogs/40104110.txt @@ -0,0 +1,2 @@ +Huvudsakliga ändringar i denna versionen: Diverse buggfixar och förbättrad stabilitet. +Fullständig lista av ändringar: https://github.com/vector-im/element-android/releases From 4ade5c1e18314f54cc87a3548a0211481b5af003 Mon Sep 17 00:00:00 2001 From: waclaw66 Date: Wed, 20 Apr 2022 11:01:12 +0000 Subject: [PATCH 127/561] Translated using Weblate (Czech) Currently translated at 100.0% (57 of 57 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/cs/ --- fastlane/metadata/android/cs-CZ/changelogs/40104100.txt | 2 ++ fastlane/metadata/android/cs-CZ/changelogs/40104110.txt | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 fastlane/metadata/android/cs-CZ/changelogs/40104100.txt create mode 100644 fastlane/metadata/android/cs-CZ/changelogs/40104110.txt diff --git a/fastlane/metadata/android/cs-CZ/changelogs/40104100.txt b/fastlane/metadata/android/cs-CZ/changelogs/40104100.txt new file mode 100644 index 0000000000..46a75b77a7 --- /dev/null +++ b/fastlane/metadata/android/cs-CZ/changelogs/40104100.txt @@ -0,0 +1,2 @@ +Hlavní změny v této verzi: Posun přehrávání v hlasových zprávách. Opravy různých chyb a vylepšení stability. +Úplný seznam změn: https://github.com/vector-im/element-android/releases diff --git a/fastlane/metadata/android/cs-CZ/changelogs/40104110.txt b/fastlane/metadata/android/cs-CZ/changelogs/40104110.txt new file mode 100644 index 0000000000..578549ce6c --- /dev/null +++ b/fastlane/metadata/android/cs-CZ/changelogs/40104110.txt @@ -0,0 +1,2 @@ +Hlavní změny v této verzi: Opravy různých chyb a vylepšení stability. +Úplný seznam změn: https://github.com/vector-im/element-android/releases From b658d6afc75e6f59201fe7d4a020f5d2f68c595a Mon Sep 17 00:00:00 2001 From: Linerly Date: Wed, 20 Apr 2022 23:04:35 +0000 Subject: [PATCH 128/561] Translated using Weblate (Indonesian) Currently translated at 100.0% (57 of 57 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/id/ --- fastlane/metadata/android/id/changelogs/40104100.txt | 2 ++ fastlane/metadata/android/id/changelogs/40104110.txt | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 fastlane/metadata/android/id/changelogs/40104100.txt create mode 100644 fastlane/metadata/android/id/changelogs/40104110.txt diff --git a/fastlane/metadata/android/id/changelogs/40104100.txt b/fastlane/metadata/android/id/changelogs/40104100.txt new file mode 100644 index 0000000000..3cda40aecc --- /dev/null +++ b/fastlane/metadata/android/id/changelogs/40104100.txt @@ -0,0 +1,2 @@ +Perubahan utama dalam versi ini: Gulir di pesan suara. Banyak perbaikan kutu dan perbaikan stabilitas. +Catatan perubahan lanjutan: https://github.com/vector-im/element-android/releases diff --git a/fastlane/metadata/android/id/changelogs/40104110.txt b/fastlane/metadata/android/id/changelogs/40104110.txt new file mode 100644 index 0000000000..1017951d47 --- /dev/null +++ b/fastlane/metadata/android/id/changelogs/40104110.txt @@ -0,0 +1,2 @@ +Perubahan utama dalam versi ini: Banyak perbaikan kutu dan perbaikan stabilitas. +Catatan perubahan lanjutan: https://github.com/vector-im/element-android/releases From f9ee06cd2a5e78ab3bf4198f22991bf6f4fb97c4 Mon Sep 17 00:00:00 2001 From: Onuray Sahin Date: Thu, 21 Apr 2022 11:23:25 +0300 Subject: [PATCH 129/561] Implement foreground service for Android Q and later. --- .../features/call/CallControlsBottomSheet.kt | 3 +- .../app/features/call/VectorCallActivity.kt | 10 ++++ .../features/call/VectorCallViewActions.kt | 2 +- .../app/features/call/VectorCallViewEvents.kt | 1 + .../app/features/call/VectorCallViewModel.kt | 36 ++++++++++--- .../app/features/call/VectorCallViewState.kt | 3 +- .../webrtc/ScreenCaptureServiceConnection.kt | 54 +++++++++++++++++++ .../app/features/call/webrtc/WebRtcCall.kt | 6 ++- .../res/layout/bottom_sheet_call_controls.xml | 2 +- vector/src/main/res/values/strings.xml | 3 +- 10 files changed, 106 insertions(+), 14 deletions(-) create mode 100644 vector/src/main/java/im/vector/app/features/call/webrtc/ScreenCaptureServiceConnection.kt diff --git a/vector/src/main/java/im/vector/app/features/call/CallControlsBottomSheet.kt b/vector/src/main/java/im/vector/app/features/call/CallControlsBottomSheet.kt index 32d32c9fa6..1c6ead33cc 100644 --- a/vector/src/main/java/im/vector/app/features/call/CallControlsBottomSheet.kt +++ b/vector/src/main/java/im/vector/app/features/call/CallControlsBottomSheet.kt @@ -68,7 +68,7 @@ class CallControlsBottomSheet : VectorBaseBottomSheetDialogFragment(), CallContro @Inject lateinit var callManager: WebRtcCallManager @Inject lateinit var avatarRenderer: AvatarRenderer + @Inject lateinit var screenCaptureServiceConnection: ScreenCaptureServiceConnection private val callViewModel: VectorCallViewModel by viewModel() @@ -528,6 +530,7 @@ class VectorCallActivity : VectorBaseActivity(), CallContro } is VectorCallViewEvents.FailToTransfer -> showSnackbar(getString(R.string.call_transfer_failure)) is VectorCallViewEvents.ShowScreenSharingPermissionDialog -> handleShowScreenSharingPermissionDialog() + is VectorCallViewEvents.StopScreenSharingService -> handleStopScreenSharingService() else -> Unit } } @@ -640,6 +643,7 @@ class VectorCallActivity : VectorBaseActivity(), CallContro this, Intent(this, ScreenCaptureService::class.java) ) + screenCaptureServiceConnection.bind() } } } @@ -650,6 +654,12 @@ class VectorCallActivity : VectorBaseActivity(), CallContro } } + private fun handleStopScreenSharingService() { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { + screenCaptureServiceConnection.stopScreenCapturing() + } + } + companion object { private const val EXTRA_MODE = "EXTRA_MODE" private const val FRAGMENT_DIAL_PAD_TAG = "FRAGMENT_DIAL_PAD_TAG" diff --git a/vector/src/main/java/im/vector/app/features/call/VectorCallViewActions.kt b/vector/src/main/java/im/vector/app/features/call/VectorCallViewActions.kt index daad8a2332..c84f733b9a 100644 --- a/vector/src/main/java/im/vector/app/features/call/VectorCallViewActions.kt +++ b/vector/src/main/java/im/vector/app/features/call/VectorCallViewActions.kt @@ -40,6 +40,6 @@ sealed class VectorCallViewActions : VectorViewModelAction { object CallTransferSelectionCancelled : VectorCallViewActions() data class CallTransferSelectionResult(val callTransferResult: CallTransferResult) : VectorCallViewActions() object TransferCall : VectorCallViewActions() - object InitiateScreenSharing : VectorCallViewActions() + object ToggleScreenSharing : VectorCallViewActions() object StartScreenSharing : VectorCallViewActions() } diff --git a/vector/src/main/java/im/vector/app/features/call/VectorCallViewEvents.kt b/vector/src/main/java/im/vector/app/features/call/VectorCallViewEvents.kt index a2b6fbaf92..68170b0f11 100644 --- a/vector/src/main/java/im/vector/app/features/call/VectorCallViewEvents.kt +++ b/vector/src/main/java/im/vector/app/features/call/VectorCallViewEvents.kt @@ -31,6 +31,7 @@ sealed class VectorCallViewEvents : VectorViewEvents { object ShowCallTransferScreen : VectorCallViewEvents() object FailToTransfer : VectorCallViewEvents() object ShowScreenSharingPermissionDialog : VectorCallViewEvents() + object StopScreenSharingService : VectorCallViewEvents() // data class CallAnswered(val content: CallAnswerContent) : VectorCallViewEvents() // data class CallHangup(val content: CallHangupContent) : VectorCallViewEvents() // object CallAccepted : VectorCallViewEvents() diff --git a/vector/src/main/java/im/vector/app/features/call/VectorCallViewModel.kt b/vector/src/main/java/im/vector/app/features/call/VectorCallViewModel.kt index 4e622c4ab3..ef827472a9 100644 --- a/vector/src/main/java/im/vector/app/features/call/VectorCallViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/call/VectorCallViewModel.kt @@ -256,7 +256,10 @@ class VectorCallViewModel @AssistedInject constructor( override fun handle(action: VectorCallViewActions) = withState { state -> when (action) { - VectorCallViewActions.EndCall -> call?.endCall() + VectorCallViewActions.EndCall -> { + call?.endCall() + _viewEvents.post(VectorCallViewEvents.StopScreenSharingService) + } VectorCallViewActions.AcceptCall -> { setState { copy(callState = Loading()) @@ -337,21 +340,38 @@ class VectorCallViewModel @AssistedInject constructor( VectorCallViewActions.TransferCall -> { handleCallTransfer() } - is VectorCallViewActions.SwitchCall -> { + is VectorCallViewActions.SwitchCall -> { setState { VectorCallViewState(action.callArgs) } setupCallWithCurrentState() } - is VectorCallViewActions.InitiateScreenSharing -> { - _viewEvents.post( - VectorCallViewEvents.ShowScreenSharingPermissionDialog - ) + is VectorCallViewActions.ToggleScreenSharing -> { + handleToggleScreenSharing(state.isSharingScreen) } - is VectorCallViewActions.StartScreenSharing -> { - call?.shareScreen() + is VectorCallViewActions.StartScreenSharing -> { + call?.startSharingScreen() + setState { + copy(isSharingScreen = true) + } } } } + private fun handleToggleScreenSharing(isSharingScreen: Boolean) { + if (isSharingScreen) { + call?.stopSharingScreen() + setState { + copy(isSharingScreen = false) + } + _viewEvents.post( + VectorCallViewEvents.StopScreenSharingService + ) + } else { + _viewEvents.post( + VectorCallViewEvents.ShowScreenSharingPermissionDialog + ) + } + } + private fun handleCallTransfer() { viewModelScope.launch { val currentCall = call ?: return@launch diff --git a/vector/src/main/java/im/vector/app/features/call/VectorCallViewState.kt b/vector/src/main/java/im/vector/app/features/call/VectorCallViewState.kt index 2d33cbf9b9..2cd819b5f5 100644 --- a/vector/src/main/java/im/vector/app/features/call/VectorCallViewState.kt +++ b/vector/src/main/java/im/vector/app/features/call/VectorCallViewState.kt @@ -42,7 +42,8 @@ data class VectorCallViewState( val callInfo: CallInfo? = null, val formattedDuration: String = "", val canOpponentBeTransferred: Boolean = false, - val transferee: TransfereeState = TransfereeState.NoTransferee + val transferee: TransfereeState = TransfereeState.NoTransferee, + val isSharingScreen: Boolean = false ) : MavericksState { sealed class TransfereeState { diff --git a/vector/src/main/java/im/vector/app/features/call/webrtc/ScreenCaptureServiceConnection.kt b/vector/src/main/java/im/vector/app/features/call/webrtc/ScreenCaptureServiceConnection.kt new file mode 100644 index 0000000000..922e9676a8 --- /dev/null +++ b/vector/src/main/java/im/vector/app/features/call/webrtc/ScreenCaptureServiceConnection.kt @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2022 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package im.vector.app.features.call.webrtc + +import android.content.ComponentName +import android.content.Context +import android.content.Intent +import android.content.ServiceConnection +import android.os.IBinder +import javax.inject.Inject + +class ScreenCaptureServiceConnection @Inject constructor( + private val context: Context +) : ServiceConnection { + + private var isBound = false + private var screenCaptureService: ScreenCaptureService? = null + + fun bind() { + if (!isBound) { + Intent(context, ScreenCaptureService::class.java).also { intent -> + context.bindService(intent, this, 0) + } + } + } + + fun stopScreenCapturing() { + screenCaptureService?.stopService() + } + + override fun onServiceConnected(className: ComponentName, binder: IBinder) { + screenCaptureService = (binder as ScreenCaptureService.LocalBinder).getService() + isBound = true + } + + override fun onServiceDisconnected(className: ComponentName) { + isBound = false + screenCaptureService = null + } +} diff --git a/vector/src/main/java/im/vector/app/features/call/webrtc/WebRtcCall.kt b/vector/src/main/java/im/vector/app/features/call/webrtc/WebRtcCall.kt index c744f317ab..bc8ae51a88 100644 --- a/vector/src/main/java/im/vector/app/features/call/webrtc/WebRtcCall.kt +++ b/vector/src/main/java/im/vector/app/features/call/webrtc/WebRtcCall.kt @@ -770,7 +770,11 @@ class WebRtcCall( return currentCaptureFormat } - fun shareScreen() { + fun startSharingScreen() { + // TODO. Will be handled within the next PR. + } + + fun stopSharingScreen() { // TODO. Will be handled within the next PR. } diff --git a/vector/src/main/res/layout/bottom_sheet_call_controls.xml b/vector/src/main/res/layout/bottom_sheet_call_controls.xml index 0b67059dd8..516dc29fa3 100644 --- a/vector/src/main/res/layout/bottom_sheet_call_controls.xml +++ b/vector/src/main/res/layout/bottom_sheet_call_controls.xml @@ -11,7 +11,7 @@ android:id="@+id/callControlsShareScreen" android:layout_width="match_parent" android:layout_height="wrap_content" - app:actionTitle="@string/call_share_screen" + app:actionTitle="@string/call_start_screen_sharing" app:leftIcon="@drawable/ic_share_screen" app:tint="?vctr_content_primary" app:titleTextColor="?vctr_content_primary" /> diff --git a/vector/src/main/res/values/strings.xml b/vector/src/main/res/values/strings.xml index 4b8009d10b..11eb3c64fa 100644 --- a/vector/src/main/res/values/strings.xml +++ b/vector/src/main/res/values/strings.xml @@ -480,7 +480,8 @@ Back Turn HD off Turn HD on - Share screen + Share screen + Stop screen sharing Send files Send sticker From 6aa0be22c9e10e503d02be7c58a798dd1b3dfdd3 Mon Sep 17 00:00:00 2001 From: ericdecanini Date: Thu, 21 Apr 2022 10:42:08 +0200 Subject: [PATCH 130/561] Makes MediaType internal --- .../main/java/im/vector/lib/multipicker/utils/MediaFileUtils.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/multipicker/src/main/java/im/vector/lib/multipicker/utils/MediaFileUtils.kt b/library/multipicker/src/main/java/im/vector/lib/multipicker/utils/MediaFileUtils.kt index e97b019c69..a029d5e6b1 100644 --- a/library/multipicker/src/main/java/im/vector/lib/multipicker/utils/MediaFileUtils.kt +++ b/library/multipicker/src/main/java/im/vector/lib/multipicker/utils/MediaFileUtils.kt @@ -37,6 +37,6 @@ internal fun createTemporaryMediaFile(context: Context, mediaType: MediaType): F ) } -enum class MediaType { +internal enum class MediaType { IMAGE, VIDEO } From b2e18a8591f9dbbdf223066d3f3c76ce3c1f5f7c Mon Sep 17 00:00:00 2001 From: ericdecanini Date: Thu, 21 Apr 2022 10:42:18 +0200 Subject: [PATCH 131/561] Adds changelog file --- changelog.d/5652.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/5652.bugfix diff --git a/changelog.d/5652.bugfix b/changelog.d/5652.bugfix new file mode 100644 index 0000000000..8ebea1558f --- /dev/null +++ b/changelog.d/5652.bugfix @@ -0,0 +1 @@ +Tentative fix of images crashing when being sent or shared from gallery From 0693e3c3aae0ce1204b74670caac0cbb419ed9dd Mon Sep 17 00:00:00 2001 From: Onuray Sahin Date: Thu, 21 Apr 2022 11:56:05 +0300 Subject: [PATCH 132/561] Add feature flag for screen sharing. --- .../app/features/debug/features/DebugVectorFeatures.kt | 4 ++++ .../src/main/java/im/vector/app/features/VectorFeatures.kt | 2 ++ .../im/vector/app/features/call/CallControlsBottomSheet.kt | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/vector/src/debug/java/im/vector/app/features/debug/features/DebugVectorFeatures.kt b/vector/src/debug/java/im/vector/app/features/debug/features/DebugVectorFeatures.kt index bc716779ac..07fab8a58d 100644 --- a/vector/src/debug/java/im/vector/app/features/debug/features/DebugVectorFeatures.kt +++ b/vector/src/debug/java/im/vector/app/features/debug/features/DebugVectorFeatures.kt @@ -60,6 +60,9 @@ class DebugVectorFeatures( override fun isLiveLocationEnabled(): Boolean = read(DebugFeatureKeys.liveLocationSharing) ?: vectorFeatures.isLiveLocationEnabled() + override fun isScreenSharingEnabled(): Boolean = read(DebugFeatureKeys.screenSharing) + ?: vectorFeatures.isScreenSharingEnabled() + fun override(value: T?, key: Preferences.Key) = updatePreferences { if (value == null) { it.remove(key) @@ -114,4 +117,5 @@ object DebugFeatureKeys { val onboardingPersonalize = booleanPreferencesKey("onboarding-personalize") val onboardingCombinedRegister = booleanPreferencesKey("onboarding-combined-register") val liveLocationSharing = booleanPreferencesKey("live-location-sharing") + val screenSharing = booleanPreferencesKey("screen-sharing") } diff --git a/vector/src/main/java/im/vector/app/features/VectorFeatures.kt b/vector/src/main/java/im/vector/app/features/VectorFeatures.kt index b2a62a42d3..9d54475e8c 100644 --- a/vector/src/main/java/im/vector/app/features/VectorFeatures.kt +++ b/vector/src/main/java/im/vector/app/features/VectorFeatures.kt @@ -27,6 +27,7 @@ interface VectorFeatures { fun isOnboardingPersonalizeEnabled(): Boolean fun isOnboardingCombinedRegisterEnabled(): Boolean fun isLiveLocationEnabled(): Boolean + fun isScreenSharingEnabled(): Boolean enum class OnboardingVariant { LEGACY, @@ -43,4 +44,5 @@ class DefaultVectorFeatures : VectorFeatures { override fun isOnboardingPersonalizeEnabled() = false override fun isOnboardingCombinedRegisterEnabled() = false override fun isLiveLocationEnabled(): Boolean = false + override fun isScreenSharingEnabled(): Boolean = false } diff --git a/vector/src/main/java/im/vector/app/features/call/CallControlsBottomSheet.kt b/vector/src/main/java/im/vector/app/features/call/CallControlsBottomSheet.kt index 1c6ead33cc..9310dbf862 100644 --- a/vector/src/main/java/im/vector/app/features/call/CallControlsBottomSheet.kt +++ b/vector/src/main/java/im/vector/app/features/call/CallControlsBottomSheet.kt @@ -27,6 +27,8 @@ import dagger.hilt.android.AndroidEntryPoint import im.vector.app.R import im.vector.app.core.platform.VectorBaseBottomSheetDialogFragment import im.vector.app.databinding.BottomSheetCallControlsBinding +import im.vector.app.features.DefaultVectorFeatures +import javax.inject.Inject @AndroidEntryPoint class CallControlsBottomSheet : VectorBaseBottomSheetDialogFragment() { @@ -34,6 +36,8 @@ class CallControlsBottomSheet : VectorBaseBottomSheetDialogFragment Date: Thu, 21 Apr 2022 12:31:34 +0300 Subject: [PATCH 133/561] Changelog added. --- changelog.d/5811.feature | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/5811.feature diff --git a/changelog.d/5811.feature b/changelog.d/5811.feature new file mode 100644 index 0000000000..12111e323b --- /dev/null +++ b/changelog.d/5811.feature @@ -0,0 +1 @@ +VoIP Screen Sharing Permission \ No newline at end of file From de899bbb18d99e8c85fca82141dc69fcbff65415 Mon Sep 17 00:00:00 2001 From: ericdecanini Date: Thu, 21 Apr 2022 11:50:15 +0200 Subject: [PATCH 134/561] Formats entire project --- .../lib/attachmentviewer/ImageLoaderTarget.kt | 2 +- .../jsonviewer/JSonViewerDialog.kt | 30 +- .../jsonviewer/JSonViewerFragment.kt | 48 +- .../jsonviewer/JSonViewerModel.kt | 24 +- .../jsonviewer/JSonViewerStyleProvider.kt | 24 +- .../jsonviewer/JSonViewerViewModel.kt | 10 +- .../java/org/billcarsonfr/jsonviewer/Utils.kt | 6 +- .../org/billcarsonfr/jsonviewer/ValueItem.kt | 8 +- .../im/vector/lib/multipicker/MultiPicker.kt | 18 +- .../org/matrix/android/sdk/flow/FlowRoom.kt | 2 + .../crypto/crosssigning/XSigningTest.kt | 36 +- .../verification/qrcode/VerificationTest.kt | 4 +- .../interceptors/CurlLoggingInterceptor.kt | 2 +- .../sdk/api/session/file/FileService.kt | 6 +- .../api/session/initsync/SyncStatusService.kt | 1 + .../api/session/permalinks/MatrixLinkify.kt | 2 +- .../api/session/permalinks/PermalinkData.kt | 24 +- .../room/model/RoomJoinRulesContent.kt | 8 +- .../room/model/call/CallAnswerContent.kt | 2 +- .../room/model/call/CallInviteContent.kt | 2 +- .../room/model/call/CallNegotiateContent.kt | 2 +- .../room/model/call/CallReplacesContent.kt | 2 +- .../session/room/model/message/FileInfo.kt | 2 +- .../session/room/model/message/ImageInfo.kt | 2 +- .../MessageVerificationRequestContent.kt | 2 +- .../room/model/message/MessageVideoContent.kt | 2 +- .../session/room/model/message/VideoInfo.kt | 2 +- .../securestorage/SharedSecretStorageError.kt | 2 +- .../sdk/api/session/space/SpaceService.kt | 2 +- .../crypto/CancelGossipRequestWorker.kt | 2 +- .../crypto/CryptoSessionInfoProvider.kt | 2 +- .../crypto/InboundGroupSessionStore.kt | 18 +- .../crypto/IncomingGossipingRequestManager.kt | 4 +- .../crypto/SendGossipRequestWorker.kt | 2 +- .../crypto/algorithms/olm/MXOlmEncryption.kt | 2 +- .../DefaultSharedSecretStorageService.kt | 2 +- .../crypto/store/db/model/CryptoRoomEntity.kt | 4 +- .../db/model/OlmInboundGroupSessionEntity.kt | 2 +- .../crypto/store/db/model/OlmSessionEntity.kt | 2 +- .../SendVerificationMessageWorker.kt | 2 +- .../VerificationTransportRoomMessage.kt | 14 +- .../database/EventInsertLiveObserver.kt | 2 +- .../database/RealmLiveEntityObserver.kt | 2 +- .../internal/database/RealmSessionProvider.kt | 2 +- .../database/migration/MigrateSessionTo019.kt | 2 +- .../internal/database/model/ChunkEntity.kt | 21 +- .../internal/database/model/GroupEntity.kt | 2 +- .../sdk/internal/database/model/RoomEntity.kt | 2 + .../database/model/TimelineEventEntity.kt | 4 +- .../database/query/ChunkEntityQueries.kt | 3 + .../query/ThreadSummaryEntityQueries.kt | 2 + .../network/NetworkConnectivityChecker.kt | 2 +- .../sdk/internal/network/RequestExecutor.kt | 1 + .../internal/session/DefaultFileService.kt | 2 +- .../session/call/CallEventProcessor.kt | 2 +- .../internal/session/content/FileUploader.kt | 4 +- .../session/content/ImageCompressor.kt | 12 +- .../initsync/DefaultSyncStatusService.kt | 2 +- .../integrationmanager/IntegrationManager.kt | 2 +- .../session/pushers/AddPusherWorker.kt | 2 +- .../pushers/UpdatePushRuleActionsTask.kt | 22 +- .../room/alias/GetRoomIdByAliasTask.kt | 2 +- .../DefaultRoomPushRuleService.kt | 2 +- .../SetRoomNotificationStateTask.kt | 2 +- .../MultipleEventSendingDispatcherWorker.kt | 10 +- .../session/room/send/RedactEventWorker.kt | 2 +- .../session/room/send/SendEventWorker.kt | 2 +- .../session/room/send/queue/QueueMemento.kt | 4 +- .../room/state/SafePowerLevelContent.kt | 2 +- .../session/room/summary/GraphUtils.kt | 4 +- .../room/timeline/LiveTimelineEvent.kt | 2 +- .../session/room/timeline/TimelineChunk.kt | 33 +- .../sdk/internal/session/search/SearchTask.kt | 2 +- .../sdk/internal/session/sync/SyncPresence.kt | 5 +- .../sdk/internal/session/sync/SyncTask.kt | 2 +- .../internal/session/sync/job/SyncWorker.kt | 2 +- .../thirdparty/DefaultThirdPartyService.kt | 2 +- .../widgets/DefaultWidgetPostAPIMediator.kt | 2 +- .../session/widgets/DefaultWidgetService.kt | 4 +- .../internal/session/widgets/WidgetManager.kt | 2 +- .../internal/util/database/RealmMigrator.kt | 2 +- .../DefaultBuildVersionSdkIntProvider.kt | 2 +- .../internal/worker/AlwaysSuccessfulWorker.kt | 2 +- .../internal/worker/MatrixWorkerFactory.kt | 2 +- .../interceptors/CurlLoggingInterceptor.kt | 2 +- .../java/im/vector/app/EspressoExt.kt | 2 +- .../vector/app/ui/robot/MessageMenuRobot.kt | 1 + .../app/ui/robot/settings/SettingsRobot.kt | 2 +- .../app/features/debug/sas/SasEmojiItem.kt | 1 + .../troubleshoot/TestAutoStartBoot.kt | 2 +- .../TestBackgroundRestrictions.kt | 2 +- .../OnApplicationUpgradeOrRebootReceiver.kt | 10 +- .../settings/troubleshoot/TestPlayServices.kt | 2 +- .../troubleshoot/TestPushFromPushGateway.kt | 2 +- .../troubleshoot/TestTokenRegistration.kt | 2 +- .../main/java/im/vector/app/UISIDetector.kt | 6 +- .../core/date/DefaultDateFormatterProvider.kt | 2 +- .../core/di/HiltMavericksViewModelFactory.kt | 2 +- .../app/core/dialogs/ExportKeysDialog.kt | 4 +- .../im/vector/app/core/extensions/Session.kt | 4 +- .../app/core/glide/AvatarPlaceholder.kt | 4 +- .../app/core/glide/VectorGlideModelLoader.kt | 4 +- .../app/core/platform/ButtonStateView.kt | 2 +- .../app/core/platform/MaxHeightScrollView.kt | 2 +- .../im/vector/app/core/platform/StateView.kt | 2 +- .../app/core/platform/VectorBaseFragment.kt | 4 +- .../app/core/platform/VectorEventViewModel.kt | 2 +- .../app/core/preference/KeywordPreference.kt | 2 +- .../app/core/resources/LocaleProvider.kt | 2 +- .../BottomSheetGenericController.kt | 2 +- .../app/core/ui/views/PasswordStrengthBar.kt | 2 +- .../core/ui/views/TypingMessageDotsView.kt | 2 +- .../ui/consent/AnalyticsOptInFragment.kt | 2 +- .../preview/AttachmentsPreviewViewModel.kt | 2 +- .../app/features/auth/PromptFragment.kt | 2 +- .../app/features/auth/ReAuthActivity.kt | 6 +- .../app/features/auth/ReAuthViewModel.kt | 4 +- .../app/features/call/VectorCallViewEvents.kt | 1 + .../app/features/call/VectorCallViewModel.kt | 32 +- .../call/audio/API23AudioDeviceDetector.kt | 6 +- .../call/audio/DefaultAudioDeviceRouter.kt | 2 +- .../features/call/dialpad/DialPadLookup.kt | 2 +- .../call/transfer/CallTransferViewModel.kt | 4 +- .../call/webrtc/PeerConnectionObserver.kt | 22 +- .../KeysBackupRestoreFromKeyFragment.kt | 2 +- .../settings/KeysBackupSettingsFragment.kt | 2 +- .../quads/SharedSecureStorageViewModel.kt | 18 +- .../SharedSecuredStorageResetAllFragment.kt | 2 +- .../crypto/recover/BootstrapActions.kt | 2 +- .../crypto/recover/BootstrapBottomSheet.kt | 2 +- .../BootstrapConfirmPassphraseFragment.kt | 2 +- .../BootstrapEnterPassphraseFragment.kt | 2 +- .../BootstrapSetupRecoveryKeyFragment.kt | 2 +- .../recover/BootstrapWaitingFragment.kt | 2 +- .../IncomingVerificationRequestHandler.kt | 2 +- .../VerificationConclusionViewModel.kt | 2 +- .../devtools/RoomDevToolEditFragment.kt | 2 +- .../change/SetIdentityServerViewModel.kt | 2 +- .../vector/app/features/home/HomeActivity.kt | 2 +- .../features/home/HomeActivityViewModel.kt | 2 +- .../UnknownDeviceDetectorSharedViewModel.kt | 2 +- .../detail/JoinReplacementRoomBottomSheet.kt | 6 +- .../DisplayReadReceiptsController.kt | 2 +- .../timeline/TimelineEventController.kt | 1 + .../edithistory/ViewEditHistoryViewState.kt | 2 +- .../timeline/factory/MessageItemFactory.kt | 574 +++++++++--------- ...TimelineVisibilityStateChangedListeners.kt | 6 +- .../timeline/item/CallTileTimelineItem.kt | 6 +- .../detail/timeline/item/MessageAudioItem.kt | 2 + .../detail/timeline/item/MessageVoiceItem.kt | 6 +- .../timeline/item/StatusTileTimelineItem.kt | 2 +- .../timeline/style/TimelineMessageLayout.kt | 18 +- .../detail/upgrade/MigrateRoomViewModel.kt | 2 +- .../detail/widget/RoomWidgetsController.kt | 2 +- .../list/CollapsableTypedEpoxyController.kt | 2 +- .../RoomListQuickActionsSharedAction.kt | 2 +- .../list/viewmodel/ThreadListController.kt | 8 +- .../threads/list/views/ThreadListFragment.kt | 1 + .../app/features/invite/VectorInviteView.kt | 2 +- .../im/vector/app/features/login/LoginMode.kt | 3 +- .../features/login/SocialLoginButtonsView.kt | 6 +- .../LoginGenericTextInputFormFragment2.kt | 4 +- .../matrixto/MatrixToRoomSpaceFragment.kt | 14 +- .../features/matrixto/MatrixToUserFragment.kt | 12 +- .../features/navigation/DefaultNavigator.kt | 2 +- .../poll/create/CreatePollViewState.kt | 16 +- .../features/rageshake/BugReportActivity.kt | 8 +- .../features/rageshake/BugReportViewModel.kt | 2 +- .../reactions/EmojiSearchResultViewModel.kt | 2 +- .../room/RequireActiveMembershipViewModel.kt | 2 +- .../roomdirectory/ExplicitTermFilter.kt | 2 +- .../devices/DeviceTrustInfoEpoxyController.kt | 2 +- .../roomprofile/RoomProfileActivity.kt | 14 +- .../RoomAliasBottomSheetSharedAction.kt | 2 +- .../RoomNotificationSettingsController.kt | 4 +- .../RoomNotificationSettingsViewModel.kt | 4 +- .../RoomNotificationSettingsViewState.kt | 2 +- .../permissions/RoomPermissionsViewModel.kt | 2 +- .../settings/RoomSettingsViewState.kt | 6 +- ...mHistoryVisibilitySharedActionViewModel.kt | 2 +- .../RoomHistoryVisibilityViewModel.kt | 2 +- .../RoomJoinRuleSharedActionViewModel.kt | 2 +- .../joinrule/RoomJoinRuleViewModel.kt | 2 +- .../features/session/SessionScopedProperty.kt | 6 +- .../DeactivateAccountViewModel.kt | 8 +- .../settings/devices/DevicesAction.kt | 2 +- .../settings/devices/DevicesViewEvents.kt | 2 +- .../settings/devtools/AccountDataViewModel.kt | 2 +- .../GossipingEventsPaperTrailViewModel.kt | 2 +- .../settings/devtools/KeyRequestViewModel.kt | 2 +- .../OutgoingKeyRequestListFragment.kt | 1 + .../notifications/NotificationIndex.kt | 29 +- ...sAdvancedNotificationPreferenceFragment.kt | 2 +- ...gsDefaultNotificationPreferenceFragment.kt | 12 +- ...ingsOtherNotificationPreferenceFragment.kt | 12 +- ...sPushRuleNotificationPreferenceFragment.kt | 2 +- .../settings/push/PushRulesViewModel.kt | 2 +- .../threepids/ThreePidsSettingsFragment.kt | 5 +- .../threepids/ThreePidsSettingsViewEvents.kt | 2 +- ...ficationTroubleshootRecyclerViewAdapter.kt | 2 +- .../troubleshoot/TestAccountSettings.kt | 2 +- .../troubleshoot/TestDeviceSettings.kt | 2 +- .../settings/troubleshoot/TestNotification.kt | 2 +- .../troubleshoot/TestPushRulesSettings.kt | 2 +- .../troubleshoot/TestSystemSettings.kt | 2 +- .../features/share/IncomingShareViewModel.kt | 2 +- .../signout/soft/SoftLogoutFragment.kt | 6 +- .../spaces/create/CreateSpaceState.kt | 12 +- .../spaces/create/CreateSpaceViewModel.kt | 2 +- .../spaces/create/WizardButtonView.kt | 2 +- .../spaces/explore/SpaceDirectoryFragment.kt | 2 +- .../spaces/explore/SpaceDirectoryViewModel.kt | 6 +- .../manage/SpaceManageRoomViewEvents.kt | 2 +- .../spaces/manage/SpaceManageViewState.kt | 1 + .../spaces/manage/SpaceSettingsController.kt | 4 +- .../spaces/manage/SpaceSettingsFragment.kt | 8 +- .../spaces/preview/SpacePreviewFragment.kt | 6 +- .../spaces/preview/SpacePreviewState.kt | 4 +- .../spaces/preview/SpacePreviewViewModel.kt | 6 +- .../features/spaces/preview/SpaceTabView.kt | 2 +- .../app/features/sync/widget/SyncStateView.kt | 2 +- .../webview/ConsentWebViewEventListener.kt | 2 +- .../app/features/widgets/WidgetViewModel.kt | 2 +- .../RoomWidgetPermissionViewModel.kt | 2 +- 224 files changed, 853 insertions(+), 815 deletions(-) diff --git a/library/attachment-viewer/src/main/java/im/vector/lib/attachmentviewer/ImageLoaderTarget.kt b/library/attachment-viewer/src/main/java/im/vector/lib/attachmentviewer/ImageLoaderTarget.kt index 99686eaabb..7b54438a52 100644 --- a/library/attachment-viewer/src/main/java/im/vector/lib/attachmentviewer/ImageLoaderTarget.kt +++ b/library/attachment-viewer/src/main/java/im/vector/lib/attachmentviewer/ImageLoaderTarget.kt @@ -37,7 +37,7 @@ interface ImageLoaderTarget { } internal class DefaultImageLoaderTarget(val holder: AnimatedImageViewHolder, private val contextView: ImageView) : - ImageLoaderTarget { + ImageLoaderTarget { override fun contextView(): ImageView { return contextView } diff --git a/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerDialog.kt b/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerDialog.kt index a8d9cac849..0ebf539d4d 100644 --- a/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerDialog.kt +++ b/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerDialog.kt @@ -27,9 +27,9 @@ import com.airbnb.mvrx.Mavericks class JSonViewerDialog : DialogFragment() { override fun onCreateView( - inflater: LayoutInflater, - container: ViewGroup?, - savedInstanceState: Bundle? + inflater: LayoutInflater, + container: ViewGroup?, + savedInstanceState: Bundle? ): View? { return inflater.inflate(R.layout.fragment_dialog_jv, container, false) } @@ -39,15 +39,15 @@ class JSonViewerDialog : DialogFragment() { val args: JSonViewerFragmentArgs = arguments?.getParcelable(Mavericks.KEY_ARG) ?: return if (savedInstanceState == null) { childFragmentManager.beginTransaction() - .replace( - R.id.fragmentContainer, JSonViewerFragment.newInstance( - args.jsonString, - args.defaultOpenDepth, - true, - args.styleProvider + .replace( + R.id.fragmentContainer, JSonViewerFragment.newInstance( + args.jsonString, + args.defaultOpenDepth, + true, + args.styleProvider ) - ) - .commitNow() + ) + .commitNow() } } @@ -63,13 +63,13 @@ class JSonViewerDialog : DialogFragment() { companion object { fun newInstance( - jsonString: String, - initialOpenDepth: Int = -1, - styleProvider: JSonViewerStyleProvider? = null + jsonString: String, + initialOpenDepth: Int = -1, + styleProvider: JSonViewerStyleProvider? = null ): JSonViewerDialog { val args = Bundle() val parcelableArgs = - JSonViewerFragmentArgs(jsonString, initialOpenDepth, false, styleProvider) + JSonViewerFragmentArgs(jsonString, initialOpenDepth, false, styleProvider) args.putParcelable(Mavericks.KEY_ARG, parcelableArgs) return JSonViewerDialog().apply { arguments = args } } diff --git a/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerFragment.kt b/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerFragment.kt index 51e2797958..fbf6f88bc3 100644 --- a/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerFragment.kt +++ b/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerFragment.kt @@ -32,10 +32,10 @@ import kotlinx.parcelize.Parcelize @Parcelize internal data class JSonViewerFragmentArgs( - val jsonString: String, - val defaultOpenDepth: Int, - val wrap: Boolean, - val styleProvider: JSonViewerStyleProvider? + val jsonString: String, + val defaultOpenDepth: Int, + val wrap: Boolean, + val styleProvider: JSonViewerStyleProvider? ) : Parcelable class JSonViewerFragment : Fragment(), MavericksView { @@ -49,20 +49,20 @@ class JSonViewerFragment : Fragment(), MavericksView { private lateinit var recyclerView: EpoxyRecyclerView override fun onCreateView( - inflater: LayoutInflater, - container: ViewGroup?, - savedInstanceState: Bundle? + inflater: LayoutInflater, + container: ViewGroup?, + savedInstanceState: Bundle? ): View? { val args: JSonViewerFragmentArgs? = arguments?.getParcelable(Mavericks.KEY_ARG) val inflate = - if (args?.wrap == true) { - inflater.inflate(R.layout.fragment_jv_recycler_view_wrap, container, false) - } else { - inflater.inflate(R.layout.fragment_jv_recycler_view, container, false) - } + if (args?.wrap == true) { + inflater.inflate(R.layout.fragment_jv_recycler_view_wrap, container, false) + } else { + inflater.inflate(R.layout.fragment_jv_recycler_view, container, false) + } recyclerView = inflate.findViewById(R.id.jvRecyclerView) recyclerView.layoutManager = - LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false) + LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false) recyclerView.setController(epoxyController) epoxyController.setStyle(args?.styleProvider) registerForContextMenu(recyclerView) @@ -79,21 +79,21 @@ class JSonViewerFragment : Fragment(), MavericksView { companion object { fun newInstance( - jsonString: String, - initialOpenDepth: Int = -1, - wrap: Boolean = false, - styleProvider: JSonViewerStyleProvider? = null + jsonString: String, + initialOpenDepth: Int = -1, + wrap: Boolean = false, + styleProvider: JSonViewerStyleProvider? = null ): JSonViewerFragment { return JSonViewerFragment().apply { arguments = Bundle().apply { putParcelable( - Mavericks.KEY_ARG, - JSonViewerFragmentArgs( - jsonString, - initialOpenDepth, - wrap, - styleProvider - ) + Mavericks.KEY_ARG, + JSonViewerFragmentArgs( + jsonString, + initialOpenDepth, + wrap, + styleProvider + ) ) } } diff --git a/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerModel.kt b/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerModel.kt index 3d1f8dd3e2..6940e79e3f 100644 --- a/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerModel.kt +++ b/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerModel.kt @@ -30,8 +30,8 @@ internal interface Composed { } internal class JSonViewerObject(key: String?, index: Int?, jObject: JSONObject) : - JSonViewerModel(key, index, jObject), - Composed { + JSonViewerModel(key, index, jObject), + Composed { var keys = LinkedHashMap() @@ -41,7 +41,7 @@ internal class JSonViewerObject(key: String?, index: Int?, jObject: JSONObject) } internal class JSonViewerArray(key: String?, index: Int?, jObject: JSONArray) : - JSonViewerModel(key, index, jObject), Composed { + JSonViewerModel(key, index, jObject), Composed { var items = ArrayList() override fun addChild(model: JSonViewerModel) { @@ -50,7 +50,7 @@ internal class JSonViewerArray(key: String?, index: Int?, jObject: JSONArray) : } internal class JSonViewerLeaf(key: String?, index: Int?, val stringRes: String, val type: JSONType) : - JSonViewerModel(key, index, stringRes) + JSonViewerModel(key, index, stringRes) internal enum class JSONType { STRING, @@ -75,41 +75,41 @@ internal object ModelParser { when (obj) { is JSONObject -> { val objectComposed = JSonViewerObject(key, index, obj) - .apply { isExpanded = initialOpenDepth == -1 || depth <= initialOpenDepth } + .apply { isExpanded = initialOpenDepth == -1 || depth <= initialOpenDepth } objectComposed.depth = depth obj.keys().forEach { eval(objectComposed, it, null, obj.get(it), depth + 1, initialOpenDepth) } parent.addChild(objectComposed) } - is JSONArray -> { + is JSONArray -> { val objectComposed = JSonViewerArray(key, index, obj) - .apply { isExpanded = initialOpenDepth == -1 || depth <= initialOpenDepth } + .apply { isExpanded = initialOpenDepth == -1 || depth <= initialOpenDepth } objectComposed.depth = depth for (i in 0 until obj.length()) { eval(objectComposed, null, i, obj[i], depth + 1, initialOpenDepth) } parent.addChild(objectComposed) } - is String -> { - JSonViewerLeaf(key, index, obj, JSONType.STRING).let { + is String -> { + JSonViewerLeaf(key, index, obj, JSONType.STRING).let { it.depth = depth parent.addChild(it) } } - is Number -> { + is Number -> { JSonViewerLeaf(key, index, obj.toString(), JSONType.NUMBER).let { it.depth = depth parent.addChild(it) } } - is Boolean -> { + is Boolean -> { JSonViewerLeaf(key, index, obj.toString(), JSONType.BOOLEAN).let { it.depth = depth parent.addChild(it) } } - else -> { + else -> { if (obj == JSONObject.NULL) { JSonViewerLeaf(key, index, "null", JSONType.NULL).let { it.depth = depth diff --git a/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerStyleProvider.kt b/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerStyleProvider.kt index 4fc04c91e4..17d8034f2d 100644 --- a/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerStyleProvider.kt +++ b/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerStyleProvider.kt @@ -24,22 +24,22 @@ import kotlinx.parcelize.Parcelize @Parcelize data class JSonViewerStyleProvider( - @ColorInt val keyColor: Int, - @ColorInt val stringColor: Int, - @ColorInt val booleanColor: Int, - @ColorInt val numberColor: Int, - @ColorInt val baseColor: Int, - @ColorInt val secondaryColor: Int + @ColorInt val keyColor: Int, + @ColorInt val stringColor: Int, + @ColorInt val booleanColor: Int, + @ColorInt val numberColor: Int, + @ColorInt val baseColor: Int, + @ColorInt val secondaryColor: Int ) : Parcelable { companion object { fun default(context: Context) = JSonViewerStyleProvider( - keyColor = ContextCompat.getColor(context, R.color.key_color), - stringColor = ContextCompat.getColor(context, R.color.string_color), - booleanColor = ContextCompat.getColor(context, R.color.bool_color), - numberColor = ContextCompat.getColor(context, R.color.number_color), - baseColor = ContextCompat.getColor(context, R.color.base_color), - secondaryColor = ContextCompat.getColor(context, R.color.secondary_color) + keyColor = ContextCompat.getColor(context, R.color.key_color), + stringColor = ContextCompat.getColor(context, R.color.string_color), + booleanColor = ContextCompat.getColor(context, R.color.bool_color), + numberColor = ContextCompat.getColor(context, R.color.number_color), + baseColor = ContextCompat.getColor(context, R.color.base_color), + secondaryColor = ContextCompat.getColor(context, R.color.secondary_color) ) } } diff --git a/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerViewModel.kt b/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerViewModel.kt index bc3f022cfa..d4e8f42604 100644 --- a/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerViewModel.kt +++ b/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerViewModel.kt @@ -28,11 +28,11 @@ import com.airbnb.mvrx.ViewModelContext import kotlinx.coroutines.launch internal data class JSonViewerState( - val root: Async = Uninitialized + val root: Async = Uninitialized ) : MavericksState internal class JSonViewerViewModel(initialState: JSonViewerState) : - MavericksViewModel(initialState) { + MavericksViewModel(initialState) { fun setJsonSource(json: String, initialOpenDepth: Int) { setState { @@ -43,14 +43,14 @@ internal class JSonViewerViewModel(initialState: JSonViewerState) : ModelParser.fromJsonString(json, initialOpenDepth).let { setState { copy( - root = Success(it) + root = Success(it) ) } } } catch (error: Throwable) { setState { copy( - root = Fail(error) + root = Fail(error) ) } } @@ -64,7 +64,7 @@ internal class JSonViewerViewModel(initialState: JSonViewerState) : val arg: JSonViewerFragmentArgs = viewModelContext.args() return try { JSonViewerState( - Success(ModelParser.fromJsonString(arg.jsonString, arg.defaultOpenDepth)) + Success(ModelParser.fromJsonString(arg.jsonString, arg.defaultOpenDepth)) ) } catch (failure: Throwable) { JSonViewerState(Fail(failure)) diff --git a/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/Utils.kt b/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/Utils.kt index efb2bfd855..0ac1cfe5f6 100644 --- a/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/Utils.kt +++ b/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/Utils.kt @@ -22,9 +22,9 @@ import android.util.TypedValue internal object Utils { fun dpToPx(dp: Int, context: Context): Int { return TypedValue.applyDimension( - TypedValue.COMPLEX_UNIT_DIP, - dp.toFloat(), - context.resources.displayMetrics + TypedValue.COMPLEX_UNIT_DIP, + dp.toFloat(), + context.resources.displayMetrics ).toInt() } } diff --git a/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/ValueItem.kt b/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/ValueItem.kt index 00d66645e6..fac7099b37 100644 --- a/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/ValueItem.kt +++ b/library/jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/ValueItem.kt @@ -71,14 +71,14 @@ internal abstract class ValueItem : EpoxyModelWithHolder() { } override fun onCreateContextMenu( - menu: ContextMenu?, - v: View?, - menuInfo: ContextMenu.ContextMenuInfo? + menu: ContextMenu?, + v: View?, + menuInfo: ContextMenu.ContextMenuInfo? ) { if (copyValue != null) { val menuItem = menu?.add(R.string.copy_value) val clipService = - v?.context?.getSystemService(Context.CLIPBOARD_SERVICE) as? ClipboardManager + v?.context?.getSystemService(Context.CLIPBOARD_SERVICE) as? ClipboardManager menuItem?.setOnMenuItemClickListener { clipService?.setPrimaryClip(ClipData.newPlainText("", copyValue)) true diff --git a/library/multipicker/src/main/java/im/vector/lib/multipicker/MultiPicker.kt b/library/multipicker/src/main/java/im/vector/lib/multipicker/MultiPicker.kt index 6ce50f622a..821c2f0d4c 100644 --- a/library/multipicker/src/main/java/im/vector/lib/multipicker/MultiPicker.kt +++ b/library/multipicker/src/main/java/im/vector/lib/multipicker/MultiPicker.kt @@ -31,15 +31,15 @@ class MultiPicker { @Suppress("UNCHECKED_CAST") fun get(type: MultiPicker): T { return when (type) { - IMAGE -> ImagePicker() as T - VIDEO -> VideoPicker() as T - MEDIA -> MediaPicker() as T - FILE -> FilePicker() as T - AUDIO -> AudioPicker() as T - CONTACT -> ContactPicker() as T - CAMERA -> CameraPicker() as T - CAMERA_VIDEO -> CameraVideoPicker() as T - else -> throw IllegalArgumentException("Unsupported type $type") + IMAGE -> ImagePicker() as T + VIDEO -> VideoPicker() as T + MEDIA -> MediaPicker() as T + FILE -> FilePicker() as T + AUDIO -> AudioPicker() as T + CONTACT -> ContactPicker() as T + CAMERA -> CameraPicker() as T + CAMERA_VIDEO -> CameraVideoPicker() as T + else -> throw IllegalArgumentException("Unsupported type $type") } } } diff --git a/matrix-sdk-android-flow/src/main/java/org/matrix/android/sdk/flow/FlowRoom.kt b/matrix-sdk-android-flow/src/main/java/org/matrix/android/sdk/flow/FlowRoom.kt index d737715306..0f0153bc23 100644 --- a/matrix-sdk-android-flow/src/main/java/org/matrix/android/sdk/flow/FlowRoom.kt +++ b/matrix-sdk-android-flow/src/main/java/org/matrix/android/sdk/flow/FlowRoom.kt @@ -108,12 +108,14 @@ class FlowRoom(private val room: Room) { room.getAllThreadSummaries() } } + fun liveThreadList(): Flow> { return room.getAllThreadsLive().asFlow() .startWith(room.coroutineDispatchers.io) { room.getAllThreads() } } + fun liveLocalUnreadThreadList(): Flow> { return room.getMarkedThreadNotificationsLive().asFlow() .startWith(room.coroutineDispatchers.io) { diff --git a/matrix-sdk-android/src/androidTest/java/org/matrix/android/sdk/internal/crypto/crosssigning/XSigningTest.kt b/matrix-sdk-android/src/androidTest/java/org/matrix/android/sdk/internal/crypto/crosssigning/XSigningTest.kt index dc65cec187..0f3ff7898f 100644 --- a/matrix-sdk-android/src/androidTest/java/org/matrix/android/sdk/internal/crypto/crosssigning/XSigningTest.kt +++ b/matrix-sdk-android/src/androidTest/java/org/matrix/android/sdk/internal/crypto/crosssigning/XSigningTest.kt @@ -110,11 +110,13 @@ class XSigningTest : InstrumentedTest { } }, it) } - testHelper.doSync { bobSession.cryptoService().crossSigningService().initializeCrossSigning(object : UserInteractiveAuthInterceptor { - override fun performStage(flowResponse: RegistrationFlowResponse, errCode: String?, promise: Continuation) { - promise.resume(bobAuthParams) - } - }, it) } + testHelper.doSync { + bobSession.cryptoService().crossSigningService().initializeCrossSigning(object : UserInteractiveAuthInterceptor { + override fun performStage(flowResponse: RegistrationFlowResponse, errCode: String?, promise: Continuation) { + promise.resume(bobAuthParams) + } + }, it) + } // Check that alice can see bob keys testHelper.doSync> { aliceSession.cryptoService().downloadKeys(listOf(bobSession.myUserId), true, it) } @@ -149,16 +151,20 @@ class XSigningTest : InstrumentedTest { password = TestConstants.PASSWORD ) - testHelper.doSync { aliceSession.cryptoService().crossSigningService().initializeCrossSigning(object : UserInteractiveAuthInterceptor { - override fun performStage(flowResponse: RegistrationFlowResponse, errCode: String?, promise: Continuation) { - promise.resume(aliceAuthParams) - } - }, it) } - testHelper.doSync { bobSession.cryptoService().crossSigningService().initializeCrossSigning(object : UserInteractiveAuthInterceptor { - override fun performStage(flowResponse: RegistrationFlowResponse, errCode: String?, promise: Continuation) { - promise.resume(bobAuthParams) - } - }, it) } + testHelper.doSync { + aliceSession.cryptoService().crossSigningService().initializeCrossSigning(object : UserInteractiveAuthInterceptor { + override fun performStage(flowResponse: RegistrationFlowResponse, errCode: String?, promise: Continuation) { + promise.resume(aliceAuthParams) + } + }, it) + } + testHelper.doSync { + bobSession.cryptoService().crossSigningService().initializeCrossSigning(object : UserInteractiveAuthInterceptor { + override fun performStage(flowResponse: RegistrationFlowResponse, errCode: String?, promise: Continuation) { + promise.resume(bobAuthParams) + } + }, it) + } // Check that alice can see bob keys val bobUserId = bobSession.myUserId diff --git a/matrix-sdk-android/src/androidTest/java/org/matrix/android/sdk/internal/crypto/verification/qrcode/VerificationTest.kt b/matrix-sdk-android/src/androidTest/java/org/matrix/android/sdk/internal/crypto/verification/qrcode/VerificationTest.kt index 2c96568102..374d709505 100644 --- a/matrix-sdk-android/src/androidTest/java/org/matrix/android/sdk/internal/crypto/verification/qrcode/VerificationTest.kt +++ b/matrix-sdk-android/src/androidTest/java/org/matrix/android/sdk/internal/crypto/verification/qrcode/VerificationTest.kt @@ -155,8 +155,8 @@ class VerificationTest : InstrumentedTest { bobSupportedMethods: List, expectedResultForAlice: ExpectedResult, expectedResultForBob: ExpectedResult) { - val testHelper = CommonTestHelper(context()) - val cryptoTestHelper = CryptoTestHelper(testHelper) + val testHelper = CommonTestHelper(context()) + val cryptoTestHelper = CryptoTestHelper(testHelper) val cryptoTestData = cryptoTestHelper.doE2ETestWithAliceAndBobInARoom() val aliceSession = cryptoTestData.firstSession diff --git a/matrix-sdk-android/src/debug/java/org/matrix/android/sdk/internal/network/interceptors/CurlLoggingInterceptor.kt b/matrix-sdk-android/src/debug/java/org/matrix/android/sdk/internal/network/interceptors/CurlLoggingInterceptor.kt index 3add757efa..6dd3553d02 100644 --- a/matrix-sdk-android/src/debug/java/org/matrix/android/sdk/internal/network/interceptors/CurlLoggingInterceptor.kt +++ b/matrix-sdk-android/src/debug/java/org/matrix/android/sdk/internal/network/interceptors/CurlLoggingInterceptor.kt @@ -37,7 +37,7 @@ import javax.inject.Inject */ @MatrixScope internal class CurlLoggingInterceptor @Inject constructor() : - Interceptor { + Interceptor { /** * Set any additional curl command options (see 'curl --help'). diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/file/FileService.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/file/FileService.kt index 72f8019ada..e3ccbad249 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/file/FileService.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/file/FileService.kt @@ -45,9 +45,9 @@ interface FileService { * Result will be a decrypted file, stored in the cache folder. url parameter will be used to create unique filename to avoid name collision. */ suspend fun downloadFile(fileName: String, - mimeType: String?, - url: String?, - elementToDecrypt: ElementToDecrypt?): File + mimeType: String?, + url: String?, + elementToDecrypt: ElementToDecrypt?): File suspend fun downloadFile(messageContent: MessageWithAttachmentContent): File = downloadFile( diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/initsync/SyncStatusService.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/initsync/SyncStatusService.kt index 267436916e..759813939f 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/initsync/SyncStatusService.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/initsync/SyncStatusService.kt @@ -43,6 +43,7 @@ interface SyncStatusService { val rooms: Int, val toDevice: Int ) : IncrementalSyncStatus() + object IncrementalSyncError : IncrementalSyncStatus() object IncrementalSyncDone : IncrementalSyncStatus() } diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/permalinks/MatrixLinkify.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/permalinks/MatrixLinkify.kt index 3e27da0c41..c5d919407a 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/permalinks/MatrixLinkify.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/permalinks/MatrixLinkify.kt @@ -55,7 +55,7 @@ object MatrixLinkify { MatrixPatterns.isRoomId(url) || MatrixPatterns.isGroupId(url) || MatrixPatterns.isEventId(url)) { - url = PermalinkService.MATRIX_TO_URL_BASE + url + url = PermalinkService.MATRIX_TO_URL_BASE + url } val span = MatrixPermalinkSpan(url, callback) spannable.setSpan(span, startPos, endPos, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/permalinks/PermalinkData.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/permalinks/PermalinkData.kt index 85291cf0f6..57aacc98b8 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/permalinks/PermalinkData.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/permalinks/PermalinkData.kt @@ -35,21 +35,21 @@ sealed class PermalinkData { /** * &room_name=Team2 - &room_avatar_url=mxc: - &inviter_name=bob + &room_avatar_url=mxc: + &inviter_name=bob */ @Parcelize data class RoomEmailInviteLink( - val roomId: String, - val email: String, - val signUrl: String, - val roomName: String?, - val roomAvatarUrl: String?, - val inviterName: String?, - val identityServer: String, - val token: String, - val privateKey: String, - val roomType: String? + val roomId: String, + val email: String, + val signUrl: String, + val roomName: String?, + val roomAvatarUrl: String?, + val inviterName: String?, + val identityServer: String, + val token: String, + val privateKey: String, + val roomType: String? ) : PermalinkData(), Parcelable data class UserLink(val userId: String) : PermalinkData() diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/RoomJoinRulesContent.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/RoomJoinRulesContent.kt index 871b299f93..5237b10d52 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/RoomJoinRulesContent.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/RoomJoinRulesContent.kt @@ -36,10 +36,10 @@ data class RoomJoinRulesContent( @Json(name = "allow") val allowList: List? = null ) { val joinRules: RoomJoinRules? = when (_joinRules) { - "public" -> RoomJoinRules.PUBLIC - "invite" -> RoomJoinRules.INVITE - "knock" -> RoomJoinRules.KNOCK - "private" -> RoomJoinRules.PRIVATE + "public" -> RoomJoinRules.PUBLIC + "invite" -> RoomJoinRules.INVITE + "knock" -> RoomJoinRules.KNOCK + "private" -> RoomJoinRules.PRIVATE "restricted" -> RoomJoinRules.RESTRICTED else -> { Timber.w("Invalid value for RoomJoinRules: `$_joinRules`") diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/call/CallAnswerContent.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/call/CallAnswerContent.kt index 6b4d782832..67ef85787e 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/call/CallAnswerContent.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/call/CallAnswerContent.kt @@ -44,7 +44,7 @@ data class CallAnswerContent( * Capability advertisement. */ @Json(name = "capabilities") val capabilities: CallCapabilities? = null -) : CallSignalingContent { +) : CallSignalingContent { @JsonClass(generateAdapter = true) data class Answer( diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/call/CallInviteContent.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/call/CallInviteContent.kt index d70e63d122..24c8152f3c 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/call/CallInviteContent.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/call/CallInviteContent.kt @@ -55,7 +55,7 @@ data class CallInviteContent( */ @Json(name = "capabilities") val capabilities: CallCapabilities? = null -) : CallSignalingContent { +) : CallSignalingContent { @JsonClass(generateAdapter = true) data class Offer( /** diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/call/CallNegotiateContent.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/call/CallNegotiateContent.kt index bbbfbe68ab..5c6c6cda01 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/call/CallNegotiateContent.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/call/CallNegotiateContent.kt @@ -47,7 +47,7 @@ data class CallNegotiateContent( */ @Json(name = "version") override val version: String? - ) : CallSignalingContent { +) : CallSignalingContent { @JsonClass(generateAdapter = true) data class Description( /** diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/call/CallReplacesContent.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/call/CallReplacesContent.kt index 7947b7d0bd..e480e013ea 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/call/CallReplacesContent.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/call/CallReplacesContent.kt @@ -61,7 +61,7 @@ data class CallReplacesContent( * Required. The version of the VoIP specification this messages adheres to. */ @Json(name = "version") override val version: String? -) : CallSignalingContent { +) : CallSignalingContent { @JsonClass(generateAdapter = true) data class TargetUser( diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/message/FileInfo.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/message/FileInfo.kt index fa18bfd21f..132b72902f 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/message/FileInfo.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/message/FileInfo.kt @@ -52,5 +52,5 @@ data class FileInfo( * Get the url of the encrypted thumbnail or of the thumbnail */ fun FileInfo.getThumbnailUrl(): String? { - return thumbnailFile?.url ?: thumbnailUrl + return thumbnailFile?.url ?: thumbnailUrl } diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/message/ImageInfo.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/message/ImageInfo.kt index 0099208320..bd99ea6900 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/message/ImageInfo.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/message/ImageInfo.kt @@ -62,5 +62,5 @@ data class ImageInfo( * Get the url of the encrypted thumbnail or of the thumbnail */ fun ImageInfo.getThumbnailUrl(): String? { - return thumbnailFile?.url ?: thumbnailUrl + return thumbnailFile?.url ?: thumbnailUrl } diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/message/MessageVerificationRequestContent.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/message/MessageVerificationRequestContent.kt index b2b3cdac90..a0699831f7 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/message/MessageVerificationRequestContent.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/message/MessageVerificationRequestContent.kt @@ -24,7 +24,7 @@ import org.matrix.android.sdk.internal.crypto.verification.VerificationInfoReque @JsonClass(generateAdapter = true) data class MessageVerificationRequestContent( - @Json(name = MessageContent.MSG_TYPE_JSON_KEY)override val msgType: String = MessageType.MSGTYPE_VERIFICATION_REQUEST, + @Json(name = MessageContent.MSG_TYPE_JSON_KEY) override val msgType: String = MessageType.MSGTYPE_VERIFICATION_REQUEST, @Json(name = "body") override val body: String, @Json(name = "from_device") override val fromDevice: String?, @Json(name = "methods") override val methods: List, diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/message/MessageVideoContent.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/message/MessageVideoContent.kt index 9266a0fb0f..9b657971b9 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/message/MessageVideoContent.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/message/MessageVideoContent.kt @@ -27,7 +27,7 @@ data class MessageVideoContent( /** * Required. Must be 'm.video'. */ - @Json(name = MessageContent.MSG_TYPE_JSON_KEY)override val msgType: String, + @Json(name = MessageContent.MSG_TYPE_JSON_KEY) override val msgType: String, /** * Required. A description of the video e.g. 'Gangnam style', or some kind of content description for accessibility e.g. 'video attachment'. diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/message/VideoInfo.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/message/VideoInfo.kt index 28f3a47d11..b02b4d96ad 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/message/VideoInfo.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/message/VideoInfo.kt @@ -67,5 +67,5 @@ data class VideoInfo( * Get the url of the encrypted thumbnail or of the thumbnail */ fun VideoInfo.getThumbnailUrl(): String? { - return thumbnailFile?.url ?: thumbnailUrl + return thumbnailFile?.url ?: thumbnailUrl } diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/securestorage/SharedSecretStorageError.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/securestorage/SharedSecretStorageError.kt index a91b97b86c..038533c19e 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/securestorage/SharedSecretStorageError.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/securestorage/SharedSecretStorageError.kt @@ -23,7 +23,7 @@ sealed class SharedSecretStorageError(message: String?) : Throwable(message) { data class UnsupportedAlgorithm(val algorithm: String) : SharedSecretStorageError("Unknown algorithm $algorithm") data class SecretNotEncrypted(val secretName: String) : SharedSecretStorageError("Missing content for secret $secretName") data class SecretNotEncryptedWithKey(val secretName: String, val keyId: String) : - SharedSecretStorageError("Missing content for secret $secretName with key $keyId") + SharedSecretStorageError("Missing content for secret $secretName with key $keyId") object BadKeyFormat : SharedSecretStorageError("Bad Key Format") object ParsingError : SharedSecretStorageError("parsing Error") diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/space/SpaceService.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/space/SpaceService.kt index f4460b7659..6d82b3f7df 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/space/SpaceService.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/space/SpaceService.kt @@ -68,7 +68,7 @@ interface SpaceService { suggestedOnly: Boolean? = null, limit: Int? = null, from: String? = null, - // when paginating, pass back the m.space.child state events + // when paginating, pass back the m.space.child state events knownStateList: List? = null): SpaceHierarchyData /** diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/CancelGossipRequestWorker.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/CancelGossipRequestWorker.kt index 98950374ed..4380e31bff 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/CancelGossipRequestWorker.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/CancelGossipRequestWorker.kt @@ -37,7 +37,7 @@ import org.matrix.android.sdk.internal.worker.SessionWorkerParams import javax.inject.Inject internal class CancelGossipRequestWorker(context: Context, params: WorkerParameters, sessionManager: SessionManager) : - SessionSafeCoroutineWorker(context, params, sessionManager, Params::class.java) { + SessionSafeCoroutineWorker(context, params, sessionManager, Params::class.java) { @JsonClass(generateAdapter = true) internal data class Params( diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/CryptoSessionInfoProvider.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/CryptoSessionInfoProvider.kt index 2a58d731e5..73dfc468d9 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/CryptoSessionInfoProvider.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/CryptoSessionInfoProvider.kt @@ -48,7 +48,7 @@ internal class CryptoSessionInfoProvider @Inject constructor( /** * @param allActive if true return joined as well as invited, if false, only joined */ - fun getRoomUserIds(roomId: String, allActive: Boolean): List { + fun getRoomUserIds(roomId: String, allActive: Boolean): List { var userIds: List = emptyList() monarchy.doWithRealm { realm -> userIds = if (allActive) { diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/InboundGroupSessionStore.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/InboundGroupSessionStore.kt index a78444dff9..28ddf291b2 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/InboundGroupSessionStore.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/InboundGroupSessionStore.kt @@ -75,15 +75,15 @@ internal class InboundGroupSessionStore @Inject constructor( @Synchronized fun getInboundGroupSession(sessionId: String, senderKey: String): InboundGroupSessionHolder? { - val known = sessionCache[CacheKey(sessionId, senderKey)] - Timber.tag(loggerTag.value).v("## Inbound: getInboundGroupSession $sessionId in cache ${known != null}") - return known - ?: store.getInboundGroupSession(sessionId, senderKey)?.also { - Timber.tag(loggerTag.value).v("## Inbound: getInboundGroupSession cache populate ${it.roomId}") - sessionCache.put(CacheKey(sessionId, senderKey), InboundGroupSessionHolder(it)) - }?.let { - InboundGroupSessionHolder(it) - } + val known = sessionCache[CacheKey(sessionId, senderKey)] + Timber.tag(loggerTag.value).v("## Inbound: getInboundGroupSession $sessionId in cache ${known != null}") + return known + ?: store.getInboundGroupSession(sessionId, senderKey)?.also { + Timber.tag(loggerTag.value).v("## Inbound: getInboundGroupSession cache populate ${it.roomId}") + sessionCache.put(CacheKey(sessionId, senderKey), InboundGroupSessionHolder(it)) + }?.let { + InboundGroupSessionHolder(it) + } } @Synchronized diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/IncomingGossipingRequestManager.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/IncomingGossipingRequestManager.kt index 3a409cf3fd..b907b57f82 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/IncomingGossipingRequestManager.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/IncomingGossipingRequestManager.kt @@ -116,7 +116,7 @@ internal class IncomingGossipingRequestManager @Inject constructor( Timber.i("## CRYPTO | GOSSIP onGossipingRequestEvent received type ${event.type} from user:${event.senderId}, content:$roomKeyShare") // val ageLocalTs = event.unsignedData?.age?.let { System.currentTimeMillis() - it } when (roomKeyShare?.action) { - GossipingToDeviceObject.ACTION_SHARE_REQUEST -> { + GossipingToDeviceObject.ACTION_SHARE_REQUEST -> { if (event.getClearType() == EventType.REQUEST_SECRET) { IncomingSecretShareRequest.fromEvent(event)?.let { if (event.senderId == credentials.userId && it.deviceId == credentials.deviceId) { @@ -346,7 +346,7 @@ internal class IncomingGossipingRequestManager @Inject constructor( val isDeviceLocallyVerified = cryptoStore.getUserDevice(userId, deviceId)?.trustLevel?.isLocallyVerified() when (secretName) { - MASTER_KEY_SSSS_NAME -> cryptoStore.getCrossSigningPrivateKeys()?.master + MASTER_KEY_SSSS_NAME -> cryptoStore.getCrossSigningPrivateKeys()?.master SELF_SIGNING_KEY_SSSS_NAME -> cryptoStore.getCrossSigningPrivateKeys()?.selfSigned USER_SIGNING_KEY_SSSS_NAME -> cryptoStore.getCrossSigningPrivateKeys()?.user KEYBACKUP_SECRET_SSSS_NAME -> cryptoStore.getKeyBackupRecoveryKeyInfo()?.recoveryKey diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/SendGossipRequestWorker.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/SendGossipRequestWorker.kt index dbdea97411..69b405aedc 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/SendGossipRequestWorker.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/SendGossipRequestWorker.kt @@ -41,7 +41,7 @@ import timber.log.Timber import javax.inject.Inject internal class SendGossipRequestWorker(context: Context, params: WorkerParameters, sessionManager: SessionManager) : - SessionSafeCoroutineWorker(context, params, sessionManager, Params::class.java) { + SessionSafeCoroutineWorker(context, params, sessionManager, Params::class.java) { @JsonClass(generateAdapter = true) internal data class Params( diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/algorithms/olm/MXOlmEncryption.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/algorithms/olm/MXOlmEncryption.kt index 7fdfd5a287..c842c54041 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/algorithms/olm/MXOlmEncryption.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/algorithms/olm/MXOlmEncryption.kt @@ -33,7 +33,7 @@ internal class MXOlmEncryption( private val messageEncrypter: MessageEncrypter, private val deviceListManager: DeviceListManager, private val ensureOlmSessionsForUsersAction: EnsureOlmSessionsForUsersAction) : - IMXEncrypting { + IMXEncrypting { override suspend fun encryptEventContent(eventContent: Content, eventType: String, userIds: List): Content { // pick the list of recipients based on the membership list. diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/secrets/DefaultSharedSecretStorageService.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/secrets/DefaultSharedSecretStorageService.kt index 19e66635c7..972c03e92a 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/secrets/DefaultSharedSecretStorageService.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/secrets/DefaultSharedSecretStorageService.kt @@ -174,7 +174,7 @@ internal class DefaultSharedSecretStorageService @Inject constructor( throw SharedSecretStorageError.UnknownAlgorithm(key.keyInfo.content.algorithm ?: "") } } - is KeyInfoResult.Error -> throw key.error + is KeyInfoResult.Error -> throw key.error } } diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/db/model/CryptoRoomEntity.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/db/model/CryptoRoomEntity.kt index 6167314b5a..114a596964 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/db/model/CryptoRoomEntity.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/db/model/CryptoRoomEntity.kt @@ -31,8 +31,8 @@ internal open class CryptoRoomEntity( // a security to ensure that a room will never revert to not encrypted // even if a new state event with empty encryption, or state is reset somehow var wasEncryptedOnce: Boolean? = false - ) : - RealmObject() { +) : + RealmObject() { companion object } diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/db/model/OlmInboundGroupSessionEntity.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/db/model/OlmInboundGroupSessionEntity.kt index f330e8822a..83671b28d9 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/db/model/OlmInboundGroupSessionEntity.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/db/model/OlmInboundGroupSessionEntity.kt @@ -34,7 +34,7 @@ internal open class OlmInboundGroupSessionEntity( var olmInboundGroupSessionData: String? = null, // Indicate if the key has been backed up to the homeserver var backedUp: Boolean = false) : - RealmObject() { + RealmObject() { fun getInboundGroupSession(): OlmInboundGroupSessionWrapper2? { return try { diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/db/model/OlmSessionEntity.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/db/model/OlmSessionEntity.kt index 0b69311c57..1a637d76c4 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/db/model/OlmSessionEntity.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/db/model/OlmSessionEntity.kt @@ -30,7 +30,7 @@ internal open class OlmSessionEntity(@PrimaryKey var primaryKey: String = "", var deviceKey: String? = null, var olmSessionData: String? = null, var lastReceivedMessageTs: Long = 0) : - RealmObject() { + RealmObject() { fun getOlmSession(): OlmSession? { return deserializeFromRealm(olmSessionData) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/verification/SendVerificationMessageWorker.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/verification/SendVerificationMessageWorker.kt index a763c05e07..0a175ae3ca 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/verification/SendVerificationMessageWorker.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/verification/SendVerificationMessageWorker.kt @@ -35,7 +35,7 @@ import javax.inject.Inject * Possible next worker : None */ internal class SendVerificationMessageWorker(context: Context, params: WorkerParameters, sessionManager: SessionManager) : - SessionSafeCoroutineWorker(context, params, sessionManager, Params::class.java) { + SessionSafeCoroutineWorker(context, params, sessionManager, Params::class.java) { @JsonClass(generateAdapter = true) internal data class Params( diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/verification/VerificationTransportRoomMessage.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/verification/VerificationTransportRoomMessage.kt index bd1186908c..49235c5744 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/verification/VerificationTransportRoomMessage.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/verification/VerificationTransportRoomMessage.kt @@ -296,13 +296,13 @@ internal class VerificationTransportRoomMessage( messageAuthenticationCode: String, shortAuthenticationStrings: List): VerificationInfoAccept = MessageVerificationAcceptContent.create( - tid, - keyAgreementProtocol, - hash, - commitment, - messageAuthenticationCode, - shortAuthenticationStrings - ) + tid, + keyAgreementProtocol, + hash, + commitment, + messageAuthenticationCode, + shortAuthenticationStrings + ) override fun createKey(tid: String, pubKey: String): VerificationInfoKey = MessageVerificationKeyContent.create(tid, pubKey) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/EventInsertLiveObserver.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/EventInsertLiveObserver.kt index 115025cc7d..b057b4c319 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/EventInsertLiveObserver.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/EventInsertLiveObserver.kt @@ -32,7 +32,7 @@ import javax.inject.Inject internal class EventInsertLiveObserver @Inject constructor(@SessionDatabase realmConfiguration: RealmConfiguration, private val processors: Set<@JvmSuppressWildcards EventInsertLiveProcessor>) : - RealmLiveEntityObserver(realmConfiguration) { + RealmLiveEntityObserver(realmConfiguration) { override val query = Monarchy.Query { it.where(EventInsertEntity::class.java).equalTo(EventInsertEntityFields.CAN_BE_PROCESSED, true) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/RealmLiveEntityObserver.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/RealmLiveEntityObserver.kt index 50eb086f9a..f2f88e216b 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/RealmLiveEntityObserver.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/RealmLiveEntityObserver.kt @@ -35,7 +35,7 @@ import java.util.concurrent.atomic.AtomicReference internal interface LiveEntityObserver : SessionLifecycleObserver internal abstract class RealmLiveEntityObserver(protected val realmConfiguration: RealmConfiguration) : - LiveEntityObserver, RealmChangeListener> { + LiveEntityObserver, RealmChangeListener> { private companion object { val BACKGROUND_HANDLER = createBackgroundHandler("LIVE_ENTITY_BACKGROUND") diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/RealmSessionProvider.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/RealmSessionProvider.kt index 8c62c345d0..e5b5915590 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/RealmSessionProvider.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/RealmSessionProvider.kt @@ -33,7 +33,7 @@ import kotlin.concurrent.getOrSet */ @SessionScope internal class RealmSessionProvider @Inject constructor(@SessionDatabase private val monarchy: Monarchy) : - SessionLifecycleObserver { + SessionLifecycleObserver { private val realmThreadLocal = ThreadLocal() diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/migration/MigrateSessionTo019.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/migration/MigrateSessionTo019.kt index d63ef62889..754a66bb4b 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/migration/MigrateSessionTo019.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/migration/MigrateSessionTo019.kt @@ -22,7 +22,7 @@ import org.matrix.android.sdk.internal.util.Normalizer import org.matrix.android.sdk.internal.util.database.RealmMigrator internal class MigrateSessionTo019(realm: DynamicRealm, - private val normalizer: Normalizer) : RealmMigrator(realm, 19) { + private val normalizer: Normalizer) : RealmMigrator(realm, 19) { override fun doMigrate(realm: DynamicRealm) { realm.schema.get("RoomSummaryEntity") diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/model/ChunkEntity.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/model/ChunkEntity.kt index 88eb821aa9..822bc1bd8f 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/model/ChunkEntity.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/model/ChunkEntity.kt @@ -24,19 +24,20 @@ import io.realm.annotations.LinkingObjects import org.matrix.android.sdk.internal.extensions.assertIsManaged import org.matrix.android.sdk.internal.extensions.clearWith -internal open class ChunkEntity(@Index var prevToken: String? = null, +internal open class ChunkEntity( + @Index var prevToken: String? = null, // Because of gaps we can have several chunks with nextToken == null - @Index var nextToken: String? = null, - var prevChunk: ChunkEntity? = null, - var nextChunk: ChunkEntity? = null, - var stateEvents: RealmList = RealmList(), - var timelineEvents: RealmList = RealmList(), + @Index var nextToken: String? = null, + var prevChunk: ChunkEntity? = null, + var nextChunk: ChunkEntity? = null, + var stateEvents: RealmList = RealmList(), + var timelineEvents: RealmList = RealmList(), // Only one chunk will have isLastForward == true - @Index var isLastForward: Boolean = false, - @Index var isLastBackward: Boolean = false, + @Index var isLastForward: Boolean = false, + @Index var isLastBackward: Boolean = false, // Threads - @Index var rootThreadEventId: String? = null, - @Index var isLastForwardThread: Boolean = false, + @Index var rootThreadEventId: String? = null, + @Index var isLastForwardThread: Boolean = false, ) : RealmObject() { fun identifier() = "${prevToken}_$nextToken" diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/model/GroupEntity.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/model/GroupEntity.kt index 527f782359..0120bb91d3 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/model/GroupEntity.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/model/GroupEntity.kt @@ -25,7 +25,7 @@ import org.matrix.android.sdk.api.session.room.model.Membership * Then GetGroupDataTask is called regularly to fetch group information from the homeserver. */ internal open class GroupEntity(@PrimaryKey var groupId: String = "") : - RealmObject() { + RealmObject() { private var membershipStr: String = Membership.NONE.name var membership: Membership diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/model/RoomEntity.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/model/RoomEntity.kt index 4a6f6a7bf8..d8e6b8af0f 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/model/RoomEntity.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/model/RoomEntity.kt @@ -48,8 +48,10 @@ internal open class RoomEntity(@PrimaryKey var roomId: String = "", set(value) { membersLoadStatusStr = value.name } + companion object } + internal fun RoomEntity.removeThreadSummaryIfNeeded(eventId: String) { assertIsManaged() threadSummaries.findRootOrLatest(eventId)?.let { diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/model/TimelineEventEntity.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/model/TimelineEventEntity.kt index aacd6570bc..477c04fe51 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/model/TimelineEventEntity.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/model/TimelineEventEntity.kt @@ -32,8 +32,8 @@ internal open class TimelineEventEntity(var localId: Long = 0, var isUniqueDisplayName: Boolean = false, var senderAvatar: String? = null, var senderMembershipEventId: String? = null, - // ownedByThreadChunk indicates that the current TimelineEventEntity belongs - // to a thread chunk and is a temporarily event. + // ownedByThreadChunk indicates that the current TimelineEventEntity belongs + // to a thread chunk and is a temporarily event. var ownedByThreadChunk: Boolean = false, var readReceipts: ReadReceiptsSummaryEntity? = null ) : RealmObject() { diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/query/ChunkEntityQueries.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/query/ChunkEntityQueries.kt index a33ba82f7a..9350102137 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/query/ChunkEntityQueries.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/query/ChunkEntityQueries.kt @@ -56,18 +56,21 @@ internal fun ChunkEntity.Companion.findLastForwardChunkOfRoom(realm: Realm, room .equalTo(ChunkEntityFields.IS_LAST_FORWARD, true) .findFirst() } + internal fun ChunkEntity.Companion.findLastForwardChunkOfThread(realm: Realm, roomId: String, rootThreadEventId: String): ChunkEntity? { return where(realm, roomId) .equalTo(ChunkEntityFields.ROOT_THREAD_EVENT_ID, rootThreadEventId) .equalTo(ChunkEntityFields.IS_LAST_FORWARD_THREAD, true) .findFirst() } + internal fun ChunkEntity.Companion.findEventInThreadChunk(realm: Realm, roomId: String, event: String): ChunkEntity? { return where(realm, roomId) .`in`(ChunkEntityFields.TIMELINE_EVENTS.EVENT_ID, arrayListOf(event).toTypedArray()) .equalTo(ChunkEntityFields.IS_LAST_FORWARD_THREAD, true) .findFirst() } + internal fun ChunkEntity.Companion.findAllIncludingEvents(realm: Realm, eventIds: List): RealmResults { return realm.where() .`in`(ChunkEntityFields.TIMELINE_EVENTS.EVENT_ID, eventIds.toTypedArray()) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/query/ThreadSummaryEntityQueries.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/query/ThreadSummaryEntityQueries.kt index 517d43d7cf..eab2740433 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/query/ThreadSummaryEntityQueries.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/query/ThreadSummaryEntityQueries.kt @@ -39,9 +39,11 @@ internal fun ThreadSummaryEntity.Companion.getOrCreate(realm: Realm, roomId: Str this.rootThreadEventId = rootThreadEventId } } + internal fun ThreadSummaryEntity.Companion.getOrNull(realm: Realm, roomId: String, rootThreadEventId: String): ThreadSummaryEntity? { return where(realm, roomId, rootThreadEventId).findFirst() } + internal fun RealmList.find(rootThreadEventId: String): ThreadSummaryEntity? { return this.where() .equalTo(ThreadSummaryEntityFields.ROOT_THREAD_EVENT_ID, rootThreadEventId) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/network/NetworkConnectivityChecker.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/network/NetworkConnectivityChecker.kt index cd7c99b8f9..3d2b2bfbfb 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/network/NetworkConnectivityChecker.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/network/NetworkConnectivityChecker.kt @@ -44,7 +44,7 @@ internal interface NetworkConnectivityChecker { internal class DefaultNetworkConnectivityChecker @Inject constructor(private val homeServerPinger: HomeServerPinger, private val backgroundDetectionObserver: BackgroundDetectionObserver, private val networkCallbackStrategy: NetworkCallbackStrategy) : - NetworkConnectivityChecker { + NetworkConnectivityChecker { private val hasInternetAccess = AtomicBoolean(true) private val listeners = Collections.synchronizedSet(LinkedHashSet()) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/network/RequestExecutor.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/network/RequestExecutor.kt index 5cd2d88000..71df7c08be 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/network/RequestExecutor.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/network/RequestExecutor.kt @@ -15,6 +15,7 @@ */ package org.matrix.android.sdk.internal.network + import org.matrix.android.sdk.internal.network.executeRequest as internalExecuteRequest internal interface RequestExecutor { diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/DefaultFileService.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/DefaultFileService.kt index ac097f57ee..9b83cca558 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/DefaultFileService.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/DefaultFileService.kt @@ -123,7 +123,7 @@ internal class DefaultFileService @Inject constructor( val resolvedUrl = contentUrlResolver.resolveForDownload(url, elementToDecrypt) ?: throw IllegalArgumentException("url is null") val request = when (resolvedUrl) { - is ContentUrlResolver.ResolvedMethod.GET -> { + is ContentUrlResolver.ResolvedMethod.GET -> { Request.Builder() .url(resolvedUrl.url) .header(DOWNLOAD_PROGRESS_INTERCEPTOR_HEADER, url) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/call/CallEventProcessor.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/call/CallEventProcessor.kt index 3f199c5cce..b15a647421 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/call/CallEventProcessor.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/call/CallEventProcessor.kt @@ -30,7 +30,7 @@ private val loggerTag = LoggerTag("CallEventProcessor", LoggerTag.VOIP) @SessionScope internal class CallEventProcessor @Inject constructor(private val callSignalingHandler: CallSignalingHandler) : - EventInsertLiveProcessor { + EventInsertLiveProcessor { private val allowedTypes = listOf( EventType.CALL_ANSWER, diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/content/FileUploader.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/content/FileUploader.kt index e9cb423893..f96a019fe2 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/content/FileUploader.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/content/FileUploader.kt @@ -148,8 +148,8 @@ internal class FileUploader @Inject constructor( .post(requestBody) .build() - return withContext(coroutineDispatchers.io) { - okHttpClient.newCall(request).awaitResponse().use { response -> + return withContext(coroutineDispatchers.io) { + okHttpClient.newCall(request).awaitResponse().use { response -> if (!response.isSuccessful) { throw response.toFailure(globalErrorReceiver) } else { diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/content/ImageCompressor.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/content/ImageCompressor.kt index 01eb52ff22..c5aa6cd5e7 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/content/ImageCompressor.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/content/ImageCompressor.kt @@ -68,16 +68,16 @@ internal class ImageCompressor @Inject constructor( val orientation = exifInfo.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL) val matrix = Matrix() when (orientation) { - ExifInterface.ORIENTATION_ROTATE_270 -> matrix.postRotate(270f) - ExifInterface.ORIENTATION_ROTATE_180 -> matrix.postRotate(180f) - ExifInterface.ORIENTATION_ROTATE_90 -> matrix.postRotate(90f) + ExifInterface.ORIENTATION_ROTATE_270 -> matrix.postRotate(270f) + ExifInterface.ORIENTATION_ROTATE_180 -> matrix.postRotate(180f) + ExifInterface.ORIENTATION_ROTATE_90 -> matrix.postRotate(90f) ExifInterface.ORIENTATION_FLIP_HORIZONTAL -> matrix.preScale(-1f, 1f) - ExifInterface.ORIENTATION_FLIP_VERTICAL -> matrix.preScale(1f, -1f) - ExifInterface.ORIENTATION_TRANSPOSE -> { + ExifInterface.ORIENTATION_FLIP_VERTICAL -> matrix.preScale(1f, -1f) + ExifInterface.ORIENTATION_TRANSPOSE -> { matrix.preRotate(-90f) matrix.preScale(-1f, 1f) } - ExifInterface.ORIENTATION_TRANSVERSE -> { + ExifInterface.ORIENTATION_TRANSVERSE -> { matrix.preRotate(90f) matrix.preScale(-1f, 1f) } diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/initsync/DefaultSyncStatusService.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/initsync/DefaultSyncStatusService.kt index 4a1e6661b0..c138c1a40e 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/initsync/DefaultSyncStatusService.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/initsync/DefaultSyncStatusService.kt @@ -24,7 +24,7 @@ import javax.inject.Inject @SessionScope internal class DefaultSyncStatusService @Inject constructor() : - SyncStatusService, + SyncStatusService, ProgressReporter { private val status = MutableLiveData() diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/integrationmanager/IntegrationManager.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/integrationmanager/IntegrationManager.kt index 30b1589169..1b96931c6c 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/integrationmanager/IntegrationManager.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/integrationmanager/IntegrationManager.kt @@ -59,7 +59,7 @@ internal class IntegrationManager @Inject constructor(matrixConfiguration: Matri private val updateUserAccountDataTask: UpdateUserAccountDataTask, private val accountDataDataSource: UserAccountDataDataSource, private val widgetFactory: WidgetFactory) : - SessionLifecycleObserver { + SessionLifecycleObserver { private val currentConfigs = ArrayList() private val lifecycleOwner: LifecycleOwner = LifecycleOwner { lifecycleRegistry } diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/AddPusherWorker.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/AddPusherWorker.kt index ce29efaaac..0042558027 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/AddPusherWorker.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/AddPusherWorker.kt @@ -26,7 +26,7 @@ import org.matrix.android.sdk.internal.worker.SessionWorkerParams import javax.inject.Inject internal class AddPusherWorker(context: Context, params: WorkerParameters, sessionManager: SessionManager) : - SessionSafeCoroutineWorker(context, params, sessionManager, Params::class.java) { + SessionSafeCoroutineWorker(context, params, sessionManager, Params::class.java) { @JsonClass(generateAdapter = true) internal data class Params( diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/UpdatePushRuleActionsTask.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/UpdatePushRuleActionsTask.kt index 33589dc55b..56f92d7b66 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/UpdatePushRuleActionsTask.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/UpdatePushRuleActionsTask.kt @@ -38,18 +38,18 @@ internal class DefaultUpdatePushRuleActionsTask @Inject constructor( ) : UpdatePushRuleActionsTask { override suspend fun execute(params: UpdatePushRuleActionsTask.Params) { + executeRequest(globalErrorReceiver) { + pushRulesApi.updateEnableRuleStatus( + params.kind.value, + params.ruleId, + EnabledBody(params.enable) + ) + } + if (params.actions != null) { + val body = mapOf("actions" to params.actions.toJson()) executeRequest(globalErrorReceiver) { - pushRulesApi.updateEnableRuleStatus( - params.kind.value, - params.ruleId, - EnabledBody(params.enable) - ) - } - if (params.actions != null) { - val body = mapOf("actions" to params.actions.toJson()) - executeRequest(globalErrorReceiver) { - pushRulesApi.updateRuleActions(params.kind.value, params.ruleId, body) - } + pushRulesApi.updateRuleActions(params.kind.value, params.ruleId, body) } + } } } diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/alias/GetRoomIdByAliasTask.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/alias/GetRoomIdByAliasTask.kt index dc3ea55a01..b25ef7ba0f 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/alias/GetRoomIdByAliasTask.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/alias/GetRoomIdByAliasTask.kt @@ -52,7 +52,7 @@ internal class DefaultGetRoomIdByAliasTask @Inject constructor( } else if (!params.searchOnServer) { Optional.from(null) } else { - val description = tryOrNull("## Failed to get roomId from alias") { + val description = tryOrNull("## Failed to get roomId from alias") { executeRequest(globalErrorReceiver) { directoryAPI.getRoomIdByAlias(params.roomAlias) } diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/notification/DefaultRoomPushRuleService.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/notification/DefaultRoomPushRuleService.kt index 8f1aefb731..7af54a45ca 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/notification/DefaultRoomPushRuleService.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/notification/DefaultRoomPushRuleService.kt @@ -32,7 +32,7 @@ import org.matrix.android.sdk.internal.di.SessionDatabase internal class DefaultRoomPushRuleService @AssistedInject constructor(@Assisted private val roomId: String, private val setRoomNotificationStateTask: SetRoomNotificationStateTask, @SessionDatabase private val monarchy: Monarchy) : - RoomPushRuleService { + RoomPushRuleService { @AssistedFactory interface Factory { diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/notification/SetRoomNotificationStateTask.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/notification/SetRoomNotificationStateTask.kt index feb8c27b09..d31f8a9d85 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/notification/SetRoomNotificationStateTask.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/notification/SetRoomNotificationStateTask.kt @@ -38,7 +38,7 @@ internal interface SetRoomNotificationStateTask : Task(context, params, sessionManager, Params::class.java) { + SessionSafeCoroutineWorker(context, params, sessionManager, Params::class.java) { @JsonClass(generateAdapter = true) internal data class Params( @@ -76,10 +76,10 @@ internal class MultipleEventSendingDispatcherWorker(context: Context, params: Wo params.localEchoIds.forEach { localEchoIds -> val roomId = localEchoIds.roomId val eventId = localEchoIds.eventId - localEchoRepository.updateSendState(eventId, roomId, SendState.SENDING) - Timber.v("## SendEvent: [${System.currentTimeMillis()}] Schedule send event $eventId") - val sendWork = createSendEventWork(params.sessionId, eventId, true) - timelineSendEventWorkCommon.postWork(roomId, sendWork) + localEchoRepository.updateSendState(eventId, roomId, SendState.SENDING) + Timber.v("## SendEvent: [${System.currentTimeMillis()}] Schedule send event $eventId") + val sendWork = createSendEventWork(params.sessionId, eventId, true) + timelineSendEventWorkCommon.postWork(roomId, sendWork) } return Result.success() diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/send/RedactEventWorker.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/send/RedactEventWorker.kt index c03d1fa81e..83c61d2845 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/send/RedactEventWorker.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/send/RedactEventWorker.kt @@ -34,7 +34,7 @@ import javax.inject.Inject * Possible next worker : None */ internal class RedactEventWorker(context: Context, params: WorkerParameters, sessionManager: SessionManager) : - SessionSafeCoroutineWorker(context, params, sessionManager, Params::class.java) { + SessionSafeCoroutineWorker(context, params, sessionManager, Params::class.java) { @JsonClass(generateAdapter = true) internal data class Params( diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/send/SendEventWorker.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/send/SendEventWorker.kt index 7f24688ece..669891c822 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/send/SendEventWorker.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/send/SendEventWorker.kt @@ -40,7 +40,7 @@ import javax.inject.Inject * Possible next worker : None */ internal class SendEventWorker(context: Context, params: WorkerParameters, sessionManager: SessionManager) : - SessionSafeCoroutineWorker(context, params, sessionManager, Params::class.java) { + SessionSafeCoroutineWorker(context, params, sessionManager, Params::class.java) { @JsonClass(generateAdapter = true) internal data class Params( diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/send/queue/QueueMemento.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/send/queue/QueueMemento.kt index 116c8d5c6b..545fc41737 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/send/queue/QueueMemento.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/send/queue/QueueMemento.kt @@ -74,7 +74,7 @@ internal class QueueMemento @Inject constructor(context: Context, encrypt = task.encrypt, order = order ) - is RedactQueuedTask -> RedactEventTaskInfo( + is RedactQueuedTask -> RedactEventTaskInfo( redactionLocalEcho = task.redactionLocalEchoId, order = order ) @@ -92,7 +92,7 @@ internal class QueueMemento @Inject constructor(context: Context, ?.forEach { info -> try { when (info) { - is SendEventTaskInfo -> { + is SendEventTaskInfo -> { localEchoRepository.getUpToDateEcho(info.localEchoId)?.let { if (it.sendState.isSending() && it.eventId != null && it.roomId != null) { localEchoRepository.updateSendState(it.eventId, it.roomId, SendState.UNSENT) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/state/SafePowerLevelContent.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/state/SafePowerLevelContent.kt index 197b4f8688..1f2ec09367 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/state/SafePowerLevelContent.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/state/SafePowerLevelContent.kt @@ -51,7 +51,7 @@ internal fun JsonDict.toSafePowerLevelsContentDict(): JsonDict { usersDefault = content.usersDefault, users = content.users, stateDefault = content.stateDefault, - notifications = content.notifications?.mapValues { content.notificationLevel(it.key) } + notifications = content.notifications?.mapValues { content.notificationLevel(it.key) } ) } ?.toContent() diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/summary/GraphUtils.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/summary/GraphUtils.kt index e3a215445d..52879d7121 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/summary/GraphUtils.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/summary/GraphUtils.kt @@ -101,11 +101,11 @@ internal class Graph { // it's a candidate destination = it.destination } - inPath -> { + inPath -> { // Cycle!! backwardEdges.add(it) } - completed -> { + completed -> { // dead end } } diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/LiveTimelineEvent.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/LiveTimelineEvent.kt index 64b1a4ff1d..e765e05578 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/LiveTimelineEvent.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/LiveTimelineEvent.kt @@ -41,7 +41,7 @@ internal class LiveTimelineEvent(private val monarchy: Monarchy, private val timelineEventMapper: TimelineEventMapper, private val roomId: String, private val eventId: String) : - MediatorLiveData>() { + MediatorLiveData>() { init { buildAndObserveQuery() diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/TimelineChunk.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/TimelineChunk.kt index ca7bf8a0ac..27f4245b22 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/TimelineChunk.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/TimelineChunk.kt @@ -49,22 +49,23 @@ import java.util.concurrent.atomic.AtomicBoolean * It does mainly listen to the db timeline events. * It also triggers pagination to the server when needed, or dispatch to the prev or next chunk if any. */ -internal class TimelineChunk(private val chunkEntity: ChunkEntity, - private val timelineSettings: TimelineSettings, - private val roomId: String, - private val timelineId: String, - private val fetchThreadTimelineTask: FetchThreadTimelineTask, - private val eventDecryptor: TimelineEventDecryptor, - private val paginationTask: PaginationTask, - private val realmConfiguration: RealmConfiguration, - private val fetchTokenAndPaginateTask: FetchTokenAndPaginateTask, - private val timelineEventMapper: TimelineEventMapper, - private val uiEchoManager: UIEchoManager?, - private val threadsAwarenessHandler: ThreadsAwarenessHandler, - private val lightweightSettingsStorage: LightweightSettingsStorage, - private val initialEventId: String?, - private val onBuiltEvents: (Boolean) -> Unit, - private val onEventsDeleted: () -> Unit, +internal class TimelineChunk( + private val chunkEntity: ChunkEntity, + private val timelineSettings: TimelineSettings, + private val roomId: String, + private val timelineId: String, + private val fetchThreadTimelineTask: FetchThreadTimelineTask, + private val eventDecryptor: TimelineEventDecryptor, + private val paginationTask: PaginationTask, + private val realmConfiguration: RealmConfiguration, + private val fetchTokenAndPaginateTask: FetchTokenAndPaginateTask, + private val timelineEventMapper: TimelineEventMapper, + private val uiEchoManager: UIEchoManager?, + private val threadsAwarenessHandler: ThreadsAwarenessHandler, + private val lightweightSettingsStorage: LightweightSettingsStorage, + private val initialEventId: String?, + private val onBuiltEvents: (Boolean) -> Unit, + private val onEventsDeleted: () -> Unit, ) { private val isLastForward = AtomicBoolean(chunkEntity.isLastForward) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/search/SearchTask.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/search/SearchTask.kt index 3ba7d11c3d..fcaf3b60a7 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/search/SearchTask.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/search/SearchTask.kt @@ -87,7 +87,7 @@ internal class DefaultSearchTask @Inject constructor( results = searchCategories.roomEvents?.results?.map { searchResponseItem -> val localThreadEventDetails = localTimelineEvents - ?.firstOrNull { it.eventId == searchResponseItem.event.eventId } + ?.firstOrNull { it.eventId == searchResponseItem.event.eventId } ?.root ?.asDomain() ?.threadDetails diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/SyncPresence.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/SyncPresence.kt index 4f1fe43b7d..42cd972e0c 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/SyncPresence.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/SyncPresence.kt @@ -34,11 +34,12 @@ internal enum class SyncPresence(val value: String) { companion object { fun from(presenceEnum: PresenceEnum): SyncPresence { return when (presenceEnum) { - PresenceEnum.ONLINE -> Online - PresenceEnum.OFFLINE -> Offline + PresenceEnum.ONLINE -> Online + PresenceEnum.OFFLINE -> Offline PresenceEnum.UNAVAILABLE -> Unavailable } } + fun from(s: String?): SyncPresence? = values().find { it.value == s } } } diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/SyncTask.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/SyncTask.kt index b56f897749..bb0197a38d 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/SyncTask.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/SyncTask.kt @@ -172,7 +172,7 @@ internal class DefaultSyncTask @Inject constructor( val nbToDevice = syncResponse.toDevice?.events.orEmpty().size val nextBatch = syncResponse.nextBatch Timber.tag(loggerTag.value).d( - "Incremental sync request parsing, $nbRooms room(s) $nbToDevice toDevice(s). Got nextBatch: $nextBatch" + "Incremental sync request parsing, $nbRooms room(s) $nbToDevice toDevice(s). Got nextBatch: $nextBatch" ) defaultSyncStatusService.setStatus(SyncStatusService.Status.IncrementalSyncParsing( rooms = nbRooms, diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/job/SyncWorker.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/job/SyncWorker.kt index c67c0e350e..f183c4cb28 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/job/SyncWorker.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/job/SyncWorker.kt @@ -42,7 +42,7 @@ private const val DEFAULT_DELAY_MILLIS = 30_000L * Possible next worker : None */ internal class SyncWorker(context: Context, workerParameters: WorkerParameters, sessionManager: SessionManager) : - SessionSafeCoroutineWorker(context, workerParameters, sessionManager, Params::class.java) { + SessionSafeCoroutineWorker(context, workerParameters, sessionManager, Params::class.java) { @JsonClass(generateAdapter = true) internal data class Params( diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/thirdparty/DefaultThirdPartyService.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/thirdparty/DefaultThirdPartyService.kt index fdd5524fc2..210cb192e7 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/thirdparty/DefaultThirdPartyService.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/thirdparty/DefaultThirdPartyService.kt @@ -23,7 +23,7 @@ import javax.inject.Inject internal class DefaultThirdPartyService @Inject constructor(private val getThirdPartyProtocolTask: GetThirdPartyProtocolsTask, private val getThirdPartyUserTask: GetThirdPartyUserTask) : - ThirdPartyService { + ThirdPartyService { override suspend fun getThirdPartyProtocols(): Map { return getThirdPartyProtocolTask.execute(Unit) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/widgets/DefaultWidgetPostAPIMediator.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/widgets/DefaultWidgetPostAPIMediator.kt index 10b4f7f7d7..9f42688f7d 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/widgets/DefaultWidgetPostAPIMediator.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/widgets/DefaultWidgetPostAPIMediator.kt @@ -29,7 +29,7 @@ import javax.inject.Inject internal class DefaultWidgetPostAPIMediator @Inject constructor(private val moshi: Moshi, private val widgetPostMessageAPIProvider: WidgetPostMessageAPIProvider) : - WidgetPostAPIMediator { + WidgetPostAPIMediator { private val jsonAdapter = moshi.adapter(JSON_DICT_PARAMETERIZED_TYPE) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/widgets/DefaultWidgetService.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/widgets/DefaultWidgetService.kt index 89e827aea0..53a435d217 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/widgets/DefaultWidgetService.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/widgets/DefaultWidgetService.kt @@ -29,7 +29,7 @@ import javax.inject.Provider internal class DefaultWidgetService @Inject constructor(private val widgetManager: WidgetManager, private val widgetURLFormatter: WidgetURLFormatter, private val widgetPostAPIMediator: Provider) : - WidgetService { + WidgetService { override fun getWidgetURLFormatter(): WidgetURLFormatter { return widgetURLFormatter @@ -52,7 +52,7 @@ internal class DefaultWidgetService @Inject constructor(private val widgetManage return widgetManager.getWidgetComputedUrl(widget, isLightTheme) } -override fun getRoomWidgetsLive( + override fun getRoomWidgetsLive( roomId: String, widgetId: QueryStringValue, widgetTypes: Set?, diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/widgets/WidgetManager.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/widgets/WidgetManager.kt index e18117d2d7..07ed91c179 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/widgets/WidgetManager.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/widgets/WidgetManager.kt @@ -52,7 +52,7 @@ internal class WidgetManager @Inject constructor(private val integrationManager: private val widgetFactory: WidgetFactory, @UserId private val userId: String) : - IntegrationManagerService.Listener, SessionLifecycleObserver { + IntegrationManagerService.Listener, SessionLifecycleObserver { private val lifecycleOwner: LifecycleOwner = LifecycleOwner { lifecycleRegistry } private val lifecycleRegistry: LifecycleRegistry = LifecycleRegistry(lifecycleOwner) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/util/database/RealmMigrator.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/util/database/RealmMigrator.kt index f22f0810a1..8f3c89f2d4 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/util/database/RealmMigrator.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/util/database/RealmMigrator.kt @@ -21,7 +21,7 @@ import io.realm.RealmObjectSchema import timber.log.Timber internal abstract class RealmMigrator(private val realm: DynamicRealm, - private val targetSchemaVersion: Int) { + private val targetSchemaVersion: Int) { fun perform() { Timber.d("Migrate ${realm.configuration.realmFileName} to $targetSchemaVersion") doMigrate(realm) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/util/system/DefaultBuildVersionSdkIntProvider.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/util/system/DefaultBuildVersionSdkIntProvider.kt index 2d5e4b944a..806c6e9735 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/util/system/DefaultBuildVersionSdkIntProvider.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/util/system/DefaultBuildVersionSdkIntProvider.kt @@ -20,6 +20,6 @@ import android.os.Build import javax.inject.Inject internal class DefaultBuildVersionSdkIntProvider @Inject constructor() : - BuildVersionSdkIntProvider { + BuildVersionSdkIntProvider { override fun get() = Build.VERSION.SDK_INT } diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/worker/AlwaysSuccessfulWorker.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/worker/AlwaysSuccessfulWorker.kt index 856d3debcf..c92b51fcb8 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/worker/AlwaysSuccessfulWorker.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/worker/AlwaysSuccessfulWorker.kt @@ -20,7 +20,7 @@ import androidx.work.Worker import androidx.work.WorkerParameters internal class AlwaysSuccessfulWorker(context: Context, params: WorkerParameters) : - Worker(context, params) { + Worker(context, params) { override fun doWork(): Result { return Result.success() diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/worker/MatrixWorkerFactory.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/worker/MatrixWorkerFactory.kt index 0b451e9c34..e56b359f7a 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/worker/MatrixWorkerFactory.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/worker/MatrixWorkerFactory.kt @@ -93,7 +93,7 @@ internal class MatrixWorkerFactory @Inject constructor(private val sessionManage class CheckFactoryWorker(context: Context, workerParameters: WorkerParameters, private val isCreatedByMatrixWorkerFactory: Boolean) : - CoroutineWorker(context, workerParameters) { + CoroutineWorker(context, workerParameters) { // Called by WorkManager if there is no MatrixWorkerFactory constructor(context: Context, workerParameters: WorkerParameters) : this(context, diff --git a/matrix-sdk-android/src/release/java/org/matrix/android/sdk/internal/network/interceptors/CurlLoggingInterceptor.kt b/matrix-sdk-android/src/release/java/org/matrix/android/sdk/internal/network/interceptors/CurlLoggingInterceptor.kt index 47f6869479..0b7bac0d6f 100644 --- a/matrix-sdk-android/src/release/java/org/matrix/android/sdk/internal/network/interceptors/CurlLoggingInterceptor.kt +++ b/matrix-sdk-android/src/release/java/org/matrix/android/sdk/internal/network/interceptors/CurlLoggingInterceptor.kt @@ -27,7 +27,7 @@ import javax.inject.Inject */ @MatrixScope internal class CurlLoggingInterceptor @Inject constructor() : - Interceptor { + Interceptor { @Throws(IOException::class) override fun intercept(chain: Interceptor.Chain): Response { diff --git a/vector/src/androidTest/java/im/vector/app/EspressoExt.kt b/vector/src/androidTest/java/im/vector/app/EspressoExt.kt index 5fb404efe3..35554ae75a 100644 --- a/vector/src/androidTest/java/im/vector/app/EspressoExt.kt +++ b/vector/src/androidTest/java/im/vector/app/EspressoExt.kt @@ -198,7 +198,7 @@ fun activityIdlingResource(activityClass: Class<*>): IdlingResource { println("*** [$name] onActivityLifecycleChanged callback: $callback") callback?.onTransitionToIdle() } - else -> { + else -> { // do nothing, we're blocking until the activity resumes } } diff --git a/vector/src/androidTest/java/im/vector/app/ui/robot/MessageMenuRobot.kt b/vector/src/androidTest/java/im/vector/app/ui/robot/MessageMenuRobot.kt index 5c9ecfdef5..53ad2af7e6 100644 --- a/vector/src/androidTest/java/im/vector/app/ui/robot/MessageMenuRobot.kt +++ b/vector/src/androidTest/java/im/vector/app/ui/robot/MessageMenuRobot.kt @@ -75,6 +75,7 @@ class MessageMenuRobot( clickOn(R.string.reply_in_thread) autoClosed = true } + fun viewInRoom() { clickOn(R.string.view_in_room) autoClosed = true diff --git a/vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsRobot.kt b/vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsRobot.kt index 97aee7ac4a..437f87c193 100644 --- a/vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsRobot.kt +++ b/vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsRobot.kt @@ -52,7 +52,7 @@ class SettingsRobot { clickOnAndGoBack(R.string.settings_security_and_privacy) { block(SettingsSecurityRobot()) } } - fun labs(shouldGoBack: Boolean = true, block: () -> Unit = {}) { + fun labs(shouldGoBack: Boolean = true, block: () -> Unit = {}) { if (shouldGoBack) { clickOnAndGoBack(R.string.room_settings_labs_pref_title) { block() } } else { diff --git a/vector/src/debug/java/im/vector/app/features/debug/sas/SasEmojiItem.kt b/vector/src/debug/java/im/vector/app/features/debug/sas/SasEmojiItem.kt index a7b74f3b59..9e0c013960 100644 --- a/vector/src/debug/java/im/vector/app/features/debug/sas/SasEmojiItem.kt +++ b/vector/src/debug/java/im/vector/app/features/debug/sas/SasEmojiItem.kt @@ -32,6 +32,7 @@ abstract class SasEmojiItem : VectorEpoxyModel() { @EpoxyAttribute var index: Int = 0 + @EpoxyAttribute lateinit var emojiRepresentation: EmojiRepresentation diff --git a/vector/src/fdroid/java/im/vector/app/fdroid/features/settings/troubleshoot/TestAutoStartBoot.kt b/vector/src/fdroid/java/im/vector/app/fdroid/features/settings/troubleshoot/TestAutoStartBoot.kt index 27a3f09ddc..6d741a36ba 100644 --- a/vector/src/fdroid/java/im/vector/app/fdroid/features/settings/troubleshoot/TestAutoStartBoot.kt +++ b/vector/src/fdroid/java/im/vector/app/fdroid/features/settings/troubleshoot/TestAutoStartBoot.kt @@ -28,7 +28,7 @@ import javax.inject.Inject */ class TestAutoStartBoot @Inject constructor(private val vectorPreferences: VectorPreferences, private val stringProvider: StringProvider) : - TroubleshootTest(R.string.settings_troubleshoot_test_service_boot_title) { + TroubleshootTest(R.string.settings_troubleshoot_test_service_boot_title) { override fun perform(activityResultLauncher: ActivityResultLauncher) { if (vectorPreferences.autoStartOnBoot()) { diff --git a/vector/src/fdroid/java/im/vector/app/fdroid/features/settings/troubleshoot/TestBackgroundRestrictions.kt b/vector/src/fdroid/java/im/vector/app/fdroid/features/settings/troubleshoot/TestBackgroundRestrictions.kt index b5635e186c..f8c30f813d 100644 --- a/vector/src/fdroid/java/im/vector/app/fdroid/features/settings/troubleshoot/TestBackgroundRestrictions.kt +++ b/vector/src/fdroid/java/im/vector/app/fdroid/features/settings/troubleshoot/TestBackgroundRestrictions.kt @@ -28,7 +28,7 @@ import javax.inject.Inject class TestBackgroundRestrictions @Inject constructor(private val context: FragmentActivity, private val stringProvider: StringProvider) : - TroubleshootTest(R.string.settings_troubleshoot_test_bg_restricted_title) { + TroubleshootTest(R.string.settings_troubleshoot_test_bg_restricted_title) { override fun perform(activityResultLauncher: ActivityResultLauncher) { context.getSystemService()!!.apply { diff --git a/vector/src/fdroid/java/im/vector/app/fdroid/receiver/OnApplicationUpgradeOrRebootReceiver.kt b/vector/src/fdroid/java/im/vector/app/fdroid/receiver/OnApplicationUpgradeOrRebootReceiver.kt index 935d7e6e13..c1bc90c4db 100644 --- a/vector/src/fdroid/java/im/vector/app/fdroid/receiver/OnApplicationUpgradeOrRebootReceiver.kt +++ b/vector/src/fdroid/java/im/vector/app/fdroid/receiver/OnApplicationUpgradeOrRebootReceiver.kt @@ -29,10 +29,10 @@ class OnApplicationUpgradeOrRebootReceiver : BroadcastReceiver() { override fun onReceive(context: Context, intent: Intent) { Timber.v("## onReceive() ${intent.action}") val singletonEntryPoint = context.singletonEntryPoint() - BackgroundSyncStarter.start( - context, - singletonEntryPoint.vectorPreferences(), - singletonEntryPoint.activeSessionHolder() - ) + BackgroundSyncStarter.start( + context, + singletonEntryPoint.vectorPreferences(), + singletonEntryPoint.activeSessionHolder() + ) } } diff --git a/vector/src/gplay/java/im/vector/app/gplay/features/settings/troubleshoot/TestPlayServices.kt b/vector/src/gplay/java/im/vector/app/gplay/features/settings/troubleshoot/TestPlayServices.kt index cc682e7a5f..ecb457bf9f 100644 --- a/vector/src/gplay/java/im/vector/app/gplay/features/settings/troubleshoot/TestPlayServices.kt +++ b/vector/src/gplay/java/im/vector/app/gplay/features/settings/troubleshoot/TestPlayServices.kt @@ -31,7 +31,7 @@ import javax.inject.Inject */ class TestPlayServices @Inject constructor(private val context: FragmentActivity, private val stringProvider: StringProvider) : - TroubleshootTest(R.string.settings_troubleshoot_test_play_services_title) { + TroubleshootTest(R.string.settings_troubleshoot_test_play_services_title) { override fun perform(activityResultLauncher: ActivityResultLauncher) { val apiAvailability = GoogleApiAvailability.getInstance() diff --git a/vector/src/gplay/java/im/vector/app/gplay/features/settings/troubleshoot/TestPushFromPushGateway.kt b/vector/src/gplay/java/im/vector/app/gplay/features/settings/troubleshoot/TestPushFromPushGateway.kt index 7ae68b201b..f485de760a 100644 --- a/vector/src/gplay/java/im/vector/app/gplay/features/settings/troubleshoot/TestPushFromPushGateway.kt +++ b/vector/src/gplay/java/im/vector/app/gplay/features/settings/troubleshoot/TestPushFromPushGateway.kt @@ -41,7 +41,7 @@ class TestPushFromPushGateway @Inject constructor(private val context: FragmentA private val errorFormatter: ErrorFormatter, private val pushersManager: PushersManager, private val activeSessionHolder: ActiveSessionHolder) : - TroubleshootTest(R.string.settings_troubleshoot_test_push_loop_title) { + TroubleshootTest(R.string.settings_troubleshoot_test_push_loop_title) { private var action: Job? = null private var pushReceived: Boolean = false diff --git a/vector/src/gplay/java/im/vector/app/gplay/features/settings/troubleshoot/TestTokenRegistration.kt b/vector/src/gplay/java/im/vector/app/gplay/features/settings/troubleshoot/TestTokenRegistration.kt index 913b5491ea..f0199ad390 100644 --- a/vector/src/gplay/java/im/vector/app/gplay/features/settings/troubleshoot/TestTokenRegistration.kt +++ b/vector/src/gplay/java/im/vector/app/gplay/features/settings/troubleshoot/TestTokenRegistration.kt @@ -37,7 +37,7 @@ class TestTokenRegistration @Inject constructor(private val context: FragmentAct private val stringProvider: StringProvider, private val pushersManager: PushersManager, private val activeSessionHolder: ActiveSessionHolder) : - TroubleshootTest(R.string.settings_troubleshoot_test_token_registration_title) { + TroubleshootTest(R.string.settings_troubleshoot_test_token_registration_title) { override fun perform(activityResultLauncher: ActivityResultLauncher) { // Check if we have a registered pusher for this token diff --git a/vector/src/main/java/im/vector/app/UISIDetector.kt b/vector/src/main/java/im/vector/app/UISIDetector.kt index 6157537743..fea1861cc6 100644 --- a/vector/src/main/java/im/vector/app/UISIDetector.kt +++ b/vector/src/main/java/im/vector/app/UISIDetector.kt @@ -34,7 +34,7 @@ data class E2EMessageDetected( val senderDeviceId: String, val senderKey: String, val sessionId: String - ) { +) { companion object { fun fromEvent(event: Event, roomId: String): E2EMessageDetected { @@ -109,9 +109,9 @@ class UISIDetector : LiveEventListener { timer.schedule(timeoutTask, timeoutMillis) } - override fun onLiveEvent(roomId: String, event: Event) { } + override fun onLiveEvent(roomId: String, event: Event) {} - override fun onPaginatedEvent(roomId: String, event: Event) { } + override fun onPaginatedEvent(roomId: String, event: Event) {} private fun trackerId(eventId: String, roomId: String): String = "$roomId-$eventId" diff --git a/vector/src/main/java/im/vector/app/core/date/DefaultDateFormatterProvider.kt b/vector/src/main/java/im/vector/app/core/date/DefaultDateFormatterProvider.kt index 6371035a17..361868cd95 100644 --- a/vector/src/main/java/im/vector/app/core/date/DefaultDateFormatterProvider.kt +++ b/vector/src/main/java/im/vector/app/core/date/DefaultDateFormatterProvider.kt @@ -24,7 +24,7 @@ import javax.inject.Inject class DefaultDateFormatterProvider @Inject constructor(private val context: Context, private val localeProvider: LocaleProvider) : - DateFormatterProvider { + DateFormatterProvider { override val dateWithMonthFormatter: DateTimeFormatter by lazy { val pattern = DateFormat.getBestDateTimePattern(localeProvider.current(), "d MMMMM") diff --git a/vector/src/main/java/im/vector/app/core/di/HiltMavericksViewModelFactory.kt b/vector/src/main/java/im/vector/app/core/di/HiltMavericksViewModelFactory.kt index 13702053e8..5850cb8cb9 100644 --- a/vector/src/main/java/im/vector/app/core/di/HiltMavericksViewModelFactory.kt +++ b/vector/src/main/java/im/vector/app/core/di/HiltMavericksViewModelFactory.kt @@ -45,7 +45,7 @@ import dagger.hilt.components.SingletonComponent inline fun , S : MavericksState> hiltMavericksViewModelFactory() = HiltMavericksViewModelFactory(VM::class.java) class HiltMavericksViewModelFactory, S : MavericksState>( - private val viewModelClass: Class> + private val viewModelClass: Class> ) : MavericksViewModelFactory { override fun create(viewModelContext: ViewModelContext, state: S): VM { diff --git a/vector/src/main/java/im/vector/app/core/dialogs/ExportKeysDialog.kt b/vector/src/main/java/im/vector/app/core/dialogs/ExportKeysDialog.kt index b87b7f0286..024d283c4c 100644 --- a/vector/src/main/java/im/vector/app/core/dialogs/ExportKeysDialog.kt +++ b/vector/src/main/java/im/vector/app/core/dialogs/ExportKeysDialog.kt @@ -35,7 +35,7 @@ class ExportKeysDialog { val textWatcher = object : SimpleTextWatcher() { override fun afterTextChanged(s: Editable) { when { - views.exportDialogEt.text.isNullOrEmpty() -> { + views.exportDialogEt.text.isNullOrEmpty() -> { views.exportDialogSubmit.isEnabled = false views.exportDialogTilConfirm.error = null } @@ -43,7 +43,7 @@ class ExportKeysDialog { views.exportDialogSubmit.isEnabled = true views.exportDialogTilConfirm.error = null } - else -> { + else -> { views.exportDialogSubmit.isEnabled = false views.exportDialogTilConfirm.error = activity.getString(R.string.passphrase_passphrase_does_not_match) } diff --git a/vector/src/main/java/im/vector/app/core/extensions/Session.kt b/vector/src/main/java/im/vector/app/core/extensions/Session.kt index 87ed51522f..f89ba4c47a 100644 --- a/vector/src/main/java/im/vector/app/core/extensions/Session.kt +++ b/vector/src/main/java/im/vector/app/core/extensions/Session.kt @@ -74,8 +74,8 @@ fun Session.cannotLogoutSafely(): Boolean { return hasUnsavedKeys() || // has local cross signing keys (cryptoService().crossSigningService().allPrivateKeysKnown() && - // That are not backed up - !sharedSecretStorageService.isRecoverySetup()) + // That are not backed up + !sharedSecretStorageService.isRecoverySetup()) } fun Session.vectorStore(context: Context) = VectorSessionStore(context, myUserId) diff --git a/vector/src/main/java/im/vector/app/core/glide/AvatarPlaceholder.kt b/vector/src/main/java/im/vector/app/core/glide/AvatarPlaceholder.kt index e61f81de55..e7ced6b335 100644 --- a/vector/src/main/java/im/vector/app/core/glide/AvatarPlaceholder.kt +++ b/vector/src/main/java/im/vector/app/core/glide/AvatarPlaceholder.kt @@ -43,7 +43,7 @@ class AvatarPlaceholderModelLoaderFactory(private val context: Context) : ModelL } class AvatarPlaceholderModelLoader(private val context: Context) : - ModelLoader { + ModelLoader { override fun buildLoadData(model: AvatarPlaceholder, width: Int, height: Int, options: Options): ModelLoader.LoadData? { return ModelLoader.LoadData(ObjectKey(model), AvatarPlaceholderDataFetcher(context, model)) @@ -55,7 +55,7 @@ class AvatarPlaceholderModelLoader(private val context: Context) : } class AvatarPlaceholderDataFetcher(context: Context, private val data: AvatarPlaceholder) : - DataFetcher { + DataFetcher { private val avatarRenderer = context.singletonEntryPoint().avatarRenderer() diff --git a/vector/src/main/java/im/vector/app/core/glide/VectorGlideModelLoader.kt b/vector/src/main/java/im/vector/app/core/glide/VectorGlideModelLoader.kt index 6b42e3fff8..c53db12b6b 100644 --- a/vector/src/main/java/im/vector/app/core/glide/VectorGlideModelLoader.kt +++ b/vector/src/main/java/im/vector/app/core/glide/VectorGlideModelLoader.kt @@ -49,7 +49,7 @@ class VectorGlideModelLoaderFactory(private val context: Context) : ModelLoaderF } class VectorGlideModelLoader(private val context: Context) : - ModelLoader { + ModelLoader { override fun handles(model: ImageContentRenderer.Data): Boolean { // Always handle return true @@ -64,7 +64,7 @@ class VectorGlideDataFetcher(context: Context, private val data: ImageContentRenderer.Data, private val width: Int, private val height: Int) : - DataFetcher { + DataFetcher { private val localFilesHelper = LocalFilesHelper(context) private val activeSessionHolder = context.singletonEntryPoint().activeSessionHolder() diff --git a/vector/src/main/java/im/vector/app/core/platform/ButtonStateView.kt b/vector/src/main/java/im/vector/app/core/platform/ButtonStateView.kt index e7e91dbfd9..7bedeaa4ff 100755 --- a/vector/src/main/java/im/vector/app/core/platform/ButtonStateView.kt +++ b/vector/src/main/java/im/vector/app/core/platform/ButtonStateView.kt @@ -29,7 +29,7 @@ import im.vector.app.core.epoxy.onClick import im.vector.app.databinding.ViewButtonStateBinding class ButtonStateView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyle: Int = 0) : - FrameLayout(context, attrs, defStyle) { + FrameLayout(context, attrs, defStyle) { sealed class State { object Button : State() diff --git a/vector/src/main/java/im/vector/app/core/platform/MaxHeightScrollView.kt b/vector/src/main/java/im/vector/app/core/platform/MaxHeightScrollView.kt index 8d4c5d8950..da15d4413d 100644 --- a/vector/src/main/java/im/vector/app/core/platform/MaxHeightScrollView.kt +++ b/vector/src/main/java/im/vector/app/core/platform/MaxHeightScrollView.kt @@ -25,7 +25,7 @@ import im.vector.app.R private const val DEFAULT_MAX_HEIGHT = 200 class MaxHeightScrollView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyle: Int = 0) : - NestedScrollView(context, attrs, defStyle) { + NestedScrollView(context, attrs, defStyle) { var maxHeight: Int = 0 set(value) { diff --git a/vector/src/main/java/im/vector/app/core/platform/StateView.kt b/vector/src/main/java/im/vector/app/core/platform/StateView.kt index b3d42dc38f..a70bf54aa1 100755 --- a/vector/src/main/java/im/vector/app/core/platform/StateView.kt +++ b/vector/src/main/java/im/vector/app/core/platform/StateView.kt @@ -27,7 +27,7 @@ import im.vector.app.core.extensions.updateConstraintSet import im.vector.app.databinding.ViewStateBinding class StateView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyle: Int = 0) : - FrameLayout(context, attrs, defStyle) { + FrameLayout(context, attrs, defStyle) { sealed class State { object Content : State() diff --git a/vector/src/main/java/im/vector/app/core/platform/VectorBaseFragment.kt b/vector/src/main/java/im/vector/app/core/platform/VectorBaseFragment.kt index 70b265ff9f..7db35a8e8f 100644 --- a/vector/src/main/java/im/vector/app/core/platform/VectorBaseFragment.kt +++ b/vector/src/main/java/im/vector/app/core/platform/VectorBaseFragment.kt @@ -83,8 +83,8 @@ abstract class VectorBaseFragment : Fragment(), MavericksView * [ToolbarConfig] instance from host activity * */ protected var toolbar: ToolbarConfig? = null - get() = (activity as? VectorBaseActivity<*>)?.toolbar - private set + get() = (activity as? VectorBaseActivity<*>)?.toolbar + private set /* ========================================================================================== * View model * ========================================================================================== */ diff --git a/vector/src/main/java/im/vector/app/core/platform/VectorEventViewModel.kt b/vector/src/main/java/im/vector/app/core/platform/VectorEventViewModel.kt index 9ab46557a5..2b47412901 100644 --- a/vector/src/main/java/im/vector/app/core/platform/VectorEventViewModel.kt +++ b/vector/src/main/java/im/vector/app/core/platform/VectorEventViewModel.kt @@ -26,4 +26,4 @@ interface VectorSharedAction * Parent class to handle navigation events, action events, or other any events */ open class VectorSharedActionViewModel(private val store: MutableDataSource = PublishDataSource()) : - ViewModel(), MutableDataSource by store + ViewModel(), MutableDataSource by store diff --git a/vector/src/main/java/im/vector/app/core/preference/KeywordPreference.kt b/vector/src/main/java/im/vector/app/core/preference/KeywordPreference.kt index b57bb27671..6101f8a597 100644 --- a/vector/src/main/java/im/vector/app/core/preference/KeywordPreference.kt +++ b/vector/src/main/java/im/vector/app/core/preference/KeywordPreference.kt @@ -139,7 +139,7 @@ class KeywordPreference : VectorPreference { keyword.contains("/") -> { context.getString(R.string.settings_notification_keyword_contains_invalid_character, "/") } - else -> null + else -> null } chipTextInputLayout.isErrorEnabled = errorMessage != null diff --git a/vector/src/main/java/im/vector/app/core/resources/LocaleProvider.kt b/vector/src/main/java/im/vector/app/core/resources/LocaleProvider.kt index fdb5f21b61..2f1b46b555 100644 --- a/vector/src/main/java/im/vector/app/core/resources/LocaleProvider.kt +++ b/vector/src/main/java/im/vector/app/core/resources/LocaleProvider.kt @@ -32,6 +32,6 @@ class LocaleProvider @Inject constructor(private val resources: Resources) { fun LocaleProvider.isEnglishSpeaking() = current().language.startsWith("en") -fun LocaleProvider.getLayoutDirectionFromCurrentLocale() = TextUtils.getLayoutDirectionFromLocale(current()) +fun LocaleProvider.getLayoutDirectionFromCurrentLocale() = TextUtils.getLayoutDirectionFromLocale(current()) fun LocaleProvider.isRTL() = getLayoutDirectionFromCurrentLocale() == View.LAYOUT_DIRECTION_RTL diff --git a/vector/src/main/java/im/vector/app/core/ui/bottomsheet/BottomSheetGenericController.kt b/vector/src/main/java/im/vector/app/core/ui/bottomsheet/BottomSheetGenericController.kt index 6e92549809..70faa87645 100644 --- a/vector/src/main/java/im/vector/app/core/ui/bottomsheet/BottomSheetGenericController.kt +++ b/vector/src/main/java/im/vector/app/core/ui/bottomsheet/BottomSheetGenericController.kt @@ -21,7 +21,7 @@ import com.airbnb.epoxy.TypedEpoxyController * Epoxy controller for generic bottom sheet actions */ abstract class BottomSheetGenericController : - TypedEpoxyController() { + TypedEpoxyController() { var listener: Listener? = null diff --git a/vector/src/main/java/im/vector/app/core/ui/views/PasswordStrengthBar.kt b/vector/src/main/java/im/vector/app/core/ui/views/PasswordStrengthBar.kt index a984707bf7..39bfce6975 100644 --- a/vector/src/main/java/im/vector/app/core/ui/views/PasswordStrengthBar.kt +++ b/vector/src/main/java/im/vector/app/core/ui/views/PasswordStrengthBar.kt @@ -36,7 +36,7 @@ class PasswordStrengthBar @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0) : - LinearLayout(context, attrs, defStyleAttr) { + LinearLayout(context, attrs, defStyleAttr) { private val views: ViewPasswordStrengthBarBinding diff --git a/vector/src/main/java/im/vector/app/core/ui/views/TypingMessageDotsView.kt b/vector/src/main/java/im/vector/app/core/ui/views/TypingMessageDotsView.kt index bc06254b0d..2e9945c8d7 100644 --- a/vector/src/main/java/im/vector/app/core/ui/views/TypingMessageDotsView.kt +++ b/vector/src/main/java/im/vector/app/core/ui/views/TypingMessageDotsView.kt @@ -30,7 +30,7 @@ import androidx.core.view.setMargins import im.vector.app.R class TypingMessageDotsView(context: Context, attrs: AttributeSet) : - LinearLayout(context, attrs) { + LinearLayout(context, attrs) { companion object { const val DEFAULT_CIRCLE_DURATION = 1000L diff --git a/vector/src/main/java/im/vector/app/features/analytics/ui/consent/AnalyticsOptInFragment.kt b/vector/src/main/java/im/vector/app/features/analytics/ui/consent/AnalyticsOptInFragment.kt index f112ba4659..320386aebd 100644 --- a/vector/src/main/java/im/vector/app/features/analytics/ui/consent/AnalyticsOptInFragment.kt +++ b/vector/src/main/java/im/vector/app/features/analytics/ui/consent/AnalyticsOptInFragment.kt @@ -31,7 +31,7 @@ import im.vector.app.databinding.FragmentAnalyticsOptinBinding import javax.inject.Inject class AnalyticsOptInFragment @Inject constructor() : - VectorBaseFragment(), + VectorBaseFragment(), OnBackPressed { // Share the view model with the Activity so that the Activity diff --git a/vector/src/main/java/im/vector/app/features/attachments/preview/AttachmentsPreviewViewModel.kt b/vector/src/main/java/im/vector/app/features/attachments/preview/AttachmentsPreviewViewModel.kt index 3e9d72e98b..81f0994899 100644 --- a/vector/src/main/java/im/vector/app/features/attachments/preview/AttachmentsPreviewViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/attachments/preview/AttachmentsPreviewViewModel.kt @@ -20,7 +20,7 @@ package im.vector.app.features.attachments.preview import im.vector.app.core.platform.VectorViewModel class AttachmentsPreviewViewModel(initialState: AttachmentsPreviewViewState) : - VectorViewModel(initialState) { + VectorViewModel(initialState) { override fun handle(action: AttachmentsPreviewAction) { when (action) { diff --git a/vector/src/main/java/im/vector/app/features/auth/PromptFragment.kt b/vector/src/main/java/im/vector/app/features/auth/PromptFragment.kt index 501af00ad2..bd44a5b9cd 100644 --- a/vector/src/main/java/im/vector/app/features/auth/PromptFragment.kt +++ b/vector/src/main/java/im/vector/app/features/auth/PromptFragment.kt @@ -65,7 +65,7 @@ class PromptFragment : VectorBaseFragment() { override fun invalidate() = withState(viewModel) { when (it.flowType) { - LoginFlowTypes.SSO -> { + LoginFlowTypes.SSO -> { views.passwordFieldTil.isVisible = false views.reAuthConfirmButton.text = getString(R.string.auth_login_sso) } diff --git a/vector/src/main/java/im/vector/app/features/auth/ReAuthActivity.kt b/vector/src/main/java/im/vector/app/features/auth/ReAuthActivity.kt index 78c6cbb021..f92ec8ea9e 100644 --- a/vector/src/main/java/im/vector/app/features/auth/ReAuthActivity.kt +++ b/vector/src/main/java/im/vector/app/features/auth/ReAuthActivity.kt @@ -86,10 +86,10 @@ class ReAuthActivity : SimpleFragmentActivity() { sharedViewModel.observeViewEvents { when (it) { - is ReAuthEvents.OpenSsoURl -> { + is ReAuthEvents.OpenSsoURl -> { openInCustomTab(it.url) } - ReAuthEvents.Dismiss -> { + ReAuthEvents.Dismiss -> { setResult(RESULT_CANCELED) finish() } @@ -205,7 +205,7 @@ class ReAuthActivity : SimpleFragmentActivity() { LoginFlowTypes.PASSWORD -> { LoginFlowTypes.PASSWORD } - LoginFlowTypes.SSO -> { + LoginFlowTypes.SSO -> { LoginFlowTypes.SSO } else -> { diff --git a/vector/src/main/java/im/vector/app/features/auth/ReAuthViewModel.kt b/vector/src/main/java/im/vector/app/features/auth/ReAuthViewModel.kt index fcc2a59ef8..16aca5cfeb 100644 --- a/vector/src/main/java/im/vector/app/features/auth/ReAuthViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/auth/ReAuthViewModel.kt @@ -42,7 +42,7 @@ class ReAuthViewModel @AssistedInject constructor( override fun handle(action: ReAuthActions) = withState { state -> when (action) { - ReAuthActions.StartSSOFallback -> { + ReAuthActions.StartSSOFallback -> { if (state.flowType == LoginFlowTypes.SSO) { setState { copy(ssoFallbackPageWasShown = true) } val ssoURL = session.getUiaSsoFallbackUrl(initialState.session ?: "") @@ -55,7 +55,7 @@ class ReAuthViewModel @AssistedInject constructor( ReAuthActions.FallBackPageClosed -> { // Should we do something here? } - is ReAuthActions.ReAuthWithPass -> { + is ReAuthActions.ReAuthWithPass -> { val safeForIntentCypher = ByteArrayOutputStream().also { it.use { session.securelyStoreObject(action.password, initialState.resultKeyStoreAlias, it) diff --git a/vector/src/main/java/im/vector/app/features/call/VectorCallViewEvents.kt b/vector/src/main/java/im/vector/app/features/call/VectorCallViewEvents.kt index 7c29d7eea3..256a373d44 100644 --- a/vector/src/main/java/im/vector/app/features/call/VectorCallViewEvents.kt +++ b/vector/src/main/java/im/vector/app/features/call/VectorCallViewEvents.kt @@ -27,6 +27,7 @@ sealed class VectorCallViewEvents : VectorViewEvents { val available: Set, val current: CallAudioManager.Device ) : VectorCallViewEvents() + object ShowDialPad : VectorCallViewEvents() object ShowCallTransferScreen : VectorCallViewEvents() object FailToTransfer : VectorCallViewEvents() diff --git a/vector/src/main/java/im/vector/app/features/call/VectorCallViewModel.kt b/vector/src/main/java/im/vector/app/features/call/VectorCallViewModel.kt index b9bf578daa..a80055d8e7 100644 --- a/vector/src/main/java/im/vector/app/features/call/VectorCallViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/call/VectorCallViewModel.kt @@ -256,27 +256,27 @@ class VectorCallViewModel @AssistedInject constructor( override fun handle(action: VectorCallViewActions) = withState { state -> when (action) { - VectorCallViewActions.EndCall -> call?.endCall() - VectorCallViewActions.AcceptCall -> { + VectorCallViewActions.EndCall -> call?.endCall() + VectorCallViewActions.AcceptCall -> { setState { copy(callState = Loading()) } call?.acceptIncomingCall() } - VectorCallViewActions.DeclineCall -> { + VectorCallViewActions.DeclineCall -> { setState { copy(callState = Loading()) } call?.endCall() } - VectorCallViewActions.ToggleMute -> { + VectorCallViewActions.ToggleMute -> { val muted = state.isAudioMuted call?.muteCall(!muted) setState { copy(isAudioMuted = !muted) } } - VectorCallViewActions.ToggleVideo -> { + VectorCallViewActions.ToggleVideo -> { if (state.isVideoCall) { val videoEnabled = state.isVideoEnabled call?.enableVideo(!videoEnabled) @@ -286,19 +286,19 @@ class VectorCallViewModel @AssistedInject constructor( } Unit } - VectorCallViewActions.ToggleHoldResume -> { + VectorCallViewActions.ToggleHoldResume -> { val isRemoteOnHold = state.isRemoteOnHold call?.updateRemoteOnHold(!isRemoteOnHold) } - is VectorCallViewActions.ChangeAudioDevice -> { + is VectorCallViewActions.ChangeAudioDevice -> { callManager.audioManager.setAudioDevice(action.device) } - VectorCallViewActions.SwitchSoundDevice -> { + VectorCallViewActions.SwitchSoundDevice -> { _viewEvents.post( VectorCallViewEvents.ShowSoundDeviceChooser(state.availableDevices, state.device) ) } - VectorCallViewActions.HeadSetButtonPressed -> { + VectorCallViewActions.HeadSetButtonPressed -> { if (state.callState.invoke() is CallState.LocalRinging) { // accept call call?.acceptIncomingCall() @@ -309,20 +309,20 @@ class VectorCallViewModel @AssistedInject constructor( } Unit } - VectorCallViewActions.ToggleCamera -> { + VectorCallViewActions.ToggleCamera -> { call?.switchCamera() } - VectorCallViewActions.ToggleHDSD -> { + VectorCallViewActions.ToggleHDSD -> { if (!state.isVideoCall) return@withState call?.setCaptureFormat(if (state.isHD) CaptureFormat.SD else CaptureFormat.HD) } - VectorCallViewActions.OpenDialPad -> { + VectorCallViewActions.OpenDialPad -> { _viewEvents.post(VectorCallViewEvents.ShowDialPad) } - is VectorCallViewActions.SendDtmfDigit -> { + is VectorCallViewActions.SendDtmfDigit -> { call?.sendDtmfDigit(action.digit) } - VectorCallViewActions.InitiateCallTransfer -> { + VectorCallViewActions.InitiateCallTransfer -> { call?.updateRemoteOnHold(true) _viewEvents.post( VectorCallViewEvents.ShowCallTransferScreen @@ -334,10 +334,10 @@ class VectorCallViewModel @AssistedInject constructor( is VectorCallViewActions.CallTransferSelectionResult -> { handleCallTransferSelectionResult(action.callTransferResult) } - VectorCallViewActions.TransferCall -> { + VectorCallViewActions.TransferCall -> { handleCallTransfer() } - is VectorCallViewActions.SwitchCall -> { + is VectorCallViewActions.SwitchCall -> { setState { VectorCallViewState(action.callArgs) } setupCallWithCurrentState() } diff --git a/vector/src/main/java/im/vector/app/features/call/audio/API23AudioDeviceDetector.kt b/vector/src/main/java/im/vector/app/features/call/audio/API23AudioDeviceDetector.kt index 7e12987a6b..3f9d4e9076 100644 --- a/vector/src/main/java/im/vector/app/features/call/audio/API23AudioDeviceDetector.kt +++ b/vector/src/main/java/im/vector/app/features/call/audio/API23AudioDeviceDetector.kt @@ -32,9 +32,9 @@ internal class API23AudioDeviceDetector(private val audioManager: AudioManager, val deviceInfos = audioManager.getDevices(AudioManager.GET_DEVICES_OUTPUTS) for (info in deviceInfos) { when (info.type) { - AudioDeviceInfo.TYPE_BLUETOOTH_SCO -> devices.add(CallAudioManager.Device.WirelessHeadset(info.productName.toString())) - AudioDeviceInfo.TYPE_BUILTIN_EARPIECE -> devices.add(CallAudioManager.Device.Phone) - AudioDeviceInfo.TYPE_BUILTIN_SPEAKER -> devices.add(CallAudioManager.Device.Speaker) + AudioDeviceInfo.TYPE_BLUETOOTH_SCO -> devices.add(CallAudioManager.Device.WirelessHeadset(info.productName.toString())) + AudioDeviceInfo.TYPE_BUILTIN_EARPIECE -> devices.add(CallAudioManager.Device.Phone) + AudioDeviceInfo.TYPE_BUILTIN_SPEAKER -> devices.add(CallAudioManager.Device.Speaker) AudioDeviceInfo.TYPE_WIRED_HEADPHONES, AudioDeviceInfo.TYPE_WIRED_HEADSET, TYPE_USB_HEADSET -> devices.add(CallAudioManager.Device.Headset) } } diff --git a/vector/src/main/java/im/vector/app/features/call/audio/DefaultAudioDeviceRouter.kt b/vector/src/main/java/im/vector/app/features/call/audio/DefaultAudioDeviceRouter.kt index fd85ce075f..c3500c7bc2 100644 --- a/vector/src/main/java/im/vector/app/features/call/audio/DefaultAudioDeviceRouter.kt +++ b/vector/src/main/java/im/vector/app/features/call/audio/DefaultAudioDeviceRouter.kt @@ -95,7 +95,7 @@ class DefaultAudioDeviceRouter(private val audioManager: AudioManager, override fun onAudioFocusChange(focusChange: Int) { callAudioManager.runInAudioThread { when (focusChange) { - AudioManager.AUDIOFOCUS_GAIN -> { + AudioManager.AUDIOFOCUS_GAIN -> { Timber.d(" Audio focus gained") if (audioFocusLost) { callAudioManager.resetAudioRoute() diff --git a/vector/src/main/java/im/vector/app/features/call/dialpad/DialPadLookup.kt b/vector/src/main/java/im/vector/app/features/call/dialpad/DialPadLookup.kt index eadccab4f6..80c4e93306 100644 --- a/vector/src/main/java/im/vector/app/features/call/dialpad/DialPadLookup.kt +++ b/vector/src/main/java/im/vector/app/features/call/dialpad/DialPadLookup.kt @@ -49,7 +49,7 @@ class DialPadLookup @Inject constructor( } session.getExistingDirectRoomWithUser(nativeUserId) // if there is not, just create a DM with the sip user - ?: directRoomHelper.ensureDMExists(sipUserId) + ?: directRoomHelper.ensureDMExists(sipUserId) } else { // do the same if there is no corresponding native user. directRoomHelper.ensureDMExists(sipUserId) diff --git a/vector/src/main/java/im/vector/app/features/call/transfer/CallTransferViewModel.kt b/vector/src/main/java/im/vector/app/features/call/transfer/CallTransferViewModel.kt index 1765b58a02..67f0949dcf 100644 --- a/vector/src/main/java/im/vector/app/features/call/transfer/CallTransferViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/call/transfer/CallTransferViewModel.kt @@ -31,7 +31,7 @@ import org.matrix.android.sdk.api.session.call.MxCall class CallTransferViewModel @AssistedInject constructor(@Assisted initialState: CallTransferViewState, private val callManager: WebRtcCallManager) : - VectorViewModel(initialState) { + VectorViewModel(initialState) { @AssistedFactory interface Factory : MavericksAssistedViewModelFactory { @@ -62,5 +62,5 @@ class CallTransferViewModel @AssistedInject constructor(@Assisted initialState: call?.removeListener(callListener) } - override fun handle(action: EmptyAction) { } + override fun handle(action: EmptyAction) {} } diff --git a/vector/src/main/java/im/vector/app/features/call/webrtc/PeerConnectionObserver.kt b/vector/src/main/java/im/vector/app/features/call/webrtc/PeerConnectionObserver.kt index 99c26c5ebe..c776951f93 100644 --- a/vector/src/main/java/im/vector/app/features/call/webrtc/PeerConnectionObserver.kt +++ b/vector/src/main/java/im/vector/app/features/call/webrtc/PeerConnectionObserver.kt @@ -37,13 +37,13 @@ class PeerConnectionObserver(private val webRtcCall: WebRtcCall) : PeerConnectio * Every ICE transport used by the connection is either in use (state "connected" or "completed") * or is closed (state "closed"); in addition, at least one transport is either "connected" or "completed" */ - PeerConnection.PeerConnectionState.CONNECTED -> { + PeerConnection.PeerConnectionState.CONNECTED -> { webRtcCall.mxCall.state = CallState.Connected(MxPeerConnectionState.CONNECTED) } /** * One or more of the ICE transports on the connection is in the "failed" state. */ - PeerConnection.PeerConnectionState.FAILED -> { + PeerConnection.PeerConnectionState.FAILED -> { // This can be temporary, e.g when other ice not yet received... // webRtcCall.mxCall.state = CallState.ERROR webRtcCall.mxCall.state = CallState.Connected(MxPeerConnectionState.FAILED) @@ -58,7 +58,7 @@ class PeerConnectionObserver(private val webRtcCall: WebRtcCall) : PeerConnectio * One or more of the ICE transports are currently in the process of establishing a connection; * that is, their RTCIceConnectionState is either "checking" or "connected", and no transports are in the "failed" state */ - PeerConnection.PeerConnectionState.CONNECTING -> { + PeerConnection.PeerConnectionState.CONNECTING -> { webRtcCall.mxCall.state = CallState.Connected(MxPeerConnectionState.CONNECTING) } /** @@ -66,7 +66,7 @@ class PeerConnectionObserver(private val webRtcCall: WebRtcCall) : PeerConnectio * This value was in the RTCSignalingState enum (and therefore found by reading the value of the signalingState) * property until the May 13, 2016 draft of the specification. */ - PeerConnection.PeerConnectionState.CLOSED -> { + PeerConnection.PeerConnectionState.CLOSED -> { webRtcCall.mxCall.state = CallState.Connected(MxPeerConnectionState.CLOSED) } /** @@ -76,7 +76,7 @@ class PeerConnectionObserver(private val webRtcCall: WebRtcCall) : PeerConnectio PeerConnection.PeerConnectionState.DISCONNECTED -> { webRtcCall.mxCall.state = CallState.Connected(MxPeerConnectionState.DISCONNECTED) } - null -> { + null -> { } } } @@ -101,14 +101,14 @@ class PeerConnectionObserver(private val webRtcCall: WebRtcCall) : PeerConnectio * the ICE agent is gathering addresses or is waiting to be given remote candidates through * calls to RTCPeerConnection.addIceCandidate() (or both). */ - PeerConnection.IceConnectionState.NEW -> { + PeerConnection.IceConnectionState.NEW -> { } /** * The ICE agent has been given one or more remote candidates and is checking pairs of local and remote candidates * against one another to try to find a compatible match, but has not yet found a pair which will allow * the peer connection to be made. It's possible that gathering of candidates is also still underway. */ - PeerConnection.IceConnectionState.CHECKING -> { + PeerConnection.IceConnectionState.CHECKING -> { } /** @@ -117,7 +117,7 @@ class PeerConnectionObserver(private val webRtcCall: WebRtcCall) : PeerConnectio * It's possible that gathering is still underway, and it's also possible that the ICE agent is still checking * candidates against one another looking for a better connection to use. */ - PeerConnection.IceConnectionState.CONNECTED -> { + PeerConnection.IceConnectionState.CONNECTED -> { } /** * Checks to ensure that components are still connected failed for at least one component of the RTCPeerConnection. @@ -131,18 +131,18 @@ class PeerConnectionObserver(private val webRtcCall: WebRtcCall) : PeerConnectio * compatible matches for all components of the connection. * It is, however, possible that the ICE agent did find compatible connections for some components. */ - PeerConnection.IceConnectionState.FAILED -> { + PeerConnection.IceConnectionState.FAILED -> { webRtcCall.onRenegotiationNeeded(restartIce = true) } /** * The ICE agent has finished gathering candidates, has checked all pairs against one another, and has found a connection for all components. */ - PeerConnection.IceConnectionState.COMPLETED -> { + PeerConnection.IceConnectionState.COMPLETED -> { } /** * The ICE agent for this RTCPeerConnection has shut down and is no longer handling requests. */ - PeerConnection.IceConnectionState.CLOSED -> { + PeerConnection.IceConnectionState.CLOSED -> { } } } diff --git a/vector/src/main/java/im/vector/app/features/crypto/keysbackup/restore/KeysBackupRestoreFromKeyFragment.kt b/vector/src/main/java/im/vector/app/features/crypto/keysbackup/restore/KeysBackupRestoreFromKeyFragment.kt index 40ad1372fb..42605a850b 100644 --- a/vector/src/main/java/im/vector/app/features/crypto/keysbackup/restore/KeysBackupRestoreFromKeyFragment.kt +++ b/vector/src/main/java/im/vector/app/features/crypto/keysbackup/restore/KeysBackupRestoreFromKeyFragment.kt @@ -31,7 +31,7 @@ import org.matrix.android.sdk.api.extensions.tryOrNull import javax.inject.Inject class KeysBackupRestoreFromKeyFragment @Inject constructor() : - VectorBaseFragment() { + VectorBaseFragment() { override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentKeysBackupRestoreFromKeyBinding { return FragmentKeysBackupRestoreFromKeyBinding.inflate(inflater, container, false) diff --git a/vector/src/main/java/im/vector/app/features/crypto/keysbackup/settings/KeysBackupSettingsFragment.kt b/vector/src/main/java/im/vector/app/features/crypto/keysbackup/settings/KeysBackupSettingsFragment.kt index 50d5e56483..4d3ec9a820 100644 --- a/vector/src/main/java/im/vector/app/features/crypto/keysbackup/settings/KeysBackupSettingsFragment.kt +++ b/vector/src/main/java/im/vector/app/features/crypto/keysbackup/settings/KeysBackupSettingsFragment.kt @@ -32,7 +32,7 @@ import im.vector.app.features.crypto.keysbackup.setup.KeysBackupSetupActivity import javax.inject.Inject class KeysBackupSettingsFragment @Inject constructor(private val keysBackupSettingsRecyclerViewController: KeysBackupSettingsRecyclerViewController) : - VectorBaseFragment(), + VectorBaseFragment(), KeysBackupSettingsRecyclerViewController.Listener { override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentKeysBackupSettingsBinding { diff --git a/vector/src/main/java/im/vector/app/features/crypto/quads/SharedSecureStorageViewModel.kt b/vector/src/main/java/im/vector/app/features/crypto/quads/SharedSecureStorageViewModel.kt index 51d8b3a8d5..55ab672c43 100644 --- a/vector/src/main/java/im/vector/app/features/crypto/quads/SharedSecureStorageViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/crypto/quads/SharedSecureStorageViewModel.kt @@ -76,7 +76,7 @@ class SharedSecureStorageViewModel @AssistedInject constructor( @Assisted private val initialState: SharedSecureStorageViewState, private val stringProvider: StringProvider, private val session: Session) : - VectorViewModel(initialState) { + VectorViewModel(initialState) { @AssistedFactory interface Factory : MavericksAssistedViewModelFactory { @@ -88,7 +88,7 @@ class SharedSecureStorageViewModel @AssistedInject constructor( copy(userId = session.myUserId) } val integrityResult = session.sharedSecretStorageService.checkShouldBeAbleToAccessSecrets(initialState.requestedSecrets, initialState.keyId) - if (integrityResult !is IntegrityResult.Success) { + if (integrityResult !is IntegrityResult.Success) { _viewEvents.post( SharedSecureStorageViewEvent.Error( stringProvider.getString(R.string.enter_secret_storage_invalid), @@ -134,13 +134,13 @@ class SharedSecureStorageViewModel @AssistedInject constructor( override fun handle(action: SharedSecureStorageAction) = withState { when (action) { - is SharedSecureStorageAction.Cancel -> handleCancel() - is SharedSecureStorageAction.SubmitPassphrase -> handleSubmitPassphrase(action) - SharedSecureStorageAction.UseKey -> handleUseKey() - is SharedSecureStorageAction.SubmitKey -> handleSubmitKey(action) - SharedSecureStorageAction.Back -> handleBack() - SharedSecureStorageAction.ForgotResetAll -> handleResetAll() - SharedSecureStorageAction.DoResetAll -> handleDoResetAll() + is SharedSecureStorageAction.Cancel -> handleCancel() + is SharedSecureStorageAction.SubmitPassphrase -> handleSubmitPassphrase(action) + SharedSecureStorageAction.UseKey -> handleUseKey() + is SharedSecureStorageAction.SubmitKey -> handleSubmitKey(action) + SharedSecureStorageAction.Back -> handleBack() + SharedSecureStorageAction.ForgotResetAll -> handleResetAll() + SharedSecureStorageAction.DoResetAll -> handleDoResetAll() } } diff --git a/vector/src/main/java/im/vector/app/features/crypto/quads/SharedSecuredStorageResetAllFragment.kt b/vector/src/main/java/im/vector/app/features/crypto/quads/SharedSecuredStorageResetAllFragment.kt index 200b2b73c2..c0d0aa8e76 100644 --- a/vector/src/main/java/im/vector/app/features/crypto/quads/SharedSecuredStorageResetAllFragment.kt +++ b/vector/src/main/java/im/vector/app/features/crypto/quads/SharedSecuredStorageResetAllFragment.kt @@ -30,7 +30,7 @@ import im.vector.app.features.roommemberprofile.devices.DeviceListBottomSheet import javax.inject.Inject class SharedSecuredStorageResetAllFragment @Inject constructor() : - VectorBaseFragment() { + VectorBaseFragment() { override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentSsssResetAllBinding { return FragmentSsssResetAllBinding.inflate(inflater, container, false) diff --git a/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapActions.kt b/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapActions.kt index 363416b7de..395b4d0475 100644 --- a/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapActions.kt +++ b/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapActions.kt @@ -37,7 +37,7 @@ sealed class BootstrapActions : VectorViewModelAction { data class UpdateCandidatePassphrase(val pass: String) : BootstrapActions() data class UpdateConfirmCandidatePassphrase(val pass: String) : BootstrapActions() -// data class ReAuth(val pass: String) : BootstrapActions() + // data class ReAuth(val pass: String) : BootstrapActions() object RecoveryKeySaved : BootstrapActions() object Completed : BootstrapActions() object SaveReqQueryStarted : BootstrapActions() diff --git a/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapBottomSheet.kt b/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapBottomSheet.kt index ac7662ca59..57a8ad68b7 100644 --- a/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapBottomSheet.kt +++ b/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapBottomSheet.kt @@ -64,7 +64,7 @@ class BootstrapBottomSheet : VectorBaseBottomSheetDialogFragment if (activityResult.resultCode == Activity.RESULT_OK) { when (activityResult.data?.extras?.getString(ReAuthActivity.RESULT_FLOW_TYPE)) { - LoginFlowTypes.SSO -> { + LoginFlowTypes.SSO -> { viewModel.handle(BootstrapActions.SsoAuthDone) } LoginFlowTypes.PASSWORD -> { diff --git a/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapConfirmPassphraseFragment.kt b/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapConfirmPassphraseFragment.kt index 8a211388ed..7920ab3b96 100644 --- a/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapConfirmPassphraseFragment.kt +++ b/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapConfirmPassphraseFragment.kt @@ -37,7 +37,7 @@ import reactivecircus.flowbinding.android.widget.textChanges import javax.inject.Inject class BootstrapConfirmPassphraseFragment @Inject constructor() : - VectorBaseFragment() { + VectorBaseFragment() { override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentBootstrapEnterPassphraseBinding { return FragmentBootstrapEnterPassphraseBinding.inflate(inflater, container, false) diff --git a/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapEnterPassphraseFragment.kt b/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapEnterPassphraseFragment.kt index 51430ba12e..ff6d109b3c 100644 --- a/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapEnterPassphraseFragment.kt +++ b/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapEnterPassphraseFragment.kt @@ -36,7 +36,7 @@ import reactivecircus.flowbinding.android.widget.textChanges import javax.inject.Inject class BootstrapEnterPassphraseFragment @Inject constructor() : - VectorBaseFragment() { + VectorBaseFragment() { override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentBootstrapEnterPassphraseBinding { return FragmentBootstrapEnterPassphraseBinding.inflate(inflater, container, false) diff --git a/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapSetupRecoveryKeyFragment.kt b/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapSetupRecoveryKeyFragment.kt index 2765dfefd3..3be2f020b8 100644 --- a/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapSetupRecoveryKeyFragment.kt +++ b/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapSetupRecoveryKeyFragment.kt @@ -29,7 +29,7 @@ import im.vector.app.databinding.FragmentBootstrapSetupRecoveryBinding import javax.inject.Inject class BootstrapSetupRecoveryKeyFragment @Inject constructor() : - VectorBaseFragment() { + VectorBaseFragment() { override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentBootstrapSetupRecoveryBinding { return FragmentBootstrapSetupRecoveryBinding.inflate(inflater, container, false) diff --git a/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapWaitingFragment.kt b/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapWaitingFragment.kt index 8cf48a7c66..cc566833d8 100644 --- a/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapWaitingFragment.kt +++ b/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapWaitingFragment.kt @@ -26,7 +26,7 @@ import im.vector.app.databinding.FragmentBootstrapWaitingBinding import javax.inject.Inject class BootstrapWaitingFragment @Inject constructor() : - VectorBaseFragment() { + VectorBaseFragment() { override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentBootstrapWaitingBinding { return FragmentBootstrapWaitingBinding.inflate(inflater, container, false) diff --git a/vector/src/main/java/im/vector/app/features/crypto/verification/IncomingVerificationRequestHandler.kt b/vector/src/main/java/im/vector/app/features/crypto/verification/IncomingVerificationRequestHandler.kt index 3a3f1054f1..62affec7b5 100644 --- a/vector/src/main/java/im/vector/app/features/crypto/verification/IncomingVerificationRequestHandler.kt +++ b/vector/src/main/java/im/vector/app/features/crypto/verification/IncomingVerificationRequestHandler.kt @@ -61,7 +61,7 @@ class IncomingVerificationRequestHandler @Inject constructor( // TODO maybe check also if val uid = "kvr_${tx.transactionId}" when (tx.state) { - is VerificationTxState.OnStarted -> { + is VerificationTxState.OnStarted -> { // Add a notification for every incoming request val user = session?.getUser(tx.otherUserId) val name = user?.toMatrixItem()?.getBestName() ?: tx.otherUserId diff --git a/vector/src/main/java/im/vector/app/features/crypto/verification/conclusion/VerificationConclusionViewModel.kt b/vector/src/main/java/im/vector/app/features/crypto/verification/conclusion/VerificationConclusionViewModel.kt index 82bdbccdb3..0e56a6857b 100644 --- a/vector/src/main/java/im/vector/app/features/crypto/verification/conclusion/VerificationConclusionViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/crypto/verification/conclusion/VerificationConclusionViewModel.kt @@ -36,7 +36,7 @@ enum class ConclusionState { } class VerificationConclusionViewModel(initialState: VerificationConclusionViewState) : - VectorViewModel(initialState) { + VectorViewModel(initialState) { companion object : MavericksViewModelFactory { diff --git a/vector/src/main/java/im/vector/app/features/devtools/RoomDevToolEditFragment.kt b/vector/src/main/java/im/vector/app/features/devtools/RoomDevToolEditFragment.kt index dd0bd174af..1b6fbb7359 100644 --- a/vector/src/main/java/im/vector/app/features/devtools/RoomDevToolEditFragment.kt +++ b/vector/src/main/java/im/vector/app/features/devtools/RoomDevToolEditFragment.kt @@ -32,7 +32,7 @@ import reactivecircus.flowbinding.android.widget.textChanges import javax.inject.Inject class RoomDevToolEditFragment @Inject constructor() : - VectorBaseFragment() { + VectorBaseFragment() { private val sharedViewModel: RoomDevToolViewModel by activityViewModel() diff --git a/vector/src/main/java/im/vector/app/features/discovery/change/SetIdentityServerViewModel.kt b/vector/src/main/java/im/vector/app/features/discovery/change/SetIdentityServerViewModel.kt index da01ba5662..4249e8d899 100644 --- a/vector/src/main/java/im/vector/app/features/discovery/change/SetIdentityServerViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/discovery/change/SetIdentityServerViewModel.kt @@ -39,7 +39,7 @@ class SetIdentityServerViewModel @AssistedInject constructor( @Assisted initialState: SetIdentityServerState, private val mxSession: Session, stringProvider: StringProvider) : - VectorViewModel(initialState) { + VectorViewModel(initialState) { @AssistedFactory interface Factory : MavericksAssistedViewModelFactory { diff --git a/vector/src/main/java/im/vector/app/features/home/HomeActivity.kt b/vector/src/main/java/im/vector/app/features/home/HomeActivity.kt index 7a8dcf2634..d0ae7581be 100644 --- a/vector/src/main/java/im/vector/app/features/home/HomeActivity.kt +++ b/vector/src/main/java/im/vector/app/features/home/HomeActivity.kt @@ -370,7 +370,7 @@ class HomeActivity : } views.waitingView.root.isVisible = true } - else -> { + else -> { // Idle or Incremental sync status views.waitingView.root.isVisible = false } diff --git a/vector/src/main/java/im/vector/app/features/home/HomeActivityViewModel.kt b/vector/src/main/java/im/vector/app/features/home/HomeActivityViewModel.kt index c8b0fa024e..09ca30363c 100644 --- a/vector/src/main/java/im/vector/app/features/home/HomeActivityViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/home/HomeActivityViewModel.kt @@ -189,7 +189,7 @@ class HomeActivityViewModel @AssistedInject constructor( maybeBootstrapCrossSigningAfterInitialSync() } } - else -> Unit + else -> Unit } setState { diff --git a/vector/src/main/java/im/vector/app/features/home/UnknownDeviceDetectorSharedViewModel.kt b/vector/src/main/java/im/vector/app/features/home/UnknownDeviceDetectorSharedViewModel.kt index 08b528f25a..d2617bd1c8 100644 --- a/vector/src/main/java/im/vector/app/features/home/UnknownDeviceDetectorSharedViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/home/UnknownDeviceDetectorSharedViewModel.kt @@ -58,7 +58,7 @@ data class DeviceDetectionInfo( class UnknownDeviceDetectorSharedViewModel @AssistedInject constructor(@Assisted initialState: UnknownDevicesState, session: Session, private val vectorPreferences: VectorPreferences) : - VectorViewModel(initialState) { + VectorViewModel(initialState) { sealed class Action : VectorViewModelAction { data class IgnoreDevice(val deviceIds: List) : Action() diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/JoinReplacementRoomBottomSheet.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/JoinReplacementRoomBottomSheet.kt index 99843084ec..ce2903a6fa 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/JoinReplacementRoomBottomSheet.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/JoinReplacementRoomBottomSheet.kt @@ -62,15 +62,15 @@ class JoinReplacementRoomBottomSheet : when (joinState) { // it should never be Uninitialized Uninitialized, - is Loading -> { + is Loading -> { views.roomUpgradeButton.render(ButtonStateView.State.Loading) views.descriptionText.setText(R.string.it_may_take_some_time) } - is Success -> { + is Success -> { views.roomUpgradeButton.render(ButtonStateView.State.Loaded) dismiss() } - is Fail -> { + is Fail -> { // display the error message views.descriptionText.text = errorFormatter.toHumanReadable(joinState.error) views.roomUpgradeButton.render(ButtonStateView.State.Error) diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/readreceipts/DisplayReadReceiptsController.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/readreceipts/DisplayReadReceiptsController.kt index bf88218fa6..c316c556b0 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/readreceipts/DisplayReadReceiptsController.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/readreceipts/DisplayReadReceiptsController.kt @@ -31,7 +31,7 @@ import javax.inject.Inject class DisplayReadReceiptsController @Inject constructor(private val dateFormatter: VectorDateFormatter, private val session: Session, private val avatarRender: AvatarRenderer) : - TypedEpoxyController>() { + TypedEpoxyController>() { var listener: Listener? = null diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/TimelineEventController.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/TimelineEventController.kt index 981e5740d7..8cea57399a 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/TimelineEventController.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/TimelineEventController.kt @@ -132,6 +132,7 @@ class TimelineEventController @Inject constructor(private val dateFormatter: Vec mediaData: ImageContentRenderer.Data, view: View, inMemory: List) + fun onVideoMessageClicked(messageVideoContent: MessageVideoContent, mediaData: VideoContentRenderer.Data, view: View) // fun onFileMessageClicked(eventId: String, messageFileContent: MessageFileContent) diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/edithistory/ViewEditHistoryViewState.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/edithistory/ViewEditHistoryViewState.kt index 61a400d875..dd344c4c82 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/edithistory/ViewEditHistoryViewState.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/edithistory/ViewEditHistoryViewState.kt @@ -27,7 +27,7 @@ data class ViewEditHistoryViewState( val roomId: String, val isOriginalAReply: Boolean = false, val editList: Async> = Uninitialized) : - MavericksState { + MavericksState { constructor(args: TimelineEventFragmentArgs) : this(roomId = args.roomId, eventId = args.eventId) } diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/MessageItemFactory.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/MessageItemFactory.kt index 1787da2ae7..04e087d25d 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/MessageItemFactory.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/MessageItemFactory.kt @@ -122,31 +122,31 @@ import org.matrix.android.sdk.api.util.MimeTypes import javax.inject.Inject class MessageItemFactory @Inject constructor( - private val localFilesHelper: LocalFilesHelper, - private val colorProvider: ColorProvider, - private val dimensionConverter: DimensionConverter, - private val timelineMediaSizeProvider: TimelineMediaSizeProvider, - private val htmlRenderer: Lazy, - private val htmlCompressor: VectorHtmlCompressor, - private val textRendererFactory: EventTextRenderer.Factory, - private val stringProvider: StringProvider, - private val imageContentRenderer: ImageContentRenderer, - private val messageInformationDataFactory: MessageInformationDataFactory, - private val messageItemAttributesFactory: MessageItemAttributesFactory, - private val contentUploadStateTrackerBinder: ContentUploadStateTrackerBinder, - private val contentDownloadStateTrackerBinder: ContentDownloadStateTrackerBinder, - private val defaultItemFactory: DefaultItemFactory, - private val noticeItemFactory: NoticeItemFactory, - private val avatarSizeProvider: AvatarSizeProvider, - private val pillsPostProcessorFactory: PillsPostProcessor.Factory, - private val lightweightSettingsStorage: LightweightSettingsStorage, - private val spanUtils: SpanUtils, - private val session: Session, - private val audioMessagePlaybackTracker: AudioMessagePlaybackTracker, - private val locationPinProvider: LocationPinProvider, - private val vectorPreferences: VectorPreferences, - private val urlMapProvider: UrlMapProvider, - private val liveLocationMessageItemFactory: LiveLocationMessageItemFactory, + private val localFilesHelper: LocalFilesHelper, + private val colorProvider: ColorProvider, + private val dimensionConverter: DimensionConverter, + private val timelineMediaSizeProvider: TimelineMediaSizeProvider, + private val htmlRenderer: Lazy, + private val htmlCompressor: VectorHtmlCompressor, + private val textRendererFactory: EventTextRenderer.Factory, + private val stringProvider: StringProvider, + private val imageContentRenderer: ImageContentRenderer, + private val messageInformationDataFactory: MessageInformationDataFactory, + private val messageItemAttributesFactory: MessageItemAttributesFactory, + private val contentUploadStateTrackerBinder: ContentUploadStateTrackerBinder, + private val contentDownloadStateTrackerBinder: ContentDownloadStateTrackerBinder, + private val defaultItemFactory: DefaultItemFactory, + private val noticeItemFactory: NoticeItemFactory, + private val avatarSizeProvider: AvatarSizeProvider, + private val pillsPostProcessorFactory: PillsPostProcessor.Factory, + private val lightweightSettingsStorage: LightweightSettingsStorage, + private val spanUtils: SpanUtils, + private val session: Session, + private val audioMessagePlaybackTracker: AudioMessagePlaybackTracker, + private val locationPinProvider: LocationPinProvider, + private val vectorPreferences: VectorPreferences, + private val urlMapProvider: UrlMapProvider, + private val liveLocationMessageItemFactory: LiveLocationMessageItemFactory, ) { // TODO inject this properly? @@ -181,7 +181,7 @@ class MessageItemFactory @Inject constructor( return defaultItemFactory.create(malformedText, informationData, highlight, callback) } if (messageContent.relatesTo?.type == RelationType.REPLACE || - event.isEncrypted() && event.root.content.toModel()?.relatesTo?.type == RelationType.REPLACE + event.isEncrypted() && event.root.content.toModel()?.relatesTo?.type == RelationType.REPLACE ) { // This is an edit event, we should display it when debugging as a notice event return noticeItemFactory.create(params) @@ -198,24 +198,24 @@ class MessageItemFactory @Inject constructor( // val all = event.root.toContent() // val ev = all.toModel() val messageItem = when (messageContent) { - is MessageEmoteContent -> buildEmoteMessageItem(messageContent, informationData, highlight, callback, attributes) - is MessageTextContent -> buildItemForTextContent(messageContent, informationData, highlight, callback, attributes) - is MessageImageInfoContent -> buildImageMessageItem(messageContent, informationData, highlight, callback, attributes) - is MessageNoticeContent -> buildNoticeMessageItem(messageContent, informationData, highlight, callback, attributes) - is MessageVideoContent -> buildVideoMessageItem(messageContent, informationData, highlight, callback, attributes) - is MessageFileContent -> buildFileMessageItem(messageContent, highlight, attributes) - is MessageAudioContent -> buildAudioContent(params, messageContent, informationData, highlight, attributes) + is MessageEmoteContent -> buildEmoteMessageItem(messageContent, informationData, highlight, callback, attributes) + is MessageTextContent -> buildItemForTextContent(messageContent, informationData, highlight, callback, attributes) + is MessageImageInfoContent -> buildImageMessageItem(messageContent, informationData, highlight, callback, attributes) + is MessageNoticeContent -> buildNoticeMessageItem(messageContent, informationData, highlight, callback, attributes) + is MessageVideoContent -> buildVideoMessageItem(messageContent, informationData, highlight, callback, attributes) + is MessageFileContent -> buildFileMessageItem(messageContent, highlight, attributes) + is MessageAudioContent -> buildAudioContent(params, messageContent, informationData, highlight, attributes) is MessageVerificationRequestContent -> buildVerificationRequestMessageItem(messageContent, informationData, highlight, callback, attributes) - is MessagePollContent -> buildPollItem(messageContent, informationData, highlight, callback, attributes) - is MessageLocationContent -> { + is MessagePollContent -> buildPollItem(messageContent, informationData, highlight, callback, attributes) + is MessageLocationContent -> { if (vectorPreferences.labsRenderLocationsInTimeline()) { buildLocationItem(messageContent, informationData, highlight, attributes) } else { buildMessageTextItem(messageContent.body, false, informationData, highlight, callback, attributes) } } - is LiveLocationBeaconContent -> liveLocationMessageItemFactory.create(messageContent, highlight, attributes) - else -> buildNotHandledMessageItem(messageContent, informationData, highlight, callback, attributes) + is LiveLocationBeaconContent -> liveLocationMessageItemFactory.create(messageContent, highlight, attributes) + else -> buildNotHandledMessageItem(messageContent, informationData, highlight, callback, attributes) } return messageItem?.apply { layout(informationData.messageLayout.layoutRes) @@ -223,10 +223,10 @@ class MessageItemFactory @Inject constructor( } private fun buildLocationItem( - locationContent: MessageLocationContent, - informationData: MessageInformationData, - highlight: Boolean, - attributes: AbsMessageItem.Attributes, + locationContent: MessageLocationContent, + informationData: MessageInformationData, + highlight: Boolean, + attributes: AbsMessageItem.Attributes, ): MessageLocationItem? { val width = timelineMediaSizeProvider.getMaxSize().first val height = dimensionConverter.dpToPx(MESSAGE_LOCATION_ITEM_HEIGHT_IN_DP) @@ -238,22 +238,22 @@ class MessageItemFactory @Inject constructor( val userId = if (locationContent.isSelfLocation()) informationData.senderId else null return MessageLocationItem_() - .attributes(attributes) - .locationUrl(locationUrl) - .mapWidth(width) - .mapHeight(height) - .userId(userId) - .locationPinProvider(locationPinProvider) - .highlighted(highlight) - .leftGuideline(avatarSizeProvider.leftGuideline) + .attributes(attributes) + .locationUrl(locationUrl) + .mapWidth(width) + .mapHeight(height) + .userId(userId) + .locationPinProvider(locationPinProvider) + .highlighted(highlight) + .leftGuideline(avatarSizeProvider.leftGuideline) } private fun buildPollItem( - pollContent: MessagePollContent, - informationData: MessageInformationData, - highlight: Boolean, - callback: TimelineEventController.Callback?, - attributes: AbsMessageItem.Attributes, + pollContent: MessagePollContent, + informationData: MessageInformationData, + highlight: Boolean, + callback: TimelineEventController.Callback?, + attributes: AbsMessageItem.Attributes, ): PollItem { val pollResponseSummary = informationData.pollResponseAggregatedSummary val pollState = createPollState(informationData, pollResponseSummary, pollContent) @@ -264,16 +264,16 @@ class MessageItemFactory @Inject constructor( val totalVotesText = createTotalVotesText(pollState, pollResponseSummary) return PollItem_() - .attributes(attributes) - .eventId(informationData.eventId) - .pollQuestion(question) - .canVote(pollState.isVotable()) - .totalVotesText(totalVotesText) - .optionViewStates(optionViewStates) - .edited(informationData.hasBeenEdited) - .highlighted(highlight) - .leftGuideline(avatarSizeProvider.leftGuideline) - .callback(callback) + .attributes(attributes) + .eventId(informationData.eventId) + .pollQuestion(question) + .canVote(pollState.isVotable()) + .totalVotesText(totalVotesText) + .optionViewStates(optionViewStates) + .edited(informationData.hasBeenEdited) + .highlighted(highlight) + .leftGuideline(avatarSizeProvider.leftGuideline) + .callback(callback) } private fun createPollState( @@ -281,11 +281,11 @@ class MessageItemFactory @Inject constructor( pollResponseSummary: PollResponseData?, pollContent: MessagePollContent, ): PollState = when { - !informationData.sendState.isSent() -> Sending - pollResponseSummary?.isClosed.orFalse() -> Ended + !informationData.sendState.isSent() -> Sending + pollResponseSummary?.isClosed.orFalse() -> Ended pollContent.getBestPollCreationInfo()?.kind == PollType.UNDISCLOSED -> Undisclosed - pollResponseSummary?.myVote?.isNotEmpty().orFalse() -> Voted(pollResponseSummary?.totalVotes ?: 0) - else -> Ready + pollResponseSummary?.myVote?.isNotEmpty().orFalse() -> Voted(pollResponseSummary?.totalVotes ?: 0) + else -> Ready } private fun List.mapToOptions( @@ -303,11 +303,11 @@ class MessageItemFactory @Inject constructor( val isWinner = winnerVoteCount != 0 && voteCount == winnerVoteCount when (pollState) { - Sending -> PollSending(optionId, optionAnswer) - Ready -> PollReady(optionId, optionAnswer) - is Voted -> PollVoted(optionId, optionAnswer, voteCount, votePercentage, isMyVote) + Sending -> PollSending(optionId, optionAnswer) + Ready -> PollReady(optionId, optionAnswer) + is Voted -> PollVoted(optionId, optionAnswer, voteCount, votePercentage, isMyVote) Undisclosed -> PollUndisclosed(optionId, optionAnswer, isMyVote) - Ended -> PollEnded(optionId, optionAnswer, voteCount, votePercentage, isWinner) + Ended -> PollEnded(optionId, optionAnswer, voteCount, votePercentage, isWinner) } } @@ -327,11 +327,11 @@ class MessageItemFactory @Inject constructor( ): String { val votes = pollResponseSummary?.totalVotes ?: 0 return when { - pollState is Ended -> stringProvider.getQuantityString(R.plurals.poll_total_vote_count_after_ended, votes, votes) + pollState is Ended -> stringProvider.getQuantityString(R.plurals.poll_total_vote_count_after_ended, votes, votes) pollState is Undisclosed -> "" - pollState is Voted -> stringProvider.getQuantityString(R.plurals.poll_total_vote_count_before_ended_and_voted, votes, votes) - votes == 0 -> stringProvider.getString(R.string.poll_no_votes_cast) - else -> stringProvider.getQuantityString(R.plurals.poll_total_vote_count_before_ended_and_not_voted, votes, votes) + pollState is Voted -> stringProvider.getQuantityString(R.plurals.poll_total_vote_count_before_ended_and_voted, votes, votes) + votes == 0 -> stringProvider.getString(R.string.poll_no_votes_cast) + else -> stringProvider.getQuantityString(R.plurals.poll_total_vote_count_before_ended_and_not_voted, votes, votes) } } @@ -406,27 +406,27 @@ class MessageItemFactory @Inject constructor( } return MessageVoiceItem_() - .attributes(attributes) - .duration(messageContent.audioWaveformInfo?.duration ?: 0) - .waveform(messageContent.audioWaveformInfo?.waveform?.toFft().orEmpty()) - .playbackControlButtonClickListener(playbackControlButtonClickListener) - .waveformTouchListener(waveformTouchListener) - .audioMessagePlaybackTracker(audioMessagePlaybackTracker) - .isLocalFile(localFilesHelper.isLocalFile(fileUrl)) - .mxcUrl(fileUrl) - .contentUploadStateTrackerBinder(contentUploadStateTrackerBinder) - .contentDownloadStateTrackerBinder(contentDownloadStateTrackerBinder) - .highlighted(highlight) - .leftGuideline(avatarSizeProvider.leftGuideline) + .attributes(attributes) + .duration(messageContent.audioWaveformInfo?.duration ?: 0) + .waveform(messageContent.audioWaveformInfo?.waveform?.toFft().orEmpty()) + .playbackControlButtonClickListener(playbackControlButtonClickListener) + .waveformTouchListener(waveformTouchListener) + .audioMessagePlaybackTracker(audioMessagePlaybackTracker) + .isLocalFile(localFilesHelper.isLocalFile(fileUrl)) + .mxcUrl(fileUrl) + .contentUploadStateTrackerBinder(contentUploadStateTrackerBinder) + .contentDownloadStateTrackerBinder(contentDownloadStateTrackerBinder) + .highlighted(highlight) + .leftGuideline(avatarSizeProvider.leftGuideline) } private fun buildVerificationRequestMessageItem( - messageContent: MessageVerificationRequestContent, - @Suppress("UNUSED_PARAMETER") - informationData: MessageInformationData, - highlight: Boolean, - callback: TimelineEventController.Callback?, - attributes: AbsMessageItem.Attributes, + messageContent: MessageVerificationRequestContent, + @Suppress("UNUSED_PARAMETER") + informationData: MessageInformationData, + highlight: Boolean, + callback: TimelineEventController.Callback?, + attributes: AbsMessageItem.Attributes, ): VerificationRequestItem? { // If this request is not sent by me or sent to me, we should ignore it in timeline val myUserId = session.myUserId @@ -441,44 +441,44 @@ class MessageItemFactory @Inject constructor( informationData.memberName } return VerificationRequestItem_() - .attributes( - VerificationRequestItem.Attributes( - otherUserId = otherUserId, - otherUserName = otherUserName.toString(), - referenceId = informationData.eventId, - informationData = informationData, - avatarRenderer = attributes.avatarRenderer, - messageColorProvider = attributes.messageColorProvider, - itemLongClickListener = attributes.itemLongClickListener, - itemClickListener = attributes.itemClickListener, - reactionPillCallback = attributes.reactionPillCallback, - readReceiptsCallback = attributes.readReceiptsCallback, - emojiTypeFace = attributes.emojiTypeFace, - reactionsSummaryEvents = attributes.reactionsSummaryEvents, + .attributes( + VerificationRequestItem.Attributes( + otherUserId = otherUserId, + otherUserName = otherUserName.toString(), + referenceId = informationData.eventId, + informationData = informationData, + avatarRenderer = attributes.avatarRenderer, + messageColorProvider = attributes.messageColorProvider, + itemLongClickListener = attributes.itemLongClickListener, + itemClickListener = attributes.itemClickListener, + reactionPillCallback = attributes.reactionPillCallback, + readReceiptsCallback = attributes.readReceiptsCallback, + emojiTypeFace = attributes.emojiTypeFace, + reactionsSummaryEvents = attributes.reactionsSummaryEvents, + ) ) - ) - .callback(callback) - .highlighted(highlight) - .leftGuideline(avatarSizeProvider.leftGuideline) + .callback(callback) + .highlighted(highlight) + .leftGuideline(avatarSizeProvider.leftGuideline) } private fun buildFileMessageItem( - messageContent: MessageFileContent, - highlight: Boolean, - attributes: AbsMessageItem.Attributes, + messageContent: MessageFileContent, + highlight: Boolean, + attributes: AbsMessageItem.Attributes, ): MessageFileItem { val mxcUrl = messageContent.getFileUrl() ?: "" return MessageFileItem_() - .attributes(attributes) - .leftGuideline(avatarSizeProvider.leftGuideline) - .isLocalFile(localFilesHelper.isLocalFile(messageContent.getFileUrl())) - .isDownloaded(session.fileService().isFileInCache(messageContent)) - .mxcUrl(mxcUrl) - .contentUploadStateTrackerBinder(contentUploadStateTrackerBinder) - .contentDownloadStateTrackerBinder(contentDownloadStateTrackerBinder) - .highlighted(highlight) - .filename(messageContent.body) - .iconRes(R.drawable.ic_paperclip) + .attributes(attributes) + .leftGuideline(avatarSizeProvider.leftGuideline) + .isLocalFile(localFilesHelper.isLocalFile(messageContent.getFileUrl())) + .isDownloaded(session.fileService().isFileInCache(messageContent)) + .mxcUrl(mxcUrl) + .contentUploadStateTrackerBinder(contentUploadStateTrackerBinder) + .contentDownloadStateTrackerBinder(contentDownloadStateTrackerBinder) + .highlighted(highlight) + .filename(messageContent.body) + .iconRes(R.drawable.ic_paperclip) } private fun buildAudioContent( @@ -488,10 +488,10 @@ class MessageItemFactory @Inject constructor( highlight: Boolean, attributes: AbsMessageItem.Attributes, ) = if (messageContent.voiceMessageIndicator != null) { - buildVoiceMessageItem(params, messageContent, informationData, highlight, attributes) - } else { - buildAudioMessageItem(params, messageContent, informationData, highlight, attributes) - } + buildVoiceMessageItem(params, messageContent, informationData, highlight, attributes) + } else { + buildAudioMessageItem(params, messageContent, informationData, highlight, attributes) + } private fun buildNotHandledMessageItem( messageContent: MessageContent, @@ -504,95 +504,95 @@ class MessageItemFactory @Inject constructor( } private fun buildImageMessageItem( - messageContent: MessageImageInfoContent, - @Suppress("UNUSED_PARAMETER") - informationData: MessageInformationData, - highlight: Boolean, - callback: TimelineEventController.Callback?, - attributes: AbsMessageItem.Attributes, + messageContent: MessageImageInfoContent, + @Suppress("UNUSED_PARAMETER") + informationData: MessageInformationData, + highlight: Boolean, + callback: TimelineEventController.Callback?, + attributes: AbsMessageItem.Attributes, ): MessageImageVideoItem? { val (maxWidth, maxHeight) = timelineMediaSizeProvider.getMaxSize() val data = ImageContentRenderer.Data( - eventId = informationData.eventId, - filename = messageContent.body, - mimeType = messageContent.mimeType, - url = messageContent.getFileUrl(), - elementToDecrypt = messageContent.encryptedFileInfo?.toElementToDecrypt(), - height = messageContent.info?.height, - maxHeight = maxHeight, - width = messageContent.info?.width, - maxWidth = maxWidth, - allowNonMxcUrls = informationData.sendState.isSending() + eventId = informationData.eventId, + filename = messageContent.body, + mimeType = messageContent.mimeType, + url = messageContent.getFileUrl(), + elementToDecrypt = messageContent.encryptedFileInfo?.toElementToDecrypt(), + height = messageContent.info?.height, + maxHeight = maxHeight, + width = messageContent.info?.width, + maxWidth = maxWidth, + allowNonMxcUrls = informationData.sendState.isSending() ) return MessageImageVideoItem_() - .attributes(attributes) - .leftGuideline(avatarSizeProvider.leftGuideline) - .imageContentRenderer(imageContentRenderer) - .contentUploadStateTrackerBinder(contentUploadStateTrackerBinder) - .playable(messageContent.mimeType == MimeTypes.Gif) - .highlighted(highlight) - .mediaData(data) - .apply { - if (messageContent.msgType == MessageType.MSGTYPE_STICKER_LOCAL) { - mode(ImageContentRenderer.Mode.STICKER) - clickListener { view -> - callback?.onImageMessageClicked(messageContent, data, view, listOf(data)) - } - } else { - clickListener { view -> - callback?.onImageMessageClicked(messageContent, data, view, emptyList()) + .attributes(attributes) + .leftGuideline(avatarSizeProvider.leftGuideline) + .imageContentRenderer(imageContentRenderer) + .contentUploadStateTrackerBinder(contentUploadStateTrackerBinder) + .playable(messageContent.mimeType == MimeTypes.Gif) + .highlighted(highlight) + .mediaData(data) + .apply { + if (messageContent.msgType == MessageType.MSGTYPE_STICKER_LOCAL) { + mode(ImageContentRenderer.Mode.STICKER) + clickListener { view -> + callback?.onImageMessageClicked(messageContent, data, view, listOf(data)) + } + } else { + clickListener { view -> + callback?.onImageMessageClicked(messageContent, data, view, emptyList()) + } } } - } } private fun buildVideoMessageItem( - messageContent: MessageVideoContent, - informationData: MessageInformationData, - highlight: Boolean, - callback: TimelineEventController.Callback?, - attributes: AbsMessageItem.Attributes, + messageContent: MessageVideoContent, + informationData: MessageInformationData, + highlight: Boolean, + callback: TimelineEventController.Callback?, + attributes: AbsMessageItem.Attributes, ): MessageImageVideoItem? { val (maxWidth, maxHeight) = timelineMediaSizeProvider.getMaxSize() val thumbnailData = ImageContentRenderer.Data( - eventId = informationData.eventId, - filename = messageContent.body, - mimeType = messageContent.mimeType, - url = messageContent.videoInfo?.getThumbnailUrl(), - elementToDecrypt = messageContent.videoInfo?.thumbnailFile?.toElementToDecrypt(), - height = messageContent.videoInfo?.height, - maxHeight = maxHeight, - width = messageContent.videoInfo?.width, - maxWidth = maxWidth, - allowNonMxcUrls = informationData.sendState.isSending() + eventId = informationData.eventId, + filename = messageContent.body, + mimeType = messageContent.mimeType, + url = messageContent.videoInfo?.getThumbnailUrl(), + elementToDecrypt = messageContent.videoInfo?.thumbnailFile?.toElementToDecrypt(), + height = messageContent.videoInfo?.height, + maxHeight = maxHeight, + width = messageContent.videoInfo?.width, + maxWidth = maxWidth, + allowNonMxcUrls = informationData.sendState.isSending() ) val videoData = VideoContentRenderer.Data( - eventId = informationData.eventId, - filename = messageContent.body, - mimeType = messageContent.mimeType, - url = messageContent.getFileUrl(), - elementToDecrypt = messageContent.encryptedFileInfo?.toElementToDecrypt(), - thumbnailMediaData = thumbnailData + eventId = informationData.eventId, + filename = messageContent.body, + mimeType = messageContent.mimeType, + url = messageContent.getFileUrl(), + elementToDecrypt = messageContent.encryptedFileInfo?.toElementToDecrypt(), + thumbnailMediaData = thumbnailData ) return MessageImageVideoItem_() - .leftGuideline(avatarSizeProvider.leftGuideline) - .attributes(attributes) - .imageContentRenderer(imageContentRenderer) - .contentUploadStateTrackerBinder(contentUploadStateTrackerBinder) - .playable(true) - .highlighted(highlight) - .mediaData(thumbnailData) - .clickListener { view -> callback?.onVideoMessageClicked(messageContent, videoData, view.findViewById(R.id.messageThumbnailView)) } + .leftGuideline(avatarSizeProvider.leftGuideline) + .attributes(attributes) + .imageContentRenderer(imageContentRenderer) + .contentUploadStateTrackerBinder(contentUploadStateTrackerBinder) + .playable(true) + .highlighted(highlight) + .mediaData(thumbnailData) + .clickListener { view -> callback?.onVideoMessageClicked(messageContent, videoData, view.findViewById(R.id.messageThumbnailView)) } } private fun buildItemForTextContent( - messageContent: MessageTextContent, - informationData: MessageInformationData, - highlight: Boolean, - callback: TimelineEventController.Callback?, - attributes: AbsMessageItem.Attributes, + messageContent: MessageTextContent, + informationData: MessageInformationData, + highlight: Boolean, + callback: TimelineEventController.Callback?, + attributes: AbsMessageItem.Attributes, ): VectorEpoxyModel<*>? { val matrixFormattedBody = messageContent.matrixFormattedBody return if (matrixFormattedBody != null) { @@ -603,11 +603,11 @@ class MessageItemFactory @Inject constructor( } private fun buildFormattedTextItem( - matrixFormattedBody: String, - informationData: MessageInformationData, - highlight: Boolean, - callback: TimelineEventController.Callback?, - attributes: AbsMessageItem.Attributes, + matrixFormattedBody: String, + informationData: MessageInformationData, + highlight: Boolean, + callback: TimelineEventController.Callback?, + attributes: AbsMessageItem.Attributes, ): MessageTextItem? { val compressed = htmlCompressor.compress(matrixFormattedBody) val renderedFormattedBody = htmlRenderer.get().render(compressed, pillsPostProcessor) as Spanned @@ -615,42 +615,42 @@ class MessageItemFactory @Inject constructor( } private fun buildMessageTextItem( - body: CharSequence, - isFormatted: Boolean, - informationData: MessageInformationData, - highlight: Boolean, - callback: TimelineEventController.Callback?, - attributes: AbsMessageItem.Attributes, + body: CharSequence, + isFormatted: Boolean, + informationData: MessageInformationData, + highlight: Boolean, + callback: TimelineEventController.Callback?, + attributes: AbsMessageItem.Attributes, ): MessageTextItem? { val renderedBody = textRenderer.render(body) val bindingOptions = spanUtils.getBindingOptions(renderedBody) val linkifiedBody = renderedBody.linkify(callback) return MessageTextItem_() - .message( - if (informationData.hasBeenEdited) { - annotateWithEdited(linkifiedBody, callback, informationData) - } else { - linkifiedBody - }.toEpoxyCharSequence() - ) - .useBigFont(linkifiedBody.length <= MAX_NUMBER_OF_EMOJI_FOR_BIG_FONT * 2 && containsOnlyEmojis(linkifiedBody.toString())) - .bindingOptions(bindingOptions) - .markwonPlugins(htmlRenderer.get().plugins) - .searchForPills(isFormatted) - .previewUrlRetriever(callback?.getPreviewUrlRetriever()) - .imageContentRenderer(imageContentRenderer) - .previewUrlCallback(callback) - .leftGuideline(avatarSizeProvider.leftGuideline) - .attributes(attributes) - .highlighted(highlight) - .movementMethod(createLinkMovementMethod(callback)) + .message( + if (informationData.hasBeenEdited) { + annotateWithEdited(linkifiedBody, callback, informationData) + } else { + linkifiedBody + }.toEpoxyCharSequence() + ) + .useBigFont(linkifiedBody.length <= MAX_NUMBER_OF_EMOJI_FOR_BIG_FONT * 2 && containsOnlyEmojis(linkifiedBody.toString())) + .bindingOptions(bindingOptions) + .markwonPlugins(htmlRenderer.get().plugins) + .searchForPills(isFormatted) + .previewUrlRetriever(callback?.getPreviewUrlRetriever()) + .imageContentRenderer(imageContentRenderer) + .previewUrlCallback(callback) + .leftGuideline(avatarSizeProvider.leftGuideline) + .attributes(attributes) + .highlighted(highlight) + .movementMethod(createLinkMovementMethod(callback)) } private fun annotateWithEdited( - linkifiedBody: CharSequence, - callback: TimelineEventController.Callback?, - informationData: MessageInformationData, + linkifiedBody: CharSequence, + callback: TimelineEventController.Callback?, + informationData: MessageInformationData, ): Spannable { val spannable = SpannableStringBuilder() spannable.append(linkifiedBody) @@ -660,17 +660,17 @@ class MessageItemFactory @Inject constructor( val editStart = spannable.lastIndexOf(editedSuffix) val editEnd = editStart + editedSuffix.length spannable.setSpan( - ForegroundColorSpan(color), - editStart, - editEnd, - Spanned.SPAN_INCLUSIVE_EXCLUSIVE) + ForegroundColorSpan(color), + editStart, + editEnd, + Spanned.SPAN_INCLUSIVE_EXCLUSIVE) // Note: text size is set to 14sp spannable.setSpan( - AbsoluteSizeSpan(dimensionConverter.spToPx(13)), - editStart, - editEnd, - Spanned.SPAN_INCLUSIVE_EXCLUSIVE) + AbsoluteSizeSpan(dimensionConverter.spToPx(13)), + editStart, + editEnd, + Spanned.SPAN_INCLUSIVE_EXCLUSIVE) spannable.setSpan(object : ClickableSpan() { override fun onClick(widget: View) { @@ -681,19 +681,19 @@ class MessageItemFactory @Inject constructor( // nop } }, - editStart, - editEnd, - Spanned.SPAN_INCLUSIVE_EXCLUSIVE) + editStart, + editEnd, + Spanned.SPAN_INCLUSIVE_EXCLUSIVE) return spannable } private fun buildNoticeMessageItem( - messageContent: MessageNoticeContent, - @Suppress("UNUSED_PARAMETER") - informationData: MessageInformationData, - highlight: Boolean, - callback: TimelineEventController.Callback?, - attributes: AbsMessageItem.Attributes, + messageContent: MessageNoticeContent, + @Suppress("UNUSED_PARAMETER") + informationData: MessageInformationData, + highlight: Boolean, + callback: TimelineEventController.Callback?, + attributes: AbsMessageItem.Attributes, ): MessageTextItem? { val htmlBody = messageContent.getHtmlBody() val formattedBody = span { @@ -706,23 +706,23 @@ class MessageItemFactory @Inject constructor( val message = formattedBody.linkify(callback) return MessageTextItem_() - .leftGuideline(avatarSizeProvider.leftGuideline) - .previewUrlRetriever(callback?.getPreviewUrlRetriever()) - .imageContentRenderer(imageContentRenderer) - .previewUrlCallback(callback) - .attributes(attributes) - .message(message.toEpoxyCharSequence()) - .bindingOptions(bindingOptions) - .highlighted(highlight) - .movementMethod(createLinkMovementMethod(callback)) + .leftGuideline(avatarSizeProvider.leftGuideline) + .previewUrlRetriever(callback?.getPreviewUrlRetriever()) + .imageContentRenderer(imageContentRenderer) + .previewUrlCallback(callback) + .attributes(attributes) + .message(message.toEpoxyCharSequence()) + .bindingOptions(bindingOptions) + .highlighted(highlight) + .movementMethod(createLinkMovementMethod(callback)) } private fun buildEmoteMessageItem( - messageContent: MessageEmoteContent, - informationData: MessageInformationData, - highlight: Boolean, - callback: TimelineEventController.Callback?, - attributes: AbsMessageItem.Attributes, + messageContent: MessageEmoteContent, + informationData: MessageInformationData, + highlight: Boolean, + callback: TimelineEventController.Callback?, + attributes: AbsMessageItem.Attributes, ): MessageTextItem? { val formattedBody = SpannableStringBuilder() formattedBody.append("* ${informationData.memberName} ") @@ -731,48 +731,48 @@ class MessageItemFactory @Inject constructor( val message = formattedBody.linkify(callback) return MessageTextItem_() - .message( - if (informationData.hasBeenEdited) { - annotateWithEdited(message, callback, informationData) - } else { - message - }.toEpoxyCharSequence() - ) - .bindingOptions(bindingOptions) - .leftGuideline(avatarSizeProvider.leftGuideline) - .previewUrlRetriever(callback?.getPreviewUrlRetriever()) - .imageContentRenderer(imageContentRenderer) - .previewUrlCallback(callback) - .attributes(attributes) - .highlighted(highlight) - .movementMethod(createLinkMovementMethod(callback)) + .message( + if (informationData.hasBeenEdited) { + annotateWithEdited(message, callback, informationData) + } else { + message + }.toEpoxyCharSequence() + ) + .bindingOptions(bindingOptions) + .leftGuideline(avatarSizeProvider.leftGuideline) + .previewUrlRetriever(callback?.getPreviewUrlRetriever()) + .imageContentRenderer(imageContentRenderer) + .previewUrlCallback(callback) + .attributes(attributes) + .highlighted(highlight) + .movementMethod(createLinkMovementMethod(callback)) } private fun MessageContentWithFormattedBody.getHtmlBody(): CharSequence { return matrixFormattedBody - ?.let { htmlCompressor.compress(it) } - ?.let { htmlRenderer.get().render(it, pillsPostProcessor) } + ?.let { htmlCompressor.compress(it) } + ?.let { htmlRenderer.get().render(it, pillsPostProcessor) } ?: body } private fun buildRedactedItem( - attributes: AbsMessageItem.Attributes, - highlight: Boolean, + attributes: AbsMessageItem.Attributes, + highlight: Boolean, ): RedactedMessageItem? { return RedactedMessageItem_() - .layout(attributes.informationData.messageLayout.layoutRes) - .leftGuideline(avatarSizeProvider.leftGuideline) - .attributes(attributes) - .highlighted(highlight) + .layout(attributes.informationData.messageLayout.layoutRes) + .leftGuideline(avatarSizeProvider.leftGuideline) + .attributes(attributes) + .highlighted(highlight) } private fun List?.toFft(): List? { return this - ?.filterNotNull() - ?.map { - // Value comes from AudioWaveformView.MAX_FFT, and 1024 is the max value in the Matrix spec - it * AudioWaveformView.MAX_FFT / 1024 - } + ?.filterNotNull() + ?.map { + // Value comes from AudioWaveformView.MAX_FFT, and 1024 is the max value in the Matrix spec + it * AudioWaveformView.MAX_FFT / 1024 + } } companion object { diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/helper/TimelineVisibilityStateChangedListeners.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/helper/TimelineVisibilityStateChangedListeners.kt index 2337a6ea15..95feef83c0 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/helper/TimelineVisibilityStateChangedListeners.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/helper/TimelineVisibilityStateChangedListeners.kt @@ -22,7 +22,7 @@ import im.vector.app.features.home.room.detail.timeline.TimelineEventController import org.matrix.android.sdk.api.session.room.timeline.TimelineEvent class ReadMarkerVisibilityStateChangedListener(private val callback: TimelineEventController.Callback?) : - VectorEpoxyModel.OnVisibilityStateChangedListener { + VectorEpoxyModel.OnVisibilityStateChangedListener { override fun onVisibilityStateChanged(visibilityState: Int) { if (visibilityState == VisibilityState.VISIBLE) { @@ -33,7 +33,7 @@ class ReadMarkerVisibilityStateChangedListener(private val callback: TimelineEve class TimelineEventVisibilityStateChangedListener(private val callback: TimelineEventController.Callback?, private val event: TimelineEvent) : - VectorEpoxyModel.OnVisibilityStateChangedListener { + VectorEpoxyModel.OnVisibilityStateChangedListener { override fun onVisibilityStateChanged(visibilityState: Int) { if (visibilityState == VisibilityState.VISIBLE) { @@ -46,7 +46,7 @@ class TimelineEventVisibilityStateChangedListener(private val callback: Timeline class MergedTimelineEventVisibilityStateChangedListener(private val callback: TimelineEventController.Callback?, private val events: List) : - VectorEpoxyModel.OnVisibilityStateChangedListener { + VectorEpoxyModel.OnVisibilityStateChangedListener { override fun onVisibilityStateChanged(visibilityState: Int) { if (visibilityState == VisibilityState.VISIBLE) { diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/CallTileTimelineItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/CallTileTimelineItem.kt index ea130901b1..b56f5264e6 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/CallTileTimelineItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/CallTileTimelineItem.kt @@ -209,13 +209,13 @@ abstract class CallTileTimelineItem : AbsBaseMessageItem { holder.statusView.setStatus(R.string.call_tile_video_active) } - attributes.informationData.sentByMe -> { + attributes.informationData.sentByMe -> { holder.statusView.setStatus(R.string.call_ringing) } - attributes.callKind.isVoiceCall -> { + attributes.callKind.isVoiceCall -> { holder.statusView.setStatus(R.string.call_tile_voice_incoming) } - else -> { + else -> { holder.statusView.setStatus(R.string.call_tile_video_incoming) } } diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageAudioItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageAudioItem.kt index 3c071578cc..f574dcfdcb 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageAudioItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageAudioItem.kt @@ -127,9 +127,11 @@ abstract class MessageAudioItem : AbsMessageItem() { (duration * (progress.toFloat() / 100)).toInt() ) } + override fun onStartTrackingTouch(seekBar: SeekBar) { isUserSeeking = true } + override fun onStopTrackingTouch(seekBar: SeekBar) { isUserSeeking = false val percentage = seekBar.progress.toFloat() / 100 diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageVoiceItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageVoiceItem.kt index 02937574f2..82860da886 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageVoiceItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageVoiceItem.kt @@ -126,9 +126,9 @@ abstract class MessageVoiceItem : AbsMessageItem() { audioMessagePlaybackTracker.track(attributes.informationData.eventId, object : AudioMessagePlaybackTracker.Listener { override fun onUpdate(state: AudioMessagePlaybackTracker.Listener.State) { when (state) { - is AudioMessagePlaybackTracker.Listener.State.Idle -> renderIdleState(holder, waveformColorIdle, waveformColorPlayed) - is AudioMessagePlaybackTracker.Listener.State.Playing -> renderPlayingState(holder, state, waveformColorIdle, waveformColorPlayed) - is AudioMessagePlaybackTracker.Listener.State.Paused -> renderPausedState(holder, state, waveformColorIdle, waveformColorPlayed) + is AudioMessagePlaybackTracker.Listener.State.Idle -> renderIdleState(holder, waveformColorIdle, waveformColorPlayed) + is AudioMessagePlaybackTracker.Listener.State.Playing -> renderPlayingState(holder, state, waveformColorIdle, waveformColorPlayed) + is AudioMessagePlaybackTracker.Listener.State.Paused -> renderPausedState(holder, state, waveformColorIdle, waveformColorPlayed) is AudioMessagePlaybackTracker.Listener.State.Recording -> Unit } } diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/StatusTileTimelineItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/StatusTileTimelineItem.kt index 2d9119f14c..3810f1cb6f 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/StatusTileTimelineItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/StatusTileTimelineItem.kt @@ -57,7 +57,7 @@ abstract class StatusTileTimelineItem : AbsBaseMessageItem R.drawable.ic_shield_trusted ShieldUIState.BLACK -> R.drawable.ic_shield_black ShieldUIState.RED -> R.drawable.ic_shield_warning - ShieldUIState.ERROR -> R.drawable.ic_warning_badge + ShieldUIState.ERROR -> R.drawable.ic_warning_badge } holder.titleView.setCompoundDrawablesWithIntrinsicBounds( diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/style/TimelineMessageLayout.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/style/TimelineMessageLayout.kt index ae9b004f6c..a41732be2a 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/style/TimelineMessageLayout.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/style/TimelineMessageLayout.kt @@ -29,11 +29,11 @@ sealed interface TimelineMessageLayout : Parcelable { @Parcelize data class Default( - override val showAvatar: Boolean, - override val showDisplayName: Boolean, - override val showTimestamp: Boolean, - // Keep defaultLayout generated on epoxy items - override val layoutRes: Int = 0, + override val showAvatar: Boolean, + override val showDisplayName: Boolean, + override val showTimestamp: Boolean, + // Keep defaultLayout generated on epoxy items + override val layoutRes: Int = 0, ) : TimelineMessageLayout @Parcelize @@ -56,10 +56,10 @@ sealed interface TimelineMessageLayout : Parcelable { @Parcelize data class CornersRadius( - val topStartRadius: Float, - val topEndRadius: Float, - val bottomStartRadius: Float, - val bottomEndRadius: Float, + val topStartRadius: Float, + val topEndRadius: Float, + val bottomStartRadius: Float, + val bottomEndRadius: Float, ) : Parcelable } } diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/upgrade/MigrateRoomViewModel.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/upgrade/MigrateRoomViewModel.kt index 98be65c167..5a535e5696 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/upgrade/MigrateRoomViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/upgrade/MigrateRoomViewModel.kt @@ -34,7 +34,7 @@ class MigrateRoomViewModel @AssistedInject constructor( @Assisted initialState: MigrateRoomViewState, private val session: Session, private val upgradeRoomViewModelTask: UpgradeRoomViewModelTask) : - VectorViewModel(initialState) { + VectorViewModel(initialState) { init { val room = session.getRoom(initialState.roomId) diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/widget/RoomWidgetsController.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/widget/RoomWidgetsController.kt index b2da3bfc78..87392c5d7a 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/widget/RoomWidgetsController.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/widget/RoomWidgetsController.kt @@ -32,7 +32,7 @@ import javax.inject.Inject class RoomWidgetsController @Inject constructor( val stringProvider: StringProvider, val colorProvider: ColorProvider) : - TypedEpoxyController>() { + TypedEpoxyController>() { var listener: Listener? = null diff --git a/vector/src/main/java/im/vector/app/features/home/room/list/CollapsableTypedEpoxyController.kt b/vector/src/main/java/im/vector/app/features/home/room/list/CollapsableTypedEpoxyController.kt index 15b3602766..8cf7e6bcab 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/list/CollapsableTypedEpoxyController.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/list/CollapsableTypedEpoxyController.kt @@ -19,7 +19,7 @@ package im.vector.app.features.home.room.list import com.airbnb.epoxy.EpoxyController abstract class CollapsableTypedEpoxyController : - EpoxyController(), CollapsableControllerExtension { + EpoxyController(), CollapsableControllerExtension { private var currentData: T? = null private var allowModelBuildRequests = false diff --git a/vector/src/main/java/im/vector/app/features/home/room/list/actions/RoomListQuickActionsSharedAction.kt b/vector/src/main/java/im/vector/app/features/home/room/list/actions/RoomListQuickActionsSharedAction.kt index 2d61da0dd5..625118919b 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/list/actions/RoomListQuickActionsSharedAction.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/list/actions/RoomListQuickActionsSharedAction.kt @@ -25,7 +25,7 @@ sealed class RoomListQuickActionsSharedAction( @StringRes val titleRes: Int, @DrawableRes val iconResId: Int?, val destructive: Boolean = false) : - VectorSharedAction { + VectorSharedAction { data class NotificationsAllNoisy(val roomId: String) : RoomListQuickActionsSharedAction( R.string.room_list_quick_actions_notifications_all_noisy, diff --git a/vector/src/main/java/im/vector/app/features/home/room/threads/list/viewmodel/ThreadListController.kt b/vector/src/main/java/im/vector/app/features/home/room/threads/list/viewmodel/ThreadListController.kt index aeef69c6dc..54c44e178f 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/threads/list/viewmodel/ThreadListController.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/threads/list/viewmodel/ThreadListController.kt @@ -71,13 +71,13 @@ class ThreadListController @Inject constructor( } ?.forEach { threadSummary -> val date = dateFormatter.format(threadSummary.latestEvent?.originServerTs, DateFormatKind.ROOM_LIST) - val lastMessageFormatted = threadSummary.let { + val lastMessageFormatted = threadSummary.let { displayableEventFormatter.formatThreadSummary( event = it.latestEvent, latestEdition = it.threadEditions.latestThreadEdition ).toString() } - val rootMessageFormatted = threadSummary.let { + val rootMessageFormatted = threadSummary.let { displayableEventFormatter.formatThreadSummary( event = it.rootEvent, latestEdition = it.threadEditions.rootThreadEdition @@ -123,12 +123,12 @@ class ThreadListController @Inject constructor( ?.forEach { timelineEvent -> val date = dateFormatter.format(timelineEvent.root.threadDetails?.lastMessageTimestamp, DateFormatKind.ROOM_LIST) val lastRootThreadEdition = timelineEvent.root.threadDetails?.lastRootThreadEdition - val lastMessageFormatted = timelineEvent.root.threadDetails?.threadSummaryLatestEvent.let { + val lastMessageFormatted = timelineEvent.root.threadDetails?.threadSummaryLatestEvent.let { displayableEventFormatter.formatThreadSummary( event = it, ).toString() } - val rootMessageFormatted = timelineEvent.root.let { + val rootMessageFormatted = timelineEvent.root.let { displayableEventFormatter.formatThreadSummary( event = it, latestEdition = lastRootThreadEdition diff --git a/vector/src/main/java/im/vector/app/features/home/room/threads/list/views/ThreadListFragment.kt b/vector/src/main/java/im/vector/app/features/home/room/threads/list/views/ThreadListFragment.kt index 16555ef03c..c90ad542c0 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/threads/list/views/ThreadListFragment.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/threads/list/views/ThreadListFragment.kt @@ -122,6 +122,7 @@ class ThreadListFragment @Inject constructor( bugReporter.openBugReportScreen(requireActivity(), reportType = ReportType.THREADS_BETA_FEEDBACK) } } + override fun invalidate() = withState(threadListViewModel) { state -> invalidateOptionsMenu() renderEmptyStateIfNeeded(state) diff --git a/vector/src/main/java/im/vector/app/features/invite/VectorInviteView.kt b/vector/src/main/java/im/vector/app/features/invite/VectorInviteView.kt index d9f1ad343b..7c5159ce11 100644 --- a/vector/src/main/java/im/vector/app/features/invite/VectorInviteView.kt +++ b/vector/src/main/java/im/vector/app/features/invite/VectorInviteView.kt @@ -32,7 +32,7 @@ import javax.inject.Inject @AndroidEntryPoint class VectorInviteView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyle: Int = 0) : - ConstraintLayout(context, attrs, defStyle) { + ConstraintLayout(context, attrs, defStyle) { interface Callback { fun onAcceptInvite() diff --git a/vector/src/main/java/im/vector/app/features/login/LoginMode.kt b/vector/src/main/java/im/vector/app/features/login/LoginMode.kt index 00945968fb..8fec4f3991 100644 --- a/vector/src/main/java/im/vector/app/features/login/LoginMode.kt +++ b/vector/src/main/java/im/vector/app/features/login/LoginMode.kt @@ -21,7 +21,8 @@ import kotlinx.parcelize.Parcelize import org.matrix.android.sdk.api.auth.data.SsoIdentityProvider sealed class LoginMode : Parcelable -/** because persist state */ { +/** because persist state */ +{ @Parcelize object Unknown : LoginMode() @Parcelize object Password : LoginMode() @Parcelize data class Sso(val ssoIdentityProviders: List?) : LoginMode() diff --git a/vector/src/main/java/im/vector/app/features/login/SocialLoginButtonsView.kt b/vector/src/main/java/im/vector/app/features/login/SocialLoginButtonsView.kt index 515c8e9d39..68fc2d1c59 100644 --- a/vector/src/main/java/im/vector/app/features/login/SocialLoginButtonsView.kt +++ b/vector/src/main/java/im/vector/app/features/login/SocialLoginButtonsView.kt @@ -28,7 +28,7 @@ import im.vector.app.R import org.matrix.android.sdk.api.auth.data.SsoIdentityProvider class SocialLoginButtonsView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyle: Int = 0) : - LinearLayout(context, attrs, defStyle) { + LinearLayout(context, attrs, defStyle) { fun interface InteractionListener { fun onProviderSelected(id: String?) @@ -99,10 +99,10 @@ class SocialLoginButtonsView @JvmOverloads constructor(context: Context, attrs: SsoIdentityProvider.BRAND_TWITTER -> { MaterialButton(context, null, R.attr.vctr_social_login_button_twitter_style) } - SsoIdentityProvider.BRAND_GITLAB -> { + SsoIdentityProvider.BRAND_GITLAB -> { MaterialButton(context, null, R.attr.vctr_social_login_button_gitlab_style) } - else -> { + else -> { // TODO Use iconUrl MaterialButton(context, null, R.attr.materialButtonOutlinedStyle).apply { transformationMethod = null diff --git a/vector/src/main/java/im/vector/app/features/login2/LoginGenericTextInputFormFragment2.kt b/vector/src/main/java/im/vector/app/features/login2/LoginGenericTextInputFormFragment2.kt index 76af86fda8..f623fb5abd 100644 --- a/vector/src/main/java/im/vector/app/features/login2/LoginGenericTextInputFormFragment2.kt +++ b/vector/src/main/java/im/vector/app/features/login2/LoginGenericTextInputFormFragment2.kt @@ -75,8 +75,8 @@ class LoginGenericTextInputFormFragment2 @Inject constructor() : AbstractLoginFr if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { views.loginGenericTextInputFormTextInput.setAutofillHints( when (params.mode) { - TextInputFormFragmentMode.SetEmail -> HintConstants.AUTOFILL_HINT_EMAIL_ADDRESS - TextInputFormFragmentMode.SetMsisdn -> HintConstants.AUTOFILL_HINT_PHONE_NUMBER + TextInputFormFragmentMode.SetEmail -> HintConstants.AUTOFILL_HINT_EMAIL_ADDRESS + TextInputFormFragmentMode.SetMsisdn -> HintConstants.AUTOFILL_HINT_PHONE_NUMBER TextInputFormFragmentMode.ConfirmMsisdn -> HintConstants.AUTOFILL_HINT_SMS_OTP } ) diff --git a/vector/src/main/java/im/vector/app/features/matrixto/MatrixToRoomSpaceFragment.kt b/vector/src/main/java/im/vector/app/features/matrixto/MatrixToRoomSpaceFragment.kt index 3b0fc175b0..4e3159b5b3 100644 --- a/vector/src/main/java/im/vector/app/features/matrixto/MatrixToRoomSpaceFragment.kt +++ b/vector/src/main/java/im/vector/app/features/matrixto/MatrixToRoomSpaceFragment.kt @@ -60,10 +60,10 @@ class MatrixToRoomSpaceFragment @Inject constructor( Uninitialized -> { views.matrixToCardContentVisibility.isVisible = false } - is Loading -> { + is Loading -> { views.matrixToCardContentVisibility.isVisible = false } - is Success -> { + is Success -> { views.matrixToCardContentVisibility.isVisible = true when (val peek = item.invoke()) { is RoomInfoResult.FullInfo -> { @@ -154,7 +154,7 @@ class MatrixToRoomSpaceFragment @Inject constructor( } } } - is Fail -> { + is Fail -> { // TODO display some error copy? sharedViewModel.handle(MatrixToAction.FailedToResolveUser) } @@ -176,14 +176,14 @@ class MatrixToRoomSpaceFragment @Inject constructor( Uninitialized -> { views.matrixToCardMainButton.render(ButtonStateView.State.Button) } - is Success -> { + is Success -> { views.matrixToCardMainButton.render(ButtonStateView.State.Button) } - is Fail -> { + is Fail -> { views.matrixToCardMainButton.render(ButtonStateView.State.Error) // TODO display some error copy? } - is Loading -> { + is Loading -> { views.matrixToCardMainButton.render(ButtonStateView.State.Loading) } } @@ -191,7 +191,7 @@ class MatrixToRoomSpaceFragment @Inject constructor( private fun mainButtonClicked() = withState(sharedViewModel) { state -> when (val info = state.roomPeekResult.invoke()) { - is RoomInfoResult.FullInfo -> { + is RoomInfoResult.FullInfo -> { when (info.membership) { Membership.NONE, Membership.INVITE, diff --git a/vector/src/main/java/im/vector/app/features/matrixto/MatrixToUserFragment.kt b/vector/src/main/java/im/vector/app/features/matrixto/MatrixToUserFragment.kt index 3792183bca..b0d68c57e8 100644 --- a/vector/src/main/java/im/vector/app/features/matrixto/MatrixToUserFragment.kt +++ b/vector/src/main/java/im/vector/app/features/matrixto/MatrixToUserFragment.kt @@ -60,16 +60,16 @@ class MatrixToUserFragment @Inject constructor( Uninitialized -> { views.matrixToCardUserContentVisibility.isVisible = false } - is Loading -> { + is Loading -> { views.matrixToCardUserContentVisibility.isVisible = false } - is Success -> { + is Success -> { views.matrixToCardUserContentVisibility.isVisible = true views.matrixToCardNameText.setTextOrHide(item.invoke().displayName) views.matrixToCardUserIdText.setTextOrHide(item.invoke().id) avatarRenderer.render(item.invoke(), views.matrixToCardAvatar) } - is Fail -> { + is Fail -> { // TODO display some error copy? sharedViewModel.handle(MatrixToAction.FailedToResolveUser) } @@ -80,17 +80,17 @@ class MatrixToUserFragment @Inject constructor( views.matrixToCardButtonLoading.isVisible = false views.matrixToCardSendMessageButton.isVisible = false } - is Success -> { + is Success -> { views.matrixToCardButtonLoading.isVisible = false views.matrixToCardSendMessageButton.isVisible = true } - is Fail -> { + is Fail -> { views.matrixToCardButtonLoading.isVisible = false views.matrixToCardSendMessageButton.isVisible = true // TODO display some error copy? sharedViewModel.handle(MatrixToAction.FailedToStartChatting) } - is Loading -> { + is Loading -> { views.matrixToCardButtonLoading.isVisible = true views.matrixToCardSendMessageButton.isInvisible = true } diff --git a/vector/src/main/java/im/vector/app/features/navigation/DefaultNavigator.kt b/vector/src/main/java/im/vector/app/features/navigation/DefaultNavigator.kt index 6122cf1eee..c8e9ee966a 100644 --- a/vector/src/main/java/im/vector/app/features/navigation/DefaultNavigator.kt +++ b/vector/src/main/java/im/vector/app/features/navigation/DefaultNavigator.kt @@ -176,7 +176,7 @@ class DefaultNavigator @Inject constructor( Navigator.PostSwitchSpaceAction.OpenAddExistingRooms -> { startActivity(context, SpaceManageActivity.newIntent(context, spaceId, ManageType.AddRooms), false) } - Navigator.PostSwitchSpaceAction.OpenRoomList -> { + Navigator.PostSwitchSpaceAction.OpenRoomList -> { startActivity(context, SpaceExploreActivity.newIntent(context, spaceId), buildTask = false) } is Navigator.PostSwitchSpaceAction.OpenDefaultRoom -> { diff --git a/vector/src/main/java/im/vector/app/features/poll/create/CreatePollViewState.kt b/vector/src/main/java/im/vector/app/features/poll/create/CreatePollViewState.kt index 3fd8ab605c..cfa1ff847e 100644 --- a/vector/src/main/java/im/vector/app/features/poll/create/CreatePollViewState.kt +++ b/vector/src/main/java/im/vector/app/features/poll/create/CreatePollViewState.kt @@ -21,14 +21,14 @@ import im.vector.app.features.poll.PollMode import org.matrix.android.sdk.api.session.room.model.message.PollType data class CreatePollViewState( - val roomId: String, - val editedEventId: String?, - val mode: PollMode, - val question: String = "", - val options: List = List(CreatePollViewModel.MIN_OPTIONS_COUNT) { "" }, - val canCreatePoll: Boolean = false, - val canAddMoreOptions: Boolean = true, - val pollType: PollType = PollType.DISCLOSED_UNSTABLE + val roomId: String, + val editedEventId: String?, + val mode: PollMode, + val question: String = "", + val options: List = List(CreatePollViewModel.MIN_OPTIONS_COUNT) { "" }, + val canCreatePoll: Boolean = false, + val canAddMoreOptions: Boolean = true, + val pollType: PollType = PollType.DISCLOSED_UNSTABLE ) : MavericksState { constructor(args: CreatePollArgs) : this( diff --git a/vector/src/main/java/im/vector/app/features/rageshake/BugReportActivity.kt b/vector/src/main/java/im/vector/app/features/rageshake/BugReportActivity.kt index 701d04f3c9..f0edf6fd57 100755 --- a/vector/src/main/java/im/vector/app/features/rageshake/BugReportActivity.kt +++ b/vector/src/main/java/im/vector/app/features/rageshake/BugReportActivity.kt @@ -63,11 +63,11 @@ class BugReportActivity : VectorBaseActivity() { // Default screen is for bug report, so modify it for suggestion when (reportType) { - ReportType.BUG_REPORT -> { + ReportType.BUG_REPORT -> { supportActionBar?.setTitle(R.string.title_activity_bug_report) views.bugReportButtonContactMe.isVisible = true } - ReportType.SUGGESTION -> { + ReportType.SUGGESTION -> { supportActionBar?.setTitle(R.string.send_suggestion) views.bugReportFirstText.setText(R.string.send_suggestion_content) @@ -76,7 +76,7 @@ class BugReportActivity : VectorBaseActivity() { hideBugReportOptions() } - ReportType.SPACE_BETA_FEEDBACK -> { + ReportType.SPACE_BETA_FEEDBACK -> { supportActionBar?.setTitle(R.string.send_feedback_space_title) views.bugReportFirstText.setText(R.string.send_feedback_space_info) @@ -94,7 +94,7 @@ class BugReportActivity : VectorBaseActivity() { hideBugReportOptions() } - else -> { + else -> { // other types not supported here } } diff --git a/vector/src/main/java/im/vector/app/features/rageshake/BugReportViewModel.kt b/vector/src/main/java/im/vector/app/features/rageshake/BugReportViewModel.kt index d0a1280868..6437f5c8f8 100644 --- a/vector/src/main/java/im/vector/app/features/rageshake/BugReportViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/rageshake/BugReportViewModel.kt @@ -39,7 +39,7 @@ class BugReportViewModel @AssistedInject constructor( override fun create(initialState: BugReportState): BugReportViewModel } - companion object : MavericksViewModelFactory by hiltMavericksViewModelFactory() + companion object : MavericksViewModelFactory by hiltMavericksViewModelFactory() init { fetchHomeserverVersion() diff --git a/vector/src/main/java/im/vector/app/features/reactions/EmojiSearchResultViewModel.kt b/vector/src/main/java/im/vector/app/features/reactions/EmojiSearchResultViewModel.kt index e1e52fdca1..720061e326 100644 --- a/vector/src/main/java/im/vector/app/features/reactions/EmojiSearchResultViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/reactions/EmojiSearchResultViewModel.kt @@ -36,7 +36,7 @@ data class EmojiSearchResultViewState( class EmojiSearchResultViewModel @AssistedInject constructor( @Assisted initialState: EmojiSearchResultViewState, private val dataSource: EmojiDataSource) : - VectorViewModel(initialState) { + VectorViewModel(initialState) { @AssistedFactory interface Factory : MavericksAssistedViewModelFactory { diff --git a/vector/src/main/java/im/vector/app/features/room/RequireActiveMembershipViewModel.kt b/vector/src/main/java/im/vector/app/features/room/RequireActiveMembershipViewModel.kt index 0cb49746f1..329618045f 100644 --- a/vector/src/main/java/im/vector/app/features/room/RequireActiveMembershipViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/room/RequireActiveMembershipViewModel.kt @@ -50,7 +50,7 @@ class RequireActiveMembershipViewModel @AssistedInject constructor( @Assisted initialState: RequireActiveMembershipViewState, private val stringProvider: StringProvider, private val session: Session) : - VectorViewModel(initialState) { + VectorViewModel(initialState) { @AssistedFactory interface Factory : MavericksAssistedViewModelFactory { diff --git a/vector/src/main/java/im/vector/app/features/roomdirectory/ExplicitTermFilter.kt b/vector/src/main/java/im/vector/app/features/roomdirectory/ExplicitTermFilter.kt index e184e77557..b1876d2c4e 100644 --- a/vector/src/main/java/im/vector/app/features/roomdirectory/ExplicitTermFilter.kt +++ b/vector/src/main/java/im/vector/app/features/roomdirectory/ExplicitTermFilter.kt @@ -35,7 +35,7 @@ class ExplicitTermFilter @Inject constructor( .toRegex(RegexOption.IGNORE_CASE) fun canSearchFor(term: String): Boolean { - return term !in explicitTerms && term != "18+" + return term !in explicitTerms && term != "18+" } fun isValid(str: String): Boolean { diff --git a/vector/src/main/java/im/vector/app/features/roommemberprofile/devices/DeviceTrustInfoEpoxyController.kt b/vector/src/main/java/im/vector/app/features/roommemberprofile/devices/DeviceTrustInfoEpoxyController.kt index a52f56870a..c3991cef99 100644 --- a/vector/src/main/java/im/vector/app/features/roommemberprofile/devices/DeviceTrustInfoEpoxyController.kt +++ b/vector/src/main/java/im/vector/app/features/roommemberprofile/devices/DeviceTrustInfoEpoxyController.kt @@ -36,7 +36,7 @@ class DeviceTrustInfoEpoxyController @Inject constructor(private val stringProvi private val colorProvider: ColorProvider, private val dimensionConverter: DimensionConverter, private val vectorPreferences: VectorPreferences) : - TypedEpoxyController() { + TypedEpoxyController() { interface InteractionListener { fun onVerifyManually(device: CryptoDeviceInfo) diff --git a/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileActivity.kt b/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileActivity.kt index 12a5d94eca..29a2f73c78 100644 --- a/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileActivity.kt +++ b/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileActivity.kt @@ -84,21 +84,21 @@ class RoomProfileActivity : addFragment(views.simpleFragmentContainer, RoomProfileFragment::class.java, roomProfileArgs) addFragmentToBackstack(views.simpleFragmentContainer, RoomSettingsFragment::class.java, roomProfileArgs) } - EXTRA_DIRECT_ACCESS_ROOM_MEMBERS -> { + EXTRA_DIRECT_ACCESS_ROOM_MEMBERS -> { addFragment(views.simpleFragmentContainer, RoomMemberListFragment::class.java, roomProfileArgs) } - else -> addFragment(views.simpleFragmentContainer, RoomProfileFragment::class.java, roomProfileArgs) + else -> addFragment(views.simpleFragmentContainer, RoomProfileFragment::class.java, roomProfileArgs) } } sharedActionViewModel .stream() .onEach { sharedAction -> when (sharedAction) { - RoomProfileSharedAction.OpenRoomMembers -> openRoomMembers() - RoomProfileSharedAction.OpenRoomSettings -> openRoomSettings() - RoomProfileSharedAction.OpenRoomAliasesSettings -> openRoomAlias() - RoomProfileSharedAction.OpenRoomPermissionsSettings -> openRoomPermissions() - RoomProfileSharedAction.OpenRoomUploads -> openRoomUploads() + RoomProfileSharedAction.OpenRoomMembers -> openRoomMembers() + RoomProfileSharedAction.OpenRoomSettings -> openRoomSettings() + RoomProfileSharedAction.OpenRoomAliasesSettings -> openRoomAlias() + RoomProfileSharedAction.OpenRoomPermissionsSettings -> openRoomPermissions() + RoomProfileSharedAction.OpenRoomUploads -> openRoomUploads() RoomProfileSharedAction.OpenBannedRoomMembers -> openBannedRoomMembers() RoomProfileSharedAction.OpenRoomNotificationSettings -> openRoomNotificationSettings() } diff --git a/vector/src/main/java/im/vector/app/features/roomprofile/alias/detail/RoomAliasBottomSheetSharedAction.kt b/vector/src/main/java/im/vector/app/features/roomprofile/alias/detail/RoomAliasBottomSheetSharedAction.kt index 7625972b05..d50c19635d 100644 --- a/vector/src/main/java/im/vector/app/features/roomprofile/alias/detail/RoomAliasBottomSheetSharedAction.kt +++ b/vector/src/main/java/im/vector/app/features/roomprofile/alias/detail/RoomAliasBottomSheetSharedAction.kt @@ -25,7 +25,7 @@ sealed class RoomAliasBottomSheetSharedAction( @StringRes val titleRes: Int, @DrawableRes val iconResId: Int = 0, val destructive: Boolean = false) : - VectorSharedAction { + VectorSharedAction { data class ShareAlias(val matrixTo: String) : RoomAliasBottomSheetSharedAction( R.string.action_share, diff --git a/vector/src/main/java/im/vector/app/features/roomprofile/notifications/RoomNotificationSettingsController.kt b/vector/src/main/java/im/vector/app/features/roomprofile/notifications/RoomNotificationSettingsController.kt index 8f6e8f54c1..3ee0a00f28 100644 --- a/vector/src/main/java/im/vector/app/features/roomprofile/notifications/RoomNotificationSettingsController.kt +++ b/vector/src/main/java/im/vector/app/features/roomprofile/notifications/RoomNotificationSettingsController.kt @@ -42,7 +42,7 @@ class RoomNotificationSettingsController @Inject constructor() : TypedEpoxyContr id("roomNotificationSettingsHeader") textRes(R.string.room_settings_room_notifications_notify_me) } - data.notificationOptions.forEach { notificationState -> + data.notificationOptions.forEach { notificationState -> val title = titleForNotificationState(notificationState) radioButtonItem { id(notificationState.name) @@ -67,6 +67,6 @@ class RoomNotificationSettingsController @Inject constructor() : TypedEpoxyContr RoomNotificationState.ALL_MESSAGES_NOISY -> R.string.room_settings_all_messages RoomNotificationState.MENTIONS_ONLY -> R.string.room_settings_mention_and_keyword_only RoomNotificationState.MUTE -> R.string.room_settings_none - else -> null + else -> null } } diff --git a/vector/src/main/java/im/vector/app/features/roomprofile/notifications/RoomNotificationSettingsViewModel.kt b/vector/src/main/java/im/vector/app/features/roomprofile/notifications/RoomNotificationSettingsViewModel.kt index 26db6b001e..4108167409 100644 --- a/vector/src/main/java/im/vector/app/features/roomprofile/notifications/RoomNotificationSettingsViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/roomprofile/notifications/RoomNotificationSettingsViewModel.kt @@ -36,7 +36,7 @@ class RoomNotificationSettingsViewModel @AssistedInject constructor( @AssistedFactory interface Factory : MavericksAssistedViewModelFactory { - override fun create(initialState: RoomNotificationSettingsViewState): RoomNotificationSettingsViewModel + override fun create(initialState: RoomNotificationSettingsViewState): RoomNotificationSettingsViewModel } companion object : MavericksViewModelFactory by hiltMavericksViewModelFactory() @@ -73,7 +73,7 @@ class RoomNotificationSettingsViewModel @AssistedInject constructor( private fun handleSelectNotificationState(action: RoomNotificationSettingsAction.SelectNotificationState) { setState { copy(isLoading = true) } viewModelScope.launch { - runCatching { room.setRoomNotificationState(action.notificationState) } + runCatching { room.setRoomNotificationState(action.notificationState) } .fold( { setState { diff --git a/vector/src/main/java/im/vector/app/features/roomprofile/notifications/RoomNotificationSettingsViewState.kt b/vector/src/main/java/im/vector/app/features/roomprofile/notifications/RoomNotificationSettingsViewState.kt index d6d1176c36..5c1e9e6bc5 100644 --- a/vector/src/main/java/im/vector/app/features/roomprofile/notifications/RoomNotificationSettingsViewState.kt +++ b/vector/src/main/java/im/vector/app/features/roomprofile/notifications/RoomNotificationSettingsViewState.kt @@ -30,7 +30,7 @@ data class RoomNotificationSettingsViewState( val roomSummary: Async = Uninitialized, val isLoading: Boolean = false, val notificationState: Async = Uninitialized -) : MavericksState { +) : MavericksState { constructor(args: RoomProfileArgs) : this(roomId = args.roomId) constructor(args: RoomListActionsArgs) : this(roomId = args.roomId) } diff --git a/vector/src/main/java/im/vector/app/features/roomprofile/permissions/RoomPermissionsViewModel.kt b/vector/src/main/java/im/vector/app/features/roomprofile/permissions/RoomPermissionsViewModel.kt index 6fbc545b6c..eff4f811fc 100644 --- a/vector/src/main/java/im/vector/app/features/roomprofile/permissions/RoomPermissionsViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/roomprofile/permissions/RoomPermissionsViewModel.kt @@ -38,7 +38,7 @@ import org.matrix.android.sdk.flow.unwrap class RoomPermissionsViewModel @AssistedInject constructor(@Assisted initialState: RoomPermissionsViewState, private val session: Session) : - VectorViewModel(initialState) { + VectorViewModel(initialState) { @AssistedFactory interface Factory : MavericksAssistedViewModelFactory { diff --git a/vector/src/main/java/im/vector/app/features/roomprofile/settings/RoomSettingsViewState.kt b/vector/src/main/java/im/vector/app/features/roomprofile/settings/RoomSettingsViewState.kt index 122e0034c6..fe7c984cb4 100644 --- a/vector/src/main/java/im/vector/app/features/roomprofile/settings/RoomSettingsViewState.kt +++ b/vector/src/main/java/im/vector/app/features/roomprofile/settings/RoomSettingsViewState.kt @@ -75,13 +75,13 @@ data class RoomSettingsViewState( fun getJoinRuleWording(stringProvider: StringProvider): String { return when (val joinRule = newRoomJoinRules.newJoinRules ?: currentRoomJoinRules) { - RoomJoinRules.INVITE -> { + RoomJoinRules.INVITE -> { stringProvider.getString(R.string.room_settings_room_access_private_title) } - RoomJoinRules.PUBLIC -> { + RoomJoinRules.PUBLIC -> { stringProvider.getString(R.string.room_settings_room_access_public_title) } - RoomJoinRules.KNOCK -> { + RoomJoinRules.KNOCK -> { stringProvider.getString(R.string.room_settings_room_access_entry_knock) } RoomJoinRules.RESTRICTED -> { diff --git a/vector/src/main/java/im/vector/app/features/roomprofile/settings/historyvisibility/RoomHistoryVisibilitySharedActionViewModel.kt b/vector/src/main/java/im/vector/app/features/roomprofile/settings/historyvisibility/RoomHistoryVisibilitySharedActionViewModel.kt index c4f4892984..2f1fc086db 100644 --- a/vector/src/main/java/im/vector/app/features/roomprofile/settings/historyvisibility/RoomHistoryVisibilitySharedActionViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/roomprofile/settings/historyvisibility/RoomHistoryVisibilitySharedActionViewModel.kt @@ -20,4 +20,4 @@ import im.vector.app.core.platform.VectorSharedActionViewModel import javax.inject.Inject class RoomHistoryVisibilitySharedActionViewModel @Inject constructor() : - VectorSharedActionViewModel() + VectorSharedActionViewModel() diff --git a/vector/src/main/java/im/vector/app/features/roomprofile/settings/historyvisibility/RoomHistoryVisibilityViewModel.kt b/vector/src/main/java/im/vector/app/features/roomprofile/settings/historyvisibility/RoomHistoryVisibilityViewModel.kt index 5580156918..e99a8d8a0b 100644 --- a/vector/src/main/java/im/vector/app/features/roomprofile/settings/historyvisibility/RoomHistoryVisibilityViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/roomprofile/settings/historyvisibility/RoomHistoryVisibilityViewModel.kt @@ -19,4 +19,4 @@ package im.vector.app.features.roomprofile.settings.historyvisibility import im.vector.app.core.ui.bottomsheet.BottomSheetGenericViewModel class RoomHistoryVisibilityViewModel(initialState: RoomHistoryVisibilityState) : - BottomSheetGenericViewModel(initialState) + BottomSheetGenericViewModel(initialState) diff --git a/vector/src/main/java/im/vector/app/features/roomprofile/settings/joinrule/RoomJoinRuleSharedActionViewModel.kt b/vector/src/main/java/im/vector/app/features/roomprofile/settings/joinrule/RoomJoinRuleSharedActionViewModel.kt index 971d71e0df..fd1fb4d61e 100644 --- a/vector/src/main/java/im/vector/app/features/roomprofile/settings/joinrule/RoomJoinRuleSharedActionViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/roomprofile/settings/joinrule/RoomJoinRuleSharedActionViewModel.kt @@ -20,4 +20,4 @@ import im.vector.app.core.platform.VectorSharedActionViewModel import javax.inject.Inject class RoomJoinRuleSharedActionViewModel @Inject constructor() : - VectorSharedActionViewModel() + VectorSharedActionViewModel() diff --git a/vector/src/main/java/im/vector/app/features/roomprofile/settings/joinrule/RoomJoinRuleViewModel.kt b/vector/src/main/java/im/vector/app/features/roomprofile/settings/joinrule/RoomJoinRuleViewModel.kt index 1ff374bf5b..e528c41676 100644 --- a/vector/src/main/java/im/vector/app/features/roomprofile/settings/joinrule/RoomJoinRuleViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/roomprofile/settings/joinrule/RoomJoinRuleViewModel.kt @@ -19,4 +19,4 @@ package im.vector.app.features.roomprofile.settings.joinrule import im.vector.app.core.ui.bottomsheet.BottomSheetGenericViewModel class RoomJoinRuleViewModel(initialState: RoomJoinRuleState) : - BottomSheetGenericViewModel(initialState) + BottomSheetGenericViewModel(initialState) diff --git a/vector/src/main/java/im/vector/app/features/session/SessionScopedProperty.kt b/vector/src/main/java/im/vector/app/features/session/SessionScopedProperty.kt index e6a84a41d8..64d49800c8 100644 --- a/vector/src/main/java/im/vector/app/features/session/SessionScopedProperty.kt +++ b/vector/src/main/java/im/vector/app/features/session/SessionScopedProperty.kt @@ -23,9 +23,9 @@ import kotlin.reflect.KProperty * This is a simple hack for having some Session scope dependencies. * Probably a temporary solution waiting for refactoring the Dagger management of Session. * You should use it with an extension property : - val Session.myProperty: MyProperty by SessionScopedProperty { - init code - } +val Session.myProperty: MyProperty by SessionScopedProperty { +init code +} * */ class SessionScopedProperty(val initializer: (Session) -> T) { diff --git a/vector/src/main/java/im/vector/app/features/settings/account/deactivation/DeactivateAccountViewModel.kt b/vector/src/main/java/im/vector/app/features/settings/account/deactivation/DeactivateAccountViewModel.kt index 95537a8700..7057f4dce4 100644 --- a/vector/src/main/java/im/vector/app/features/settings/account/deactivation/DeactivateAccountViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/settings/account/deactivation/DeactivateAccountViewModel.kt @@ -44,7 +44,7 @@ data class DeactivateAccountViewState( class DeactivateAccountViewModel @AssistedInject constructor(@Assisted private val initialState: DeactivateAccountViewState, private val session: Session) : - VectorViewModel(initialState) { + VectorViewModel(initialState) { @AssistedFactory interface Factory : MavericksAssistedViewModelFactory { @@ -57,7 +57,7 @@ class DeactivateAccountViewModel @AssistedInject constructor(@Assisted private v override fun handle(action: DeactivateAccountAction) { when (action) { is DeactivateAccountAction.DeactivateAccount -> handleDeactivateAccount(action) - DeactivateAccountAction.SsoAuthDone -> { + DeactivateAccountAction.SsoAuthDone -> { Timber.d("## UIA - FallBack success") if (pendingAuth != null) { uiaContinuation?.resume(pendingAuth!!) @@ -65,7 +65,7 @@ class DeactivateAccountViewModel @AssistedInject constructor(@Assisted private v uiaContinuation?.resumeWithException(IllegalArgumentException()) } } - is DeactivateAccountAction.PasswordAuthDone -> { + is DeactivateAccountAction.PasswordAuthDone -> { val decryptedPass = session.loadSecureSecret(action.password.fromBase64().inputStream(), ReAuthActivity.DEFAULT_RESULT_KEYSTORE_ALIAS) uiaContinuation?.resume( UserPasswordAuth( @@ -75,7 +75,7 @@ class DeactivateAccountViewModel @AssistedInject constructor(@Assisted private v ) ) } - DeactivateAccountAction.ReAuthCancelled -> { + DeactivateAccountAction.ReAuthCancelled -> { Timber.d("## UIA - Reauth cancelled") uiaContinuation?.resumeWithException(Exception()) uiaContinuation = null diff --git a/vector/src/main/java/im/vector/app/features/settings/devices/DevicesAction.kt b/vector/src/main/java/im/vector/app/features/settings/devices/DevicesAction.kt index dd8fca3820..8ee0e7636e 100644 --- a/vector/src/main/java/im/vector/app/features/settings/devices/DevicesAction.kt +++ b/vector/src/main/java/im/vector/app/features/settings/devices/DevicesAction.kt @@ -23,7 +23,7 @@ sealed class DevicesAction : VectorViewModelAction { object Refresh : DevicesAction() data class Delete(val deviceId: String) : DevicesAction() -// data class Password(val password: String) : DevicesAction() + // data class Password(val password: String) : DevicesAction() data class Rename(val deviceId: String, val newName: String) : DevicesAction() data class PromptRename(val deviceId: String) : DevicesAction() diff --git a/vector/src/main/java/im/vector/app/features/settings/devices/DevicesViewEvents.kt b/vector/src/main/java/im/vector/app/features/settings/devices/DevicesViewEvents.kt index 941b33a8ef..8ba7dbc871 100644 --- a/vector/src/main/java/im/vector/app/features/settings/devices/DevicesViewEvents.kt +++ b/vector/src/main/java/im/vector/app/features/settings/devices/DevicesViewEvents.kt @@ -29,7 +29,7 @@ import org.matrix.android.sdk.api.session.crypto.model.DeviceInfo sealed class DevicesViewEvents : VectorViewEvents { data class Loading(val message: CharSequence? = null) : DevicesViewEvents() -// object HideLoading : DevicesViewEvents() + // object HideLoading : DevicesViewEvents() data class Failure(val throwable: Throwable) : DevicesViewEvents() // object RequestPassword : DevicesViewEvents() diff --git a/vector/src/main/java/im/vector/app/features/settings/devtools/AccountDataViewModel.kt b/vector/src/main/java/im/vector/app/features/settings/devtools/AccountDataViewModel.kt index 9576b84e98..72085d37fd 100644 --- a/vector/src/main/java/im/vector/app/features/settings/devtools/AccountDataViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/settings/devtools/AccountDataViewModel.kt @@ -38,7 +38,7 @@ data class AccountDataViewState( class AccountDataViewModel @AssistedInject constructor(@Assisted initialState: AccountDataViewState, private val session: Session) : - VectorViewModel(initialState) { + VectorViewModel(initialState) { init { session.flow().liveUserAccountData(emptySet()) diff --git a/vector/src/main/java/im/vector/app/features/settings/devtools/GossipingEventsPaperTrailViewModel.kt b/vector/src/main/java/im/vector/app/features/settings/devtools/GossipingEventsPaperTrailViewModel.kt index dde032d303..30c2757eff 100644 --- a/vector/src/main/java/im/vector/app/features/settings/devtools/GossipingEventsPaperTrailViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/settings/devtools/GossipingEventsPaperTrailViewModel.kt @@ -40,7 +40,7 @@ data class GossipingEventsPaperTrailState( class GossipingEventsPaperTrailViewModel @AssistedInject constructor(@Assisted initialState: GossipingEventsPaperTrailState, private val session: Session) : - VectorViewModel(initialState) { + VectorViewModel(initialState) { init { refresh() diff --git a/vector/src/main/java/im/vector/app/features/settings/devtools/KeyRequestViewModel.kt b/vector/src/main/java/im/vector/app/features/settings/devtools/KeyRequestViewModel.kt index fd1cd3480d..f2df0e4211 100644 --- a/vector/src/main/java/im/vector/app/features/settings/devtools/KeyRequestViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/settings/devtools/KeyRequestViewModel.kt @@ -51,7 +51,7 @@ data class KeyRequestViewState( class KeyRequestViewModel @AssistedInject constructor( @Assisted initialState: KeyRequestViewState, private val session: Session) : - VectorViewModel(initialState) { + VectorViewModel(initialState) { @AssistedFactory interface Factory : MavericksAssistedViewModelFactory { diff --git a/vector/src/main/java/im/vector/app/features/settings/devtools/OutgoingKeyRequestListFragment.kt b/vector/src/main/java/im/vector/app/features/settings/devtools/OutgoingKeyRequestListFragment.kt index 0483d5fb4d..ca1f36dbb2 100644 --- a/vector/src/main/java/im/vector/app/features/settings/devtools/OutgoingKeyRequestListFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/devtools/OutgoingKeyRequestListFragment.kt @@ -28,6 +28,7 @@ import im.vector.app.core.extensions.configureWith import im.vector.app.core.platform.VectorBaseFragment import im.vector.app.databinding.FragmentGenericRecyclerBinding import javax.inject.Inject + class OutgoingKeyRequestListFragment @Inject constructor( private val epoxyController: OutgoingKeyRequestPagedController ) : VectorBaseFragment() { diff --git a/vector/src/main/java/im/vector/app/features/settings/notifications/NotificationIndex.kt b/vector/src/main/java/im/vector/app/features/settings/notifications/NotificationIndex.kt index 793b94db1d..7d5eaab8f3 100644 --- a/vector/src/main/java/im/vector/app/features/settings/notifications/NotificationIndex.kt +++ b/vector/src/main/java/im/vector/app/features/settings/notifications/NotificationIndex.kt @@ -29,15 +29,16 @@ enum class NotificationIndex { * Given a push rule determine the NotificationIndex by comparing it to the static push rule definitions. * Used when determining the selected state of the PushRulePreference. */ -val PushRule.notificationIndex: NotificationIndex? get() = - NotificationIndex.values().firstOrNull { - // Get the actions for the index - val standardAction = getStandardAction(this.ruleId, it) ?: return@firstOrNull false - val indexActions = standardAction.actions ?: listOf() - // Check if the input rule matches a rule generated from the static rule definitions - val targetRule = this.copy(enabled = standardAction != StandardActions.Disabled, actions = indexActions.toJson()) - ruleMatches(this, targetRule) - } +val PushRule.notificationIndex: NotificationIndex? + get() = + NotificationIndex.values().firstOrNull { + // Get the actions for the index + val standardAction = getStandardAction(this.ruleId, it) ?: return@firstOrNull false + val indexActions = standardAction.actions ?: listOf() + // Check if the input rule matches a rule generated from the static rule definitions + val targetRule = this.copy(enabled = standardAction != StandardActions.Disabled, actions = indexActions.toJson()) + ruleMatches(this, targetRule) + } /** * A check to determine if two push rules should be considered a match. @@ -46,9 +47,9 @@ private fun ruleMatches(rule: PushRule, targetRule: PushRule): Boolean { // Rules match if both are disabled, or if both are enabled and their highlight/sound/notify actions match up. return (!rule.enabled && !targetRule.enabled) || (rule.enabled && - targetRule.enabled && - rule.getHighlight() == targetRule.getHighlight() && - rule.getNotificationSound() == targetRule.getNotificationSound() && - rule.shouldNotify() == targetRule.shouldNotify() && - rule.shouldNotNotify() == targetRule.shouldNotNotify()) + targetRule.enabled && + rule.getHighlight() == targetRule.getHighlight() && + rule.getNotificationSound() == targetRule.getNotificationSound() && + rule.shouldNotify() == targetRule.shouldNotify() && + rule.shouldNotNotify() == targetRule.shouldNotNotify()) } diff --git a/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsAdvancedNotificationPreferenceFragment.kt b/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsAdvancedNotificationPreferenceFragment.kt index 3b4aef929d..8c899c2256 100644 --- a/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsAdvancedNotificationPreferenceFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsAdvancedNotificationPreferenceFragment.kt @@ -28,7 +28,7 @@ import org.matrix.android.sdk.api.pushrules.rest.PushRuleAndKind import javax.inject.Inject class VectorSettingsAdvancedNotificationPreferenceFragment @Inject constructor() : - VectorSettingsBaseFragment() { + VectorSettingsBaseFragment() { override var titleRes: Int = R.string.settings_notification_advanced diff --git a/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsDefaultNotificationPreferenceFragment.kt b/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsDefaultNotificationPreferenceFragment.kt index 2179e0eee2..3d67f89b10 100644 --- a/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsDefaultNotificationPreferenceFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsDefaultNotificationPreferenceFragment.kt @@ -23,18 +23,18 @@ import im.vector.app.features.analytics.plan.MobileScreen import org.matrix.android.sdk.api.pushrules.RuleIds class VectorSettingsDefaultNotificationPreferenceFragment : - VectorSettingsPushRuleNotificationPreferenceFragment() { + VectorSettingsPushRuleNotificationPreferenceFragment() { override var titleRes: Int = R.string.settings_notification_default override val preferenceXmlRes = R.xml.vector_settings_notification_default override val prefKeyToPushRuleId = mapOf( - "SETTINGS_PUSH_RULE_MESSAGES_IN_ONE_TO_ONE_PREFERENCE_KEY" to RuleIds.RULE_ID_ONE_TO_ONE_ROOM, - "SETTINGS_PUSH_RULE_MESSAGES_IN_GROUP_CHAT_PREFERENCE_KEY" to RuleIds.RULE_ID_ALL_OTHER_MESSAGES_ROOMS, - "SETTINGS_PUSH_RULE_MESSAGES_IN_E2E_ONE_ONE_CHAT_PREFERENCE_KEY" to RuleIds.RULE_ID_ONE_TO_ONE_ENCRYPTED_ROOM, - "SETTINGS_PUSH_RULE_MESSAGES_IN_E2E_GROUP_CHAT_PREFERENCE_KEY" to RuleIds.RULE_ID_ENCRYPTED - ) + "SETTINGS_PUSH_RULE_MESSAGES_IN_ONE_TO_ONE_PREFERENCE_KEY" to RuleIds.RULE_ID_ONE_TO_ONE_ROOM, + "SETTINGS_PUSH_RULE_MESSAGES_IN_GROUP_CHAT_PREFERENCE_KEY" to RuleIds.RULE_ID_ALL_OTHER_MESSAGES_ROOMS, + "SETTINGS_PUSH_RULE_MESSAGES_IN_E2E_ONE_ONE_CHAT_PREFERENCE_KEY" to RuleIds.RULE_ID_ONE_TO_ONE_ENCRYPTED_ROOM, + "SETTINGS_PUSH_RULE_MESSAGES_IN_E2E_GROUP_CHAT_PREFERENCE_KEY" to RuleIds.RULE_ID_ENCRYPTED + ) override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) diff --git a/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsOtherNotificationPreferenceFragment.kt b/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsOtherNotificationPreferenceFragment.kt index 71f8f0920a..8637bc9b81 100644 --- a/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsOtherNotificationPreferenceFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsOtherNotificationPreferenceFragment.kt @@ -21,18 +21,18 @@ import im.vector.app.core.preference.VectorPreferenceCategory import org.matrix.android.sdk.api.pushrules.RuleIds class VectorSettingsOtherNotificationPreferenceFragment : - VectorSettingsPushRuleNotificationPreferenceFragment() { + VectorSettingsPushRuleNotificationPreferenceFragment() { override var titleRes: Int = R.string.settings_notification_other override val preferenceXmlRes = R.xml.vector_settings_notification_other override val prefKeyToPushRuleId = mapOf( - "SETTINGS_PUSH_RULE_INVITED_TO_ROOM_PREFERENCE_KEY" to RuleIds.RULE_ID_INVITE_ME, - "SETTINGS_PUSH_RULE_CALL_INVITATIONS_PREFERENCE_KEY" to RuleIds.RULE_ID_CALL, - "SETTINGS_PUSH_RULE_MESSAGES_SENT_BY_BOT_PREFERENCE_KEY" to RuleIds.RULE_ID_SUPPRESS_BOTS_NOTIFICATIONS, - "SETTINGS_PUSH_RULE_ROOMS_UPGRADED_KEY" to RuleIds.RULE_ID_TOMBSTONE - ) + "SETTINGS_PUSH_RULE_INVITED_TO_ROOM_PREFERENCE_KEY" to RuleIds.RULE_ID_INVITE_ME, + "SETTINGS_PUSH_RULE_CALL_INVITATIONS_PREFERENCE_KEY" to RuleIds.RULE_ID_CALL, + "SETTINGS_PUSH_RULE_MESSAGES_SENT_BY_BOT_PREFERENCE_KEY" to RuleIds.RULE_ID_SUPPRESS_BOTS_NOTIFICATIONS, + "SETTINGS_PUSH_RULE_ROOMS_UPGRADED_KEY" to RuleIds.RULE_ID_TOMBSTONE + ) override fun bindPref() { super.bindPref() diff --git a/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsPushRuleNotificationPreferenceFragment.kt b/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsPushRuleNotificationPreferenceFragment.kt index 26ee2fc601..6dd1a492b3 100644 --- a/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsPushRuleNotificationPreferenceFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsPushRuleNotificationPreferenceFragment.kt @@ -25,7 +25,7 @@ import org.matrix.android.sdk.api.pushrules.RuleKind import org.matrix.android.sdk.api.pushrules.rest.PushRuleAndKind abstract class VectorSettingsPushRuleNotificationPreferenceFragment : - VectorSettingsBaseFragment() { + VectorSettingsBaseFragment() { abstract val prefKeyToPushRuleId: Map diff --git a/vector/src/main/java/im/vector/app/features/settings/push/PushRulesViewModel.kt b/vector/src/main/java/im/vector/app/features/settings/push/PushRulesViewModel.kt index 0b6b72bb10..c6423bfea6 100644 --- a/vector/src/main/java/im/vector/app/features/settings/push/PushRulesViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/settings/push/PushRulesViewModel.kt @@ -30,7 +30,7 @@ data class PushRulesViewState( ) : MavericksState class PushRulesViewModel(initialState: PushRulesViewState) : - VectorViewModel(initialState) { + VectorViewModel(initialState) { companion object : MavericksViewModelFactory { diff --git a/vector/src/main/java/im/vector/app/features/settings/threepids/ThreePidsSettingsFragment.kt b/vector/src/main/java/im/vector/app/features/settings/threepids/ThreePidsSettingsFragment.kt index ee7f8efab4..2a9db78121 100644 --- a/vector/src/main/java/im/vector/app/features/settings/threepids/ThreePidsSettingsFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/threepids/ThreePidsSettingsFragment.kt @@ -61,7 +61,7 @@ class ThreePidsSettingsFragment @Inject constructor( viewModel.observeViewEvents { when (it) { - is ThreePidsSettingsViewEvents.Failure -> displayErrorDialog(it.throwable) + is ThreePidsSettingsViewEvents.Failure -> displayErrorDialog(it.throwable) is ThreePidsSettingsViewEvents.RequestReAuth -> askAuthentication(it) } } @@ -75,10 +75,11 @@ class ThreePidsSettingsFragment @Inject constructor( reAuthActivityResultLauncher.launch(intent) } } + private val reAuthActivityResultLauncher = registerStartForActivityResult { activityResult -> if (activityResult.resultCode == Activity.RESULT_OK) { when (activityResult.data?.extras?.getString(ReAuthActivity.RESULT_FLOW_TYPE)) { - LoginFlowTypes.SSO -> { + LoginFlowTypes.SSO -> { viewModel.handle(ThreePidsSettingsAction.SsoAuthDone) } LoginFlowTypes.PASSWORD -> { diff --git a/vector/src/main/java/im/vector/app/features/settings/threepids/ThreePidsSettingsViewEvents.kt b/vector/src/main/java/im/vector/app/features/settings/threepids/ThreePidsSettingsViewEvents.kt index 94ea8d24c6..9768d7bd93 100644 --- a/vector/src/main/java/im/vector/app/features/settings/threepids/ThreePidsSettingsViewEvents.kt +++ b/vector/src/main/java/im/vector/app/features/settings/threepids/ThreePidsSettingsViewEvents.kt @@ -22,6 +22,6 @@ import org.matrix.android.sdk.api.auth.registration.RegistrationFlowResponse sealed class ThreePidsSettingsViewEvents : VectorViewEvents { data class Failure(val throwable: Throwable) : ThreePidsSettingsViewEvents() -// object RequestPassword : ThreePidsSettingsViewEvents() + // object RequestPassword : ThreePidsSettingsViewEvents() data class RequestReAuth(val registrationFlowResponse: RegistrationFlowResponse, val lastErrorCode: String?) : ThreePidsSettingsViewEvents() } diff --git a/vector/src/main/java/im/vector/app/features/settings/troubleshoot/NotificationTroubleshootRecyclerViewAdapter.kt b/vector/src/main/java/im/vector/app/features/settings/troubleshoot/NotificationTroubleshootRecyclerViewAdapter.kt index 8f0b2cfe74..8f762a9abc 100644 --- a/vector/src/main/java/im/vector/app/features/settings/troubleshoot/NotificationTroubleshootRecyclerViewAdapter.kt +++ b/vector/src/main/java/im/vector/app/features/settings/troubleshoot/NotificationTroubleshootRecyclerViewAdapter.kt @@ -25,7 +25,7 @@ import im.vector.app.databinding.ItemNotificationTroubleshootBinding import im.vector.app.features.themes.ThemeUtils class NotificationTroubleshootRecyclerViewAdapter(val tests: ArrayList) : - RecyclerView.Adapter() { + RecyclerView.Adapter() { override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder { val inflater = LayoutInflater.from(parent.context) diff --git a/vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestAccountSettings.kt b/vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestAccountSettings.kt index 9d06e1724c..5b1216445f 100644 --- a/vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestAccountSettings.kt +++ b/vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestAccountSettings.kt @@ -34,7 +34,7 @@ import javax.inject.Inject */ class TestAccountSettings @Inject constructor(private val stringProvider: StringProvider, private val activeSessionHolder: ActiveSessionHolder) : - TroubleshootTest(R.string.settings_troubleshoot_test_account_settings_title) { + TroubleshootTest(R.string.settings_troubleshoot_test_account_settings_title) { override fun perform(activityResultLauncher: ActivityResultLauncher) { val session = activeSessionHolder.getSafeActiveSession() ?: return diff --git a/vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestDeviceSettings.kt b/vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestDeviceSettings.kt index f9fc7e80e3..c58b7f4ebc 100644 --- a/vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestDeviceSettings.kt +++ b/vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestDeviceSettings.kt @@ -27,7 +27,7 @@ import javax.inject.Inject */ class TestDeviceSettings @Inject constructor(private val vectorPreferences: VectorPreferences, private val stringProvider: StringProvider) : - TroubleshootTest(R.string.settings_troubleshoot_test_device_settings_title) { + TroubleshootTest(R.string.settings_troubleshoot_test_device_settings_title) { override fun perform(activityResultLauncher: ActivityResultLauncher) { if (vectorPreferences.areNotificationEnabledForDevice()) { diff --git a/vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestNotification.kt b/vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestNotification.kt index 412916c201..1efe76205a 100644 --- a/vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestNotification.kt +++ b/vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestNotification.kt @@ -30,7 +30,7 @@ import javax.inject.Inject class TestNotification @Inject constructor(private val context: Context, private val notificationUtils: NotificationUtils, private val stringProvider: StringProvider) : - TroubleshootTest(R.string.settings_troubleshoot_test_notification_title) { + TroubleshootTest(R.string.settings_troubleshoot_test_notification_title) { override fun perform(activityResultLauncher: ActivityResultLauncher) { // Display the notification right now diff --git a/vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestPushRulesSettings.kt b/vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestPushRulesSettings.kt index 79e4377a5c..12b3316e05 100644 --- a/vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestPushRulesSettings.kt +++ b/vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestPushRulesSettings.kt @@ -27,7 +27,7 @@ import javax.inject.Inject class TestPushRulesSettings @Inject constructor(private val activeSessionHolder: ActiveSessionHolder, private val stringProvider: StringProvider) : - TroubleshootTest(R.string.settings_troubleshoot_test_bing_settings_title) { + TroubleshootTest(R.string.settings_troubleshoot_test_bing_settings_title) { private val testedRules = listOf(RuleIds.RULE_ID_CONTAIN_DISPLAY_NAME, diff --git a/vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestSystemSettings.kt b/vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestSystemSettings.kt index 42f506d4a6..f3e64659cf 100644 --- a/vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestSystemSettings.kt +++ b/vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestSystemSettings.kt @@ -29,7 +29,7 @@ import javax.inject.Inject */ class TestSystemSettings @Inject constructor(private val context: FragmentActivity, private val stringProvider: StringProvider) : - TroubleshootTest(R.string.settings_troubleshoot_test_system_settings_title) { + TroubleshootTest(R.string.settings_troubleshoot_test_system_settings_title) { override fun perform(activityResultLauncher: ActivityResultLauncher) { if (NotificationManagerCompat.from(context).areNotificationsEnabled()) { diff --git a/vector/src/main/java/im/vector/app/features/share/IncomingShareViewModel.kt b/vector/src/main/java/im/vector/app/features/share/IncomingShareViewModel.kt index ca4148ebb7..1d72f224c4 100644 --- a/vector/src/main/java/im/vector/app/features/share/IncomingShareViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/share/IncomingShareViewModel.kt @@ -42,7 +42,7 @@ class IncomingShareViewModel @AssistedInject constructor( @Assisted initialState: IncomingShareViewState, private val session: Session, private val breadcrumbsRoomComparator: BreadcrumbsRoomComparator) : - VectorViewModel(initialState) { + VectorViewModel(initialState) { @AssistedFactory interface Factory : MavericksAssistedViewModelFactory { diff --git a/vector/src/main/java/im/vector/app/features/signout/soft/SoftLogoutFragment.kt b/vector/src/main/java/im/vector/app/features/signout/soft/SoftLogoutFragment.kt index f40f35a6e2..8a682b4b5e 100644 --- a/vector/src/main/java/im/vector/app/features/signout/soft/SoftLogoutFragment.kt +++ b/vector/src/main/java/im/vector/app/features/signout/soft/SoftLogoutFragment.kt @@ -65,14 +65,14 @@ class SoftLogoutFragment @Inject constructor( mode.ssoIdentityProviders )) } - is LoginMode.Sso -> { + is LoginMode.Sso -> { loginViewModel.handle(LoginAction.SetupSsoForSessionRecovery( softLogoutViewState.homeServerUrl, softLogoutViewState.deviceId, mode.ssoIdentityProviders )) } - LoginMode.Unsupported -> { + LoginMode.Unsupported -> { // Prepare the loginViewModel for a SSO/login fallback recovery loginViewModel.handle(LoginAction.SetupSsoForSessionRecovery( softLogoutViewState.homeServerUrl, @@ -80,7 +80,7 @@ class SoftLogoutFragment @Inject constructor( null )) } - else -> Unit + else -> Unit } } } diff --git a/vector/src/main/java/im/vector/app/features/spaces/create/CreateSpaceState.kt b/vector/src/main/java/im/vector/app/features/spaces/create/CreateSpaceState.kt index 57782d9182..2f55270a69 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/create/CreateSpaceState.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/create/CreateSpaceState.kt @@ -33,9 +33,15 @@ data class CreateSpaceState( val aliasManuallyModified: Boolean = false, val aliasVerificationTask: Async = Uninitialized, val nameInlineError: String? = null, - val defaultRooms: Map? = null, - val default3pidInvite: Map? = null, - val emailValidationResult: Map? = null, + val defaultRooms: Map? = null, + val default3pidInvite: Map? = null, + val emailValidationResult: Map? = null, val creationResult: Async = Uninitialized, val canInviteByMail: Boolean = false ) : MavericksState { diff --git a/vector/src/main/java/im/vector/app/features/spaces/create/CreateSpaceViewModel.kt b/vector/src/main/java/im/vector/app/features/spaces/create/CreateSpaceViewModel.kt index 2b8276a4d7..330467d161 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/create/CreateSpaceViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/create/CreateSpaceViewModel.kt @@ -373,7 +373,7 @@ class CreateSpaceViewModel @AssistedInject constructor( ) ) when (result) { - is CreateSpaceTaskResult.Success -> { + is CreateSpaceTaskResult.Success -> { setState { copy(creationResult = Success(result.spaceId)) } diff --git a/vector/src/main/java/im/vector/app/features/spaces/create/WizardButtonView.kt b/vector/src/main/java/im/vector/app/features/spaces/create/WizardButtonView.kt index 971d61dd9c..c1bfba7205 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/create/WizardButtonView.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/create/WizardButtonView.kt @@ -30,7 +30,7 @@ import im.vector.app.core.extensions.setTextOrHide import im.vector.app.databinding.ViewSpaceTypeButtonBinding class WizardButtonView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyle: Int = 0) : - ConstraintLayout(context, attrs, defStyle) { + ConstraintLayout(context, attrs, defStyle) { private val views: ViewSpaceTypeButtonBinding diff --git a/vector/src/main/java/im/vector/app/features/spaces/explore/SpaceDirectoryFragment.kt b/vector/src/main/java/im/vector/app/features/spaces/explore/SpaceDirectoryFragment.kt index 7e7b1d8996..e59087778f 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/explore/SpaceDirectoryFragment.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/explore/SpaceDirectoryFragment.kt @@ -169,7 +169,7 @@ class SpaceDirectoryFragment @Inject constructor( } else { toolbar?.title = state.currentRootSummary?.name ?: state.currentRootSummary?.canonicalAlias - ?: getString(R.string.space_explore_activity_title) + ?: getString(R.string.space_explore_activity_title) } spaceCardRenderer.render(state.currentRootSummary, emptyList(), this, views.spaceCard, showDescription = false) diff --git a/vector/src/main/java/im/vector/app/features/spaces/explore/SpaceDirectoryViewModel.kt b/vector/src/main/java/im/vector/app/features/spaces/explore/SpaceDirectoryViewModel.kt index abc70ccbc1..b980b7a457 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/explore/SpaceDirectoryViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/explore/SpaceDirectoryViewModel.kt @@ -275,9 +275,9 @@ class SpaceDirectoryViewModel @AssistedInject constructor( knownSummaries = ( knownSummaries + (paginate.children.mapNotNull { - session.getRoomSummary(it.childRoomId) - ?.takeIf { it.membership == Membership.JOIN } // only take if joined because it will be up to date (synced) - }) + session.getRoomSummary(it.childRoomId) + ?.takeIf { it.membership == Membership.JOIN } // only take if joined because it will be up to date (synced) + }) ).distinctBy { it.roomId } query = query.copy( diff --git a/vector/src/main/java/im/vector/app/features/spaces/manage/SpaceManageRoomViewEvents.kt b/vector/src/main/java/im/vector/app/features/spaces/manage/SpaceManageRoomViewEvents.kt index 8ba7398a2f..043c71f549 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/manage/SpaceManageRoomViewEvents.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/manage/SpaceManageRoomViewEvents.kt @@ -19,6 +19,6 @@ package im.vector.app.features.spaces.manage import im.vector.app.core.platform.VectorViewEvents sealed class SpaceManageRoomViewEvents : VectorViewEvents { -// object BulkActionSuccess: SpaceManageRoomViewEvents() + // object BulkActionSuccess: SpaceManageRoomViewEvents() data class BulkActionFailure(val errorList: List) : SpaceManageRoomViewEvents() } diff --git a/vector/src/main/java/im/vector/app/features/spaces/manage/SpaceManageViewState.kt b/vector/src/main/java/im/vector/app/features/spaces/manage/SpaceManageViewState.kt index 82abc823c3..0baa4d309f 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/manage/SpaceManageViewState.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/manage/SpaceManageViewState.kt @@ -24,6 +24,7 @@ enum class ManageType { Settings, ManageRooms } + data class SpaceManageViewState( val spaceId: String = "", val manageType: ManageType diff --git a/vector/src/main/java/im/vector/app/features/spaces/manage/SpaceSettingsController.kt b/vector/src/main/java/im/vector/app/features/spaces/manage/SpaceSettingsController.kt index 7cd5a70279..afe5200fbb 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/manage/SpaceSettingsController.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/manage/SpaceSettingsController.kt @@ -65,13 +65,13 @@ class SpaceSettingsController @Inject constructor( id("avatar") enabled(data.actionPermissions.canChangeAvatar) when (val avatarAction = data.avatarAction) { - RoomSettingsViewState.AvatarAction.None -> { + RoomSettingsViewState.AvatarAction.None -> { // Use the current value avatarRenderer(host.avatarRenderer) // We do not want to use the fallback avatar url, which can be the other user avatar, or the current user avatar. matrixItem(roomSummary.toMatrixItem().updateAvatar(data.currentRoomAvatarUrl)) } - RoomSettingsViewState.AvatarAction.DeleteAvatar -> + RoomSettingsViewState.AvatarAction.DeleteAvatar -> imageUri(null) is RoomSettingsViewState.AvatarAction.UpdateAvatar -> imageUri(avatarAction.newAvatarUri) diff --git a/vector/src/main/java/im/vector/app/features/spaces/manage/SpaceSettingsFragment.kt b/vector/src/main/java/im/vector/app/features/spaces/manage/SpaceSettingsFragment.kt index db9420abc2..57b1c97efb 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/manage/SpaceSettingsFragment.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/manage/SpaceSettingsFragment.kt @@ -96,8 +96,8 @@ class SpaceSettingsFragment @Inject constructor( viewModel.observeViewEvents { when (it) { is RoomSettingsViewEvents.Failure -> showFailure(it.throwable) - RoomSettingsViewEvents.Success -> showSuccess() - RoomSettingsViewEvents.GoBack -> { + RoomSettingsViewEvents.Success -> showSuccess() + RoomSettingsViewEvents.GoBack -> { ignoreChanges = true vectorBaseActivity.onBackPressed() } @@ -244,10 +244,10 @@ class SpaceSettingsFragment @Inject constructor( override fun onAvatarDelete() { withState(viewModel) { when (it.avatarAction) { - RoomSettingsViewState.AvatarAction.None -> { + RoomSettingsViewState.AvatarAction.None -> { viewModel.handle(RoomSettingsAction.SetAvatarAction(RoomSettingsViewState.AvatarAction.DeleteAvatar)) } - RoomSettingsViewState.AvatarAction.DeleteAvatar -> { + RoomSettingsViewState.AvatarAction.DeleteAvatar -> { /* Should not happen */ } is RoomSettingsViewState.AvatarAction.UpdateAvatar -> { diff --git a/vector/src/main/java/im/vector/app/features/spaces/preview/SpacePreviewFragment.kt b/vector/src/main/java/im/vector/app/features/spaces/preview/SpacePreviewFragment.kt index e97dab1d86..271b00c707 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/preview/SpacePreviewFragment.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/preview/SpacePreviewFragment.kt @@ -105,7 +105,7 @@ class SpacePreviewFragment @Inject constructor( views.spacePreviewAcceptInviteButton.isEnabled = false views.spacePreviewDeclineInviteButton.isEnabled = false } - is Fail -> { + is Fail -> { views.spacePreviewPeekingProgress.isVisible = false views.spacePreviewButtonBar.isVisible = false } @@ -127,10 +127,10 @@ class SpacePreviewFragment @Inject constructor( private fun handleViewEvents(viewEvents: SpacePreviewViewEvents) { when (viewEvents) { - SpacePreviewViewEvents.Dismiss -> { + SpacePreviewViewEvents.Dismiss -> { sharedActionViewModel.post(SpacePreviewSharedAction.DismissAction) } - SpacePreviewViewEvents.JoinSuccess -> { + SpacePreviewViewEvents.JoinSuccess -> { sharedActionViewModel.post(SpacePreviewSharedAction.HideModalLoading) sharedActionViewModel.post(SpacePreviewSharedAction.DismissAction) } diff --git a/vector/src/main/java/im/vector/app/features/spaces/preview/SpacePreviewState.kt b/vector/src/main/java/im/vector/app/features/spaces/preview/SpacePreviewState.kt index 14f9a45d68..ca6a472985 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/preview/SpacePreviewState.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/preview/SpacePreviewState.kt @@ -22,8 +22,8 @@ import com.airbnb.mvrx.Uninitialized data class SpacePreviewState( val idOrAlias: String, - val name: String? = null, - val topic: String? = null, + val name: String? = null, + val topic: String? = null, val avatarUrl: String? = null, val spaceInfo: Async = Uninitialized, val childInfoList: Async> = Uninitialized, diff --git a/vector/src/main/java/im/vector/app/features/spaces/preview/SpacePreviewViewModel.kt b/vector/src/main/java/im/vector/app/features/spaces/preview/SpacePreviewViewModel.kt index 149f582c5c..f7471bc7aa 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/preview/SpacePreviewViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/preview/SpacePreviewViewModel.kt @@ -64,8 +64,8 @@ class SpacePreviewViewModel @AssistedInject constructor( override fun handle(action: SpacePreviewViewAction) { when (action) { - SpacePreviewViewAction.ViewReady -> handleReady() - SpacePreviewViewAction.AcceptInvite -> handleAcceptInvite() + SpacePreviewViewAction.ViewReady -> handleReady() + SpacePreviewViewAction.AcceptInvite -> handleAcceptInvite() SpacePreviewViewAction.DismissInvite -> handleDismissInvite() } } @@ -103,7 +103,7 @@ class SpacePreviewViewModel @AssistedInject constructor( // For now we don't handle partial success, it's just success _viewEvents.post(SpacePreviewViewEvents.JoinSuccess) } - is JoinSpaceResult.Fail -> { + is JoinSpaceResult.Fail -> { _viewEvents.post(SpacePreviewViewEvents.JoinFailure(errorFormatter.toHumanReadable(joinResult.error))) } } diff --git a/vector/src/main/java/im/vector/app/features/spaces/preview/SpaceTabView.kt b/vector/src/main/java/im/vector/app/features/spaces/preview/SpaceTabView.kt index 41fc8bf6b9..ea28129262 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/preview/SpaceTabView.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/preview/SpaceTabView.kt @@ -24,7 +24,7 @@ import im.vector.app.R class SpaceTabView constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0) : - LinearLayout(context, attrs, defStyleAttr) { + LinearLayout(context, attrs, defStyleAttr) { constructor(context: Context, attrs: AttributeSet) : this(context, attrs, 0) {} constructor(context: Context) : this(context, null, 0) {} diff --git a/vector/src/main/java/im/vector/app/features/sync/widget/SyncStateView.kt b/vector/src/main/java/im/vector/app/features/sync/widget/SyncStateView.kt index ce6df67d53..01e933e446 100755 --- a/vector/src/main/java/im/vector/app/features/sync/widget/SyncStateView.kt +++ b/vector/src/main/java/im/vector/app/features/sync/widget/SyncStateView.kt @@ -28,7 +28,7 @@ import org.matrix.android.sdk.api.session.initsync.SyncStatusService import org.matrix.android.sdk.api.session.sync.SyncState class SyncStateView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyle: Int = 0) : - LinearLayout(context, attrs, defStyle) { + LinearLayout(context, attrs, defStyle) { private val views: ViewSyncStateBinding diff --git a/vector/src/main/java/im/vector/app/features/webview/ConsentWebViewEventListener.kt b/vector/src/main/java/im/vector/app/features/webview/ConsentWebViewEventListener.kt index a3d4902b41..91253383ea 100644 --- a/vector/src/main/java/im/vector/app/features/webview/ConsentWebViewEventListener.kt +++ b/vector/src/main/java/im/vector/app/features/webview/ConsentWebViewEventListener.kt @@ -32,7 +32,7 @@ private const val RIOT_BOT_ID = "@riot-bot:matrix.org" class ConsentWebViewEventListener(activity: VectorBaseActivity<*>, private val session: Session, private val delegate: WebViewEventListener) : - WebViewEventListener by delegate { + WebViewEventListener by delegate { private val safeActivity: VectorBaseActivity<*>? by weak(activity) diff --git a/vector/src/main/java/im/vector/app/features/widgets/WidgetViewModel.kt b/vector/src/main/java/im/vector/app/features/widgets/WidgetViewModel.kt index 20fae6e31a..2ba35573f0 100644 --- a/vector/src/main/java/im/vector/app/features/widgets/WidgetViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/widgets/WidgetViewModel.kt @@ -51,7 +51,7 @@ class WidgetViewModel @AssistedInject constructor(@Assisted val initialState: Wi widgetPostAPIHandlerFactory: WidgetPostAPIHandler.Factory, private val stringProvider: StringProvider, private val session: Session) : - VectorViewModel(initialState), + VectorViewModel(initialState), WidgetPostAPIHandler.NavigationCallback, IntegrationManagerService.Listener { diff --git a/vector/src/main/java/im/vector/app/features/widgets/permissions/RoomWidgetPermissionViewModel.kt b/vector/src/main/java/im/vector/app/features/widgets/permissions/RoomWidgetPermissionViewModel.kt index 78871da324..7ab2cf174d 100644 --- a/vector/src/main/java/im/vector/app/features/widgets/permissions/RoomWidgetPermissionViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/widgets/permissions/RoomWidgetPermissionViewModel.kt @@ -37,7 +37,7 @@ import java.net.URL class RoomWidgetPermissionViewModel @AssistedInject constructor(@Assisted val initialState: RoomWidgetPermissionViewState, private val session: Session) : - VectorViewModel(initialState) { + VectorViewModel(initialState) { private val widgetService = session.widgetService() private val integrationManagerService = session.integrationManagerService() From ed11ca99af99fcb7167e63bb608fb7057ecb8d9a Mon Sep 17 00:00:00 2001 From: ericdecanini Date: Thu, 21 Apr 2022 11:53:24 +0200 Subject: [PATCH 135/561] Adds changelog file --- changelog.d/5805.misc | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/5805.misc diff --git a/changelog.d/5805.misc b/changelog.d/5805.misc new file mode 100644 index 0000000000..e0e6a311b4 --- /dev/null +++ b/changelog.d/5805.misc @@ -0,0 +1 @@ +Autoformats entire project From 8e569af60c6b5f7a37d9539ced4615a1d9075138 Mon Sep 17 00:00:00 2001 From: ericdecanini Date: Thu, 21 Apr 2022 11:54:29 +0200 Subject: [PATCH 136/561] Fixes lint errors --- .../java/im/vector/app/features/login/LoginMode.kt | 7 +++---- .../app/features/spaces/create/CreateSpaceState.kt | 12 +++--------- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/login/LoginMode.kt b/vector/src/main/java/im/vector/app/features/login/LoginMode.kt index 8fec4f3991..53c5abbc88 100644 --- a/vector/src/main/java/im/vector/app/features/login/LoginMode.kt +++ b/vector/src/main/java/im/vector/app/features/login/LoginMode.kt @@ -20,10 +20,9 @@ import android.os.Parcelable import kotlinx.parcelize.Parcelize import org.matrix.android.sdk.api.auth.data.SsoIdentityProvider -sealed class LoginMode : Parcelable -/** because persist state */ -{ - @Parcelize object Unknown : LoginMode() +sealed class LoginMode : Parcelable { /** Parcelable because persist state */ + +@Parcelize object Unknown : LoginMode() @Parcelize object Password : LoginMode() @Parcelize data class Sso(val ssoIdentityProviders: List?) : LoginMode() @Parcelize data class SsoAndPassword(val ssoIdentityProviders: List?) : LoginMode() diff --git a/vector/src/main/java/im/vector/app/features/spaces/create/CreateSpaceState.kt b/vector/src/main/java/im/vector/app/features/spaces/create/CreateSpaceState.kt index 2f55270a69..40f316b79a 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/create/CreateSpaceState.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/create/CreateSpaceState.kt @@ -33,15 +33,9 @@ data class CreateSpaceState( val aliasManuallyModified: Boolean = false, val aliasVerificationTask: Async = Uninitialized, val nameInlineError: String? = null, - val defaultRooms: Map? = null, - val default3pidInvite: Map? = null, - val emailValidationResult: Map? = null, + val defaultRooms: Map? = null, /** Int: position in form */ + val default3pidInvite: Map? = null, /** Int: position in form */ + val emailValidationResult: Map? = null, /** Int: position in form */ val creationResult: Async = Uninitialized, val canInviteByMail: Boolean = false ) : MavericksState { From 534d55a24e32b188f34d2f008262248c79c7cbd1 Mon Sep 17 00:00:00 2001 From: Onuray Sahin Date: Thu, 21 Apr 2022 13:00:51 +0300 Subject: [PATCH 137/561] Fix import. --- .../im/vector/app/features/call/CallControlsBottomSheet.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/call/CallControlsBottomSheet.kt b/vector/src/main/java/im/vector/app/features/call/CallControlsBottomSheet.kt index 9310dbf862..11a43bcd0c 100644 --- a/vector/src/main/java/im/vector/app/features/call/CallControlsBottomSheet.kt +++ b/vector/src/main/java/im/vector/app/features/call/CallControlsBottomSheet.kt @@ -27,7 +27,7 @@ import dagger.hilt.android.AndroidEntryPoint import im.vector.app.R import im.vector.app.core.platform.VectorBaseBottomSheetDialogFragment import im.vector.app.databinding.BottomSheetCallControlsBinding -import im.vector.app.features.DefaultVectorFeatures +import im.vector.app.features.VectorFeatures import javax.inject.Inject @AndroidEntryPoint @@ -36,7 +36,7 @@ class CallControlsBottomSheet : VectorBaseBottomSheetDialogFragment Date: Thu, 21 Apr 2022 12:02:47 +0200 Subject: [PATCH 138/561] Fixes long line and comment lint errors --- .../app/features/call/audio/API23AudioDeviceDetector.kt | 9 +++++---- .../main/java/im/vector/app/features/login/LoginMode.kt | 4 ++-- .../app/features/spaces/create/CreateSpaceState.kt | 6 +++--- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/call/audio/API23AudioDeviceDetector.kt b/vector/src/main/java/im/vector/app/features/call/audio/API23AudioDeviceDetector.kt index 3f9d4e9076..ccf79cc02d 100644 --- a/vector/src/main/java/im/vector/app/features/call/audio/API23AudioDeviceDetector.kt +++ b/vector/src/main/java/im/vector/app/features/call/audio/API23AudioDeviceDetector.kt @@ -32,10 +32,11 @@ internal class API23AudioDeviceDetector(private val audioManager: AudioManager, val deviceInfos = audioManager.getDevices(AudioManager.GET_DEVICES_OUTPUTS) for (info in deviceInfos) { when (info.type) { - AudioDeviceInfo.TYPE_BLUETOOTH_SCO -> devices.add(CallAudioManager.Device.WirelessHeadset(info.productName.toString())) - AudioDeviceInfo.TYPE_BUILTIN_EARPIECE -> devices.add(CallAudioManager.Device.Phone) - AudioDeviceInfo.TYPE_BUILTIN_SPEAKER -> devices.add(CallAudioManager.Device.Speaker) - AudioDeviceInfo.TYPE_WIRED_HEADPHONES, AudioDeviceInfo.TYPE_WIRED_HEADSET, TYPE_USB_HEADSET -> devices.add(CallAudioManager.Device.Headset) + AudioDeviceInfo.TYPE_BLUETOOTH_SCO -> devices.add(CallAudioManager.Device.WirelessHeadset(info.productName.toString())) + AudioDeviceInfo.TYPE_BUILTIN_EARPIECE -> devices.add(CallAudioManager.Device.Phone) + AudioDeviceInfo.TYPE_BUILTIN_SPEAKER -> devices.add(CallAudioManager.Device.Speaker) + AudioDeviceInfo.TYPE_WIRED_HEADPHONES, + AudioDeviceInfo.TYPE_WIRED_HEADSET, TYPE_USB_HEADSET -> devices.add(CallAudioManager.Device.Headset) } } callAudioManager.replaceDevices(devices) diff --git a/vector/src/main/java/im/vector/app/features/login/LoginMode.kt b/vector/src/main/java/im/vector/app/features/login/LoginMode.kt index 53c5abbc88..9713e492ec 100644 --- a/vector/src/main/java/im/vector/app/features/login/LoginMode.kt +++ b/vector/src/main/java/im/vector/app/features/login/LoginMode.kt @@ -20,9 +20,9 @@ import android.os.Parcelable import kotlinx.parcelize.Parcelize import org.matrix.android.sdk.api.auth.data.SsoIdentityProvider -sealed class LoginMode : Parcelable { /** Parcelable because persist state */ +sealed class LoginMode : Parcelable { // Parcelable because persist state -@Parcelize object Unknown : LoginMode() + @Parcelize object Unknown : LoginMode() @Parcelize object Password : LoginMode() @Parcelize data class Sso(val ssoIdentityProviders: List?) : LoginMode() @Parcelize data class SsoAndPassword(val ssoIdentityProviders: List?) : LoginMode() diff --git a/vector/src/main/java/im/vector/app/features/spaces/create/CreateSpaceState.kt b/vector/src/main/java/im/vector/app/features/spaces/create/CreateSpaceState.kt index 40f316b79a..439f5491f7 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/create/CreateSpaceState.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/create/CreateSpaceState.kt @@ -33,9 +33,9 @@ data class CreateSpaceState( val aliasManuallyModified: Boolean = false, val aliasVerificationTask: Async = Uninitialized, val nameInlineError: String? = null, - val defaultRooms: Map? = null, /** Int: position in form */ - val default3pidInvite: Map? = null, /** Int: position in form */ - val emailValidationResult: Map? = null, /** Int: position in form */ + val defaultRooms: Map? = null, // Int: position in form + val default3pidInvite: Map? = null, // Int: position in form + val emailValidationResult: Map? = null, // Int: position in form val creationResult: Async = Uninitialized, val canInviteByMail: Boolean = false ) : MavericksState { From 543e27443785d630357f2b13e5f5f752b7fff79e Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 15 Apr 2022 16:51:06 +0200 Subject: [PATCH 139/561] Required by dokka-gradle-plugin:1.6.20 --- dependencies_groups.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/dependencies_groups.gradle b/dependencies_groups.gradle index 2c3f6a0219..8422e05930 100644 --- a/dependencies_groups.gradle +++ b/dependencies_groups.gradle @@ -164,6 +164,7 @@ ext.groups = [ 'org.codehaus.woodstox', 'org.eclipse.ee4j', 'org.ec4j.core', + 'org.freemarker', 'org.glassfish.jaxb', 'org.hamcrest', 'org.jacoco', From 729a2e6372890e11539d00e120e4e07eb3787003 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 15 Apr 2022 17:36:56 +0200 Subject: [PATCH 140/561] Move `pushrules` package to the `session` package --- .../matrix/android/sdk/api/session/Session.kt | 2 +- .../sdk/api/{ => session}/pushrules/Action.kt | 4 ++-- .../api/{ => session}/pushrules/Condition.kt | 2 +- .../pushrules/ConditionResolver.kt | 2 +- .../pushrules/ContainsDisplayNameCondition.kt | 2 +- .../pushrules/EventMatchCondition.kt | 2 +- .../sdk/api/{ => session}/pushrules/Kind.kt | 2 +- .../api/{ => session}/pushrules/PushEvents.kt | 4 ++-- .../pushrules/PushRuleService.kt | 6 ++--- .../pushrules/RoomMemberCountCondition.kt | 2 +- .../api/{ => session}/pushrules/RuleIds.kt | 2 +- .../api/{ => session}/pushrules/RuleScope.kt | 2 +- .../api/{ => session}/pushrules/RuleSetKey.kt | 2 +- .../SenderNotificationPermissionCondition.kt | 2 +- .../pushrules/rest/GetPushRulesResponse.kt | 2 +- .../pushrules/rest/PushCondition.kt | 16 +++++++------- .../{ => session}/pushrules/rest/PushRule.kt | 8 +++---- .../{ => session}/pushrules/rest/RuleSet.kt | 6 ++--- .../database/mapper/PushConditionMapper.kt | 2 +- .../database/mapper/PushRulesMapper.kt | 6 ++--- .../database/model/PushRulesEntity.kt | 2 +- .../internal/database/query/PushersQueries.kt | 2 +- .../sdk/internal/session/DefaultSession.kt | 2 +- .../notification/DefaultPushRuleService.kt | 22 +++++++++---------- .../notification/ProcessEventForPushTask.kt | 4 ++-- .../session/notification/PushRuleFinder.kt | 4 ++-- .../session/pushers/AddPushRuleTask.kt | 4 ++-- .../pushers/DefaultConditionResolver.kt | 10 ++++----- .../internal/session/pushers/PushRulesApi.kt | 4 ++-- .../internal/session/pushers/PushersModule.kt | 4 ++-- .../session/pushers/RemovePushRuleTask.kt | 2 +- .../session/pushers/SavePushRulesTask.kt | 6 ++--- .../pushers/UpdatePushRuleActionsTask.kt | 6 ++--- .../pushers/UpdatePushRuleEnableStatusTask.kt | 4 ++-- .../DefaultRoomPushRuleService.kt | 2 +- .../session/room/notification/RoomPushRule.kt | 4 ++-- .../room/notification/RoomPushRuleMapper.kt | 14 ++++++------ .../SetRoomNotificationStateTask.kt | 2 +- .../session/sync/SyncResponseHandler.kt | 4 ++-- .../handler/UserAccountDataSyncHandler.kt | 6 ++--- .../pushrules/PushRuleActionsTest.kt | 4 ++-- .../pushrules/PushRulesConditionTest.kt | 2 +- .../member/AutocompleteMemberPresenter.kt | 2 +- .../features/home/HomeActivityViewModel.kt | 2 +- .../notifications/NotificationAction.kt | 2 +- .../notifications/PushRuleTriggerListener.kt | 6 ++--- .../notifications/NotificationIndex.kt | 4 ++-- .../notifications/PushRuleDefinitions.kt | 2 +- .../settings/notifications/StandardActions.kt | 2 +- ...sAdvancedNotificationPreferenceFragment.kt | 4 ++-- ...gsDefaultNotificationPreferenceFragment.kt | 2 +- ...dMentionsNotificationPreferenceFragment.kt | 8 +++---- ...rSettingsNotificationPreferenceFragment.kt | 4 ++-- ...ingsOtherNotificationPreferenceFragment.kt | 2 +- ...sPushRuleNotificationPreferenceFragment.kt | 4 ++-- .../features/settings/push/PushRuleItem.kt | 4 ++-- .../settings/push/PushRulesViewModel.kt | 2 +- .../troubleshoot/TestAccountSettings.kt | 4 ++-- .../troubleshoot/TestPushRulesSettings.kt | 4 ++-- 59 files changed, 124 insertions(+), 124 deletions(-) rename matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/{ => session}/pushrules/Action.kt (97%) rename matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/{ => session}/pushrules/Condition.kt (93%) rename matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/{ => session}/pushrules/ConditionResolver.kt (96%) rename matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/{ => session}/pushrules/ContainsDisplayNameCondition.kt (97%) rename matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/{ => session}/pushrules/EventMatchCondition.kt (98%) rename matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/{ => session}/pushrules/Kind.kt (96%) rename matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/{ => session}/pushrules/PushEvents.kt (88%) rename matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/{ => session}/pushrules/PushRuleService.kt (91%) rename matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/{ => session}/pushrules/RoomMemberCountCondition.kt (97%) rename matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/{ => session}/pushrules/RuleIds.kt (97%) rename matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/{ => session}/pushrules/RuleScope.kt (92%) rename matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/{ => session}/pushrules/RuleSetKey.kt (95%) rename matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/{ => session}/pushrules/SenderNotificationPermissionCondition.kt (97%) rename matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/{ => session}/pushrules/rest/GetPushRulesResponse.kt (95%) rename matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/{ => session}/pushrules/rest/PushCondition.kt (84%) rename matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/{ => session}/pushrules/rest/PushRule.kt (94%) rename matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/{ => session}/pushrules/rest/RuleSet.kt (93%) rename matrix-sdk-android/src/test/java/org/matrix/android/sdk/api/{ => session}/pushrules/PushRuleActionsTest.kt (95%) rename matrix-sdk-android/src/test/java/org/matrix/android/sdk/api/{ => session}/pushrules/PushRulesConditionTest.kt (99%) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/Session.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/Session.kt index 2ad0ae9e0d..207afd50cc 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/Session.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/Session.kt @@ -24,7 +24,6 @@ import org.matrix.android.sdk.api.MatrixCoroutineDispatchers import org.matrix.android.sdk.api.auth.data.SessionParams import org.matrix.android.sdk.api.failure.GlobalError import org.matrix.android.sdk.api.federation.FederationService -import org.matrix.android.sdk.api.pushrules.PushRuleService import org.matrix.android.sdk.api.session.account.AccountService import org.matrix.android.sdk.api.session.accountdata.SessionAccountDataService import org.matrix.android.sdk.api.session.cache.CacheService @@ -47,6 +46,7 @@ import org.matrix.android.sdk.api.session.permalinks.PermalinkService import org.matrix.android.sdk.api.session.presence.PresenceService import org.matrix.android.sdk.api.session.profile.ProfileService import org.matrix.android.sdk.api.session.pushers.PushersService +import org.matrix.android.sdk.api.session.pushrules.PushRuleService import org.matrix.android.sdk.api.session.room.RoomDirectoryService import org.matrix.android.sdk.api.session.room.RoomService import org.matrix.android.sdk.api.session.search.SearchService diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/Action.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/Action.kt similarity index 97% rename from matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/Action.kt rename to matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/Action.kt index 30289531e7..7790942d84 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/Action.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/Action.kt @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.matrix.android.sdk.api.pushrules +package org.matrix.android.sdk.api.session.pushrules -import org.matrix.android.sdk.api.pushrules.rest.PushRule +import org.matrix.android.sdk.api.session.pushrules.rest.PushRule import timber.log.Timber sealed class Action { diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/Condition.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/Condition.kt similarity index 93% rename from matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/Condition.kt rename to matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/Condition.kt index 04cccf7319..df5b056c2e 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/Condition.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/Condition.kt @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.matrix.android.sdk.api.pushrules +package org.matrix.android.sdk.api.session.pushrules import org.matrix.android.sdk.api.session.events.model.Event diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/ConditionResolver.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/ConditionResolver.kt similarity index 96% rename from matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/ConditionResolver.kt rename to matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/ConditionResolver.kt index 0a7366e5d2..f8a930f987 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/ConditionResolver.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/ConditionResolver.kt @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.matrix.android.sdk.api.pushrules +package org.matrix.android.sdk.api.session.pushrules import org.matrix.android.sdk.api.session.events.model.Event diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/ContainsDisplayNameCondition.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/ContainsDisplayNameCondition.kt similarity index 97% rename from matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/ContainsDisplayNameCondition.kt rename to matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/ContainsDisplayNameCondition.kt index 7f43023873..69dd14ddc2 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/ContainsDisplayNameCondition.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/ContainsDisplayNameCondition.kt @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.matrix.android.sdk.api.pushrules +package org.matrix.android.sdk.api.session.pushrules import org.matrix.android.sdk.api.session.events.model.Event import org.matrix.android.sdk.api.session.events.model.EventType diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/EventMatchCondition.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/EventMatchCondition.kt similarity index 98% rename from matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/EventMatchCondition.kt rename to matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/EventMatchCondition.kt index 65a13b4fec..8875807b8a 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/EventMatchCondition.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/EventMatchCondition.kt @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.matrix.android.sdk.api.pushrules +package org.matrix.android.sdk.api.session.pushrules import org.matrix.android.sdk.api.session.events.model.Event import org.matrix.android.sdk.internal.di.MoshiProvider diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/Kind.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/Kind.kt similarity index 96% rename from matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/Kind.kt rename to matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/Kind.kt index 293a06af9f..463f3c2a73 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/Kind.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/Kind.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.matrix.android.sdk.api.pushrules +package org.matrix.android.sdk.api.session.pushrules enum class Kind(val value: String) { EventMatch("event_match"), diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/PushEvents.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/PushEvents.kt similarity index 88% rename from matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/PushEvents.kt rename to matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/PushEvents.kt index 466e345cad..ee460d7076 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/PushEvents.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/PushEvents.kt @@ -13,10 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.matrix.android.sdk.api.pushrules +package org.matrix.android.sdk.api.session.pushrules -import org.matrix.android.sdk.api.pushrules.rest.PushRule import org.matrix.android.sdk.api.session.events.model.Event +import org.matrix.android.sdk.api.session.pushrules.rest.PushRule data class PushEvents( val matchedEvents: List>, diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/PushRuleService.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/PushRuleService.kt similarity index 91% rename from matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/PushRuleService.kt rename to matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/PushRuleService.kt index 76885d8545..abbdbf8104 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/PushRuleService.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/PushRuleService.kt @@ -13,12 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.matrix.android.sdk.api.pushrules +package org.matrix.android.sdk.api.session.pushrules import androidx.lifecycle.LiveData -import org.matrix.android.sdk.api.pushrules.rest.PushRule -import org.matrix.android.sdk.api.pushrules.rest.RuleSet import org.matrix.android.sdk.api.session.events.model.Event +import org.matrix.android.sdk.api.session.pushrules.rest.PushRule +import org.matrix.android.sdk.api.session.pushrules.rest.RuleSet interface PushRuleService { /** diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/RoomMemberCountCondition.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/RoomMemberCountCondition.kt similarity index 97% rename from matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/RoomMemberCountCondition.kt rename to matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/RoomMemberCountCondition.kt index 328e6dae11..84b2f520ea 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/RoomMemberCountCondition.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/RoomMemberCountCondition.kt @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.matrix.android.sdk.api.pushrules +package org.matrix.android.sdk.api.session.pushrules import org.matrix.android.sdk.api.session.events.model.Event import org.matrix.android.sdk.internal.session.room.RoomGetter diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/RuleIds.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/RuleIds.kt similarity index 97% rename from matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/RuleIds.kt rename to matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/RuleIds.kt index 5b14e97d5e..4f35fb79c3 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/RuleIds.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/RuleIds.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.matrix.android.sdk.api.pushrules +package org.matrix.android.sdk.api.session.pushrules /** * Known rule ids diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/RuleScope.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/RuleScope.kt similarity index 92% rename from matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/RuleScope.kt rename to matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/RuleScope.kt index 7c1edc1aca..307b9db042 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/RuleScope.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/RuleScope.kt @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.matrix.android.sdk.api.pushrules +package org.matrix.android.sdk.api.session.pushrules object RuleScope { const val GLOBAL = "global" diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/RuleSetKey.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/RuleSetKey.kt similarity index 95% rename from matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/RuleSetKey.kt rename to matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/RuleSetKey.kt index 5b6f6713f8..7b8f4c9f95 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/RuleSetKey.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/RuleSetKey.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.matrix.android.sdk.api.pushrules +package org.matrix.android.sdk.api.session.pushrules /** * Ref: https://matrix.org/docs/spec/client_server/latest#get-matrix-client-r0-pushrules diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/SenderNotificationPermissionCondition.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/SenderNotificationPermissionCondition.kt similarity index 97% rename from matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/SenderNotificationPermissionCondition.kt rename to matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/SenderNotificationPermissionCondition.kt index 6675fb0ff5..82f5023c2f 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/SenderNotificationPermissionCondition.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/SenderNotificationPermissionCondition.kt @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.matrix.android.sdk.api.pushrules +package org.matrix.android.sdk.api.session.pushrules import org.matrix.android.sdk.api.session.events.model.Event import org.matrix.android.sdk.api.session.room.model.PowerLevelsContent diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/rest/GetPushRulesResponse.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/rest/GetPushRulesResponse.kt similarity index 95% rename from matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/rest/GetPushRulesResponse.kt rename to matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/rest/GetPushRulesResponse.kt index 35b4d77c0e..097891728a 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/rest/GetPushRulesResponse.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/rest/GetPushRulesResponse.kt @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.matrix.android.sdk.api.pushrules.rest +package org.matrix.android.sdk.api.session.pushrules.rest import com.squareup.moshi.Json import com.squareup.moshi.JsonClass diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/rest/PushCondition.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/rest/PushCondition.kt similarity index 84% rename from matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/rest/PushCondition.kt rename to matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/rest/PushCondition.kt index b31a1e6343..1fc8329535 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/rest/PushCondition.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/rest/PushCondition.kt @@ -13,17 +13,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.matrix.android.sdk.api.pushrules.rest +package org.matrix.android.sdk.api.session.pushrules.rest import com.squareup.moshi.Json import com.squareup.moshi.JsonClass -import org.matrix.android.sdk.api.pushrules.Condition -import org.matrix.android.sdk.api.pushrules.ContainsDisplayNameCondition -import org.matrix.android.sdk.api.pushrules.EventMatchCondition -import org.matrix.android.sdk.api.pushrules.Kind -import org.matrix.android.sdk.api.pushrules.RoomMemberCountCondition -import org.matrix.android.sdk.api.pushrules.RuleIds -import org.matrix.android.sdk.api.pushrules.SenderNotificationPermissionCondition +import org.matrix.android.sdk.api.session.pushrules.Condition +import org.matrix.android.sdk.api.session.pushrules.ContainsDisplayNameCondition +import org.matrix.android.sdk.api.session.pushrules.EventMatchCondition +import org.matrix.android.sdk.api.session.pushrules.Kind +import org.matrix.android.sdk.api.session.pushrules.RoomMemberCountCondition +import org.matrix.android.sdk.api.session.pushrules.RuleIds +import org.matrix.android.sdk.api.session.pushrules.SenderNotificationPermissionCondition import timber.log.Timber /** diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/rest/PushRule.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/rest/PushRule.kt similarity index 94% rename from matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/rest/PushRule.kt rename to matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/rest/PushRule.kt index 31d7770a9f..270ffb2940 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/rest/PushRule.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/rest/PushRule.kt @@ -14,14 +14,14 @@ * limitations under the License. */ -package org.matrix.android.sdk.api.pushrules.rest +package org.matrix.android.sdk.api.session.pushrules.rest import com.squareup.moshi.Json import com.squareup.moshi.JsonClass import org.matrix.android.sdk.api.extensions.orFalse -import org.matrix.android.sdk.api.pushrules.Action -import org.matrix.android.sdk.api.pushrules.getActions -import org.matrix.android.sdk.api.pushrules.toJson +import org.matrix.android.sdk.api.session.pushrules.Action +import org.matrix.android.sdk.api.session.pushrules.getActions +import org.matrix.android.sdk.api.session.pushrules.toJson /** * Ref: https://matrix.org/docs/spec/client_server/latest#get-matrix-client-r0-pushrules diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/rest/RuleSet.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/rest/RuleSet.kt similarity index 93% rename from matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/rest/RuleSet.kt rename to matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/rest/RuleSet.kt index 46f5148714..5bf42b8252 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/pushrules/rest/RuleSet.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/rest/RuleSet.kt @@ -13,12 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.matrix.android.sdk.api.pushrules.rest +package org.matrix.android.sdk.api.session.pushrules.rest import com.squareup.moshi.Json import com.squareup.moshi.JsonClass -import org.matrix.android.sdk.api.pushrules.RuleIds -import org.matrix.android.sdk.api.pushrules.RuleSetKey +import org.matrix.android.sdk.api.session.pushrules.RuleIds +import org.matrix.android.sdk.api.session.pushrules.RuleSetKey /** * Ref: https://matrix.org/docs/spec/client_server/latest#get-matrix-client-r0-pushrules diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/mapper/PushConditionMapper.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/mapper/PushConditionMapper.kt index 5c0a2ba902..6521bf62d9 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/mapper/PushConditionMapper.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/mapper/PushConditionMapper.kt @@ -16,7 +16,7 @@ package org.matrix.android.sdk.internal.database.mapper -import org.matrix.android.sdk.api.pushrules.rest.PushCondition +import org.matrix.android.sdk.api.session.pushrules.rest.PushCondition import org.matrix.android.sdk.internal.database.model.PushConditionEntity internal object PushConditionMapper { diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/mapper/PushRulesMapper.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/mapper/PushRulesMapper.kt index 12eff8efa1..0b07754126 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/mapper/PushRulesMapper.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/mapper/PushRulesMapper.kt @@ -17,9 +17,9 @@ package org.matrix.android.sdk.internal.database.mapper import com.squareup.moshi.Types import io.realm.RealmList -import org.matrix.android.sdk.api.pushrules.Kind -import org.matrix.android.sdk.api.pushrules.rest.PushCondition -import org.matrix.android.sdk.api.pushrules.rest.PushRule +import org.matrix.android.sdk.api.session.pushrules.Kind +import org.matrix.android.sdk.api.session.pushrules.rest.PushCondition +import org.matrix.android.sdk.api.session.pushrules.rest.PushRule import org.matrix.android.sdk.internal.database.model.PushRuleEntity import org.matrix.android.sdk.internal.di.MoshiProvider import timber.log.Timber diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/model/PushRulesEntity.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/model/PushRulesEntity.kt index 4125d90891..62bf40c1d2 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/model/PushRulesEntity.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/model/PushRulesEntity.kt @@ -17,7 +17,7 @@ package org.matrix.android.sdk.internal.database.model import io.realm.RealmList import io.realm.RealmObject -import org.matrix.android.sdk.api.pushrules.RuleKind +import org.matrix.android.sdk.api.session.pushrules.RuleKind import org.matrix.android.sdk.internal.extensions.clearWith internal open class PushRulesEntity( diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/query/PushersQueries.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/query/PushersQueries.kt index 1f6b210252..3cea19a690 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/query/PushersQueries.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/query/PushersQueries.kt @@ -18,7 +18,7 @@ package org.matrix.android.sdk.internal.database.query import io.realm.Realm import io.realm.RealmQuery import io.realm.kotlin.where -import org.matrix.android.sdk.api.pushrules.RuleKind +import org.matrix.android.sdk.api.session.pushrules.RuleKind import org.matrix.android.sdk.internal.database.model.PushRuleEntity import org.matrix.android.sdk.internal.database.model.PushRuleEntityFields import org.matrix.android.sdk.internal.database.model.PushRulesEntity diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/DefaultSession.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/DefaultSession.kt index 1e533158a7..1c2e2bb266 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/DefaultSession.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/DefaultSession.kt @@ -26,7 +26,6 @@ import org.matrix.android.sdk.api.MatrixCoroutineDispatchers import org.matrix.android.sdk.api.auth.data.SessionParams import org.matrix.android.sdk.api.failure.GlobalError import org.matrix.android.sdk.api.federation.FederationService -import org.matrix.android.sdk.api.pushrules.PushRuleService import org.matrix.android.sdk.api.session.EventStreamService import org.matrix.android.sdk.api.session.Session import org.matrix.android.sdk.api.session.SessionLifecycleObserver @@ -53,6 +52,7 @@ import org.matrix.android.sdk.api.session.permalinks.PermalinkService import org.matrix.android.sdk.api.session.presence.PresenceService import org.matrix.android.sdk.api.session.profile.ProfileService import org.matrix.android.sdk.api.session.pushers.PushersService +import org.matrix.android.sdk.api.session.pushrules.PushRuleService import org.matrix.android.sdk.api.session.room.RoomDirectoryService import org.matrix.android.sdk.api.session.room.RoomService import org.matrix.android.sdk.api.session.search.SearchService diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/notification/DefaultPushRuleService.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/notification/DefaultPushRuleService.kt index cdc7350f8b..4b989213cc 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/notification/DefaultPushRuleService.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/notification/DefaultPushRuleService.kt @@ -18,18 +18,18 @@ package org.matrix.android.sdk.internal.session.notification import androidx.lifecycle.LiveData import androidx.lifecycle.Transformations import com.zhuinden.monarchy.Monarchy -import org.matrix.android.sdk.api.pushrules.Action -import org.matrix.android.sdk.api.pushrules.ConditionResolver -import org.matrix.android.sdk.api.pushrules.PushEvents -import org.matrix.android.sdk.api.pushrules.PushRuleService -import org.matrix.android.sdk.api.pushrules.RuleKind -import org.matrix.android.sdk.api.pushrules.RuleScope -import org.matrix.android.sdk.api.pushrules.RuleSetKey -import org.matrix.android.sdk.api.pushrules.SenderNotificationPermissionCondition -import org.matrix.android.sdk.api.pushrules.getActions -import org.matrix.android.sdk.api.pushrules.rest.PushRule -import org.matrix.android.sdk.api.pushrules.rest.RuleSet import org.matrix.android.sdk.api.session.events.model.Event +import org.matrix.android.sdk.api.session.pushrules.Action +import org.matrix.android.sdk.api.session.pushrules.ConditionResolver +import org.matrix.android.sdk.api.session.pushrules.PushEvents +import org.matrix.android.sdk.api.session.pushrules.PushRuleService +import org.matrix.android.sdk.api.session.pushrules.RuleKind +import org.matrix.android.sdk.api.session.pushrules.RuleScope +import org.matrix.android.sdk.api.session.pushrules.RuleSetKey +import org.matrix.android.sdk.api.session.pushrules.SenderNotificationPermissionCondition +import org.matrix.android.sdk.api.session.pushrules.getActions +import org.matrix.android.sdk.api.session.pushrules.rest.PushRule +import org.matrix.android.sdk.api.session.pushrules.rest.RuleSet import org.matrix.android.sdk.internal.database.mapper.PushRulesMapper import org.matrix.android.sdk.internal.database.model.PushRuleEntity import org.matrix.android.sdk.internal.database.model.PushRulesEntity diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/notification/ProcessEventForPushTask.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/notification/ProcessEventForPushTask.kt index 899bce4c8d..f1a509a027 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/notification/ProcessEventForPushTask.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/notification/ProcessEventForPushTask.kt @@ -16,10 +16,10 @@ package org.matrix.android.sdk.internal.session.notification -import org.matrix.android.sdk.api.pushrules.PushEvents -import org.matrix.android.sdk.api.pushrules.rest.PushRule import org.matrix.android.sdk.api.session.events.model.EventType import org.matrix.android.sdk.api.session.events.model.isInvitation +import org.matrix.android.sdk.api.session.pushrules.PushEvents +import org.matrix.android.sdk.api.session.pushrules.rest.PushRule import org.matrix.android.sdk.api.session.sync.model.RoomsSyncResponse import org.matrix.android.sdk.internal.di.UserId import org.matrix.android.sdk.internal.task.Task diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/notification/PushRuleFinder.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/notification/PushRuleFinder.kt index 6e302d373d..41729231c0 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/notification/PushRuleFinder.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/notification/PushRuleFinder.kt @@ -16,9 +16,9 @@ package org.matrix.android.sdk.internal.session.notification -import org.matrix.android.sdk.api.pushrules.ConditionResolver -import org.matrix.android.sdk.api.pushrules.rest.PushRule import org.matrix.android.sdk.api.session.events.model.Event +import org.matrix.android.sdk.api.session.pushrules.ConditionResolver +import org.matrix.android.sdk.api.session.pushrules.rest.PushRule import javax.inject.Inject internal class PushRuleFinder @Inject constructor( diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/AddPushRuleTask.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/AddPushRuleTask.kt index b217687168..c46474cf90 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/AddPushRuleTask.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/AddPushRuleTask.kt @@ -15,8 +15,8 @@ */ package org.matrix.android.sdk.internal.session.pushers -import org.matrix.android.sdk.api.pushrules.RuleKind -import org.matrix.android.sdk.api.pushrules.rest.PushRule +import org.matrix.android.sdk.api.session.pushrules.RuleKind +import org.matrix.android.sdk.api.session.pushrules.rest.PushRule import org.matrix.android.sdk.internal.network.GlobalErrorReceiver import org.matrix.android.sdk.internal.network.executeRequest import org.matrix.android.sdk.internal.task.Task diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/DefaultConditionResolver.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/DefaultConditionResolver.kt index 84a05067be..0aa58b7410 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/DefaultConditionResolver.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/DefaultConditionResolver.kt @@ -15,14 +15,14 @@ */ package org.matrix.android.sdk.internal.session.pushers -import org.matrix.android.sdk.api.pushrules.ConditionResolver -import org.matrix.android.sdk.api.pushrules.ContainsDisplayNameCondition -import org.matrix.android.sdk.api.pushrules.EventMatchCondition -import org.matrix.android.sdk.api.pushrules.RoomMemberCountCondition -import org.matrix.android.sdk.api.pushrules.SenderNotificationPermissionCondition import org.matrix.android.sdk.api.session.events.model.Event import org.matrix.android.sdk.api.session.events.model.EventType import org.matrix.android.sdk.api.session.events.model.toModel +import org.matrix.android.sdk.api.session.pushrules.ConditionResolver +import org.matrix.android.sdk.api.session.pushrules.ContainsDisplayNameCondition +import org.matrix.android.sdk.api.session.pushrules.EventMatchCondition +import org.matrix.android.sdk.api.session.pushrules.RoomMemberCountCondition +import org.matrix.android.sdk.api.session.pushrules.SenderNotificationPermissionCondition import org.matrix.android.sdk.api.session.room.model.PowerLevelsContent import org.matrix.android.sdk.internal.di.UserId import org.matrix.android.sdk.internal.session.room.RoomGetter diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/PushRulesApi.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/PushRulesApi.kt index 994b4860c6..ac3b09e59c 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/PushRulesApi.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/PushRulesApi.kt @@ -15,8 +15,8 @@ */ package org.matrix.android.sdk.internal.session.pushers -import org.matrix.android.sdk.api.pushrules.rest.GetPushRulesResponse -import org.matrix.android.sdk.api.pushrules.rest.PushRule +import org.matrix.android.sdk.api.session.pushrules.rest.GetPushRulesResponse +import org.matrix.android.sdk.api.session.pushrules.rest.PushRule import org.matrix.android.sdk.internal.network.NetworkConstants import retrofit2.http.Body import retrofit2.http.DELETE diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/PushersModule.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/PushersModule.kt index d53a4eed65..16ea33f1dd 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/PushersModule.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/PushersModule.kt @@ -19,9 +19,9 @@ package org.matrix.android.sdk.internal.session.pushers import dagger.Binds import dagger.Module import dagger.Provides -import org.matrix.android.sdk.api.pushrules.ConditionResolver -import org.matrix.android.sdk.api.pushrules.PushRuleService import org.matrix.android.sdk.api.session.pushers.PushersService +import org.matrix.android.sdk.api.session.pushrules.ConditionResolver +import org.matrix.android.sdk.api.session.pushrules.PushRuleService import org.matrix.android.sdk.internal.session.notification.DefaultProcessEventForPushTask import org.matrix.android.sdk.internal.session.notification.DefaultPushRuleService import org.matrix.android.sdk.internal.session.notification.ProcessEventForPushTask diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/RemovePushRuleTask.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/RemovePushRuleTask.kt index bae893608b..9b0bf7934b 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/RemovePushRuleTask.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/RemovePushRuleTask.kt @@ -15,7 +15,7 @@ */ package org.matrix.android.sdk.internal.session.pushers -import org.matrix.android.sdk.api.pushrules.RuleKind +import org.matrix.android.sdk.api.session.pushrules.RuleKind import org.matrix.android.sdk.internal.network.GlobalErrorReceiver import org.matrix.android.sdk.internal.network.executeRequest import org.matrix.android.sdk.internal.task.Task diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/SavePushRulesTask.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/SavePushRulesTask.kt index 6a4b891ecf..be7c86422a 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/SavePushRulesTask.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/SavePushRulesTask.kt @@ -16,9 +16,9 @@ package org.matrix.android.sdk.internal.session.pushers import com.zhuinden.monarchy.Monarchy -import org.matrix.android.sdk.api.pushrules.RuleScope -import org.matrix.android.sdk.api.pushrules.RuleSetKey -import org.matrix.android.sdk.api.pushrules.rest.GetPushRulesResponse +import org.matrix.android.sdk.api.session.pushrules.RuleScope +import org.matrix.android.sdk.api.session.pushrules.RuleSetKey +import org.matrix.android.sdk.api.session.pushrules.rest.GetPushRulesResponse import org.matrix.android.sdk.internal.database.mapper.PushRulesMapper import org.matrix.android.sdk.internal.database.model.PushRulesEntity import org.matrix.android.sdk.internal.database.model.deleteOnCascade diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/UpdatePushRuleActionsTask.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/UpdatePushRuleActionsTask.kt index 33589dc55b..d93f7cb8ce 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/UpdatePushRuleActionsTask.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/UpdatePushRuleActionsTask.kt @@ -15,9 +15,9 @@ */ package org.matrix.android.sdk.internal.session.pushers -import org.matrix.android.sdk.api.pushrules.Action -import org.matrix.android.sdk.api.pushrules.RuleKind -import org.matrix.android.sdk.api.pushrules.toJson +import org.matrix.android.sdk.api.session.pushrules.Action +import org.matrix.android.sdk.api.session.pushrules.RuleKind +import org.matrix.android.sdk.api.session.pushrules.toJson import org.matrix.android.sdk.internal.network.GlobalErrorReceiver import org.matrix.android.sdk.internal.network.executeRequest import org.matrix.android.sdk.internal.task.Task diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/UpdatePushRuleEnableStatusTask.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/UpdatePushRuleEnableStatusTask.kt index 3fe1614678..815661a1ce 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/UpdatePushRuleEnableStatusTask.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/UpdatePushRuleEnableStatusTask.kt @@ -15,8 +15,8 @@ */ package org.matrix.android.sdk.internal.session.pushers -import org.matrix.android.sdk.api.pushrules.RuleKind -import org.matrix.android.sdk.api.pushrules.rest.PushRule +import org.matrix.android.sdk.api.session.pushrules.RuleKind +import org.matrix.android.sdk.api.session.pushrules.rest.PushRule import org.matrix.android.sdk.internal.network.GlobalErrorReceiver import org.matrix.android.sdk.internal.network.executeRequest import org.matrix.android.sdk.internal.task.Task diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/notification/DefaultRoomPushRuleService.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/notification/DefaultRoomPushRuleService.kt index 8f1aefb731..1d4cd844a1 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/notification/DefaultRoomPushRuleService.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/notification/DefaultRoomPushRuleService.kt @@ -22,7 +22,7 @@ import com.zhuinden.monarchy.Monarchy import dagger.assisted.Assisted import dagger.assisted.AssistedFactory import dagger.assisted.AssistedInject -import org.matrix.android.sdk.api.pushrules.RuleScope +import org.matrix.android.sdk.api.session.pushrules.RuleScope import org.matrix.android.sdk.api.session.room.notification.RoomNotificationState import org.matrix.android.sdk.api.session.room.notification.RoomPushRuleService import org.matrix.android.sdk.internal.database.model.PushRuleEntity diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/notification/RoomPushRule.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/notification/RoomPushRule.kt index d2c0d13b51..2c74e2a1e5 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/notification/RoomPushRule.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/notification/RoomPushRule.kt @@ -16,8 +16,8 @@ package org.matrix.android.sdk.internal.session.room.notification -import org.matrix.android.sdk.api.pushrules.RuleKind -import org.matrix.android.sdk.api.pushrules.rest.PushRule +import org.matrix.android.sdk.api.session.pushrules.RuleKind +import org.matrix.android.sdk.api.session.pushrules.rest.PushRule internal data class RoomPushRule( val kind: RuleKind, diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/notification/RoomPushRuleMapper.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/notification/RoomPushRuleMapper.kt index 86d2e6c619..a5a5ab58ba 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/notification/RoomPushRuleMapper.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/notification/RoomPushRuleMapper.kt @@ -16,13 +16,13 @@ package org.matrix.android.sdk.internal.session.room.notification -import org.matrix.android.sdk.api.pushrules.Action -import org.matrix.android.sdk.api.pushrules.Kind -import org.matrix.android.sdk.api.pushrules.RuleSetKey -import org.matrix.android.sdk.api.pushrules.getActions -import org.matrix.android.sdk.api.pushrules.rest.PushCondition -import org.matrix.android.sdk.api.pushrules.rest.PushRule -import org.matrix.android.sdk.api.pushrules.toJson +import org.matrix.android.sdk.api.session.pushrules.Action +import org.matrix.android.sdk.api.session.pushrules.Kind +import org.matrix.android.sdk.api.session.pushrules.RuleSetKey +import org.matrix.android.sdk.api.session.pushrules.getActions +import org.matrix.android.sdk.api.session.pushrules.rest.PushCondition +import org.matrix.android.sdk.api.session.pushrules.rest.PushRule +import org.matrix.android.sdk.api.session.pushrules.toJson import org.matrix.android.sdk.api.session.room.notification.RoomNotificationState import org.matrix.android.sdk.internal.database.mapper.PushRulesMapper import org.matrix.android.sdk.internal.database.model.PushRuleEntity diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/notification/SetRoomNotificationStateTask.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/notification/SetRoomNotificationStateTask.kt index feb8c27b09..9b94296df8 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/notification/SetRoomNotificationStateTask.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/notification/SetRoomNotificationStateTask.kt @@ -18,7 +18,7 @@ package org.matrix.android.sdk.internal.session.room.notification import com.zhuinden.monarchy.Monarchy import io.realm.Realm -import org.matrix.android.sdk.api.pushrules.RuleScope +import org.matrix.android.sdk.api.session.pushrules.RuleScope import org.matrix.android.sdk.api.session.room.notification.RoomNotificationState import org.matrix.android.sdk.internal.database.model.PushRuleEntity import org.matrix.android.sdk.internal.database.query.where diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/SyncResponseHandler.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/SyncResponseHandler.kt index 97850e81d3..7d7d8ae166 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/SyncResponseHandler.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/SyncResponseHandler.kt @@ -18,9 +18,9 @@ package org.matrix.android.sdk.internal.session.sync import androidx.work.ExistingPeriodicWorkPolicy import com.zhuinden.monarchy.Monarchy -import org.matrix.android.sdk.api.pushrules.PushRuleService -import org.matrix.android.sdk.api.pushrules.RuleScope import org.matrix.android.sdk.api.session.initsync.InitSyncStep +import org.matrix.android.sdk.api.session.pushrules.PushRuleService +import org.matrix.android.sdk.api.session.pushrules.RuleScope import org.matrix.android.sdk.api.session.sync.model.GroupsSyncResponse import org.matrix.android.sdk.api.session.sync.model.RoomsSyncResponse import org.matrix.android.sdk.api.session.sync.model.SyncResponse diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/UserAccountDataSyncHandler.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/UserAccountDataSyncHandler.kt index ce827c2311..e19583ec5b 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/UserAccountDataSyncHandler.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/UserAccountDataSyncHandler.kt @@ -22,13 +22,13 @@ import io.realm.RealmList import io.realm.kotlin.where import org.matrix.android.sdk.api.failure.GlobalError import org.matrix.android.sdk.api.failure.InitialSyncRequestReason -import org.matrix.android.sdk.api.pushrules.RuleScope -import org.matrix.android.sdk.api.pushrules.RuleSetKey -import org.matrix.android.sdk.api.pushrules.rest.GetPushRulesResponse import org.matrix.android.sdk.api.session.accountdata.UserAccountDataEvent import org.matrix.android.sdk.api.session.accountdata.UserAccountDataTypes import org.matrix.android.sdk.api.session.events.model.Content import org.matrix.android.sdk.api.session.events.model.toModel +import org.matrix.android.sdk.api.session.pushrules.RuleScope +import org.matrix.android.sdk.api.session.pushrules.RuleSetKey +import org.matrix.android.sdk.api.session.pushrules.rest.GetPushRulesResponse import org.matrix.android.sdk.api.session.room.model.RoomMemberContent import org.matrix.android.sdk.api.session.room.model.RoomSummary import org.matrix.android.sdk.api.session.sync.model.InvitedRoomSync diff --git a/matrix-sdk-android/src/test/java/org/matrix/android/sdk/api/pushrules/PushRuleActionsTest.kt b/matrix-sdk-android/src/test/java/org/matrix/android/sdk/api/session/pushrules/PushRuleActionsTest.kt similarity index 95% rename from matrix-sdk-android/src/test/java/org/matrix/android/sdk/api/pushrules/PushRuleActionsTest.kt rename to matrix-sdk-android/src/test/java/org/matrix/android/sdk/api/session/pushrules/PushRuleActionsTest.kt index 9bfdea5414..1879e8195c 100644 --- a/matrix-sdk-android/src/test/java/org/matrix/android/sdk/api/pushrules/PushRuleActionsTest.kt +++ b/matrix-sdk-android/src/test/java/org/matrix/android/sdk/api/session/pushrules/PushRuleActionsTest.kt @@ -14,14 +14,14 @@ * limitations under the License. */ -package org.matrix.android.sdk.api.pushrules +package org.matrix.android.sdk.api.session.pushrules import org.junit.Assert.assertEquals import org.junit.Assert.assertNotNull import org.junit.Assert.assertTrue import org.junit.Test import org.matrix.android.sdk.MatrixTest -import org.matrix.android.sdk.api.pushrules.rest.PushRule +import org.matrix.android.sdk.api.session.pushrules.rest.PushRule import org.matrix.android.sdk.internal.di.MoshiProvider class PushRuleActionsTest : MatrixTest { diff --git a/matrix-sdk-android/src/test/java/org/matrix/android/sdk/api/pushrules/PushRulesConditionTest.kt b/matrix-sdk-android/src/test/java/org/matrix/android/sdk/api/session/pushrules/PushRulesConditionTest.kt similarity index 99% rename from matrix-sdk-android/src/test/java/org/matrix/android/sdk/api/pushrules/PushRulesConditionTest.kt rename to matrix-sdk-android/src/test/java/org/matrix/android/sdk/api/session/pushrules/PushRulesConditionTest.kt index c0b869a90e..8b680449cd 100644 --- a/matrix-sdk-android/src/test/java/org/matrix/android/sdk/api/pushrules/PushRulesConditionTest.kt +++ b/matrix-sdk-android/src/test/java/org/matrix/android/sdk/api/session/pushrules/PushRulesConditionTest.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.matrix.android.sdk.api.pushrules +package org.matrix.android.sdk.api.session.pushrules import io.mockk.every import io.mockk.mockk diff --git a/vector/src/main/java/im/vector/app/features/autocomplete/member/AutocompleteMemberPresenter.kt b/vector/src/main/java/im/vector/app/features/autocomplete/member/AutocompleteMemberPresenter.kt index ce3b9c6a7e..a62024d99f 100644 --- a/vector/src/main/java/im/vector/app/features/autocomplete/member/AutocompleteMemberPresenter.kt +++ b/vector/src/main/java/im/vector/app/features/autocomplete/member/AutocompleteMemberPresenter.kt @@ -24,10 +24,10 @@ import dagger.assisted.AssistedInject import im.vector.app.R import im.vector.app.features.autocomplete.AutocompleteClickListener import im.vector.app.features.autocomplete.RecyclerViewPresenter -import org.matrix.android.sdk.api.pushrules.SenderNotificationPermissionCondition import org.matrix.android.sdk.api.query.QueryStringValue import org.matrix.android.sdk.api.session.Session import org.matrix.android.sdk.api.session.events.model.Event +import org.matrix.android.sdk.api.session.pushrules.SenderNotificationPermissionCondition import org.matrix.android.sdk.api.session.room.members.RoomMemberQueryParams import org.matrix.android.sdk.api.session.room.members.roomMemberQueryParams import org.matrix.android.sdk.api.session.room.model.Membership diff --git a/vector/src/main/java/im/vector/app/features/home/HomeActivityViewModel.kt b/vector/src/main/java/im/vector/app/features/home/HomeActivityViewModel.kt index c8b0fa024e..75546b4ea9 100644 --- a/vector/src/main/java/im/vector/app/features/home/HomeActivityViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/home/HomeActivityViewModel.kt @@ -42,10 +42,10 @@ import org.matrix.android.sdk.api.auth.data.LoginFlowTypes import org.matrix.android.sdk.api.auth.registration.RegistrationFlowResponse import org.matrix.android.sdk.api.auth.registration.nextUncompletedStage import org.matrix.android.sdk.api.extensions.tryOrNull -import org.matrix.android.sdk.api.pushrules.RuleIds import org.matrix.android.sdk.api.session.crypto.model.CryptoDeviceInfo import org.matrix.android.sdk.api.session.crypto.model.MXUsersDevicesMap import org.matrix.android.sdk.api.session.initsync.SyncStatusService +import org.matrix.android.sdk.api.session.pushrules.RuleIds import org.matrix.android.sdk.api.session.room.model.Membership import org.matrix.android.sdk.api.session.room.roomSummaryQueryParams import org.matrix.android.sdk.api.settings.LightweightSettingsStorage diff --git a/vector/src/main/java/im/vector/app/features/notifications/NotificationAction.kt b/vector/src/main/java/im/vector/app/features/notifications/NotificationAction.kt index c11ce6794f..86a9e917e5 100644 --- a/vector/src/main/java/im/vector/app/features/notifications/NotificationAction.kt +++ b/vector/src/main/java/im/vector/app/features/notifications/NotificationAction.kt @@ -15,7 +15,7 @@ */ package im.vector.app.features.notifications -import org.matrix.android.sdk.api.pushrules.Action +import org.matrix.android.sdk.api.session.pushrules.Action data class NotificationAction( val shouldNotify: Boolean, diff --git a/vector/src/main/java/im/vector/app/features/notifications/PushRuleTriggerListener.kt b/vector/src/main/java/im/vector/app/features/notifications/PushRuleTriggerListener.kt index cd08820fc1..cd44ae461a 100644 --- a/vector/src/main/java/im/vector/app/features/notifications/PushRuleTriggerListener.kt +++ b/vector/src/main/java/im/vector/app/features/notifications/PushRuleTriggerListener.kt @@ -21,10 +21,10 @@ import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.SupervisorJob import kotlinx.coroutines.cancelChildren import kotlinx.coroutines.launch -import org.matrix.android.sdk.api.pushrules.PushEvents -import org.matrix.android.sdk.api.pushrules.PushRuleService -import org.matrix.android.sdk.api.pushrules.getActions import org.matrix.android.sdk.api.session.Session +import org.matrix.android.sdk.api.session.pushrules.PushEvents +import org.matrix.android.sdk.api.session.pushrules.PushRuleService +import org.matrix.android.sdk.api.session.pushrules.getActions import timber.log.Timber import javax.inject.Inject import javax.inject.Singleton diff --git a/vector/src/main/java/im/vector/app/features/settings/notifications/NotificationIndex.kt b/vector/src/main/java/im/vector/app/features/settings/notifications/NotificationIndex.kt index 793b94db1d..b38b6ac968 100644 --- a/vector/src/main/java/im/vector/app/features/settings/notifications/NotificationIndex.kt +++ b/vector/src/main/java/im/vector/app/features/settings/notifications/NotificationIndex.kt @@ -16,8 +16,8 @@ package im.vector.app.features.settings.notifications -import org.matrix.android.sdk.api.pushrules.rest.PushRule -import org.matrix.android.sdk.api.pushrules.toJson +import org.matrix.android.sdk.api.session.pushrules.rest.PushRule +import org.matrix.android.sdk.api.session.pushrules.toJson enum class NotificationIndex { OFF, diff --git a/vector/src/main/java/im/vector/app/features/settings/notifications/PushRuleDefinitions.kt b/vector/src/main/java/im/vector/app/features/settings/notifications/PushRuleDefinitions.kt index d101d86aa3..1507528bd1 100644 --- a/vector/src/main/java/im/vector/app/features/settings/notifications/PushRuleDefinitions.kt +++ b/vector/src/main/java/im/vector/app/features/settings/notifications/PushRuleDefinitions.kt @@ -16,7 +16,7 @@ package im.vector.app.features.settings.notifications -import org.matrix.android.sdk.api.pushrules.RuleIds +import org.matrix.android.sdk.api.session.pushrules.RuleIds fun getStandardAction(ruleId: String, index: NotificationIndex): StandardActions? { return when (ruleId) { diff --git a/vector/src/main/java/im/vector/app/features/settings/notifications/StandardActions.kt b/vector/src/main/java/im/vector/app/features/settings/notifications/StandardActions.kt index d6b6165bd9..b19b5bcdd6 100644 --- a/vector/src/main/java/im/vector/app/features/settings/notifications/StandardActions.kt +++ b/vector/src/main/java/im/vector/app/features/settings/notifications/StandardActions.kt @@ -16,7 +16,7 @@ package im.vector.app.features.settings.notifications -import org.matrix.android.sdk.api.pushrules.Action +import org.matrix.android.sdk.api.session.pushrules.Action sealed class StandardActions( val actions: List? diff --git a/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsAdvancedNotificationPreferenceFragment.kt b/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsAdvancedNotificationPreferenceFragment.kt index 3b4aef929d..187e7819c9 100644 --- a/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsAdvancedNotificationPreferenceFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsAdvancedNotificationPreferenceFragment.kt @@ -23,8 +23,8 @@ import im.vector.app.core.preference.VectorPreference import im.vector.app.core.utils.toast import im.vector.app.features.settings.VectorSettingsBaseFragment import kotlinx.coroutines.launch -import org.matrix.android.sdk.api.pushrules.RuleIds -import org.matrix.android.sdk.api.pushrules.rest.PushRuleAndKind +import org.matrix.android.sdk.api.session.pushrules.RuleIds +import org.matrix.android.sdk.api.session.pushrules.rest.PushRuleAndKind import javax.inject.Inject class VectorSettingsAdvancedNotificationPreferenceFragment @Inject constructor() : diff --git a/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsDefaultNotificationPreferenceFragment.kt b/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsDefaultNotificationPreferenceFragment.kt index 2179e0eee2..2a2bf388ee 100644 --- a/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsDefaultNotificationPreferenceFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsDefaultNotificationPreferenceFragment.kt @@ -20,7 +20,7 @@ import android.os.Bundle import im.vector.app.R import im.vector.app.core.preference.VectorPreferenceCategory import im.vector.app.features.analytics.plan.MobileScreen -import org.matrix.android.sdk.api.pushrules.RuleIds +import org.matrix.android.sdk.api.session.pushrules.RuleIds class VectorSettingsDefaultNotificationPreferenceFragment : VectorSettingsPushRuleNotificationPreferenceFragment() { diff --git a/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsKeywordAndMentionsNotificationPreferenceFragment.kt b/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsKeywordAndMentionsNotificationPreferenceFragment.kt index 731f4b3228..3117fd4b55 100644 --- a/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsKeywordAndMentionsNotificationPreferenceFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsKeywordAndMentionsNotificationPreferenceFragment.kt @@ -29,10 +29,10 @@ import im.vector.app.features.analytics.plan.MobileScreen import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch import kotlinx.coroutines.withContext -import org.matrix.android.sdk.api.pushrules.RuleIds -import org.matrix.android.sdk.api.pushrules.RuleKind -import org.matrix.android.sdk.api.pushrules.rest.PushRule -import org.matrix.android.sdk.api.pushrules.toJson +import org.matrix.android.sdk.api.session.pushrules.RuleIds +import org.matrix.android.sdk.api.session.pushrules.RuleKind +import org.matrix.android.sdk.api.session.pushrules.rest.PushRule +import org.matrix.android.sdk.api.session.pushrules.toJson class VectorSettingsKeywordAndMentionsNotificationPreferenceFragment : VectorSettingsPushRuleNotificationPreferenceFragment() { diff --git a/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsNotificationPreferenceFragment.kt b/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsNotificationPreferenceFragment.kt index 79104433ee..05a7cfecd8 100644 --- a/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsNotificationPreferenceFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsNotificationPreferenceFragment.kt @@ -53,11 +53,11 @@ import im.vector.app.push.fcm.FcmHelper import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.launch import org.matrix.android.sdk.api.extensions.tryOrNull -import org.matrix.android.sdk.api.pushrules.RuleIds -import org.matrix.android.sdk.api.pushrules.RuleKind import org.matrix.android.sdk.api.session.Session import org.matrix.android.sdk.api.session.identity.ThreePid import org.matrix.android.sdk.api.session.pushers.Pusher +import org.matrix.android.sdk.api.session.pushrules.RuleIds +import org.matrix.android.sdk.api.session.pushrules.RuleKind import javax.inject.Inject // Referenced in vector_settings_preferences_root.xml diff --git a/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsOtherNotificationPreferenceFragment.kt b/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsOtherNotificationPreferenceFragment.kt index 71f8f0920a..9be8c4a47e 100644 --- a/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsOtherNotificationPreferenceFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsOtherNotificationPreferenceFragment.kt @@ -18,7 +18,7 @@ package im.vector.app.features.settings.notifications import im.vector.app.R import im.vector.app.core.preference.VectorPreferenceCategory -import org.matrix.android.sdk.api.pushrules.RuleIds +import org.matrix.android.sdk.api.session.pushrules.RuleIds class VectorSettingsOtherNotificationPreferenceFragment : VectorSettingsPushRuleNotificationPreferenceFragment() { diff --git a/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsPushRuleNotificationPreferenceFragment.kt b/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsPushRuleNotificationPreferenceFragment.kt index 26ee2fc601..280fcc15aa 100644 --- a/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsPushRuleNotificationPreferenceFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsPushRuleNotificationPreferenceFragment.kt @@ -21,8 +21,8 @@ import androidx.preference.Preference import im.vector.app.core.preference.VectorCheckboxPreference import im.vector.app.features.settings.VectorSettingsBaseFragment import kotlinx.coroutines.launch -import org.matrix.android.sdk.api.pushrules.RuleKind -import org.matrix.android.sdk.api.pushrules.rest.PushRuleAndKind +import org.matrix.android.sdk.api.session.pushrules.RuleKind +import org.matrix.android.sdk.api.session.pushrules.rest.PushRuleAndKind abstract class VectorSettingsPushRuleNotificationPreferenceFragment : VectorSettingsBaseFragment() { diff --git a/vector/src/main/java/im/vector/app/features/settings/push/PushRuleItem.kt b/vector/src/main/java/im/vector/app/features/settings/push/PushRuleItem.kt index f6e03143f5..172764d87f 100644 --- a/vector/src/main/java/im/vector/app/features/settings/push/PushRuleItem.kt +++ b/vector/src/main/java/im/vector/app/features/settings/push/PushRuleItem.kt @@ -30,8 +30,8 @@ import im.vector.app.R import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.features.notifications.toNotificationAction import im.vector.app.features.themes.ThemeUtils -import org.matrix.android.sdk.api.pushrules.getActions -import org.matrix.android.sdk.api.pushrules.rest.PushRule +import org.matrix.android.sdk.api.session.pushrules.getActions +import org.matrix.android.sdk.api.session.pushrules.rest.PushRule @EpoxyModelClass(layout = R.layout.item_pushrule_raw) abstract class PushRuleItem : EpoxyModelWithHolder() { diff --git a/vector/src/main/java/im/vector/app/features/settings/push/PushRulesViewModel.kt b/vector/src/main/java/im/vector/app/features/settings/push/PushRulesViewModel.kt index 0b6b72bb10..1f6e787fa2 100644 --- a/vector/src/main/java/im/vector/app/features/settings/push/PushRulesViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/settings/push/PushRulesViewModel.kt @@ -23,7 +23,7 @@ import im.vector.app.core.di.SingletonEntryPoint import im.vector.app.core.platform.EmptyAction import im.vector.app.core.platform.EmptyViewEvents import im.vector.app.core.platform.VectorViewModel -import org.matrix.android.sdk.api.pushrules.rest.PushRule +import org.matrix.android.sdk.api.session.pushrules.rest.PushRule data class PushRulesViewState( val rules: List = emptyList() diff --git a/vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestAccountSettings.kt b/vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestAccountSettings.kt index 9d06e1724c..a0bb758c63 100644 --- a/vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestAccountSettings.kt +++ b/vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestAccountSettings.kt @@ -25,8 +25,8 @@ import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch import kotlinx.coroutines.withContext import org.matrix.android.sdk.api.extensions.tryOrNull -import org.matrix.android.sdk.api.pushrules.RuleIds -import org.matrix.android.sdk.api.pushrules.RuleKind +import org.matrix.android.sdk.api.session.pushrules.RuleIds +import org.matrix.android.sdk.api.session.pushrules.RuleKind import javax.inject.Inject /** diff --git a/vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestPushRulesSettings.kt b/vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestPushRulesSettings.kt index 79e4377a5c..def66b7f0e 100644 --- a/vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestPushRulesSettings.kt +++ b/vector/src/main/java/im/vector/app/features/settings/troubleshoot/TestPushRulesSettings.kt @@ -21,8 +21,8 @@ import im.vector.app.R import im.vector.app.core.di.ActiveSessionHolder import im.vector.app.core.resources.StringProvider import im.vector.app.features.notifications.toNotificationAction -import org.matrix.android.sdk.api.pushrules.RuleIds -import org.matrix.android.sdk.api.pushrules.getActions +import org.matrix.android.sdk.api.session.pushrules.RuleIds +import org.matrix.android.sdk.api.session.pushrules.getActions import javax.inject.Inject class TestPushRulesSettings @Inject constructor(private val activeSessionHolder: ActiveSessionHolder, From 4def1e60683bca7389c8a4fc391809c9ae830588 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 21 Apr 2022 11:56:04 +0200 Subject: [PATCH 141/561] Rename internal package from `notification` to `pushrules` --- .../android/sdk/internal/session/pushers/PushersModule.kt | 6 +++--- .../{notification => pushrules}/DefaultPushRuleService.kt | 2 +- .../{notification => pushrules}/ProcessEventForPushTask.kt | 2 +- .../session/{notification => pushrules}/PushRuleFinder.kt | 2 +- .../sdk/internal/session/sync/SyncResponseHandler.kt | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) rename matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/{notification => pushrules}/DefaultPushRuleService.kt (99%) rename matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/{notification => pushrules}/ProcessEventForPushTask.kt (98%) rename matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/{notification => pushrules}/PushRuleFinder.kt (95%) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/PushersModule.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/PushersModule.kt index 16ea33f1dd..4528c95e69 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/PushersModule.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/PushersModule.kt @@ -22,11 +22,11 @@ import dagger.Provides import org.matrix.android.sdk.api.session.pushers.PushersService import org.matrix.android.sdk.api.session.pushrules.ConditionResolver import org.matrix.android.sdk.api.session.pushrules.PushRuleService -import org.matrix.android.sdk.internal.session.notification.DefaultProcessEventForPushTask -import org.matrix.android.sdk.internal.session.notification.DefaultPushRuleService -import org.matrix.android.sdk.internal.session.notification.ProcessEventForPushTask import org.matrix.android.sdk.internal.session.pushers.gateway.DefaultPushGatewayNotifyTask import org.matrix.android.sdk.internal.session.pushers.gateway.PushGatewayNotifyTask +import org.matrix.android.sdk.internal.session.pushrules.DefaultProcessEventForPushTask +import org.matrix.android.sdk.internal.session.pushrules.DefaultPushRuleService +import org.matrix.android.sdk.internal.session.pushrules.ProcessEventForPushTask import org.matrix.android.sdk.internal.session.room.notification.DefaultSetRoomNotificationStateTask import org.matrix.android.sdk.internal.session.room.notification.SetRoomNotificationStateTask import retrofit2.Retrofit diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/notification/DefaultPushRuleService.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushrules/DefaultPushRuleService.kt similarity index 99% rename from matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/notification/DefaultPushRuleService.kt rename to matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushrules/DefaultPushRuleService.kt index 4b989213cc..ace23f1fe5 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/notification/DefaultPushRuleService.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushrules/DefaultPushRuleService.kt @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.matrix.android.sdk.internal.session.notification +package org.matrix.android.sdk.internal.session.pushrules import androidx.lifecycle.LiveData import androidx.lifecycle.Transformations diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/notification/ProcessEventForPushTask.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushrules/ProcessEventForPushTask.kt similarity index 98% rename from matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/notification/ProcessEventForPushTask.kt rename to matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushrules/ProcessEventForPushTask.kt index f1a509a027..91d092a2b4 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/notification/ProcessEventForPushTask.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushrules/ProcessEventForPushTask.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.matrix.android.sdk.internal.session.notification +package org.matrix.android.sdk.internal.session.pushrules import org.matrix.android.sdk.api.session.events.model.EventType import org.matrix.android.sdk.api.session.events.model.isInvitation diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/notification/PushRuleFinder.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushrules/PushRuleFinder.kt similarity index 95% rename from matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/notification/PushRuleFinder.kt rename to matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushrules/PushRuleFinder.kt index 41729231c0..b9d06a934d 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/notification/PushRuleFinder.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushrules/PushRuleFinder.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.matrix.android.sdk.internal.session.notification +package org.matrix.android.sdk.internal.session.pushrules import org.matrix.android.sdk.api.session.events.model.Event import org.matrix.android.sdk.api.session.pushrules.ConditionResolver diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/SyncResponseHandler.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/SyncResponseHandler.kt index 7d7d8ae166..02a7a9a37f 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/SyncResponseHandler.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/SyncResponseHandler.kt @@ -34,7 +34,7 @@ import org.matrix.android.sdk.internal.session.dispatchTo import org.matrix.android.sdk.internal.session.group.GetGroupDataWorker import org.matrix.android.sdk.internal.session.initsync.ProgressReporter import org.matrix.android.sdk.internal.session.initsync.reportSubtask -import org.matrix.android.sdk.internal.session.notification.ProcessEventForPushTask +import org.matrix.android.sdk.internal.session.pushrules.ProcessEventForPushTask import org.matrix.android.sdk.internal.session.sync.handler.CryptoSyncHandler import org.matrix.android.sdk.internal.session.sync.handler.GroupSyncHandler import org.matrix.android.sdk.internal.session.sync.handler.PresenceSyncHandler From 863ed2f15db27b78abc11358caaf01e679c26ac7 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 21 Apr 2022 12:00:23 +0200 Subject: [PATCH 142/561] Move `GetPushRulesResponse` to internal package --- .../rest => internal/session/pushers}/GetPushRulesResponse.kt | 3 ++- .../android/sdk/internal/session/pushers/PushRulesApi.kt | 1 - .../android/sdk/internal/session/pushers/SavePushRulesTask.kt | 1 - .../session/sync/handler/UserAccountDataSyncHandler.kt | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) rename matrix-sdk-android/src/main/java/org/matrix/android/sdk/{api/session/pushrules/rest => internal/session/pushers}/GetPushRulesResponse.kt (90%) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/rest/GetPushRulesResponse.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/GetPushRulesResponse.kt similarity index 90% rename from matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/rest/GetPushRulesResponse.kt rename to matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/GetPushRulesResponse.kt index 097891728a..de03819629 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/pushrules/rest/GetPushRulesResponse.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/GetPushRulesResponse.kt @@ -13,10 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.matrix.android.sdk.api.session.pushrules.rest +package org.matrix.android.sdk.internal.session.pushers import com.squareup.moshi.Json import com.squareup.moshi.JsonClass +import org.matrix.android.sdk.api.session.pushrules.rest.RuleSet /** * All push rulesets for a user. diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/PushRulesApi.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/PushRulesApi.kt index ac3b09e59c..dab6d37317 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/PushRulesApi.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/PushRulesApi.kt @@ -15,7 +15,6 @@ */ package org.matrix.android.sdk.internal.session.pushers -import org.matrix.android.sdk.api.session.pushrules.rest.GetPushRulesResponse import org.matrix.android.sdk.api.session.pushrules.rest.PushRule import org.matrix.android.sdk.internal.network.NetworkConstants import retrofit2.http.Body diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/SavePushRulesTask.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/SavePushRulesTask.kt index be7c86422a..ff685e9281 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/SavePushRulesTask.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/SavePushRulesTask.kt @@ -18,7 +18,6 @@ package org.matrix.android.sdk.internal.session.pushers import com.zhuinden.monarchy.Monarchy import org.matrix.android.sdk.api.session.pushrules.RuleScope import org.matrix.android.sdk.api.session.pushrules.RuleSetKey -import org.matrix.android.sdk.api.session.pushrules.rest.GetPushRulesResponse import org.matrix.android.sdk.internal.database.mapper.PushRulesMapper import org.matrix.android.sdk.internal.database.model.PushRulesEntity import org.matrix.android.sdk.internal.database.model.deleteOnCascade diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/UserAccountDataSyncHandler.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/UserAccountDataSyncHandler.kt index e19583ec5b..9cdc4697c3 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/UserAccountDataSyncHandler.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/UserAccountDataSyncHandler.kt @@ -28,7 +28,6 @@ import org.matrix.android.sdk.api.session.events.model.Content import org.matrix.android.sdk.api.session.events.model.toModel import org.matrix.android.sdk.api.session.pushrules.RuleScope import org.matrix.android.sdk.api.session.pushrules.RuleSetKey -import org.matrix.android.sdk.api.session.pushrules.rest.GetPushRulesResponse import org.matrix.android.sdk.api.session.room.model.RoomMemberContent import org.matrix.android.sdk.api.session.room.model.RoomSummary import org.matrix.android.sdk.api.session.sync.model.InvitedRoomSync @@ -55,6 +54,7 @@ import org.matrix.android.sdk.internal.di.SessionId import org.matrix.android.sdk.internal.di.UserId import org.matrix.android.sdk.internal.session.SessionListeners import org.matrix.android.sdk.internal.session.dispatchTo +import org.matrix.android.sdk.internal.session.pushers.GetPushRulesResponse import org.matrix.android.sdk.internal.session.room.RoomAvatarResolver import org.matrix.android.sdk.internal.session.room.membership.RoomDisplayNameResolver import org.matrix.android.sdk.internal.session.room.membership.RoomMemberHelper From 8874f236e46a905d228c37178ea82b4a15090359 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 21 Apr 2022 12:28:42 +0200 Subject: [PATCH 143/561] Changelog --- changelog.d/5812.sdk | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/5812.sdk diff --git a/changelog.d/5812.sdk b/changelog.d/5812.sdk new file mode 100644 index 0000000000..5ddd8cfac1 --- /dev/null +++ b/changelog.d/5812.sdk @@ -0,0 +1 @@ +Move package `org.matrix.android.sdk.api.pushrules` to `org.matrix.android.sdk.api.session.pushrules` From 949d476623b1b6bf5b04a47c34ce31fcf007b507 Mon Sep 17 00:00:00 2001 From: Onuray Sahin Date: Thu, 21 Apr 2022 15:09:41 +0300 Subject: [PATCH 144/561] Code review fixes. --- .../im/vector/app/features/call/VectorCallViewEvents.kt | 3 --- .../app/features/call/webrtc/ScreenCaptureService.kt | 9 ++++++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/call/VectorCallViewEvents.kt b/vector/src/main/java/im/vector/app/features/call/VectorCallViewEvents.kt index 68170b0f11..78c4886fef 100644 --- a/vector/src/main/java/im/vector/app/features/call/VectorCallViewEvents.kt +++ b/vector/src/main/java/im/vector/app/features/call/VectorCallViewEvents.kt @@ -32,7 +32,4 @@ sealed class VectorCallViewEvents : VectorViewEvents { object FailToTransfer : VectorCallViewEvents() object ShowScreenSharingPermissionDialog : VectorCallViewEvents() object StopScreenSharingService : VectorCallViewEvents() -// data class CallAnswered(val content: CallAnswerContent) : VectorCallViewEvents() -// data class CallHangup(val content: CallHangupContent) : VectorCallViewEvents() -// object CallAccepted : VectorCallViewEvents() } diff --git a/vector/src/main/java/im/vector/app/features/call/webrtc/ScreenCaptureService.kt b/vector/src/main/java/im/vector/app/features/call/webrtc/ScreenCaptureService.kt index 7626e8178c..f1a4975751 100644 --- a/vector/src/main/java/im/vector/app/features/call/webrtc/ScreenCaptureService.kt +++ b/vector/src/main/java/im/vector/app/features/call/webrtc/ScreenCaptureService.kt @@ -31,12 +31,15 @@ class ScreenCaptureService : VectorService() { private val binder = LocalBinder() override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int { - // Show a sticky notification + showStickyNotification() + + return START_STICKY + } + + private fun showStickyNotification() { val notificationId = System.currentTimeMillis().toInt() val notification = notificationUtils.buildScreenSharingNotification() startForeground(notificationId, notification) - - return START_STICKY } override fun onBind(intent: Intent?): IBinder { From 7f09a37503a3b3dab670686ddbbe037581c2a2e1 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 21 Apr 2022 14:27:17 +0200 Subject: [PATCH 145/561] Move code to TimelineEventEntityQueries.kt (#5810) --- .../database/query/TimelineEventEntityQueries.kt | 11 +++++++++++ .../sync/handler/UserAccountDataSyncHandler.kt | 7 ++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/query/TimelineEventEntityQueries.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/query/TimelineEventEntityQueries.kt index 81d5ac835f..f216e93b07 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/query/TimelineEventEntityQueries.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/query/TimelineEventEntityQueries.kt @@ -132,3 +132,14 @@ internal fun RealmQuery.filterSendStates(sendStates: List): RealmResults { + return realm.where(TimelineEventEntity::class.java) + .`in`(TimelineEventEntityFields.ROOT.SENDER, senderIds.toTypedArray()) + .isNull(TimelineEventEntityFields.ROOT.STATE_KEY) + .findAll() +} diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/UserAccountDataSyncHandler.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/UserAccountDataSyncHandler.kt index ce827c2311..fa9ba371f7 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/UserAccountDataSyncHandler.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/handler/UserAccountDataSyncHandler.kt @@ -43,10 +43,10 @@ import org.matrix.android.sdk.internal.database.model.PushRulesEntity import org.matrix.android.sdk.internal.database.model.RoomSummaryEntity import org.matrix.android.sdk.internal.database.model.RoomSummaryEntityFields import org.matrix.android.sdk.internal.database.model.TimelineEventEntity -import org.matrix.android.sdk.internal.database.model.TimelineEventEntityFields import org.matrix.android.sdk.internal.database.model.UserAccountDataEntity import org.matrix.android.sdk.internal.database.model.UserAccountDataEntityFields import org.matrix.android.sdk.internal.database.model.deleteOnCascade +import org.matrix.android.sdk.internal.database.query.findAllFrom import org.matrix.android.sdk.internal.database.query.getDirectRooms import org.matrix.android.sdk.internal.database.query.getOrCreate import org.matrix.android.sdk.internal.database.query.where @@ -206,10 +206,7 @@ internal class UserAccountDataSyncHandler @Inject constructor( // See https://spec.matrix.org/latest/client-server-api/#client-behaviour-22 : // "Once ignored, the client will no longer receive events sent by that user, with the exception of state events" // So just delete all non-state events from our local storage. - realm.where(TimelineEventEntity::class.java) - .`in`(TimelineEventEntityFields.ROOT.SENDER, userIds.toTypedArray()) - .isNull(TimelineEventEntityFields.ROOT.STATE_KEY) - .findAll() + TimelineEventEntity.findAllFrom(realm, userIds) .also { Timber.d("Deleting ${it.size} TimelineEventEntity from ignored users") } .forEach { it.deleteOnCascade(true) From dbc558afbcdea96379b2ae1f661f000d3497c3bb Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 21 Apr 2022 14:37:56 +0200 Subject: [PATCH 146/561] More cleanup in TimelineEventEntityQueries.kt --- .../helper/TimelineEventEntityHelper.kt | 3 +- .../query/TimelineEventEntityQueries.kt | 29 ++++++++++++------- .../room/timeline/TimelineEventDataSource.kt | 5 ++-- 3 files changed, 23 insertions(+), 14 deletions(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/helper/TimelineEventEntityHelper.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/helper/TimelineEventEntityHelper.kt index ea508731b1..8a5d08cd30 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/helper/TimelineEventEntityHelper.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/helper/TimelineEventEntityHelper.kt @@ -19,9 +19,10 @@ package org.matrix.android.sdk.internal.database.helper import io.realm.Realm import org.matrix.android.sdk.internal.database.model.TimelineEventEntity import org.matrix.android.sdk.internal.database.model.TimelineEventEntityFields +import org.matrix.android.sdk.internal.database.query.where internal fun TimelineEventEntity.Companion.nextId(realm: Realm): Long { - val currentIdNum = realm.where(TimelineEventEntity::class.java).max(TimelineEventEntityFields.LOCAL_ID) + val currentIdNum = TimelineEventEntity.where(realm).max(TimelineEventEntityFields.LOCAL_ID) return if (currentIdNum == null) { 1 } else { diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/query/TimelineEventEntityQueries.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/query/TimelineEventEntityQueries.kt index f216e93b07..215ab34f95 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/query/TimelineEventEntityQueries.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/query/TimelineEventEntityQueries.kt @@ -29,26 +29,35 @@ import org.matrix.android.sdk.internal.database.model.RoomEntity import org.matrix.android.sdk.internal.database.model.TimelineEventEntity import org.matrix.android.sdk.internal.database.model.TimelineEventEntityFields -internal fun TimelineEventEntity.Companion.where(realm: Realm, roomId: String, eventId: String): RealmQuery { - return realm.where() +internal fun TimelineEventEntity.Companion.where(realm: Realm): RealmQuery { + return realm.where() +} + +internal fun TimelineEventEntity.Companion.where(realm: Realm, + roomId: String, + eventId: String): RealmQuery { + return where(realm) .equalTo(TimelineEventEntityFields.ROOM_ID, roomId) .equalTo(TimelineEventEntityFields.EVENT_ID, eventId) } -internal fun TimelineEventEntity.Companion.where(realm: Realm, roomId: String, eventIds: List): RealmQuery { - return realm.where() +internal fun TimelineEventEntity.Companion.where(realm: Realm, + roomId: String, + eventIds: List): RealmQuery { + return where(realm) .equalTo(TimelineEventEntityFields.ROOM_ID, roomId) .`in`(TimelineEventEntityFields.EVENT_ID, eventIds.toTypedArray()) } internal fun TimelineEventEntity.Companion.whereRoomId(realm: Realm, roomId: String): RealmQuery { - return realm.where() + return where(realm) .equalTo(TimelineEventEntityFields.ROOM_ID, roomId) } -internal fun TimelineEventEntity.Companion.findWithSenderMembershipEvent(realm: Realm, senderMembershipEventId: String): List { - return realm.where() +internal fun TimelineEventEntity.Companion.findWithSenderMembershipEvent(realm: Realm, + senderMembershipEventId: String): List { + return where(realm) .equalTo(TimelineEventEntityFields.SENDER_MEMBERSHIP_EVENT_ID, senderMembershipEventId) .findAll() } @@ -110,12 +119,12 @@ internal fun RealmQuery.filterTypes(filterTypes: List.find(eventId: String): TimelineEventEntity? { - return this.where() + return where() .equalTo(TimelineEventEntityFields.EVENT_ID, eventId) .findFirst() } @@ -138,7 +147,7 @@ internal fun RealmQuery.filterSendStates(sendStates: List): RealmResults { - return realm.where(TimelineEventEntity::class.java) + return where(realm) .`in`(TimelineEventEntityFields.ROOT.SENDER, senderIds.toTypedArray()) .isNull(TimelineEventEntityFields.ROOT.STATE_KEY) .findAll() diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/TimelineEventDataSource.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/TimelineEventDataSource.kt index 638866a46e..8b58d3ca5c 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/TimelineEventDataSource.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/TimelineEventDataSource.kt @@ -19,7 +19,6 @@ package org.matrix.android.sdk.internal.session.room.timeline import androidx.lifecycle.LiveData import com.zhuinden.monarchy.Monarchy import io.realm.Sort -import io.realm.kotlin.where import org.matrix.android.sdk.api.session.events.model.isImageMessage import org.matrix.android.sdk.api.session.events.model.isVideoMessage import org.matrix.android.sdk.api.session.room.timeline.TimelineEvent @@ -29,6 +28,7 @@ import org.matrix.android.sdk.internal.database.mapper.TimelineEventMapper import org.matrix.android.sdk.internal.database.model.TimelineEventEntity import org.matrix.android.sdk.internal.database.model.TimelineEventEntityFields import org.matrix.android.sdk.internal.database.query.where +import org.matrix.android.sdk.internal.database.query.whereRoomId import org.matrix.android.sdk.internal.di.SessionDatabase import org.matrix.android.sdk.internal.task.TaskExecutor import javax.inject.Inject @@ -53,8 +53,7 @@ internal class TimelineEventDataSource @Inject constructor(private val realmSess fun getAttachmentMessages(roomId: String): List { // TODO pretty bad query.. maybe we should denormalize clear type in base? return realmSessionProvider.withRealm { realm -> - realm.where() - .equalTo(TimelineEventEntityFields.ROOM_ID, roomId) + TimelineEventEntity.whereRoomId(realm, roomId) .sort(TimelineEventEntityFields.DISPLAY_INDEX, Sort.ASCENDING) .findAll() ?.mapNotNull { timelineEventMapper.map(it).takeIf { it.root.isImageMessage() || it.root.isVideoMessage() } } From 914db8c6be84375975da0989182f2394ca5f7e8e Mon Sep 17 00:00:00 2001 From: Maxime NATUREL Date: Thu, 21 Apr 2022 15:52:16 +0200 Subject: [PATCH 147/561] Removing BeaconInfo structure --- .../room/model/livelocation/BeaconInfo.kt | 33 ------------------- .../livelocation/LiveLocationBeaconContent.kt | 16 ++++++--- ...DefaultLiveLocationAggregationProcessor.kt | 4 +-- .../session/room/state/DefaultStateService.kt | 14 ++------ .../factory/LiveLocationMessageItemFactory.kt | 2 +- .../location/LocationSharingService.kt | 7 ++-- 6 files changed, 19 insertions(+), 57 deletions(-) delete mode 100644 matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/livelocation/BeaconInfo.kt diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/livelocation/BeaconInfo.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/livelocation/BeaconInfo.kt deleted file mode 100644 index 873edc0f1f..0000000000 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/livelocation/BeaconInfo.kt +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2022 The Matrix.org Foundation C.I.C. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.matrix.android.sdk.api.session.room.model.livelocation - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -@JsonClass(generateAdapter = true) -data class BeaconInfo( - @Json(name = "description") val description: String? = null, - /** - * Beacon should be considered as inactive after this timeout as milliseconds. - */ - @Json(name = "timeout") val timeout: Long? = null, - /** - * Should be set true to start sharing beacon. - */ - @Json(name = "live") val isLive: Boolean? = null -) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/livelocation/LiveLocationBeaconContent.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/livelocation/LiveLocationBeaconContent.kt index 106e76eafd..a7c78f6e80 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/livelocation/LiveLocationBeaconContent.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/livelocation/LiveLocationBeaconContent.kt @@ -39,10 +39,18 @@ data class LiveLocationBeaconContent( @Json(name = "m.new_content") override val newContent: Content? = null, /** - * Indicates user's intent to share ephemeral location. + * Optional description of the beacon. */ - @Json(name = "org.matrix.msc3672.beacon_info") val unstableBeaconInfo: BeaconInfo? = null, - @Json(name = "m.beacon_info") val beaconInfo: BeaconInfo? = null, + @Json(name = "description") val description: String? = null, + /** + * Beacon should be considered as inactive after this timeout as milliseconds. + */ + @Json(name = "timeout") val timeout: Long? = null, + /** + * Should be set true to start sharing beacon. + */ + @Json(name = "live") val isLive: Boolean? = null, + /** * Beacon creation timestamp. */ @@ -65,8 +73,6 @@ data class LiveLocationBeaconContent( var hasTimedOut: Boolean = false ) : MessageContent { - fun getBestBeaconInfo() = beaconInfo ?: unstableBeaconInfo - fun getBestTimestampAsMilliseconds() = timestampAsMilliseconds ?: unstableTimestampAsMilliseconds fun getBestLocationAsset() = locationAsset ?: unstableLocationAsset diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/aggregation/livelocation/DefaultLiveLocationAggregationProcessor.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/aggregation/livelocation/DefaultLiveLocationAggregationProcessor.kt index 95e196c762..8de0965b40 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/aggregation/livelocation/DefaultLiveLocationAggregationProcessor.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/aggregation/livelocation/DefaultLiveLocationAggregationProcessor.kt @@ -59,7 +59,7 @@ internal class DefaultLiveLocationAggregationProcessor @Inject constructor() : L } // Check if live location is ended - if (!beaconInfoContent.getBestBeaconInfo()?.isLive.orFalse()) { + if (!beaconInfoContent.isLive.orFalse()) { Timber.v("## LIVE LOCATION. Beacon info is not live anymore") return } @@ -79,7 +79,7 @@ internal class DefaultLiveLocationAggregationProcessor @Inject constructor() : L liveLocationContent: MessageLiveLocationContent): Boolean { val beaconInfoStartTime = beaconInfoContent.getBestTimestampAsMilliseconds() ?: 0 val liveLocationEventTime = liveLocationContent.getBestTimestampAsMilliseconds() ?: 0 - val timeout = beaconInfoContent.getBestBeaconInfo()?.timeout ?: 0 + val timeout = beaconInfoContent.timeout ?: 0 return liveLocationEventTime - beaconInfoStartTime > timeout } } diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/state/DefaultStateService.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/state/DefaultStateService.kt index 89d33f98d2..0a4fd875d5 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/state/DefaultStateService.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/state/DefaultStateService.kt @@ -33,7 +33,6 @@ import org.matrix.android.sdk.api.session.room.model.RoomHistoryVisibility import org.matrix.android.sdk.api.session.room.model.RoomJoinRules import org.matrix.android.sdk.api.session.room.model.RoomJoinRulesAllowEntry import org.matrix.android.sdk.api.session.room.model.RoomJoinRulesContent -import org.matrix.android.sdk.api.session.room.model.livelocation.BeaconInfo import org.matrix.android.sdk.api.session.room.model.livelocation.LiveLocationBeaconContent import org.matrix.android.sdk.api.session.room.state.StateService import org.matrix.android.sdk.api.util.JsonDict @@ -194,19 +193,12 @@ internal class DefaultStateService @AssistedInject constructor(@Assisted private override suspend fun stopLiveLocation(userId: String) { getLiveLocationBeaconInfo(userId, true)?.let { beaconInfoStateEvent -> beaconInfoStateEvent.getClearContent()?.toModel()?.let { content -> - val beaconContent = LiveLocationBeaconContent( - unstableBeaconInfo = BeaconInfo( - description = content.getBestBeaconInfo()?.description, - timeout = content.getBestBeaconInfo()?.timeout, - isLive = false, - ), - unstableTimestampAsMilliseconds = System.currentTimeMillis() - ).toContent() + val updatedContent = content.copy(isLive = false).toContent() beaconInfoStateEvent.stateKey?.let { sendStateEvent( eventType = EventType.STATE_ROOM_BEACON_INFO.first(), - body = beaconContent, + body = updatedContent, stateKey = it ) } @@ -225,7 +217,7 @@ internal class DefaultStateService @AssistedInject constructor(@Assisted private } .firstOrNull { beaconInfoEvent -> !filterOnlyLive || - beaconInfoEvent.getClearContent()?.toModel()?.getBestBeaconInfo()?.isLive.orFalse() + beaconInfoEvent.getClearContent()?.toModel()?.isLive.orFalse() } } } diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/LiveLocationMessageItemFactory.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/LiveLocationMessageItemFactory.kt index 9bc148a562..c417038935 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/LiveLocationMessageItemFactory.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/LiveLocationMessageItemFactory.kt @@ -46,7 +46,7 @@ class LiveLocationMessageItemFactory @Inject constructor( } private fun isLiveRunning(liveLocationContent: LiveLocationBeaconContent): Boolean { - return liveLocationContent.getBestBeaconInfo()?.isLive.orFalse() && liveLocationContent.hasTimedOut.not() + return liveLocationContent.isLive.orFalse() && liveLocationContent.hasTimedOut.not() } private fun buildStartLiveItem( diff --git a/vector/src/main/java/im/vector/app/features/location/LocationSharingService.kt b/vector/src/main/java/im/vector/app/features/location/LocationSharingService.kt index 2126cdac04..4e0980173b 100644 --- a/vector/src/main/java/im/vector/app/features/location/LocationSharingService.kt +++ b/vector/src/main/java/im/vector/app/features/location/LocationSharingService.kt @@ -31,7 +31,6 @@ import kotlinx.parcelize.Parcelize import org.matrix.android.sdk.api.session.Session import org.matrix.android.sdk.api.session.events.model.EventType import org.matrix.android.sdk.api.session.events.model.toContent -import org.matrix.android.sdk.api.session.room.model.livelocation.BeaconInfo import org.matrix.android.sdk.api.session.room.model.livelocation.LiveLocationBeaconContent import timber.log.Timber import java.util.Timer @@ -97,10 +96,8 @@ class LocationSharingService : VectorService(), LocationTracker.Callback { private suspend fun sendLiveBeaconInfo(session: Session, roomArgs: RoomArgs) { val beaconContent = LiveLocationBeaconContent( - unstableBeaconInfo = BeaconInfo( - timeout = roomArgs.durationMillis, - isLive = true - ), + timeout = roomArgs.durationMillis, + isLive = true, unstableTimestampAsMilliseconds = clock.epochMillis() ).toContent() From cf8031bbc64d2c0947655180c1b5adbddd7a4e25 Mon Sep 17 00:00:00 2001 From: ariskotsomitopoulos Date: Thu, 21 Apr 2022 17:14:25 +0300 Subject: [PATCH 148/561] Remove unused comment --- .../home/room/detail/timeline/factory/TimelineItemFactory.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/TimelineItemFactory.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/TimelineItemFactory.kt index 45ab4e4ba3..b5d620658e 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/TimelineItemFactory.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/TimelineItemFactory.kt @@ -138,7 +138,6 @@ class TimelineItemFactory @Inject constructor( } }.also { if (it != null && event.isEncrypted()) { -// Timber.i("----> ${event.eventId} encryption error found") decryptionFailureTracker.e2eEventDisplayedInTimeline(event) } } From cc705d5458bd288e4335b67c7d2a7c72f43a51a9 Mon Sep 17 00:00:00 2001 From: ariskotsomitopoulos Date: Thu, 21 Apr 2022 17:23:00 +0300 Subject: [PATCH 149/561] Remove unused import --- .../im/vector/app/features/analytics/DecryptionFailureTracker.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/vector/src/main/java/im/vector/app/features/analytics/DecryptionFailureTracker.kt b/vector/src/main/java/im/vector/app/features/analytics/DecryptionFailureTracker.kt index 308077810d..057930b4c8 100644 --- a/vector/src/main/java/im/vector/app/features/analytics/DecryptionFailureTracker.kt +++ b/vector/src/main/java/im/vector/app/features/analytics/DecryptionFailureTracker.kt @@ -29,7 +29,6 @@ import kotlinx.coroutines.flow.onEach import kotlinx.coroutines.launch import org.matrix.android.sdk.api.session.crypto.MXCryptoError import org.matrix.android.sdk.api.session.room.timeline.TimelineEvent -import timber.log.Timber import javax.inject.Inject import javax.inject.Singleton From eb844753a55f6ce0341dc5665c4cbafe474c189f Mon Sep 17 00:00:00 2001 From: Maxime NATUREL Date: Thu, 21 Apr 2022 16:47:38 +0200 Subject: [PATCH 150/561] Adding changelog entry --- changelog.d/5814.feature | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/5814.feature diff --git a/changelog.d/5814.feature b/changelog.d/5814.feature new file mode 100644 index 0000000000..c892702486 --- /dev/null +++ b/changelog.d/5814.feature @@ -0,0 +1 @@ +Live location sharing: updating beacon state event content structure From e368046b8435461d61daaaa821e009c12fe8d4ac Mon Sep 17 00:00:00 2001 From: ariskotsomitopoulos Date: Thu, 21 Apr 2022 19:31:12 +0300 Subject: [PATCH 151/561] Add KEYS_WITHHELD error type to analytics --- .../features/analytics/DecryptionFailureTracker.kt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/analytics/DecryptionFailureTracker.kt b/vector/src/main/java/im/vector/app/features/analytics/DecryptionFailureTracker.kt index 057930b4c8..b23365c056 100644 --- a/vector/src/main/java/im/vector/app/features/analytics/DecryptionFailureTracker.kt +++ b/vector/src/main/java/im/vector/app/features/analytics/DecryptionFailureTracker.kt @@ -38,7 +38,8 @@ private data class DecryptionFailure( val failedEventId: String, val error: MXCryptoError.ErrorType ) -private typealias DetailedErrorName = Pair +private typealias DetailedErrorName = Pair + private const val GRACE_PERIOD_MILLIS = 4_000 private const val CHECK_INTERVAL = 2_000L @@ -145,10 +146,11 @@ class DecryptionFailureTracker @Inject constructor( private fun MXCryptoError.ErrorType.toAnalyticsErrorName(): DetailedErrorName { val detailed = "$name | mxc_crypto_error_type" return when (this) { - MXCryptoError.ErrorType.UNKNOWN_INBOUND_SESSION_ID -> Pair(detailed, Error.Name.OlmKeysNotSentError) - MXCryptoError.ErrorType.OLM -> Pair(detailed, Error.Name.OlmUnspecifiedError) - MXCryptoError.ErrorType.UNKNOWN_MESSAGE_INDEX -> Pair(detailed, Error.Name.OlmIndexError) - else -> Pair(detailed, Error.Name.UnknownError) + MXCryptoError.ErrorType.UNKNOWN_INBOUND_SESSION_ID, + MXCryptoError.ErrorType.KEYS_WITHHELD -> Pair(detailed, Error.Name.OlmKeysNotSentError) + MXCryptoError.ErrorType.OLM -> Pair(detailed, Error.Name.OlmUnspecifiedError) + MXCryptoError.ErrorType.UNKNOWN_MESSAGE_INDEX -> Pair(detailed, Error.Name.OlmIndexError) + else -> Pair(detailed, Error.Name.UnknownError) } } } From 3ed6a90fde60de30256b8d1652f1be594db2de6b Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 21 Apr 2022 21:08:28 +0200 Subject: [PATCH 152/561] Fix sanity test after #5773 --- .../java/im/vector/app/ui/UiAllScreensSanityTest.kt | 1 - .../java/im/vector/app/ui/robot/settings/SettingsRobot.kt | 4 ---- .../vector/app/ui/robot/settings/SettingsSecurityRobot.kt | 7 +++++++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/vector/src/androidTest/java/im/vector/app/ui/UiAllScreensSanityTest.kt b/vector/src/androidTest/java/im/vector/app/ui/UiAllScreensSanityTest.kt index 5a03d5890a..4333558e7a 100644 --- a/vector/src/androidTest/java/im/vector/app/ui/UiAllScreensSanityTest.kt +++ b/vector/src/androidTest/java/im/vector/app/ui/UiAllScreensSanityTest.kt @@ -72,7 +72,6 @@ class UiAllScreensSanityTest { notifications { crawl() } preferences { crawl() } voiceAndVideo() - ignoredUsers() securityAndPrivacy { crawl() } labs() advancedSettings { crawl() } diff --git a/vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsRobot.kt b/vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsRobot.kt index 437f87c193..1697fe078d 100644 --- a/vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsRobot.kt +++ b/vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsRobot.kt @@ -44,10 +44,6 @@ class SettingsRobot { clickOnAndGoBack(R.string.preference_voice_and_video) { block() } } - fun ignoredUsers(block: () -> Unit = {}) { - clickOnAndGoBack(R.string.settings_ignored_users) { block() } - } - fun securityAndPrivacy(block: SettingsSecurityRobot.() -> Unit) { clickOnAndGoBack(R.string.settings_security_and_privacy) { block(SettingsSecurityRobot()) } } diff --git a/vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsSecurityRobot.kt b/vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsSecurityRobot.kt index 168db3e0e9..ef20d7764b 100644 --- a/vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsSecurityRobot.kt +++ b/vector/src/androidTest/java/im/vector/app/ui/robot/settings/SettingsSecurityRobot.kt @@ -18,6 +18,7 @@ package im.vector.app.ui.robot.settings import androidx.test.espresso.Espresso import im.vector.app.R +import im.vector.app.clickOnAndGoBack import im.vector.app.espresso.tools.clickOnPreference class SettingsSecurityRobot { @@ -36,5 +37,11 @@ class SettingsSecurityRobot { clickOnPreference(R.string.settings_opt_in_of_analytics) Espresso.pressBack() + + ignoredUsers() + } + + private fun ignoredUsers(block: () -> Unit = {}) { + clickOnAndGoBack(R.string.settings_ignored_users) { block() } } } From 2839d1467f1ecd07f092f57025c3fca1652969e3 Mon Sep 17 00:00:00 2001 From: TarasSmakula Date: Thu, 21 Apr 2022 23:02:27 +0300 Subject: [PATCH 153/561] Feature/5575 custom auth params for sign up (#5577) Add a fun `RegistrationWizard.registrationCustom()` to be able to use any parameters during the registration. Move terms converter into `api` package. --- changelog.d/5575.sdk | 2 + .../android/sdk/api/auth}/UrlAndName.kt | 4 +- .../matrix/android/sdk/api/auth}/converter.kt | 254 +++++++++--------- .../auth/registration/RegistrationWizard.kt | 9 + .../android/sdk/internal/auth/AuthAPI.kt | 9 + .../registration/DefaultRegistrationWizard.kt | 44 ++- .../auth/registration/RegisterCustomTask.kt | 47 ++++ .../registration/RegistrationCustomParams.kt | 31 +++ .../app/features/login/LoginActivity.kt | 2 +- .../app/features/onboarding/Login2Variant.kt | 2 +- .../onboarding/ftueauth/FtueAuthVariant.kt | 2 +- 11 files changed, 268 insertions(+), 138 deletions(-) create mode 100644 changelog.d/5575.sdk rename {vector/src/main/java/im/vector/app/features/login/terms => matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/auth}/UrlAndName.kt (87%) rename {vector/src/main/java/im/vector/app/features/login/terms => matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/auth}/converter.kt (95%) create mode 100644 matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/registration/RegisterCustomTask.kt create mode 100644 matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/registration/RegistrationCustomParams.kt diff --git a/changelog.d/5575.sdk b/changelog.d/5575.sdk new file mode 100644 index 0000000000..19339bdce2 --- /dev/null +++ b/changelog.d/5575.sdk @@ -0,0 +1,2 @@ +- Added registrationCustom into RegistrationWizard to send custom auth params for sign up +- Moved terms converter into api package to make it accessible in sdk \ No newline at end of file diff --git a/vector/src/main/java/im/vector/app/features/login/terms/UrlAndName.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/auth/UrlAndName.kt similarity index 87% rename from vector/src/main/java/im/vector/app/features/login/terms/UrlAndName.kt rename to matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/auth/UrlAndName.kt index f298aeca37..ca0123b832 100644 --- a/vector/src/main/java/im/vector/app/features/login/terms/UrlAndName.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/auth/UrlAndName.kt @@ -1,5 +1,5 @@ /* - * Copyright 2019 New Vector Ltd + * Copyright 2020 The Matrix.org Foundation C.I.C. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package im.vector.app.features.login.terms +package org.matrix.android.sdk.api.auth data class UrlAndName( val url: String, diff --git a/vector/src/main/java/im/vector/app/features/login/terms/converter.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/auth/converter.kt similarity index 95% rename from vector/src/main/java/im/vector/app/features/login/terms/converter.kt rename to matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/auth/converter.kt index 64e4fb65d9..1a4c1ee51c 100644 --- a/vector/src/main/java/im/vector/app/features/login/terms/converter.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/auth/converter.kt @@ -1,127 +1,127 @@ -/* - * Copyright 2019 New Vector Ltd - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package im.vector.app.features.login.terms - -import org.matrix.android.sdk.api.auth.data.LocalizedFlowDataLoginTerms -import org.matrix.android.sdk.api.auth.registration.TermPolicies - -/** - * This method extract the policies from the login terms parameter, regarding the user language. - * For each policy, if user language is not found, the default language is used and if not found, the first url and name are used (not predictable) - * - * Example of Data: - *
- * "m.login.terms": {
- *       "policies": {
- *         "privacy_policy": {
- *           "version": "1.0",
- *           "en": {
- *             "url": "http:\/\/matrix.org\/_matrix\/consent?v=1.0",
- *             "name": "Terms and Conditions"
- *           }
- *         }
- *       }
- *     }
- *
- * - * @param userLanguage the user language - * @param defaultLanguage the default language to use if the user language is not found for a policy in registrationFlowResponse - */ -fun TermPolicies.toLocalizedLoginTerms(userLanguage: String, - defaultLanguage: String = "en"): List { - val result = ArrayList() - - val policies = get("policies") - if (policies is Map<*, *>) { - policies.keys.forEach { policyName -> - val localizedFlowDataLoginTermsPolicyName = policyName as String - var localizedFlowDataLoginTermsVersion: String? = null - var localizedFlowDataLoginTermsLocalizedUrl: String? = null - var localizedFlowDataLoginTermsLocalizedName: String? = null - - val policy = policies[policyName] - - // Enter this policy - if (policy is Map<*, *>) { - // Version - localizedFlowDataLoginTermsVersion = policy["version"] as String? - - var userLanguageUrlAndName: UrlAndName? = null - var defaultLanguageUrlAndName: UrlAndName? = null - var firstUrlAndName: UrlAndName? = null - - // Search for language - policy.keys.forEach { policyKey -> - when (policyKey) { - "version" -> Unit // Ignore - userLanguage -> { - // We found the data for the user language - userLanguageUrlAndName = extractUrlAndName(policy[policyKey]) - } - defaultLanguage -> { - // We found default language - defaultLanguageUrlAndName = extractUrlAndName(policy[policyKey]) - } - else -> { - if (firstUrlAndName == null) { - // Get at least some data - firstUrlAndName = extractUrlAndName(policy[policyKey]) - } - } - } - } - - // Copy found language data by priority - when { - userLanguageUrlAndName != null -> { - localizedFlowDataLoginTermsLocalizedUrl = userLanguageUrlAndName!!.url - localizedFlowDataLoginTermsLocalizedName = userLanguageUrlAndName!!.name - } - defaultLanguageUrlAndName != null -> { - localizedFlowDataLoginTermsLocalizedUrl = defaultLanguageUrlAndName!!.url - localizedFlowDataLoginTermsLocalizedName = defaultLanguageUrlAndName!!.name - } - firstUrlAndName != null -> { - localizedFlowDataLoginTermsLocalizedUrl = firstUrlAndName!!.url - localizedFlowDataLoginTermsLocalizedName = firstUrlAndName!!.name - } - } - } - - result.add(LocalizedFlowDataLoginTerms( - policyName = localizedFlowDataLoginTermsPolicyName, - version = localizedFlowDataLoginTermsVersion, - localizedUrl = localizedFlowDataLoginTermsLocalizedUrl, - localizedName = localizedFlowDataLoginTermsLocalizedName - )) - } - } - - return result -} - -private fun extractUrlAndName(policyData: Any?): UrlAndName? { - if (policyData is Map<*, *>) { - val url = policyData["url"] as String? - val name = policyData["name"] as String? - - if (url != null && name != null) { - return UrlAndName(url, name) - } - } - return null -} +/* + * Copyright 2020 The Matrix.org Foundation C.I.C. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.matrix.android.sdk.api.auth + +import org.matrix.android.sdk.api.auth.data.LocalizedFlowDataLoginTerms +import org.matrix.android.sdk.api.auth.registration.TermPolicies + +/** + * This method extract the policies from the login terms parameter, regarding the user language. + * For each policy, if user language is not found, the default language is used and if not found, the first url and name are used (not predictable) + * + * Example of Data: + *
+ * "m.login.terms": {
+ *       "policies": {
+ *         "privacy_policy": {
+ *           "version": "1.0",
+ *           "en": {
+ *             "url": "http:\/\/matrix.org\/_matrix\/consent?v=1.0",
+ *             "name": "Terms and Conditions"
+ *           }
+ *         }
+ *       }
+ *     }
+ *
+ * + * @param userLanguage the user language + * @param defaultLanguage the default language to use if the user language is not found for a policy in registrationFlowResponse + */ +fun TermPolicies.toLocalizedLoginTerms(userLanguage: String, + defaultLanguage: String = "en"): List { + val result = ArrayList() + + val policies = get("policies") + if (policies is Map<*, *>) { + policies.keys.forEach { policyName -> + val localizedFlowDataLoginTermsPolicyName = policyName as String + var localizedFlowDataLoginTermsVersion: String? = null + var localizedFlowDataLoginTermsLocalizedUrl: String? = null + var localizedFlowDataLoginTermsLocalizedName: String? = null + + val policy = policies[policyName] + + // Enter this policy + if (policy is Map<*, *>) { + // Version + localizedFlowDataLoginTermsVersion = policy["version"] as String? + + var userLanguageUrlAndName: UrlAndName? = null + var defaultLanguageUrlAndName: UrlAndName? = null + var firstUrlAndName: UrlAndName? = null + + // Search for language + policy.keys.forEach { policyKey -> + when (policyKey) { + "version" -> Unit // Ignore + userLanguage -> { + // We found the data for the user language + userLanguageUrlAndName = extractUrlAndName(policy[policyKey]) + } + defaultLanguage -> { + // We found default language + defaultLanguageUrlAndName = extractUrlAndName(policy[policyKey]) + } + else -> { + if (firstUrlAndName == null) { + // Get at least some data + firstUrlAndName = extractUrlAndName(policy[policyKey]) + } + } + } + } + + // Copy found language data by priority + when { + userLanguageUrlAndName != null -> { + localizedFlowDataLoginTermsLocalizedUrl = userLanguageUrlAndName!!.url + localizedFlowDataLoginTermsLocalizedName = userLanguageUrlAndName!!.name + } + defaultLanguageUrlAndName != null -> { + localizedFlowDataLoginTermsLocalizedUrl = defaultLanguageUrlAndName!!.url + localizedFlowDataLoginTermsLocalizedName = defaultLanguageUrlAndName!!.name + } + firstUrlAndName != null -> { + localizedFlowDataLoginTermsLocalizedUrl = firstUrlAndName!!.url + localizedFlowDataLoginTermsLocalizedName = firstUrlAndName!!.name + } + } + } + + result.add(LocalizedFlowDataLoginTerms( + policyName = localizedFlowDataLoginTermsPolicyName, + version = localizedFlowDataLoginTermsVersion, + localizedUrl = localizedFlowDataLoginTermsLocalizedUrl, + localizedName = localizedFlowDataLoginTermsLocalizedName + )) + } + } + + return result +} + +private fun extractUrlAndName(policyData: Any?): UrlAndName? { + if (policyData is Map<*, *>) { + val url = policyData["url"] as String? + val name = policyData["name"] as String? + + if (url != null && name != null) { + return UrlAndName(url, name) + } + } + return null +} diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/auth/registration/RegistrationWizard.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/auth/registration/RegistrationWizard.kt index 621253faa5..0cda64499f 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/auth/registration/RegistrationWizard.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/auth/registration/RegistrationWizard.kt @@ -16,6 +16,8 @@ package org.matrix.android.sdk.api.auth.registration +import org.matrix.android.sdk.api.util.JsonDict + /** * Set of methods to be able to create an account on a homeserver. * @@ -73,6 +75,13 @@ interface RegistrationWizard { */ suspend fun dummy(): RegistrationResult + /** + * Perform custom registration stage by sending a custom JsonDict. + * Current registration "session" param will be included into authParams by default. + * The authParams should contain at least one entry "type" with a String value. + */ + suspend fun registrationCustom(authParams: JsonDict): RegistrationResult + /** * Perform the "m.login.email.identity" or "m.login.msisdn" stage. * diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/AuthAPI.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/AuthAPI.kt index 554e21ce55..ebad859b05 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/AuthAPI.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/AuthAPI.kt @@ -26,6 +26,7 @@ import org.matrix.android.sdk.internal.auth.data.WebClientConfig import org.matrix.android.sdk.internal.auth.login.ResetPasswordMailConfirmed import org.matrix.android.sdk.internal.auth.registration.AddThreePidRegistrationParams import org.matrix.android.sdk.internal.auth.registration.AddThreePidRegistrationResponse +import org.matrix.android.sdk.internal.auth.registration.RegistrationCustomParams import org.matrix.android.sdk.internal.auth.registration.RegistrationParams import org.matrix.android.sdk.internal.auth.registration.SuccessResult import org.matrix.android.sdk.internal.auth.registration.ValidationCodeBody @@ -68,6 +69,14 @@ internal interface AuthAPI { @POST(NetworkConstants.URI_API_PREFIX_PATH_R0 + "register") suspend fun register(@Body registrationParams: RegistrationParams): Credentials + /** + * Register to the homeserver, or get error 401 with a RegistrationFlowResponse object if registration is incomplete + * method to perform other custom stages + * Ref: https://matrix.org/docs/spec/client_server/latest#account-registration-and-management + */ + @POST(NetworkConstants.URI_API_PREFIX_PATH_R0 + "register") + suspend fun registerCustom(@Body registrationCustomParams: RegistrationCustomParams): Credentials + /** * Checks to see if a username is available, and valid, for the server. */ diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/registration/DefaultRegistrationWizard.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/registration/DefaultRegistrationWizard.kt index 4a156e74cd..590b333e90 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/registration/DefaultRegistrationWizard.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/registration/DefaultRegistrationWizard.kt @@ -17,6 +17,7 @@ package org.matrix.android.sdk.internal.auth.registration import kotlinx.coroutines.delay +import org.matrix.android.sdk.api.auth.data.Credentials import org.matrix.android.sdk.api.auth.data.LoginFlowTypes import org.matrix.android.sdk.api.auth.registration.RegisterThreePid import org.matrix.android.sdk.api.auth.registration.RegistrationAvailability @@ -25,6 +26,7 @@ import org.matrix.android.sdk.api.auth.registration.RegistrationWizard import org.matrix.android.sdk.api.auth.registration.toFlowResult import org.matrix.android.sdk.api.failure.Failure import org.matrix.android.sdk.api.failure.Failure.RegistrationFlowError +import org.matrix.android.sdk.api.util.JsonDict import org.matrix.android.sdk.internal.auth.AuthAPI import org.matrix.android.sdk.internal.auth.PendingSessionStore import org.matrix.android.sdk.internal.auth.SessionCreator @@ -45,6 +47,7 @@ internal class DefaultRegistrationWizard( private val registerAvailableTask: RegisterAvailableTask = DefaultRegisterAvailableTask(authAPI) private val registerAddThreePidTask: RegisterAddThreePidTask = DefaultRegisterAddThreePidTask(authAPI) private val validateCodeTask: ValidateCodeTask = DefaultValidateCodeTask(authAPI) + private val registerCustomTask: RegisterCustomTask = DefaultRegisterCustomTask(authAPI) override val currentThreePid: String? get() { @@ -187,22 +190,51 @@ internal class DefaultRegistrationWizard( return performRegistrationRequest(params) } - private suspend fun performRegistrationRequest(registrationParams: RegistrationParams, - delayMillis: Long = 0): RegistrationResult { + override suspend fun registrationCustom( + authParams: JsonDict + ): RegistrationResult { + val safeSession = pendingSessionData.currentSession + ?: throw IllegalStateException("developer error, call createAccount() method first") + + val mutableParams = authParams.toMutableMap() + mutableParams["session"] = safeSession + + val params = RegistrationCustomParams(auth = mutableParams) + return performRegistrationOtherRequest(params) + } + + private suspend fun performRegistrationRequest( + registrationParams: RegistrationParams, + delayMillis: Long = 0 + ): RegistrationResult { delay(delayMillis) + return register { registerTask.execute(RegisterTask.Params(registrationParams)) } + } + + private suspend fun performRegistrationOtherRequest( + registrationCustomParams: RegistrationCustomParams + ): RegistrationResult { + return register { registerCustomTask.execute(RegisterCustomTask.Params(registrationCustomParams)) } + } + + private suspend fun register( + execute: suspend () -> Credentials + ): RegistrationResult { val credentials = try { - registerTask.execute(RegisterTask.Params(registrationParams)) + execute.invoke() } catch (exception: Throwable) { if (exception is RegistrationFlowError) { - pendingSessionData = pendingSessionData.copy(currentSession = exception.registrationFlowResponse.session) - .also { pendingSessionStore.savePendingSessionData(it) } + pendingSessionData = + pendingSessionData.copy(currentSession = exception.registrationFlowResponse.session) + .also { pendingSessionStore.savePendingSessionData(it) } return RegistrationResult.FlowResponse(exception.registrationFlowResponse.toFlowResult()) } else { throw exception } } - val session = sessionCreator.createSession(credentials, pendingSessionData.homeServerConnectionConfig) + val session = + sessionCreator.createSession(credentials, pendingSessionData.homeServerConnectionConfig) return RegistrationResult.Success(session) } diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/registration/RegisterCustomTask.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/registration/RegisterCustomTask.kt new file mode 100644 index 0000000000..60af708c38 --- /dev/null +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/registration/RegisterCustomTask.kt @@ -0,0 +1,47 @@ +/* + * Copyright 2021 The Matrix.org Foundation C.I.C. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.matrix.android.sdk.internal.auth.registration + +import org.matrix.android.sdk.api.auth.data.Credentials +import org.matrix.android.sdk.api.failure.Failure +import org.matrix.android.sdk.api.failure.toRegistrationFlowResponse +import org.matrix.android.sdk.internal.auth.AuthAPI +import org.matrix.android.sdk.internal.network.executeRequest +import org.matrix.android.sdk.internal.task.Task + +internal interface RegisterCustomTask : Task { + data class Params( + val registrationCustomParams: RegistrationCustomParams + ) +} + +internal class DefaultRegisterCustomTask( + private val authAPI: AuthAPI +) : RegisterCustomTask { + + override suspend fun execute(params: RegisterCustomTask.Params): Credentials { + try { + return executeRequest(null) { + authAPI.registerCustom(params.registrationCustomParams) + } + } catch (throwable: Throwable) { + throw throwable.toRegistrationFlowResponse() + ?.let { Failure.RegistrationFlowError(it) } + ?: throwable + } + } +} diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/registration/RegistrationCustomParams.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/registration/RegistrationCustomParams.kt new file mode 100644 index 0000000000..45adac6c26 --- /dev/null +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/registration/RegistrationCustomParams.kt @@ -0,0 +1,31 @@ +/* + * Copyright 2021 The Matrix.org Foundation C.I.C. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.matrix.android.sdk.internal.auth.registration + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass +import org.matrix.android.sdk.api.util.JsonDict + +/** + * Class to pass parameters to the custom registration types for /register. + */ +@JsonClass(generateAdapter = true) +internal data class RegistrationCustomParams( + // authentication parameters + @Json(name = "auth") + val auth: JsonDict? = null, +) diff --git a/vector/src/main/java/im/vector/app/features/login/LoginActivity.kt b/vector/src/main/java/im/vector/app/features/login/LoginActivity.kt index dec6fef040..79d2d37c44 100644 --- a/vector/src/main/java/im/vector/app/features/login/LoginActivity.kt +++ b/vector/src/main/java/im/vector/app/features/login/LoginActivity.kt @@ -42,10 +42,10 @@ import im.vector.app.features.analytics.plan.MobileScreen import im.vector.app.features.home.HomeActivity import im.vector.app.features.login.terms.LoginTermsFragment import im.vector.app.features.login.terms.LoginTermsFragmentArgument -import im.vector.app.features.login.terms.toLocalizedLoginTerms import im.vector.app.features.pin.UnlockedActivity import org.matrix.android.sdk.api.auth.registration.FlowResult import org.matrix.android.sdk.api.auth.registration.Stage +import org.matrix.android.sdk.api.auth.toLocalizedLoginTerms import org.matrix.android.sdk.api.extensions.tryOrNull /** diff --git a/vector/src/main/java/im/vector/app/features/onboarding/Login2Variant.kt b/vector/src/main/java/im/vector/app/features/onboarding/Login2Variant.kt index 163af5d8d1..15d07a0197 100644 --- a/vector/src/main/java/im/vector/app/features/onboarding/Login2Variant.kt +++ b/vector/src/main/java/im/vector/app/features/onboarding/Login2Variant.kt @@ -41,7 +41,6 @@ import im.vector.app.features.login.LoginWaitForEmailFragmentArgument import im.vector.app.features.login.TextInputFormFragmentMode import im.vector.app.features.login.isSupported import im.vector.app.features.login.terms.LoginTermsFragmentArgument -import im.vector.app.features.login.terms.toLocalizedLoginTerms import im.vector.app.features.login2.LoginAction2 import im.vector.app.features.login2.LoginCaptchaFragment2 import im.vector.app.features.login2.LoginFragmentSigninPassword2 @@ -66,6 +65,7 @@ import im.vector.app.features.login2.created.AccountCreatedFragment import im.vector.app.features.login2.terms.LoginTermsFragment2 import org.matrix.android.sdk.api.auth.registration.FlowResult import org.matrix.android.sdk.api.auth.registration.Stage +import org.matrix.android.sdk.api.auth.toLocalizedLoginTerms import org.matrix.android.sdk.api.extensions.tryOrNull private const val FRAGMENT_REGISTRATION_STAGE_TAG = "FRAGMENT_REGISTRATION_STAGE_TAG" diff --git a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthVariant.kt b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthVariant.kt index d5816762df..c96a2fbf42 100644 --- a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthVariant.kt +++ b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthVariant.kt @@ -45,7 +45,6 @@ import im.vector.app.features.login.ServerType import im.vector.app.features.login.SignMode import im.vector.app.features.login.TextInputFormFragmentMode import im.vector.app.features.login.isSupported -import im.vector.app.features.login.terms.toLocalizedLoginTerms import im.vector.app.features.onboarding.OnboardingAction import im.vector.app.features.onboarding.OnboardingActivity import im.vector.app.features.onboarding.OnboardingVariant @@ -57,6 +56,7 @@ import im.vector.app.features.onboarding.ftueauth.terms.FtueAuthTermsFragment import im.vector.app.features.onboarding.ftueauth.terms.FtueAuthTermsLegacyStyleFragmentArgument import org.matrix.android.sdk.api.auth.registration.FlowResult import org.matrix.android.sdk.api.auth.registration.Stage +import org.matrix.android.sdk.api.auth.toLocalizedLoginTerms import org.matrix.android.sdk.api.extensions.tryOrNull private const val FRAGMENT_REGISTRATION_STAGE_TAG = "FRAGMENT_REGISTRATION_STAGE_TAG" From 15dd035ee8165386c3765a5eef3b3d5ba26b210a Mon Sep 17 00:00:00 2001 From: Zet Date: Thu, 21 Apr 2022 20:18:57 +0000 Subject: [PATCH 154/561] Translated using Weblate (Arabic) Currently translated at 40.2% (893 of 2217 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/ar/ --- vector/src/main/res/values-ar/strings.xml | 62 +++++++++++++++++++++-- 1 file changed, 57 insertions(+), 5 deletions(-) diff --git a/vector/src/main/res/values-ar/strings.xml b/vector/src/main/res/values-ar/strings.xml index 3953a0d050..f5005957bd 100644 --- a/vector/src/main/res/values-ar/strings.xml +++ b/vector/src/main/res/values-ar/strings.xml @@ -245,7 +245,7 @@ أزِل انضم ارفض - انتقل إلى أول رسالة غير مقروءة. + انتقل إلى غير المقروءة. ترك الغرفة أمتأكّد من ترك الغرفة؟ امنع @@ -253,7 +253,7 @@ أخفِ كل رسائل هذا المستخدم اعرض كل رسائل هذا المستخدم ‏⁨%1$s⁩ يكتب… - لا تصريح لديك للنشر في هذه الغرفة + لا أذن لديك للنشر في هذه الغرفة. اخرج البصمة (⁨%s⁩): تعذّر التحقق من معرّف الخادوم البعيد. @@ -408,7 +408,7 @@ أشِر إليه لن تستطيع العودة عن هذا التغيير إذ أنك تمنح المستخدم نفس مستوى السلطة الذي لك. أمتأكد؟ - أمتأكد من منع هذا المستخدم من هذه الدردشة؟ + حظر مستخدم عن هذه الغرفة سيمنعه من الانضمام إليها ثانية. ثِق لا تثق تجاهل @@ -481,7 +481,7 @@ <b>غير<b/> مؤكّدة مؤكّدة أكّد - اسرد الأعضاء + أعضاء ادعُ قد يعني هذا بأن أحدهم يعترض الاتصال بعدوانية، أو أن هاتفك لا يثق بالشهادة التي قدّمها الخادوم البعيد. إن قال مدير الخادوم بأن هذا متوقع، فتأكد من أن البصمة أدناه تطابق البصمة التي وفّرها. @@ -735,7 +735,7 @@ %d مكالمةً فائة %d مكالمة فائة
- يتصل… + يَرِن… اختر نغمة للمكالمات: نغمة المكالمات الواردة أكّد المكالمة قبل إجرائها @@ -1026,4 +1026,56 @@ النسخة يتحقق من حالة النسخ الاحتياطي استعد من نسخ احتياطي + الأذونات + أذونات الفضاء + أذونات الغرفة + %1$s و%2$s وآخرون + %1$s و%2$s + فك الحظر عن مستخدم سيمح له الانضمام لهذا الفضاء. + فك الحظر عن مستخدم سيمح له الانضمام لهذه الغرفة. + حظر مستخدم عن هذه الفضاء سيمنعه من الانضمام إليه ثانية. + فك حظر مستخدم + سبب الحظر + احظر مستخدمًا + سيزال المستخدم من هذه الفضاء. +\n +\nلمنعه من الانضمام ثانية لهذه الفضاء احظره. + سيزال المستخدم من هذه الغرفة. +\n +\nلمنعه من الانضمام ثانية لهذه الغرفة احظره. + سبب الإزالة + أزل مستخدمًا + أمتأكد من سحب دعوة هذا المستخدم؟ + اسحب الدعوة + ألغ تجاهل المستخدم + بتجاهل هذا المستخدم ستزال الرسائل من الغرف المشتركة بينكما. +\n +\nيمكنم التراجع عن هذا الإجراء في أي وقت عبر الإعدادات العامة. + تجاهل مستخدم + اخفض الرتبة + لن تتمكن من التراجع عن هذا التغيير لأنك ستخفض رتبتك ، إذا كنت آخر مستخدم ذي امتياز في الغرفة ، فسيكون من المستحيل استعادة الامتيازات. + أتريد خفض رتبتك؟ + اسحب الدعوة + هذه الغرفة ليست علنية، لا يمكنك إعادة الانضمام إليها بدون دعوة. + امنح اذن النفاذ للمتراسلين. + لمسح رمز الاستحابة السريعة اسمح بالنفاذ للكاميرا. + تجري مكالمة مرئية… + + لا مكالمات مرئية فائتة + مكالمة مرئية فائتة + مكالمتان مرئيتان فائتتان + %d مكالمات مرئية فائتة + %d مكالمة مرئية فائتة + %d مكالمة مرئية فائتة + + استخدم نغمة ${app_name} الافتراضية للمكالمات الواردة + امنع المكالمات العَرضية + استزد + عدّل + جربه + ليس الآن + عطّل + فعّل + لا يمكنك إجراء مكالمة مع نفسك، انتظر قبول منتسبين لطلب + شغّلتّ التعمية بين الطرفيات (خورزمية مجهولة %1$s). \ No newline at end of file From 4960cb1c96dcb6d1c650f322c3dfb774202fc710 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Thu, 21 Apr 2022 09:12:17 +0000 Subject: [PATCH 155/561] Translated using Weblate (Estonian) Currently translated at 99.8% (2213 of 2217 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/et/ --- vector/src/main/res/values-et/strings.xml | 30 ++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/vector/src/main/res/values-et/strings.xml b/vector/src/main/res/values-et/strings.xml index 19b4d37102..bb33f8aec2 100644 --- a/vector/src/main/res/values-et/strings.xml +++ b/vector/src/main/res/values-et/strings.xml @@ -743,7 +743,9 @@ \nÜldistest seadistustest saad seda alati muuta. Eira selle kasutaja sõnumeid Lõpeta selle kasutaja eiramine - Selle kasutaja eiramise lõpetamine teeb tema sõnumid uuesti nähtavaks. + Selle kasutaja eiramise lõpetamine teeb tema sõnumid uuesti nähtavaks. +\n +\nPalun arvesta, et samaga käivitud rakendub uuesti ning andmete sünkroniseerimiseks kulub natuke aega. Lõpeta eiramine Tühista kutse Kas oled kindel et sa soovid tühistada kutse sellele kasutajale\? @@ -2457,4 +2459,30 @@ Mine avalehele Isikupärasta oma profiili Lülita välja + Reaalajas asukoha laadimine… + 8 tunni kestel + 1 tunni kestel + 15 minuti jooksul + Jaga oma asukohta reaalajas + (%1$s) + %1$s (%2$s) + %1$s helisõnumi esitamine ei õnnestu + Peata helisõnumi esitus: %1$s + Esita helisõnumit: %1$s + %1$d minutit %2$d sekundit + %1$s, %2$s, %3$s + Jagas oma asukohta + ${app_name} sobib ideaalselt kasutamiseks töökeskkonnas. Ta on kasutusel ka mitmetes üliturvalistes organisatsioonides. + BEETA + Jutulõngade beetaversiooni tagasiside + Jaga tagasisidet + BEETA + Kui see valik on kasutusel, siis sa alati oled teiste jaoks võrgust väljas. Seda ka siis, kui kasutad rakendust. + Ei ole võrgus + Olek võrgus + Sinu koduserver hetkel ei toeta jutulõngasid ning seega antud funktsionaalsus ei pruugi toimida korralikult. Kõik sõnumid jutulõngas ilmselt ei ole loetavad. %sKas sa ikkagi soovid jutulõngad kasutusele võtta\? + Jutulõngade beetaversioon + Jutulõngade beetaversioon + Lisateave + Proovi nüüd \ No newline at end of file From da3322dbc23d703ceda4f0fce6386e723ba567a0 Mon Sep 17 00:00:00 2001 From: random Date: Thu, 21 Apr 2022 12:42:09 +0000 Subject: [PATCH 156/561] Translated using Weblate (Italian) Currently translated at 100.0% (2217 of 2217 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/it/ --- vector/src/main/res/values-it/strings.xml | 32 ++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/vector/src/main/res/values-it/strings.xml b/vector/src/main/res/values-it/strings.xml index 15f08ba6da..66fff2077e 100644 --- a/vector/src/main/res/values-it/strings.xml +++ b/vector/src/main/res/values-it/strings.xml @@ -1519,7 +1519,9 @@ \n \nPuoi annullare questa azione in qualsiasi momento nelle impostazioni generali. Non ignorare più - Se non ignori più l\'utente vedrai di nuovo tutti i suoi messaggi. + Se non ignori più l\'utente vedrai di nuovo tutti i suoi messaggi. +\n +\nNota che quest\'azione riavvierà l\'app e potrebbe richiedere del tempo. Annulla invito Sei sicuro di voler annullare l\'invito per questo utente\? Butta fuori l\'utente @@ -2448,4 +2450,32 @@ Congratulazioni! Personalizza profilo Disattiva + Caricamento posizione in tempo reale… + 8 ore + 1 ora + 15 minuti + Condividi la tua posizione in tempo reale per + (%1$s) + %1$s (%2$s) + Impossibile riprodurre %1$s + Metti in pausa %1$s + Riproduci %1$s + %1$d minuti %2$d secondi + %1$s, %2$s, %3$s + Ha condiviso la sua posizione + ${app_name} è ottimo anche per i luoghi di lavoro. È considerato affidabile dalle più sicure organizzazioni del mondo. + BETA + Le conversazioni sono ancora in sviluppo e ci saranno nuove funzionalità in arrivo, come le notifiche migliorate. Vorremmo sapere la tua opinione! + Feedback della beta conversazioni + Invia un feedback + BETA + Se attiva, apparirai sempre offline agli altri utenti, anche quando usi l\'applicazione. + Modalità offline + Presenza + Il tuo homeserver attualmente non supporta i messaggi in conversazioni, perciò questa funzione sarà inaffidabile. Alcuni messaggi in conversazioni potrebbero non essere disponibili. %sVuoi attivare comunque le conversazioni\? + Beta conversazioni + Le conversazioni ti aiutano a tenere le tue discussioni in tema e rintracciabili. %sL\'attivazione ricaricherà l\'app. Potrebbe richiedere più tempo per alcuni account. + Beta conversazioni + Maggiori informazioni + Provalo \ No newline at end of file From fdc1fa4bd7f28e7d4f4a2f83ccf78cec11514027 Mon Sep 17 00:00:00 2001 From: Aleksa Sarai Date: Fri, 22 Apr 2022 03:12:52 +0000 Subject: [PATCH 157/561] Translated using Weblate (Japanese) Currently translated at 96.8% (2148 of 2217 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/ja/ --- vector/src/main/res/values-ja/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/res/values-ja/strings.xml b/vector/src/main/res/values-ja/strings.xml index 672e2472bb..f7c2e35aff 100644 --- a/vector/src/main/res/values-ja/strings.xml +++ b/vector/src/main/res/values-ja/strings.xml @@ -512,7 +512,7 @@ セキュリティーとプライバシー ヘルプと概要 ダイレクトメッセージ - (編集済) + (編集した) 会話を検索… 全てのメッセージ (音量大) 全てのメッセージ From 81c6b49650617889012682305145be9935895e27 Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Thu, 21 Apr 2022 02:14:16 +0000 Subject: [PATCH 158/561] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (2217 of 2217 strings) Translation: Element Android/Element Android App Translate-URL: https://translate.element.io/projects/element-android/element-app/zh_Hant/ --- vector/src/main/res/values-zh-rTW/strings.xml | 32 ++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/vector/src/main/res/values-zh-rTW/strings.xml b/vector/src/main/res/values-zh-rTW/strings.xml index ea0c677168..f93374acdb 100644 --- a/vector/src/main/res/values-zh-rTW/strings.xml +++ b/vector/src/main/res/values-zh-rTW/strings.xml @@ -1501,7 +1501,9 @@ \n \n您隨時都可以在一般設定中撤銷此動作。 取消忽略使用者 - 取消忽略此使用者將再次顯示從他們而來的所有訊息。 + 取消忽略此使用者將再次顯示從他們而來的所有訊息。 +\n +\n注意,此動作將會重新啟動應用程式,且可能需要一些時間。 取消邀請 您確定您想要取消對此使用者的邀請嗎? 踢除使用者 @@ -2410,4 +2412,32 @@ 帶我回家 個人化檔案 停用 + 正在載入即時位置…… + 8小時 + 1小時 + 15分鐘 + 分享您的即時位置 + (%1$s) + %1$s (%2$s) + 無法播放 %1$s + 暫停 %1$s + 播放 %1$s + %1$d分鐘%2$d秒 + %1$s, %2$s, %3$s + 分享了他們的即時位置 + ${app_name} 也非常適合工作場所。其受到世界上最安全的組織信任。 + 測試版 + 討論串是一項正在進行中的工作,包含了新的、令人興奮的即將推出的功能,例如改進的通知。我們想要聽到您的回饋! + 討論串測試版回饋 + 給予回饋 + 測試版 + 若啟用,即使在使用應用程式時,您也會對其他使用者顯示為離線狀態。 + 離線模式 + 在場 + 您的家伺服器目前不支援討論串,所以此功能可能不可靠。部份已進入討論串的訊息可能無法可靠地使用。%s您仍想啟用討論串嗎? + 討論串測試版 + 討論串有助於讓您的對話不離題且易於追蹤。%s啟用討論串將會重新整理應用程式。對於特定帳號,可能需要更長的時間。 + 討論串測試版 + 取得更多資訊 + 試試看 \ No newline at end of file From 42d942d501f064c27da391856107d35b94c21260 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Thu, 21 Apr 2022 09:01:11 +0000 Subject: [PATCH 159/561] Translated using Weblate (Estonian) Currently translated at 100.0% (57 of 57 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/et/ --- fastlane/metadata/android/et/changelogs/40104100.txt | 2 ++ fastlane/metadata/android/et/changelogs/40104110.txt | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 fastlane/metadata/android/et/changelogs/40104100.txt create mode 100644 fastlane/metadata/android/et/changelogs/40104110.txt diff --git a/fastlane/metadata/android/et/changelogs/40104100.txt b/fastlane/metadata/android/et/changelogs/40104100.txt new file mode 100644 index 0000000000..b164935ba4 --- /dev/null +++ b/fastlane/metadata/android/et/changelogs/40104100.txt @@ -0,0 +1,2 @@ +Põhilised muutused selles versioonis: kerimine häälsõnumites ning erinevate vigade parandused ja stabiilsust edendavad kohendused. +Kogu ingliskeelne muudatuste logi: https://github.com/vector-im/element-android/releases diff --git a/fastlane/metadata/android/et/changelogs/40104110.txt b/fastlane/metadata/android/et/changelogs/40104110.txt new file mode 100644 index 0000000000..1df5ac4176 --- /dev/null +++ b/fastlane/metadata/android/et/changelogs/40104110.txt @@ -0,0 +1,2 @@ +Põhilised muutused selles versioonis: erinevate vigade parandused ja stabiilsust edendavad kohendused. +Kogu ingliskeelne muudatuste logi: https://github.com/vector-im/element-android/releases From 3699a8e97d990f4d57057b487593255b518ec036 Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Thu, 21 Apr 2022 02:01:31 +0000 Subject: [PATCH 160/561] Translated using Weblate (Chinese (Traditional)) Currently translated at 100.0% (57 of 57 strings) Translation: Element Android/Element Android Store Translate-URL: https://translate.element.io/projects/element-android/element-store/zh_Hant/ --- fastlane/metadata/android/zh-TW/changelogs/40104100.txt | 2 ++ fastlane/metadata/android/zh-TW/changelogs/40104110.txt | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 fastlane/metadata/android/zh-TW/changelogs/40104100.txt create mode 100644 fastlane/metadata/android/zh-TW/changelogs/40104110.txt diff --git a/fastlane/metadata/android/zh-TW/changelogs/40104100.txt b/fastlane/metadata/android/zh-TW/changelogs/40104100.txt new file mode 100644 index 0000000000..c78ed7dd2d --- /dev/null +++ b/fastlane/metadata/android/zh-TW/changelogs/40104100.txt @@ -0,0 +1,2 @@ +此版本中的主要變動:捲動音訊訊息。多個臭蟲修復與穩定性改善。 +完整的變更紀錄:https://github.com/vector-im/element-android/releases diff --git a/fastlane/metadata/android/zh-TW/changelogs/40104110.txt b/fastlane/metadata/android/zh-TW/changelogs/40104110.txt new file mode 100644 index 0000000000..4bcca9a0b8 --- /dev/null +++ b/fastlane/metadata/android/zh-TW/changelogs/40104110.txt @@ -0,0 +1,2 @@ +此版本中的主要變動:多個臭蟲修復與穩定性改善。 +完整的變更紀錄:https://github.com/vector-im/element-android/releases From 7939ecaedce33c93833bfaa954ece0b9a8871be8 Mon Sep 17 00:00:00 2001 From: Onuray Sahin Date: Fri, 22 Apr 2022 15:50:40 +0300 Subject: [PATCH 161/561] Try to start streaming screen capture. --- .../app/features/call/VectorCallActivity.kt | 35 +++++++++++++++---- .../features/call/VectorCallViewActions.kt | 3 +- .../app/features/call/VectorCallViewModel.kt | 2 +- .../webrtc/ScreenCaptureServiceConnection.kt | 10 +++++- .../app/features/call/webrtc/WebRtcCall.kt | 24 +++++++++++-- 5 files changed, 62 insertions(+), 12 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/call/VectorCallActivity.kt b/vector/src/main/java/im/vector/app/features/call/VectorCallActivity.kt index ea9adcde85..1ab423d541 100644 --- a/vector/src/main/java/im/vector/app/features/call/VectorCallActivity.kt +++ b/vector/src/main/java/im/vector/app/features/call/VectorCallActivity.kt @@ -24,6 +24,7 @@ import android.content.Intent import android.content.Intent.FLAG_ACTIVITY_CLEAR_TOP import android.content.res.Configuration import android.graphics.Color +import android.media.projection.MediaProjection import android.media.projection.MediaProjectionManager import android.os.Build import android.os.Bundle @@ -32,6 +33,7 @@ import android.util.Rational import android.view.MenuItem import android.view.View import android.view.WindowManager +import androidx.activity.result.ActivityResult import androidx.annotation.StringRes import androidx.core.content.ContextCompat import androidx.core.content.getSystemService @@ -76,6 +78,7 @@ import org.matrix.android.sdk.api.session.call.TurnServerResponse import org.matrix.android.sdk.api.session.room.model.call.EndCallReason import org.webrtc.EglBase import org.webrtc.RendererCommon +import org.webrtc.ScreenCapturerAndroid import timber.log.Timber import javax.inject.Inject @@ -636,18 +639,36 @@ class VectorCallActivity : VectorBaseActivity(), CallContro private val screenSharingPermissionActivityResultLauncher = registerStartForActivityResult { activityResult -> if (activityResult.resultCode == Activity.RESULT_OK) { - callViewModel.handle(VectorCallViewActions.StartScreenSharing) - // We need to start a foreground service with a sticky notification during screen sharing if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { - ContextCompat.startForegroundService( - this, - Intent(this, ScreenCaptureService::class.java) - ) - screenCaptureServiceConnection.bind() + // We need to start a foreground service with a sticky notification during screen sharing + startScreenSharingService(activityResult) + } else { + startScreenSharing(activityResult) } } } + private fun startScreenSharing(activityResult: ActivityResult) { + val videoCapturer = ScreenCapturerAndroid(activityResult.data, object : MediaProjection.Callback() { + override fun onStop() { + Timber.v("User revoked the screen capturing permission") + } + }) + callViewModel.handle(VectorCallViewActions.StartScreenSharing(videoCapturer)) + } + + private fun startScreenSharingService(activityResult: ActivityResult) { + ContextCompat.startForegroundService( + this, + Intent(this, ScreenCaptureService::class.java) + ) + screenCaptureServiceConnection.bind(object : ScreenCaptureServiceConnection.Callback { + override fun onServiceConnected() { + startScreenSharingService(activityResult) + } + }) + } + private fun handleShowScreenSharingPermissionDialog() { getSystemService()?.let { navigator.openScreenSharingPermissionDialog(it.createScreenCaptureIntent(), screenSharingPermissionActivityResultLauncher) diff --git a/vector/src/main/java/im/vector/app/features/call/VectorCallViewActions.kt b/vector/src/main/java/im/vector/app/features/call/VectorCallViewActions.kt index c84f733b9a..cec118f296 100644 --- a/vector/src/main/java/im/vector/app/features/call/VectorCallViewActions.kt +++ b/vector/src/main/java/im/vector/app/features/call/VectorCallViewActions.kt @@ -19,6 +19,7 @@ package im.vector.app.features.call import im.vector.app.core.platform.VectorViewModelAction import im.vector.app.features.call.audio.CallAudioManager import im.vector.app.features.call.transfer.CallTransferResult +import org.webrtc.VideoCapturer sealed class VectorCallViewActions : VectorViewModelAction { object EndCall : VectorCallViewActions() @@ -41,5 +42,5 @@ sealed class VectorCallViewActions : VectorViewModelAction { data class CallTransferSelectionResult(val callTransferResult: CallTransferResult) : VectorCallViewActions() object TransferCall : VectorCallViewActions() object ToggleScreenSharing : VectorCallViewActions() - object StartScreenSharing : VectorCallViewActions() + data class StartScreenSharing(val videoCapturer: VideoCapturer) : VectorCallViewActions() } diff --git a/vector/src/main/java/im/vector/app/features/call/VectorCallViewModel.kt b/vector/src/main/java/im/vector/app/features/call/VectorCallViewModel.kt index 3b7baef155..3b6ff9997b 100644 --- a/vector/src/main/java/im/vector/app/features/call/VectorCallViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/call/VectorCallViewModel.kt @@ -348,7 +348,7 @@ class VectorCallViewModel @AssistedInject constructor( handleToggleScreenSharing(state.isSharingScreen) } is VectorCallViewActions.StartScreenSharing -> { - call?.startSharingScreen() + call?.startSharingScreen(action.videoCapturer) setState { copy(isSharingScreen = true) } diff --git a/vector/src/main/java/im/vector/app/features/call/webrtc/ScreenCaptureServiceConnection.kt b/vector/src/main/java/im/vector/app/features/call/webrtc/ScreenCaptureServiceConnection.kt index 922e9676a8..b8d28791b5 100644 --- a/vector/src/main/java/im/vector/app/features/call/webrtc/ScreenCaptureServiceConnection.kt +++ b/vector/src/main/java/im/vector/app/features/call/webrtc/ScreenCaptureServiceConnection.kt @@ -27,10 +27,17 @@ class ScreenCaptureServiceConnection @Inject constructor( private val context: Context ) : ServiceConnection { + interface Callback { + fun onServiceConnected() + } + private var isBound = false private var screenCaptureService: ScreenCaptureService? = null + private var callback: Callback? = null + + fun bind(callback: Callback) { + this.callback = callback - fun bind() { if (!isBound) { Intent(context, ScreenCaptureService::class.java).also { intent -> context.bindService(intent, this, 0) @@ -45,6 +52,7 @@ class ScreenCaptureServiceConnection @Inject constructor( override fun onServiceConnected(className: ComponentName, binder: IBinder) { screenCaptureService = (binder as ScreenCaptureService.LocalBinder).getService() isBound = true + callback?.onServiceConnected() } override fun onServiceDisconnected(className: ComponentName) { diff --git a/vector/src/main/java/im/vector/app/features/call/webrtc/WebRtcCall.kt b/vector/src/main/java/im/vector/app/features/call/webrtc/WebRtcCall.kt index bc8ae51a88..aac5ecc962 100644 --- a/vector/src/main/java/im/vector/app/features/call/webrtc/WebRtcCall.kt +++ b/vector/src/main/java/im/vector/app/features/call/webrtc/WebRtcCall.kt @@ -84,6 +84,7 @@ import org.webrtc.RtpTransceiver import org.webrtc.SessionDescription import org.webrtc.SurfaceTextureHelper import org.webrtc.SurfaceViewRenderer +import org.webrtc.VideoCapturer import org.webrtc.VideoSource import org.webrtc.VideoTrack import timber.log.Timber @@ -770,8 +771,27 @@ class WebRtcCall( return currentCaptureFormat } - fun startSharingScreen() { - // TODO. Will be handled within the next PR. + fun startSharingScreen(videoCapturer: VideoCapturer) { + val factory = peerConnectionFactoryProvider.get() ?: return + val videoSource = factory.createVideoSource(true) + val audioSource = factory.createAudioSource(DEFAULT_AUDIO_CONSTRAINTS) + val surfaceTextureHelper = SurfaceTextureHelper.create("CaptureThread", rootEglBase!!.eglBaseContext) + videoCapturer.initialize(surfaceTextureHelper, context, videoSource.capturerObserver) + videoCapturer.startCapture(currentCaptureFormat.width, currentCaptureFormat.height, currentCaptureFormat.fps) + + val videoTrack = factory.createVideoTrack("ARDAMSv0", videoSource).apply { setEnabled(true) } + val audioTrack = factory.createAudioTrack("ARDAMSa0", audioSource).apply { setEnabled(true) } + + val localMediaStream = factory.createLocalMediaStream("ARDAMS") + peerConnection?.addTrack(videoTrack) + peerConnection?.addTrack(audioTrack) + localMediaStream.addTrack(videoTrack) + localMediaStream.addTrack(audioTrack) + + localAudioSource = audioSource + localVideoSource = videoSource + localAudioTrack = audioTrack + localVideoTrack = videoTrack } fun stopSharingScreen() { From 683cc599caf771ecc5c3903a50e0f527235406e3 Mon Sep 17 00:00:00 2001 From: Claire G Date: Fri, 22 Apr 2022 16:19:15 +0200 Subject: [PATCH 162/561] disable triage-move-review-requests for forks --- .github/workflows/triage-move-review-requests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/triage-move-review-requests.yml b/.github/workflows/triage-move-review-requests.yml index 75738a53a9..61f1f114dd 100644 --- a/.github/workflows/triage-move-review-requests.yml +++ b/.github/workflows/triage-move-review-requests.yml @@ -7,6 +7,8 @@ jobs: add_design_pr_to_project: name: Move PRs asking for design review to the design board runs-on: ubuntu-latest + # Skip in forks + if: github.repository == 'vector-im/element-android' steps: - uses: octokit/graphql-action@v2.x id: find_team_members @@ -74,6 +76,8 @@ jobs: add_product_pr_to_project: name: Move PRs asking for product review to the product board runs-on: ubuntu-latest + # Skip in forks + if: github.repository == 'vector-im/element-android' steps: - uses: octokit/graphql-action@v2.x id: find_team_members From 43c2b42a82b356863bcf473a73b28a35e1bee0c8 Mon Sep 17 00:00:00 2001 From: ericdecanini Date: Fri, 22 Apr 2022 21:33:25 +0200 Subject: [PATCH 163/561] Adds suggested tag in explore rooms --- .../home/room/list/SpaceChildInfoItem.kt | 7 +++++-- .../explore/SpaceDirectoryController.kt | 2 ++ ..._room.xml => item_explore_space_child.xml} | 19 +++++++++++++++++-- 3 files changed, 24 insertions(+), 4 deletions(-) rename vector/src/main/res/layout/{item_suggested_room.xml => item_explore_space_child.xml} (88%) diff --git a/vector/src/main/java/im/vector/app/features/home/room/list/SpaceChildInfoItem.kt b/vector/src/main/java/im/vector/app/features/home/room/list/SpaceChildInfoItem.kt index 99cbd45294..a2cb905f1b 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/list/SpaceChildInfoItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/list/SpaceChildInfoItem.kt @@ -40,7 +40,7 @@ import me.gujun.android.span.image import me.gujun.android.span.span import org.matrix.android.sdk.api.util.MatrixItem -@EpoxyModelClass(layout = R.layout.item_suggested_room) +@EpoxyModelClass(layout = R.layout.item_explore_space_child) abstract class SpaceChildInfoItem : VectorEpoxyModel() { @EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer @@ -51,6 +51,7 @@ abstract class SpaceChildInfoItem : VectorEpoxyModel( @EpoxyAttribute var memberCount: Int = 0 @EpoxyAttribute var loading: Boolean = false + @EpoxyAttribute var suggested: Boolean = false @EpoxyAttribute var buttonLabel: String? = null @EpoxyAttribute var errorLabel: String? = null @@ -89,6 +90,7 @@ abstract class SpaceChildInfoItem : VectorEpoxyModel( } } + holder.suggestedTag.visibility = if (suggested) View.VISIBLE else View.GONE holder.joinButton.text = buttonLabel if (loading) { @@ -121,7 +123,8 @@ abstract class SpaceChildInfoItem : VectorEpoxyModel( val titleView by bind(R.id.roomNameView) val joinButton by bind