From 2e4d30ef29e8120e44b235ed273fa35db677270f Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Fri, 10 Apr 2020 12:07:53 -0500 Subject: [PATCH 001/156] Set `tickerText` to improve accessibility of notifications. Signed-off-by: Nolan Darilek --- gradle.properties | 2 +- .../features/notifications/NotificationDrawerManager.kt | 9 ++++++++- .../riotx/features/notifications/NotificationUtils.kt | 4 +++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index 2e2b110f15..d9d9e57cbc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ # The setting is particularly useful for tweaking memory settings. android.enableJetifier=true android.useAndroidX=true -org.gradle.jvmargs=-Xmx1536m +org.gradle.jvmargs=-Xmx8192m # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects diff --git a/vector/src/main/java/im/vector/riotx/features/notifications/NotificationDrawerManager.kt b/vector/src/main/java/im/vector/riotx/features/notifications/NotificationDrawerManager.kt index 94d3860cca..7307e08c56 100644 --- a/vector/src/main/java/im/vector/riotx/features/notifications/NotificationDrawerManager.kt +++ b/vector/src/main/java/im/vector/riotx/features/notifications/NotificationDrawerManager.kt @@ -343,12 +343,19 @@ class NotificationDrawerManager @Inject constructor(private val context: Context globalLastMessageTimestamp = lastMessageTimestamp } + val tickerText = if (roomEventGroupInfo.isDirect) { + String.format("%s: %s", events[0].senderName, events[0].description) + } else { + String.format("%s: %s %s", roomName, events[0].senderName, events[0].description) + } + val notification = notificationUtils.buildMessagesListNotification( style, roomEventGroupInfo, largeBitmap, lastMessageTimestamp, - myUserDisplayName) + myUserDisplayName, + tickerText) // is there an id for this room? notificationUtils.showNotificationMessage(roomId, ROOM_MESSAGES_NOTIFICATION_ID, notification) diff --git a/vector/src/main/java/im/vector/riotx/features/notifications/NotificationUtils.kt b/vector/src/main/java/im/vector/riotx/features/notifications/NotificationUtils.kt index 50fb5b70de..178235ab5f 100755 --- a/vector/src/main/java/im/vector/riotx/features/notifications/NotificationUtils.kt +++ b/vector/src/main/java/im/vector/riotx/features/notifications/NotificationUtils.kt @@ -381,7 +381,8 @@ class NotificationUtils @Inject constructor(private val context: Context, roomInfo: RoomEventGroupInfo, largeIcon: Bitmap?, lastMessageTimestamp: Long, - senderDisplayNameForReplyCompat: String?): Notification { + senderDisplayNameForReplyCompat: String?, + tickerText: String): Notification { val accentColor = ContextCompat.getColor(context, R.color.notification_accent_color) // Build the pending intent for when the notification is clicked val openRoomIntent = buildOpenRoomIntent(roomInfo.roomId) @@ -478,6 +479,7 @@ class NotificationUtils @Inject constructor(private val context: Context, System.currentTimeMillis().toInt(), intent, PendingIntent.FLAG_UPDATE_CURRENT) setDeleteIntent(pendingIntent) } + .setTicker(tickerText) .build() } From f25c9811737817b9d3c65d531b43ce03b5bf040d Mon Sep 17 00:00:00 2001 From: onurays Date: Tue, 28 Apr 2020 17:30:23 +0300 Subject: [PATCH 002/156] Add menu item to invite users to the room. --- .../roomprofile/members/RoomMemberListFragment.kt | 13 +++++++++++++ vector/src/main/res/menu/menu_room_member_list.xml | 12 ++++++++++++ vector/src/main/res/values/strings_riotX.xml | 1 + 3 files changed, 26 insertions(+) create mode 100644 vector/src/main/res/menu/menu_room_member_list.xml diff --git a/vector/src/main/java/im/vector/riotx/features/roomprofile/members/RoomMemberListFragment.kt b/vector/src/main/java/im/vector/riotx/features/roomprofile/members/RoomMemberListFragment.kt index e6e54d6771..2fbcf705fb 100644 --- a/vector/src/main/java/im/vector/riotx/features/roomprofile/members/RoomMemberListFragment.kt +++ b/vector/src/main/java/im/vector/riotx/features/roomprofile/members/RoomMemberListFragment.kt @@ -17,6 +17,7 @@ package im.vector.riotx.features.roomprofile.members import android.os.Bundle +import android.view.MenuItem import android.view.View import com.airbnb.mvrx.args import com.airbnb.mvrx.fragmentViewModel @@ -43,6 +44,18 @@ class RoomMemberListFragment @Inject constructor( override fun getLayoutResId() = R.layout.fragment_room_setting_generic + override fun getMenuRes() = R.menu.menu_room_member_list + + override fun onOptionsItemSelected(item: MenuItem): Boolean { + when (item.itemId) { + R.id.menu_room_member_list_add_member -> { + navigator.openCreateDirectRoom(requireContext()) + return true + } + } + return super.onOptionsItemSelected(item) + } + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) roomMemberListController.callback = this diff --git a/vector/src/main/res/menu/menu_room_member_list.xml b/vector/src/main/res/menu/menu_room_member_list.xml new file mode 100644 index 0000000000..c8d9bd31f4 --- /dev/null +++ b/vector/src/main/res/menu/menu_room_member_list.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/vector/src/main/res/values/strings_riotX.xml b/vector/src/main/res/values/strings_riotX.xml index 8b675ee8c1..fac7795a34 100644 --- a/vector/src/main/res/values/strings_riotX.xml +++ b/vector/src/main/res/values/strings_riotX.xml @@ -36,6 +36,7 @@ Double-check this link The link %1$s is taking you to another site: %2$s.\n\nAre you sure you want to continue? + Add members From a4eba653a32fa1c1c8bca0cce3c10e6135385ab3 Mon Sep 17 00:00:00 2001 From: onurays Date: Thu, 30 Apr 2020 02:50:30 +0300 Subject: [PATCH 003/156] Make a generic user directory search & selection views. --- .../im/vector/riotx/core/di/FragmentModule.kt | 12 +- .../vector/riotx/core/di/ViewModelModule.kt | 6 +- .../createdirect/CreateDirectRoomAction.kt | 11 +- .../createdirect/CreateDirectRoomActivity.kt | 35 ++++- .../CreateDirectRoomViewEvents.kt | 3 - .../createdirect/CreateDirectRoomViewModel.kt | 102 ++----------- .../createdirect/CreateDirectRoomViewState.kt | 42 ++--- .../DirectoryUsersController.kt | 32 ++-- .../KnownUsersController.kt | 14 +- .../KnownUsersFragment.kt} | 85 +++++------ .../KnownUsersFragmentArgs.kt} | 17 ++- .../userdirectory/UserDirectoryAction.kt | 28 ++++ .../UserDirectoryFragment.kt} | 40 ++--- .../UserDirectoryLetterHeaderItem.kt} | 12 +- .../UserDirectorySharedAction.kt | 27 ++++ .../UserDirectorySharedActionViewModel.kt} | 8 +- .../UserDirectoryUserItem.kt} | 38 +++-- .../userdirectory/UserDirectoryViewEvents.kt | 24 +++ .../userdirectory/UserDirectoryViewModel.kt | 132 ++++++++++++++++ .../userdirectory/UserDirectoryViewState.kt | 43 ++++++ .../main/res/layout/fragment_known_users.xml | 143 ++++++++++++++++++ .../res/layout/fragment_user_directory.xml | 109 +++++++++++++ .../src/main/res/layout/item_known_user.xml | 72 +++++++++ .../item_user_directory_letter_header.xml | 14 ++ 24 files changed, 780 insertions(+), 269 deletions(-) rename vector/src/main/java/im/vector/riotx/features/{createdirect => userdirectory}/DirectoryUsersController.kt (83%) rename vector/src/main/java/im/vector/riotx/features/{createdirect => userdirectory}/KnownUsersController.kt (92%) rename vector/src/main/java/im/vector/riotx/features/{createdirect/CreateDirectRoomKnownUsersFragment.kt => userdirectory/KnownUsersFragment.kt} (60%) rename vector/src/main/java/im/vector/riotx/features/{createdirect/CreateDirectRoomSharedAction.kt => userdirectory/KnownUsersFragmentArgs.kt} (60%) create mode 100644 vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryAction.kt rename vector/src/main/java/im/vector/riotx/features/{createdirect/CreateDirectRoomDirectoryUsersFragment.kt => userdirectory/UserDirectoryFragment.kt} (64%) rename vector/src/main/java/im/vector/riotx/features/{createdirect/CreateDirectRoomLetterHeaderItem.kt => userdirectory/UserDirectoryLetterHeaderItem.kt} (70%) create mode 100644 vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectorySharedAction.kt rename vector/src/main/java/im/vector/riotx/features/{createdirect/CreateDirectRoomSharedActionViewModel.kt => userdirectory/UserDirectorySharedActionViewModel.kt} (70%) rename vector/src/main/java/im/vector/riotx/features/{createdirect/CreateDirectRoomUserItem.kt => userdirectory/UserDirectoryUserItem.kt} (63%) create mode 100644 vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryViewEvents.kt create mode 100644 vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryViewModel.kt create mode 100644 vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryViewState.kt create mode 100644 vector/src/main/res/layout/fragment_known_users.xml create mode 100644 vector/src/main/res/layout/fragment_user_directory.xml create mode 100644 vector/src/main/res/layout/item_known_user.xml create mode 100644 vector/src/main/res/layout/item_user_directory_letter_header.xml diff --git a/vector/src/main/java/im/vector/riotx/core/di/FragmentModule.kt b/vector/src/main/java/im/vector/riotx/core/di/FragmentModule.kt index db62ddc2d8..01709efcac 100644 --- a/vector/src/main/java/im/vector/riotx/core/di/FragmentModule.kt +++ b/vector/src/main/java/im/vector/riotx/core/di/FragmentModule.kt @@ -23,8 +23,6 @@ import dagger.Binds import dagger.Module import dagger.multibindings.IntoMap import im.vector.riotx.features.attachments.preview.AttachmentsPreviewFragment -import im.vector.riotx.features.createdirect.CreateDirectRoomDirectoryUsersFragment -import im.vector.riotx.features.createdirect.CreateDirectRoomKnownUsersFragment import im.vector.riotx.features.crypto.keysbackup.settings.KeysBackupSettingsFragment import im.vector.riotx.features.crypto.quads.SharedSecuredStorageKeyFragment import im.vector.riotx.features.crypto.quads.SharedSecuredStoragePassphraseFragment @@ -63,6 +61,8 @@ import im.vector.riotx.features.login.LoginSplashFragment import im.vector.riotx.features.login.LoginWaitForEmailFragment import im.vector.riotx.features.login.LoginWebFragment import im.vector.riotx.features.login.terms.LoginTermsFragment +import im.vector.riotx.features.userdirectory.KnownUsersFragment +import im.vector.riotx.features.userdirectory.UserDirectoryFragment import im.vector.riotx.features.qrcode.QrCodeScannerFragment import im.vector.riotx.features.reactions.EmojiChooserFragment import im.vector.riotx.features.reactions.EmojiSearchResultFragment @@ -226,13 +226,13 @@ interface FragmentModule { @Binds @IntoMap - @FragmentKey(CreateDirectRoomDirectoryUsersFragment::class) - fun bindCreateDirectRoomDirectoryUsersFragment(fragment: CreateDirectRoomDirectoryUsersFragment): Fragment + @FragmentKey(UserDirectoryFragment::class) + fun bindUserDirectoryFragment(fragment: UserDirectoryFragment): Fragment @Binds @IntoMap - @FragmentKey(CreateDirectRoomKnownUsersFragment::class) - fun bindCreateDirectRoomKnownUsersFragment(fragment: CreateDirectRoomKnownUsersFragment): Fragment + @FragmentKey(KnownUsersFragment::class) + fun bindKnownUsersFragment(fragment: KnownUsersFragment): Fragment @Binds @IntoMap diff --git a/vector/src/main/java/im/vector/riotx/core/di/ViewModelModule.kt b/vector/src/main/java/im/vector/riotx/core/di/ViewModelModule.kt index 4bb0adb9f0..e480cf22ca 100644 --- a/vector/src/main/java/im/vector/riotx/core/di/ViewModelModule.kt +++ b/vector/src/main/java/im/vector/riotx/core/di/ViewModelModule.kt @@ -22,7 +22,6 @@ import dagger.Binds import dagger.Module import dagger.multibindings.IntoMap import im.vector.riotx.core.platform.ConfigurationViewModel -import im.vector.riotx.features.createdirect.CreateDirectRoomSharedActionViewModel import im.vector.riotx.features.crypto.keysbackup.restore.KeysBackupRestoreFromKeyViewModel import im.vector.riotx.features.crypto.keysbackup.restore.KeysBackupRestoreFromPassphraseViewModel import im.vector.riotx.features.crypto.keysbackup.restore.KeysBackupRestoreSharedViewModel @@ -32,6 +31,7 @@ import im.vector.riotx.features.home.room.detail.RoomDetailSharedActionViewModel import im.vector.riotx.features.home.room.detail.timeline.action.MessageSharedActionViewModel import im.vector.riotx.features.home.room.list.actions.RoomListQuickActionsSharedActionViewModel import im.vector.riotx.features.login.LoginSharedActionViewModel +import im.vector.riotx.features.userdirectory.UserDirectorySharedActionViewModel import im.vector.riotx.features.reactions.EmojiChooserViewModel import im.vector.riotx.features.roomdirectory.RoomDirectorySharedActionViewModel import im.vector.riotx.features.roomprofile.RoomProfileSharedActionViewModel @@ -87,8 +87,8 @@ interface ViewModelModule { @Binds @IntoMap - @ViewModelKey(CreateDirectRoomSharedActionViewModel::class) - fun bindCreateDirectRoomSharedActionViewModel(viewModel: CreateDirectRoomSharedActionViewModel): ViewModel + @ViewModelKey(UserDirectorySharedActionViewModel::class) + fun bindUserDirectorySharedActionViewModel(viewModel: UserDirectorySharedActionViewModel): ViewModel @Binds @IntoMap diff --git a/vector/src/main/java/im/vector/riotx/features/createdirect/CreateDirectRoomAction.kt b/vector/src/main/java/im/vector/riotx/features/createdirect/CreateDirectRoomAction.kt index 0e74ff71fd..f995f82ff7 100644 --- a/vector/src/main/java/im/vector/riotx/features/createdirect/CreateDirectRoomAction.kt +++ b/vector/src/main/java/im/vector/riotx/features/createdirect/CreateDirectRoomAction.kt @@ -1,11 +1,11 @@ /* - * Copyright 2019 New Vector Ltd + * Copyright (c) 2020 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 + * 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, @@ -20,10 +20,5 @@ import im.vector.matrix.android.api.session.user.model.User import im.vector.riotx.core.platform.VectorViewModelAction sealed class CreateDirectRoomAction : VectorViewModelAction { - object CreateRoomAndInviteSelectedUsers : CreateDirectRoomAction() - data class FilterKnownUsers(val value: String) : CreateDirectRoomAction() - data class SearchDirectoryUsers(val value: String) : CreateDirectRoomAction() - object ClearFilterKnownUsers : CreateDirectRoomAction() - data class SelectUser(val user: User) : CreateDirectRoomAction() - data class RemoveSelectedUser(val user: User) : CreateDirectRoomAction() + data class CreateRoomAndInviteSelectedUsers(val selectedUsers: Set) : CreateDirectRoomAction() } diff --git a/vector/src/main/java/im/vector/riotx/features/createdirect/CreateDirectRoomActivity.kt b/vector/src/main/java/im/vector/riotx/features/createdirect/CreateDirectRoomActivity.kt index 3ae206cd21..ef3e9bdeff 100644 --- a/vector/src/main/java/im/vector/riotx/features/createdirect/CreateDirectRoomActivity.kt +++ b/vector/src/main/java/im/vector/riotx/features/createdirect/CreateDirectRoomActivity.kt @@ -37,6 +37,12 @@ import im.vector.riotx.core.extensions.addFragment import im.vector.riotx.core.extensions.addFragmentToBackstack import im.vector.riotx.core.platform.SimpleFragmentActivity import im.vector.riotx.core.platform.WaitingViewData +import im.vector.riotx.features.userdirectory.KnownUsersFragment +import im.vector.riotx.features.userdirectory.KnownUsersFragmentArgs +import im.vector.riotx.features.userdirectory.UserDirectoryFragment +import im.vector.riotx.features.userdirectory.UserDirectorySharedAction +import im.vector.riotx.features.userdirectory.UserDirectorySharedActionViewModel +import im.vector.riotx.features.userdirectory.UserDirectoryViewModel import kotlinx.android.synthetic.main.activity.* import java.net.HttpURLConnection import javax.inject.Inject @@ -44,7 +50,8 @@ import javax.inject.Inject class CreateDirectRoomActivity : SimpleFragmentActivity() { private val viewModel: CreateDirectRoomViewModel by viewModel() - private lateinit var sharedActionViewModel: CreateDirectRoomSharedActionViewModel + private lateinit var sharedActionViewModel: UserDirectorySharedActionViewModel + @Inject lateinit var userDirectoryViewModelFactory: UserDirectoryViewModel.Factory @Inject lateinit var createDirectRoomViewModelFactory: CreateDirectRoomViewModel.Factory @Inject lateinit var errorFormatter: ErrorFormatter @@ -56,26 +63,40 @@ class CreateDirectRoomActivity : SimpleFragmentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) toolbar.visibility = View.GONE - sharedActionViewModel = viewModelProvider.get(CreateDirectRoomSharedActionViewModel::class.java) + sharedActionViewModel = viewModelProvider.get(UserDirectorySharedActionViewModel::class.java) sharedActionViewModel .observe() .subscribe { sharedAction -> when (sharedAction) { - CreateDirectRoomSharedAction.OpenUsersDirectory -> - addFragmentToBackstack(R.id.container, CreateDirectRoomDirectoryUsersFragment::class.java) - CreateDirectRoomSharedAction.Close -> finish() - CreateDirectRoomSharedAction.GoBack -> onBackPressed() + UserDirectorySharedAction.OpenUsersDirectory -> + addFragmentToBackstack(R.id.container, UserDirectoryFragment::class.java) + UserDirectorySharedAction.Close -> finish() + UserDirectorySharedAction.GoBack -> onBackPressed() + is UserDirectorySharedAction.OnMenuItemSelected -> onMenuItemSelected(sharedAction) } } .disposeOnDestroy() if (isFirstCreation()) { - addFragment(R.id.container, CreateDirectRoomKnownUsersFragment::class.java) + addFragment( + R.id.container, + KnownUsersFragment::class.java, + KnownUsersFragmentArgs( + title = getString(R.string.fab_menu_create_chat), + menuResId = R.menu.vector_create_direct_room + ) + ) } viewModel.selectSubscribe(this, CreateDirectRoomViewState::createAndInviteState) { renderCreateAndInviteState(it) } } + private fun onMenuItemSelected(action: UserDirectorySharedAction.OnMenuItemSelected) { + if (action.itemId == R.id.action_create_direct_room) { + viewModel.handle(CreateDirectRoomAction.CreateRoomAndInviteSelectedUsers(action.selectedUsers)) + } + } + private fun renderCreateAndInviteState(state: Async) { when (state) { is Loading -> renderCreationLoading() diff --git a/vector/src/main/java/im/vector/riotx/features/createdirect/CreateDirectRoomViewEvents.kt b/vector/src/main/java/im/vector/riotx/features/createdirect/CreateDirectRoomViewEvents.kt index 0ed584ac6b..5ea344115a 100644 --- a/vector/src/main/java/im/vector/riotx/features/createdirect/CreateDirectRoomViewEvents.kt +++ b/vector/src/main/java/im/vector/riotx/features/createdirect/CreateDirectRoomViewEvents.kt @@ -18,7 +18,4 @@ package im.vector.riotx.features.createdirect import im.vector.riotx.core.platform.VectorViewEvents -/** - * Transient events for create direct room screen - */ sealed class CreateDirectRoomViewEvents : VectorViewEvents diff --git a/vector/src/main/java/im/vector/riotx/features/createdirect/CreateDirectRoomViewModel.kt b/vector/src/main/java/im/vector/riotx/features/createdirect/CreateDirectRoomViewModel.kt index 71fae11486..1800759da6 100644 --- a/vector/src/main/java/im/vector/riotx/features/createdirect/CreateDirectRoomViewModel.kt +++ b/vector/src/main/java/im/vector/riotx/features/createdirect/CreateDirectRoomViewModel.kt @@ -1,42 +1,31 @@ /* + * Copyright (c) 2020 New Vector Ltd * - * * 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. + * 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.riotx.features.createdirect -import arrow.core.Option import com.airbnb.mvrx.ActivityViewModelContext import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.ViewModelContext -import com.jakewharton.rxrelay2.BehaviorRelay import com.squareup.inject.assisted.Assisted import com.squareup.inject.assisted.AssistedInject import im.vector.matrix.android.api.session.Session import im.vector.matrix.android.api.session.room.model.create.CreateRoomParams -import im.vector.matrix.android.api.util.toMatrixItem +import im.vector.matrix.android.api.session.user.model.User import im.vector.matrix.rx.rx -import im.vector.riotx.core.extensions.toggle import im.vector.riotx.core.platform.VectorViewModel -import io.reactivex.Single -import io.reactivex.android.schedulers.AndroidSchedulers -import java.util.concurrent.TimeUnit - -private typealias KnowUsersFilter = String -private typealias DirectoryUsersSearch = String class CreateDirectRoomViewModel @AssistedInject constructor(@Assisted initialState: CreateDirectRoomViewState, @@ -48,9 +37,6 @@ class CreateDirectRoomViewModel @AssistedInject constructor(@Assisted fun create(initialState: CreateDirectRoomViewState): CreateDirectRoomViewModel } - private val knownUsersFilter = BehaviorRelay.createDefault>(Option.empty()) - private val directoryUsersSearch = BehaviorRelay.create() - companion object : MvRxViewModelFactory { @JvmStatic @@ -60,25 +46,15 @@ class CreateDirectRoomViewModel @AssistedInject constructor(@Assisted } } - init { - observeKnownUsers() - observeDirectoryUsers() - } - override fun handle(action: CreateDirectRoomAction) { when (action) { - is CreateDirectRoomAction.CreateRoomAndInviteSelectedUsers -> createRoomAndInviteSelectedUsers() - is CreateDirectRoomAction.FilterKnownUsers -> knownUsersFilter.accept(Option.just(action.value)) - is CreateDirectRoomAction.ClearFilterKnownUsers -> knownUsersFilter.accept(Option.empty()) - is CreateDirectRoomAction.SearchDirectoryUsers -> directoryUsersSearch.accept(action.value) - is CreateDirectRoomAction.SelectUser -> handleSelectUser(action) - is CreateDirectRoomAction.RemoveSelectedUser -> handleRemoveSelectedUser(action) + is CreateDirectRoomAction.CreateRoomAndInviteSelectedUsers -> createRoomAndInviteSelectedUsers(action.selectedUsers) } } - private fun createRoomAndInviteSelectedUsers() = withState { currentState -> + private fun createRoomAndInviteSelectedUsers(selectedUsers: Set) { val roomParams = CreateRoomParams( - invitedUserIds = currentState.selectedUsers.map { it.userId } + invitedUserIds = selectedUsers.map { it.userId } ) .setDirectMessage() .enableEncryptionIfInvitedUsersSupportIt() @@ -89,52 +65,4 @@ class CreateDirectRoomViewModel @AssistedInject constructor(@Assisted copy(createAndInviteState = it) } } - - private fun handleRemoveSelectedUser(action: CreateDirectRoomAction.RemoveSelectedUser) = withState { state -> - val selectedUsers = state.selectedUsers.minus(action.user) - setState { copy(selectedUsers = selectedUsers) } - } - - private fun handleSelectUser(action: CreateDirectRoomAction.SelectUser) = withState { state -> - // Reset the filter asap - directoryUsersSearch.accept("") - val selectedUsers = state.selectedUsers.toggle(action.user) - setState { copy(selectedUsers = selectedUsers) } - } - - private fun observeDirectoryUsers() { - directoryUsersSearch - .debounce(300, TimeUnit.MILLISECONDS) - .switchMapSingle { search -> - val stream = if (search.isBlank()) { - Single.just(emptyList()) - } else { - session.rx() - .searchUsersDirectory(search, 50, emptySet()) - .map { users -> - users.sortedBy { it.toMatrixItem().firstLetterOfDisplayName() } - } - } - stream.toAsync { - copy(directoryUsers = it, directorySearchTerm = search) - } - } - .subscribe() - .disposeOnClear() - } - - private fun observeKnownUsers() { - knownUsersFilter - .throttleLast(300, TimeUnit.MILLISECONDS) - .observeOn(AndroidSchedulers.mainThread()) - .switchMap { - session.rx().livePagedUsers(it.orNull()) - } - .execute { async -> - copy( - knownUsers = async, - filterKnownUsersValue = knownUsersFilter.value ?: Option.empty() - ) - } - } } diff --git a/vector/src/main/java/im/vector/riotx/features/createdirect/CreateDirectRoomViewState.kt b/vector/src/main/java/im/vector/riotx/features/createdirect/CreateDirectRoomViewState.kt index dcf86ef6f1..8bb8c3ce58 100644 --- a/vector/src/main/java/im/vector/riotx/features/createdirect/CreateDirectRoomViewState.kt +++ b/vector/src/main/java/im/vector/riotx/features/createdirect/CreateDirectRoomViewState.kt @@ -1,41 +1,25 @@ /* + * Copyright (c) 2020 New Vector Ltd * - * * 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. + * 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.riotx.features.createdirect -import androidx.paging.PagedList -import arrow.core.Option import com.airbnb.mvrx.Async import com.airbnb.mvrx.MvRxState import com.airbnb.mvrx.Uninitialized -import im.vector.matrix.android.api.session.user.model.User data class CreateDirectRoomViewState( - val knownUsers: Async> = Uninitialized, - val directoryUsers: Async> = Uninitialized, - val selectedUsers: Set = emptySet(), - val createAndInviteState: Async = Uninitialized, - val directorySearchTerm: String = "", - val filterKnownUsersValue: Option = Option.empty() -) : MvRxState { - - enum class DisplayMode { - KNOWN_USERS, - DIRECTORY_USERS - } -} + val createAndInviteState: Async = Uninitialized +) : MvRxState diff --git a/vector/src/main/java/im/vector/riotx/features/createdirect/DirectoryUsersController.kt b/vector/src/main/java/im/vector/riotx/features/userdirectory/DirectoryUsersController.kt similarity index 83% rename from vector/src/main/java/im/vector/riotx/features/createdirect/DirectoryUsersController.kt rename to vector/src/main/java/im/vector/riotx/features/userdirectory/DirectoryUsersController.kt index 1c38e6f723..9d11387fe8 100644 --- a/vector/src/main/java/im/vector/riotx/features/createdirect/DirectoryUsersController.kt +++ b/vector/src/main/java/im/vector/riotx/features/userdirectory/DirectoryUsersController.kt @@ -1,22 +1,20 @@ /* + * Copyright (c) 2020 New Vector Ltd * - * * 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. + * 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.riotx.features.createdirect +package im.vector.riotx.features.userdirectory import com.airbnb.epoxy.EpoxyController import com.airbnb.mvrx.Fail @@ -41,7 +39,7 @@ class DirectoryUsersController @Inject constructor(private val session: Session, private val stringProvider: StringProvider, private val errorFormatter: ErrorFormatter) : EpoxyController() { - private var state: CreateDirectRoomViewState? = null + private var state: UserDirectoryViewState? = null var callback: Callback? = null @@ -49,7 +47,7 @@ class DirectoryUsersController @Inject constructor(private val session: Session, requestModelBuild() } - fun setData(state: CreateDirectRoomViewState) { + fun setData(state: UserDirectoryViewState) { this.state = state requestModelBuild() } @@ -110,7 +108,7 @@ class DirectoryUsersController @Inject constructor(private val session: Session, continue } val isSelected = selectedUsers.contains(user.userId) - createDirectRoomUserItem { + userDirectoryUserItem { id(user.userId) selected(isSelected) matrixItem(user.toMatrixItem()) diff --git a/vector/src/main/java/im/vector/riotx/features/createdirect/KnownUsersController.kt b/vector/src/main/java/im/vector/riotx/features/userdirectory/KnownUsersController.kt similarity index 92% rename from vector/src/main/java/im/vector/riotx/features/createdirect/KnownUsersController.kt rename to vector/src/main/java/im/vector/riotx/features/userdirectory/KnownUsersController.kt index a0e20b45f5..7a1ad49b8c 100644 --- a/vector/src/main/java/im/vector/riotx/features/createdirect/KnownUsersController.kt +++ b/vector/src/main/java/im/vector/riotx/features/userdirectory/KnownUsersController.kt @@ -1,11 +1,11 @@ /* - * Copyright 2019 New Vector Ltd + * Copyright (c) 2020 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 + * 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, @@ -14,7 +14,7 @@ * limitations under the License. */ -package im.vector.riotx.features.createdirect +package im.vector.riotx.features.userdirectory import com.airbnb.epoxy.EpoxyModel import com.airbnb.epoxy.paging.PagedListEpoxyController @@ -49,7 +49,7 @@ class KnownUsersController @Inject constructor(private val session: Session, requestModelBuild() } - fun setData(state: CreateDirectRoomViewState) { + fun setData(state: UserDirectoryViewState) { this.isFiltering = !state.filterKnownUsersValue.isEmpty() val newSelection = state.selectedUsers.map { it.userId } this.users = state.knownUsers @@ -65,7 +65,7 @@ class KnownUsersController @Inject constructor(private val session: Session, EmptyItem_().id(currentPosition) } else { val isSelected = selectedUsers.contains(item.userId) - CreateDirectRoomUserItem_() + UserDirectoryUserItem_() .id(item.userId) .selected(isSelected) .matrixItem(item.toMatrixItem()) @@ -84,13 +84,13 @@ class KnownUsersController @Inject constructor(private val session: Session, } else { var lastFirstLetter: String? = null for (model in models) { - if (model is CreateDirectRoomUserItem) { + if (model is UserDirectoryUserItem) { if (model.matrixItem.id == session.myUserId) continue val currentFirstLetter = model.matrixItem.firstLetterOfDisplayName() val showLetter = !isFiltering && currentFirstLetter.isNotEmpty() && lastFirstLetter != currentFirstLetter lastFirstLetter = currentFirstLetter - CreateDirectRoomLetterHeaderItem_() + UserDirectoryLetterHeaderItem_() .id(currentFirstLetter) .letter(currentFirstLetter) .addIf(showLetter, this) diff --git a/vector/src/main/java/im/vector/riotx/features/createdirect/CreateDirectRoomKnownUsersFragment.kt b/vector/src/main/java/im/vector/riotx/features/userdirectory/KnownUsersFragment.kt similarity index 60% rename from vector/src/main/java/im/vector/riotx/features/createdirect/CreateDirectRoomKnownUsersFragment.kt rename to vector/src/main/java/im/vector/riotx/features/userdirectory/KnownUsersFragment.kt index 24b5394e5c..fe8b4ac6c0 100644 --- a/vector/src/main/java/im/vector/riotx/features/createdirect/CreateDirectRoomKnownUsersFragment.kt +++ b/vector/src/main/java/im/vector/riotx/features/userdirectory/KnownUsersFragment.kt @@ -1,28 +1,27 @@ /* + * Copyright (c) 2020 New Vector Ltd * - * * 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. + * 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.riotx.features.createdirect +package im.vector.riotx.features.userdirectory import android.os.Bundle import android.view.Menu import android.view.MenuItem import android.view.View import android.widget.ScrollView +import androidx.core.view.forEach import com.airbnb.mvrx.activityViewModel import com.airbnb.mvrx.withState import com.google.android.material.chip.Chip @@ -35,30 +34,33 @@ import im.vector.riotx.core.extensions.hideKeyboard import im.vector.riotx.core.extensions.setupAsSearch import im.vector.riotx.core.platform.VectorBaseFragment import im.vector.riotx.core.utils.DimensionConverter -import kotlinx.android.synthetic.main.fragment_create_direct_room.* +import kotlinx.android.synthetic.main.fragment_known_users.* import javax.inject.Inject -class CreateDirectRoomKnownUsersFragment @Inject constructor( +class KnownUsersFragment @Inject constructor( + val userDirectoryViewModelFactory: UserDirectoryViewModel.Factory, private val knownUsersController: KnownUsersController, private val dimensionConverter: DimensionConverter ) : VectorBaseFragment(), KnownUsersController.Callback { - override fun getLayoutResId() = R.layout.fragment_create_direct_room + override fun getLayoutResId() = R.layout.fragment_known_users - override fun getMenuRes() = R.menu.vector_create_direct_room + override fun getMenuRes() = withState(viewModel) { + return@withState it.menuResId ?: -1 + } - private val viewModel: CreateDirectRoomViewModel by activityViewModel() - private lateinit var sharedActionViewModel: CreateDirectRoomSharedActionViewModel + private val viewModel: UserDirectoryViewModel by activityViewModel() + private lateinit var sharedActionViewModel: UserDirectorySharedActionViewModel override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) - sharedActionViewModel = activityViewModelProvider.get(CreateDirectRoomSharedActionViewModel::class.java) - vectorBaseActivity.setSupportActionBar(createDirectRoomToolbar) + sharedActionViewModel = activityViewModelProvider.get(UserDirectorySharedActionViewModel::class.java) + vectorBaseActivity.setSupportActionBar(knownUsersToolbar) setupRecyclerView() setupFilterView() setupAddByMatrixIdView() setupCloseView() - viewModel.selectSubscribe(this, CreateDirectRoomViewState::selectedUsers) { + viewModel.selectSubscribe(this, UserDirectoryViewState::selectedUsers) { renderSelectedUsers(it) } } @@ -71,27 +73,22 @@ class CreateDirectRoomKnownUsersFragment @Inject constructor( override fun onPrepareOptionsMenu(menu: Menu) { withState(viewModel) { - val createMenuItem = menu.findItem(R.id.action_create_direct_room) val showMenuItem = it.selectedUsers.isNotEmpty() - createMenuItem.setVisible(showMenuItem) + menu.forEach { menuItem -> + menuItem.isVisible = showMenuItem + } } super.onPrepareOptionsMenu(menu) } - override fun onOptionsItemSelected(item: MenuItem): Boolean { - return when (item.itemId) { - R.id.action_create_direct_room -> { - viewModel.handle(CreateDirectRoomAction.CreateRoomAndInviteSelectedUsers) - true - } - else -> - super.onOptionsItemSelected(item) - } + override fun onOptionsItemSelected(item: MenuItem): Boolean = withState(viewModel) { + sharedActionViewModel.post(UserDirectorySharedAction.OnMenuItemSelected(item.itemId, it.selectedUsers)) + return@withState true } private fun setupAddByMatrixIdView() { addByMatrixId.setOnClickListener { - sharedActionViewModel.post(CreateDirectRoomSharedAction.OpenUsersDirectory) + sharedActionViewModel.post(UserDirectorySharedAction.OpenUsersDirectory) } } @@ -102,26 +99,26 @@ class CreateDirectRoomKnownUsersFragment @Inject constructor( } private fun setupFilterView() { - createDirectRoomFilter + knownUsersFilter .textChanges() - .startWith(createDirectRoomFilter.text) + .startWith(knownUsersFilter.text) .subscribe { text -> val filterValue = text.trim() val action = if (filterValue.isBlank()) { - CreateDirectRoomAction.ClearFilterKnownUsers + UserDirectoryAction.ClearFilterKnownUsers } else { - CreateDirectRoomAction.FilterKnownUsers(filterValue.toString()) + UserDirectoryAction.FilterKnownUsers(filterValue.toString()) } viewModel.handle(action) } .disposeOnDestroyView() - createDirectRoomFilter.setupAsSearch() - createDirectRoomFilter.requestFocus() + knownUsersFilter.setupAsSearch() + knownUsersFilter.requestFocus() } private fun setupCloseView() { - createDirectRoomClose.setOnClickListener { + knownUsersClose.setOnClickListener { requireActivity().finish() } } @@ -157,12 +154,12 @@ class CreateDirectRoomKnownUsersFragment @Inject constructor( chip.isCloseIconVisible = true chipGroup.addView(chip) chip.setOnCloseIconClickListener { - viewModel.handle(CreateDirectRoomAction.RemoveSelectedUser(user)) + viewModel.handle(UserDirectoryAction.RemoveSelectedUser(user)) } } override fun onItemClick(user: User) { view?.hideKeyboard() - viewModel.handle(CreateDirectRoomAction.SelectUser(user)) + viewModel.handle(UserDirectoryAction.SelectUser(user)) } } diff --git a/vector/src/main/java/im/vector/riotx/features/createdirect/CreateDirectRoomSharedAction.kt b/vector/src/main/java/im/vector/riotx/features/userdirectory/KnownUsersFragmentArgs.kt similarity index 60% rename from vector/src/main/java/im/vector/riotx/features/createdirect/CreateDirectRoomSharedAction.kt rename to vector/src/main/java/im/vector/riotx/features/userdirectory/KnownUsersFragmentArgs.kt index eeffc1f119..2003f085d4 100644 --- a/vector/src/main/java/im/vector/riotx/features/createdirect/CreateDirectRoomSharedAction.kt +++ b/vector/src/main/java/im/vector/riotx/features/userdirectory/KnownUsersFragmentArgs.kt @@ -1,5 +1,5 @@ /* - * Copyright 2019 New Vector Ltd + * Copyright (c) 2020 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. @@ -14,12 +14,13 @@ * limitations under the License. */ -package im.vector.riotx.features.createdirect +package im.vector.riotx.features.userdirectory -import im.vector.riotx.core.platform.VectorSharedAction +import android.os.Parcelable +import kotlinx.android.parcel.Parcelize -sealed class CreateDirectRoomSharedAction : VectorSharedAction { - object OpenUsersDirectory : CreateDirectRoomSharedAction() - object Close : CreateDirectRoomSharedAction() - object GoBack : CreateDirectRoomSharedAction() -} +@Parcelize +data class KnownUsersFragmentArgs( + val title: String, + val menuResId: Int? = null +) : Parcelable diff --git a/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryAction.kt b/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryAction.kt new file mode 100644 index 0000000000..1df3c02736 --- /dev/null +++ b/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryAction.kt @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2020 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.riotx.features.userdirectory + +import im.vector.matrix.android.api.session.user.model.User +import im.vector.riotx.core.platform.VectorViewModelAction + +sealed class UserDirectoryAction : VectorViewModelAction { + data class FilterKnownUsers(val value: String) : UserDirectoryAction() + data class SearchDirectoryUsers(val value: String) : UserDirectoryAction() + object ClearFilterKnownUsers : UserDirectoryAction() + data class SelectUser(val user: User) : UserDirectoryAction() + data class RemoveSelectedUser(val user: User) : UserDirectoryAction() +} diff --git a/vector/src/main/java/im/vector/riotx/features/createdirect/CreateDirectRoomDirectoryUsersFragment.kt b/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryFragment.kt similarity index 64% rename from vector/src/main/java/im/vector/riotx/features/createdirect/CreateDirectRoomDirectoryUsersFragment.kt rename to vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryFragment.kt index ecfe054767..28aa2d433b 100644 --- a/vector/src/main/java/im/vector/riotx/features/createdirect/CreateDirectRoomDirectoryUsersFragment.kt +++ b/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryFragment.kt @@ -1,11 +1,11 @@ /* - * Copyright 2019 New Vector Ltd + * Copyright (c) 2020 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 + * 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, @@ -14,7 +14,7 @@ * limitations under the License. */ -package im.vector.riotx.features.createdirect +package im.vector.riotx.features.userdirectory import android.os.Bundle import android.view.View @@ -29,22 +29,22 @@ import im.vector.riotx.core.extensions.hideKeyboard import im.vector.riotx.core.extensions.setupAsSearch import im.vector.riotx.core.extensions.showKeyboard import im.vector.riotx.core.platform.VectorBaseFragment -import kotlinx.android.synthetic.main.fragment_create_direct_room_directory_users.* +import kotlinx.android.synthetic.main.fragment_create_direct_room_directory_users.recyclerView +import kotlinx.android.synthetic.main.fragment_user_directory.* import javax.inject.Inject -class CreateDirectRoomDirectoryUsersFragment @Inject constructor( +class UserDirectoryFragment @Inject constructor( private val directRoomController: DirectoryUsersController ) : VectorBaseFragment(), DirectoryUsersController.Callback { - override fun getLayoutResId() = R.layout.fragment_create_direct_room_directory_users + override fun getLayoutResId() = R.layout.fragment_user_directory + private val viewModel: UserDirectoryViewModel by activityViewModel() - private val viewModel: CreateDirectRoomViewModel by activityViewModel() - - private lateinit var sharedActionViewModel: CreateDirectRoomSharedActionViewModel + private lateinit var sharedActionViewModel: UserDirectorySharedActionViewModel override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) - sharedActionViewModel = activityViewModelProvider.get(CreateDirectRoomSharedActionViewModel::class.java) + sharedActionViewModel = activityViewModelProvider.get(UserDirectorySharedActionViewModel::class.java) setupRecyclerView() setupSearchByMatrixIdView() setupCloseView() @@ -62,19 +62,19 @@ class CreateDirectRoomDirectoryUsersFragment @Inject constructor( } private fun setupSearchByMatrixIdView() { - createDirectRoomSearchById.setupAsSearch(searchIconRes = 0) - createDirectRoomSearchById + userDirectorySearchById.setupAsSearch(searchIconRes = 0) + userDirectorySearchById .textChanges() .subscribe { - viewModel.handle(CreateDirectRoomAction.SearchDirectoryUsers(it.toString())) + viewModel.handle(UserDirectoryAction.SearchDirectoryUsers(it.toString())) } .disposeOnDestroyView() - createDirectRoomSearchById.showKeyboard(andRequestFocus = true) + userDirectorySearchById.showKeyboard(andRequestFocus = true) } private fun setupCloseView() { - createDirectRoomClose.setOnClickListener { - sharedActionViewModel.post(CreateDirectRoomSharedAction.GoBack) + userDirectoryClose.setOnClickListener { + sharedActionViewModel.post(UserDirectorySharedAction.GoBack) } } @@ -84,12 +84,12 @@ class CreateDirectRoomDirectoryUsersFragment @Inject constructor( override fun onItemClick(user: User) { view?.hideKeyboard() - viewModel.handle(CreateDirectRoomAction.SelectUser(user)) - sharedActionViewModel.post(CreateDirectRoomSharedAction.GoBack) + viewModel.handle(UserDirectoryAction.SelectUser(user)) + sharedActionViewModel.post(UserDirectorySharedAction.GoBack) } override fun retryDirectoryUsersRequest() { - val currentSearch = createDirectRoomSearchById.text.toString() - viewModel.handle(CreateDirectRoomAction.SearchDirectoryUsers(currentSearch)) + val currentSearch = userDirectorySearchById.text.toString() + viewModel.handle(UserDirectoryAction.SearchDirectoryUsers(currentSearch)) } } diff --git a/vector/src/main/java/im/vector/riotx/features/createdirect/CreateDirectRoomLetterHeaderItem.kt b/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryLetterHeaderItem.kt similarity index 70% rename from vector/src/main/java/im/vector/riotx/features/createdirect/CreateDirectRoomLetterHeaderItem.kt rename to vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryLetterHeaderItem.kt index e512337c64..e7e9183ada 100644 --- a/vector/src/main/java/im/vector/riotx/features/createdirect/CreateDirectRoomLetterHeaderItem.kt +++ b/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryLetterHeaderItem.kt @@ -1,11 +1,11 @@ /* - * Copyright 2019 New Vector Ltd + * Copyright (c) 2020 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 + * 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, @@ -14,7 +14,7 @@ * limitations under the License. */ -package im.vector.riotx.features.createdirect +package im.vector.riotx.features.userdirectory import android.widget.TextView import com.airbnb.epoxy.EpoxyAttribute @@ -23,8 +23,8 @@ import im.vector.riotx.R import im.vector.riotx.core.epoxy.VectorEpoxyHolder import im.vector.riotx.core.epoxy.VectorEpoxyModel -@EpoxyModelClass(layout = R.layout.item_create_direct_room_letter_header) -abstract class CreateDirectRoomLetterHeaderItem : VectorEpoxyModel() { +@EpoxyModelClass(layout = R.layout.item_user_directory_letter_header) +abstract class UserDirectoryLetterHeaderItem : VectorEpoxyModel() { @EpoxyAttribute var letter: String = "" @@ -33,6 +33,6 @@ abstract class CreateDirectRoomLetterHeaderItem : VectorEpoxyModel(R.id.createDirectRoomLetterView) + val letterView by bind(R.id.userDirectoryLetterView) } } diff --git a/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectorySharedAction.kt b/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectorySharedAction.kt new file mode 100644 index 0000000000..7d1987aa4b --- /dev/null +++ b/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectorySharedAction.kt @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2020 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.riotx.features.userdirectory + +import im.vector.matrix.android.api.session.user.model.User +import im.vector.riotx.core.platform.VectorSharedAction + +sealed class UserDirectorySharedAction : VectorSharedAction { + object OpenUsersDirectory : UserDirectorySharedAction() + object Close : UserDirectorySharedAction() + object GoBack : UserDirectorySharedAction() + data class OnMenuItemSelected(val itemId: Int, val selectedUsers: Set) : UserDirectorySharedAction() +} diff --git a/vector/src/main/java/im/vector/riotx/features/createdirect/CreateDirectRoomSharedActionViewModel.kt b/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectorySharedActionViewModel.kt similarity index 70% rename from vector/src/main/java/im/vector/riotx/features/createdirect/CreateDirectRoomSharedActionViewModel.kt rename to vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectorySharedActionViewModel.kt index 91c21378d2..e7081ea969 100644 --- a/vector/src/main/java/im/vector/riotx/features/createdirect/CreateDirectRoomSharedActionViewModel.kt +++ b/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectorySharedActionViewModel.kt @@ -1,11 +1,11 @@ /* - * Copyright 2019 New Vector Ltd + * Copyright (c) 2020 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 + * 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, @@ -14,9 +14,9 @@ * limitations under the License. */ -package im.vector.riotx.features.createdirect +package im.vector.riotx.features.userdirectory import im.vector.riotx.core.platform.VectorSharedActionViewModel import javax.inject.Inject -class CreateDirectRoomSharedActionViewModel @Inject constructor() : VectorSharedActionViewModel() +class UserDirectorySharedActionViewModel @Inject constructor() : VectorSharedActionViewModel() diff --git a/vector/src/main/java/im/vector/riotx/features/createdirect/CreateDirectRoomUserItem.kt b/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryUserItem.kt similarity index 63% rename from vector/src/main/java/im/vector/riotx/features/createdirect/CreateDirectRoomUserItem.kt rename to vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryUserItem.kt index f2f517fd6e..7ea0709ce8 100644 --- a/vector/src/main/java/im/vector/riotx/features/createdirect/CreateDirectRoomUserItem.kt +++ b/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryUserItem.kt @@ -1,22 +1,20 @@ /* + * Copyright (c) 2020 New Vector Ltd * - * * 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. + * 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.riotx.features.createdirect +package im.vector.riotx.features.userdirectory import android.view.View import android.widget.ImageView @@ -31,8 +29,8 @@ import im.vector.riotx.core.epoxy.VectorEpoxyHolder import im.vector.riotx.core.epoxy.VectorEpoxyModel import im.vector.riotx.features.home.AvatarRenderer -@EpoxyModelClass(layout = R.layout.item_create_direct_room_user) -abstract class CreateDirectRoomUserItem : VectorEpoxyModel() { +@EpoxyModelClass(layout = R.layout.item_known_user) +abstract class UserDirectoryUserItem : VectorEpoxyModel() { @EpoxyAttribute lateinit var avatarRenderer: AvatarRenderer @EpoxyAttribute lateinit var matrixItem: MatrixItem @@ -66,9 +64,9 @@ abstract class CreateDirectRoomUserItem : VectorEpoxyModel(R.id.createDirectRoomUserID) - val nameView by bind(R.id.createDirectRoomUserName) - val avatarImageView by bind(R.id.createDirectRoomUserAvatar) - val avatarCheckedImageView by bind(R.id.createDirectRoomUserAvatarChecked) + val userIdView by bind(R.id.knownUserID) + val nameView by bind(R.id.knownUserName) + val avatarImageView by bind(R.id.knownUserAvatar) + val avatarCheckedImageView by bind(R.id.knownUserAvatarChecked) } } diff --git a/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryViewEvents.kt b/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryViewEvents.kt new file mode 100644 index 0000000000..8673e55622 --- /dev/null +++ b/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryViewEvents.kt @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2020 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.riotx.features.userdirectory + +import im.vector.riotx.core.platform.VectorViewEvents + +/** + * Transient events for create direct room screen + */ +sealed class UserDirectoryViewEvents : VectorViewEvents diff --git a/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryViewModel.kt b/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryViewModel.kt new file mode 100644 index 0000000000..67cfa1c1f7 --- /dev/null +++ b/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryViewModel.kt @@ -0,0 +1,132 @@ +/* + * Copyright (c) 2020 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.riotx.features.userdirectory + +import androidx.fragment.app.FragmentActivity +import arrow.core.Option +import com.airbnb.mvrx.ActivityViewModelContext +import com.airbnb.mvrx.FragmentViewModelContext +import com.airbnb.mvrx.MvRxViewModelFactory +import com.airbnb.mvrx.ViewModelContext +import com.jakewharton.rxrelay2.BehaviorRelay +import com.squareup.inject.assisted.Assisted +import com.squareup.inject.assisted.AssistedInject +import im.vector.matrix.android.api.session.Session +import im.vector.matrix.android.api.util.toMatrixItem +import im.vector.matrix.rx.rx +import im.vector.riotx.core.extensions.toggle +import im.vector.riotx.core.platform.VectorViewModel +import im.vector.riotx.features.createdirect.CreateDirectRoomActivity +import io.reactivex.Single +import io.reactivex.android.schedulers.AndroidSchedulers +import java.util.concurrent.TimeUnit + +private typealias KnowUsersFilter = String +private typealias DirectoryUsersSearch = String + +class UserDirectoryViewModel @AssistedInject constructor(@Assisted + initialState: UserDirectoryViewState, + private val session: Session) + : VectorViewModel(initialState) { + + @AssistedInject.Factory + interface Factory { + fun create(initialState: UserDirectoryViewState): UserDirectoryViewModel + } + + private val knownUsersFilter = BehaviorRelay.createDefault>(Option.empty()) + private val directoryUsersSearch = BehaviorRelay.create() + + companion object : MvRxViewModelFactory { + + override fun create(viewModelContext: ViewModelContext, state: UserDirectoryViewState): UserDirectoryViewModel? { + return when (viewModelContext) { + is FragmentViewModelContext -> (viewModelContext.fragment() as KnownUsersFragment).userDirectoryViewModelFactory.create(state) + is ActivityViewModelContext -> { + when (viewModelContext.activity()) { + is CreateDirectRoomActivity -> viewModelContext.activity().userDirectoryViewModelFactory.create(state) + else -> error("Wrong activity or fragment") + } + } + else -> error("Wrong activity or fragment") + } + } + } + + init { + observeKnownUsers() + observeDirectoryUsers() + } + + override fun handle(action: UserDirectoryAction) { + when (action) { + is UserDirectoryAction.FilterKnownUsers -> knownUsersFilter.accept(Option.just(action.value)) + is UserDirectoryAction.ClearFilterKnownUsers -> knownUsersFilter.accept(Option.empty()) + is UserDirectoryAction.SearchDirectoryUsers -> directoryUsersSearch.accept(action.value) + is UserDirectoryAction.SelectUser -> handleSelectUser(action) + is UserDirectoryAction.RemoveSelectedUser -> handleRemoveSelectedUser(action) + } + } + + private fun handleRemoveSelectedUser(action: UserDirectoryAction.RemoveSelectedUser) = withState { state -> + val selectedUsers = state.selectedUsers.minus(action.user) + setState { copy(selectedUsers = selectedUsers) } + } + + private fun handleSelectUser(action: UserDirectoryAction.SelectUser) = withState { state -> + // Reset the filter asap + directoryUsersSearch.accept("") + val selectedUsers = state.selectedUsers.toggle(action.user) + setState { copy(selectedUsers = selectedUsers) } + } + + private fun observeDirectoryUsers() { + directoryUsersSearch + .debounce(300, TimeUnit.MILLISECONDS) + .switchMapSingle { search -> + val stream = if (search.isBlank()) { + Single.just(emptyList()) + } else { + session.rx() + .searchUsersDirectory(search, 50, emptySet()) + .map { users -> + users.sortedBy { it.toMatrixItem().firstLetterOfDisplayName() } + } + } + stream.toAsync { + copy(directoryUsers = it, directorySearchTerm = search) + } + } + .subscribe() + .disposeOnClear() + } + + private fun observeKnownUsers() { + knownUsersFilter + .throttleLast(300, TimeUnit.MILLISECONDS) + .observeOn(AndroidSchedulers.mainThread()) + .switchMap { + session.rx().livePagedUsers(it.orNull()) + } + .execute { async -> + copy( + knownUsers = async, + filterKnownUsersValue = knownUsersFilter.value ?: Option.empty() + ) + } + } +} diff --git a/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryViewState.kt b/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryViewState.kt new file mode 100644 index 0000000000..b5920aa695 --- /dev/null +++ b/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryViewState.kt @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2020 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.riotx.features.userdirectory + +import androidx.paging.PagedList +import arrow.core.Option +import com.airbnb.mvrx.Async +import com.airbnb.mvrx.MvRxState +import com.airbnb.mvrx.Uninitialized +import im.vector.matrix.android.api.session.user.model.User + +data class UserDirectoryViewState( + val knownUsers: Async> = Uninitialized, + val directoryUsers: Async> = Uninitialized, + val selectedUsers: Set = emptySet(), + val createAndInviteState: Async = Uninitialized, + val directorySearchTerm: String = "", + val filterKnownUsersValue: Option = Option.empty(), + val title: String, + val menuResId: Int? +) : MvRxState { + + constructor(args: KnownUsersFragmentArgs) : this(title = args.title, menuResId = args.menuResId) + + enum class DisplayMode { + KNOWN_USERS, + DIRECTORY_USERS + } +} diff --git a/vector/src/main/res/layout/fragment_known_users.xml b/vector/src/main/res/layout/fragment_known_users.xml new file mode 100644 index 0000000000..915d27bdf7 --- /dev/null +++ b/vector/src/main/res/layout/fragment_known_users.xml @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vector/src/main/res/layout/fragment_user_directory.xml b/vector/src/main/res/layout/fragment_user_directory.xml new file mode 100644 index 0000000000..e10f5bcaa9 --- /dev/null +++ b/vector/src/main/res/layout/fragment_user_directory.xml @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vector/src/main/res/layout/item_known_user.xml b/vector/src/main/res/layout/item_known_user.xml new file mode 100644 index 0000000000..e90b2c6256 --- /dev/null +++ b/vector/src/main/res/layout/item_known_user.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vector/src/main/res/layout/item_user_directory_letter_header.xml b/vector/src/main/res/layout/item_user_directory_letter_header.xml new file mode 100644 index 0000000000..0cb2faf9bc --- /dev/null +++ b/vector/src/main/res/layout/item_user_directory_letter_header.xml @@ -0,0 +1,14 @@ + + + \ No newline at end of file From 57a87ba620ab329711bb00ea0ca66030e46d25fa Mon Sep 17 00:00:00 2001 From: onurays Date: Thu, 30 Apr 2020 13:54:09 +0300 Subject: [PATCH 004/156] Add InviteUsersToRoomActivity and mvrx classes. --- .../main/java/im/vector/matrix/rx/RxRoom.kt | 5 + .../room/membership/joining/InviteTask.kt | 2 + vector/src/main/AndroidManifest.xml | 1 + .../vector/riotx/core/di/ScreenComponent.kt | 2 + .../core/platform/SimpleFragmentActivity.kt | 12 ++ .../invite/InviteUsersToRoomAction.kt | 24 +++ .../invite/InviteUsersToRoomActivity.kt | 145 ++++++++++++++++++ .../invite/InviteUsersToRoomViewEvents.kt | 25 +++ .../invite/InviteUsersToRoomViewModel.kt | 70 +++++++++ .../invite/InviteUsersToRoomViewState.kt | 29 ++++ .../features/navigation/DefaultNavigator.kt | 6 + .../riotx/features/navigation/Navigator.kt | 2 + .../members/RoomMemberListFragment.kt | 2 +- .../userdirectory/KnownUsersFragment.kt | 6 + .../userdirectory/UserDirectoryViewModel.kt | 2 + .../res/menu/vector_invite_users_to_room.xml | 10 ++ vector/src/main/res/values/strings_riotX.xml | 5 + 17 files changed, 347 insertions(+), 1 deletion(-) create mode 100644 vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomAction.kt create mode 100644 vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomActivity.kt create mode 100644 vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomViewEvents.kt create mode 100644 vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomViewModel.kt create mode 100644 vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomViewState.kt create mode 100755 vector/src/main/res/menu/vector_invite_users_to_room.xml diff --git a/matrix-sdk-android-rx/src/main/java/im/vector/matrix/rx/RxRoom.kt b/matrix-sdk-android-rx/src/main/java/im/vector/matrix/rx/RxRoom.kt index 193b5c3fbf..469bc514e0 100644 --- a/matrix-sdk-android-rx/src/main/java/im/vector/matrix/rx/RxRoom.kt +++ b/matrix-sdk-android-rx/src/main/java/im/vector/matrix/rx/RxRoom.kt @@ -28,6 +28,7 @@ import im.vector.matrix.android.api.session.room.send.UserDraft import im.vector.matrix.android.api.session.room.timeline.TimelineEvent import im.vector.matrix.android.api.util.Optional import im.vector.matrix.android.api.util.toOptional +import io.reactivex.Completable import io.reactivex.Observable import io.reactivex.Single @@ -95,6 +96,10 @@ class RxRoom(private val room: Room) { fun liveNotificationState(): Observable { return room.getLiveRoomNotificationState().asObservable() } + + fun invite(userId: String, reason: String? = null): Completable = completableBuilder { + room.invite(userId, reason, it) + } } fun Room.rx(): RxRoom { diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/membership/joining/InviteTask.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/membership/joining/InviteTask.kt index 93b3889455..5a8b302f1b 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/membership/joining/InviteTask.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/membership/joining/InviteTask.kt @@ -39,6 +39,8 @@ internal class DefaultInviteTask @Inject constructor( return executeRequest(eventBus) { val body = InviteBody(params.userId, params.reason) apiCall = roomAPI.invite(params.roomId, body) + isRetryable = true + maxRetryCount = 3 } } } diff --git a/vector/src/main/AndroidManifest.xml b/vector/src/main/AndroidManifest.xml index 092817a6cc..ae0ffa1f91 100644 --- a/vector/src/main/AndroidManifest.xml +++ b/vector/src/main/AndroidManifest.xml @@ -85,6 +85,7 @@ + diff --git a/vector/src/main/java/im/vector/riotx/core/di/ScreenComponent.kt b/vector/src/main/java/im/vector/riotx/core/di/ScreenComponent.kt index af49b00b59..c38c0c99e6 100644 --- a/vector/src/main/java/im/vector/riotx/core/di/ScreenComponent.kt +++ b/vector/src/main/java/im/vector/riotx/core/di/ScreenComponent.kt @@ -39,6 +39,7 @@ import im.vector.riotx.features.home.room.detail.timeline.reactions.ViewReaction import im.vector.riotx.features.home.room.filtered.FilteredRoomsActivity import im.vector.riotx.features.home.room.list.RoomListModule import im.vector.riotx.features.home.room.list.actions.RoomListQuickActionsBottomSheet +import im.vector.riotx.features.invite.InviteUsersToRoomActivity import im.vector.riotx.features.invite.VectorInviteView import im.vector.riotx.features.link.LinkHandlerActivity import im.vector.riotx.features.login.LoginActivity @@ -116,6 +117,7 @@ interface ScreenComponent { fun inject(activity: DebugMenuActivity) fun inject(activity: SharedSecureStorageActivity) fun inject(activity: BigImageViewerActivity) + fun inject(activity: InviteUsersToRoomActivity) /* ========================================================================================== * BottomSheets diff --git a/vector/src/main/java/im/vector/riotx/core/platform/SimpleFragmentActivity.kt b/vector/src/main/java/im/vector/riotx/core/platform/SimpleFragmentActivity.kt index 58ec4b22c6..e8e8f21259 100644 --- a/vector/src/main/java/im/vector/riotx/core/platform/SimpleFragmentActivity.kt +++ b/vector/src/main/java/im/vector/riotx/core/platform/SimpleFragmentActivity.kt @@ -26,6 +26,7 @@ import im.vector.matrix.android.api.session.Session import im.vector.riotx.R import im.vector.riotx.core.di.ScreenComponent import im.vector.riotx.core.extensions.hideKeyboard +import io.reactivex.android.schedulers.AndroidSchedulers import kotlinx.android.synthetic.main.activity.* import javax.inject.Inject @@ -107,4 +108,15 @@ abstract class SimpleFragmentActivity : VectorBaseActivity() { } super.onBackPressed() } + + protected fun VectorViewModel<*, *, T>.observeViewEvents(observer: (T) -> Unit) { + viewEvents + .observe() + .observeOn(AndroidSchedulers.mainThread()) + .subscribe { + hideWaitingView() + observer(it) + } + .disposeOnDestroy() + } } diff --git a/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomAction.kt b/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomAction.kt new file mode 100644 index 0000000000..8a62935bdd --- /dev/null +++ b/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomAction.kt @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2020 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.riotx.features.invite + +import im.vector.matrix.android.api.session.user.model.User +import im.vector.riotx.core.platform.VectorViewModelAction + +sealed class InviteUsersToRoomAction : VectorViewModelAction { + data class InviteSelectedUsers(val selectedUsers: Set) : InviteUsersToRoomAction() +} diff --git a/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomActivity.kt b/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomActivity.kt new file mode 100644 index 0000000000..3998a9bfa5 --- /dev/null +++ b/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomActivity.kt @@ -0,0 +1,145 @@ +/* + * Copyright (c) 2020 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.riotx.features.invite + +import android.content.Context +import android.content.Intent +import android.os.Bundle +import android.os.Parcelable +import android.view.View +import androidx.appcompat.app.AlertDialog +import com.airbnb.mvrx.MvRx +import com.airbnb.mvrx.viewModel +import com.airbnb.mvrx.withState +import im.vector.matrix.android.api.failure.Failure +import im.vector.matrix.android.api.session.room.failure.CreateRoomFailure +import im.vector.riotx.R +import im.vector.riotx.core.di.ScreenComponent +import im.vector.riotx.core.error.ErrorFormatter +import im.vector.riotx.core.extensions.addFragment +import im.vector.riotx.core.extensions.addFragmentToBackstack +import im.vector.riotx.core.platform.SimpleFragmentActivity +import im.vector.riotx.core.platform.WaitingViewData +import im.vector.riotx.core.utils.toast +import im.vector.riotx.features.userdirectory.KnownUsersFragment +import im.vector.riotx.features.userdirectory.KnownUsersFragmentArgs +import im.vector.riotx.features.userdirectory.UserDirectoryFragment +import im.vector.riotx.features.userdirectory.UserDirectorySharedAction +import im.vector.riotx.features.userdirectory.UserDirectorySharedActionViewModel +import im.vector.riotx.features.userdirectory.UserDirectoryViewModel +import kotlinx.android.parcel.Parcelize +import kotlinx.android.synthetic.main.activity.* +import java.net.HttpURLConnection +import javax.inject.Inject + +@Parcelize +data class InviteUsersToRoomArgs(val roomId: String) : Parcelable + +class InviteUsersToRoomActivity : SimpleFragmentActivity() { + + private val viewModel: InviteUsersToRoomViewModel by viewModel() + private lateinit var sharedActionViewModel: UserDirectorySharedActionViewModel + @Inject lateinit var userDirectoryViewModelFactory: UserDirectoryViewModel.Factory + @Inject lateinit var inviteUsersToRoomViewModelFactory: InviteUsersToRoomViewModel.Factory + @Inject lateinit var errorFormatter: ErrorFormatter + + override fun injectWith(injector: ScreenComponent) { + super.injectWith(injector) + injector.inject(this) + } + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + + toolbar.visibility = View.GONE + sharedActionViewModel = viewModelProvider.get(UserDirectorySharedActionViewModel::class.java) + sharedActionViewModel + .observe() + .subscribe { sharedAction -> + when (sharedAction) { + UserDirectorySharedAction.OpenUsersDirectory -> + addFragmentToBackstack(R.id.container, UserDirectoryFragment::class.java) + UserDirectorySharedAction.Close -> finish() + UserDirectorySharedAction.GoBack -> onBackPressed() + is UserDirectorySharedAction.OnMenuItemSelected -> onMenuItemSelected(sharedAction) + } + } + .disposeOnDestroy() + if (isFirstCreation()) { + addFragment( + R.id.container, + KnownUsersFragment::class.java, + KnownUsersFragmentArgs( + title = getString(R.string.invite_users_to_room_title), + menuResId = R.menu.vector_invite_users_to_room + ) + ) + } + + viewModel.observeViewEvents { renderInviteEvents(it) } + } + + private fun onMenuItemSelected(action: UserDirectorySharedAction.OnMenuItemSelected) { + if (action.itemId == R.id.action_invite_users_to_room_invite) { + viewModel.handle(InviteUsersToRoomAction.InviteSelectedUsers(action.selectedUsers)) + } + } + + private fun renderInviteEvents(viewEvent: InviteUsersToRoomViewEvents) { + when (viewEvent) { + is InviteUsersToRoomViewEvents.Loading -> renderInviteLoading() + is InviteUsersToRoomViewEvents.Success -> renderInvitationSuccess() + is InviteUsersToRoomViewEvents.Failure -> renderInviteFailure(viewEvent.throwable) + } + } + + private fun renderInviteLoading() { + updateWaitingView(WaitingViewData(getString(R.string.inviting_users_to_room))) + } + + private fun renderInviteFailure(error: Throwable) { + hideWaitingView() + if (error is CreateRoomFailure.CreatedWithTimeout) { + finish() + } else { + val message = if (error is Failure.ServerError && error.httpCode == HttpURLConnection.HTTP_INTERNAL_ERROR /*500*/) { + // This error happen if the invited userId does not exist. + getString(R.string.invite_users_to_room_failure) + } else { + errorFormatter.toHumanReadable(error) + } + AlertDialog.Builder(this) + .setMessage(message) + .setPositiveButton(R.string.ok, null) + .show() + } + } + + private fun renderInvitationSuccess() = withState(viewModel) { + toast(R.string.invitations_sent_successfully) + finish() + } + + companion object { + + fun getIntent(context: Context, roomId: String): Intent { + return Intent(context, InviteUsersToRoomActivity::class.java).also { + it.putExtra(MvRx.KEY_ARG, InviteUsersToRoomArgs(roomId)) + } + } + } +} diff --git a/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomViewEvents.kt b/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomViewEvents.kt new file mode 100644 index 0000000000..b4ecfc5a52 --- /dev/null +++ b/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomViewEvents.kt @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2020 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.riotx.features.invite + +import im.vector.riotx.core.platform.VectorViewEvents + +sealed class InviteUsersToRoomViewEvents : VectorViewEvents { + object Loading : InviteUsersToRoomViewEvents() + data class Failure(val throwable: Throwable) : InviteUsersToRoomViewEvents() + object Success : InviteUsersToRoomViewEvents() +} diff --git a/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomViewModel.kt b/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomViewModel.kt new file mode 100644 index 0000000000..554a64d33c --- /dev/null +++ b/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomViewModel.kt @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2020 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.riotx.features.invite + +import com.airbnb.mvrx.ActivityViewModelContext +import com.airbnb.mvrx.MvRxViewModelFactory +import com.airbnb.mvrx.ViewModelContext +import com.squareup.inject.assisted.Assisted +import com.squareup.inject.assisted.AssistedInject +import im.vector.matrix.android.api.session.Session +import im.vector.matrix.android.api.session.user.model.User +import im.vector.matrix.rx.rx +import im.vector.riotx.core.platform.VectorViewModel +import io.reactivex.Observable + +class InviteUsersToRoomViewModel @AssistedInject constructor(@Assisted + initialState: InviteUsersToRoomViewState, + session: Session) + : VectorViewModel(initialState) { + + private val room = session.getRoom(initialState.roomId)!! + + @AssistedInject.Factory + interface Factory { + fun create(initialState: InviteUsersToRoomViewState): InviteUsersToRoomViewModel + } + + companion object : MvRxViewModelFactory { + + @JvmStatic + override fun create(viewModelContext: ViewModelContext, state: InviteUsersToRoomViewState): InviteUsersToRoomViewModel? { + val activity: InviteUsersToRoomActivity = (viewModelContext as ActivityViewModelContext).activity() + return activity.inviteUsersToRoomViewModelFactory.create(state) + } + } + + override fun handle(action: InviteUsersToRoomAction) { + when (action) { + is InviteUsersToRoomAction.InviteSelectedUsers -> inviteUsersToRoom(action.selectedUsers) + } + } + + private fun inviteUsersToRoom(selectedUsers: Set) { + _viewEvents.post(InviteUsersToRoomViewEvents.Loading) + + Observable.fromIterable(selectedUsers).flatMapCompletable { user -> + room.rx().invite(user.userId, null) + }.subscribe( + { + _viewEvents.post(InviteUsersToRoomViewEvents.Success) + }, + { + _viewEvents.post(InviteUsersToRoomViewEvents.Failure(it)) + }).disposeOnClear() + } +} diff --git a/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomViewState.kt b/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomViewState.kt new file mode 100644 index 0000000000..e0c3ec24a3 --- /dev/null +++ b/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomViewState.kt @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2020 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.riotx.features.invite + +import com.airbnb.mvrx.Async +import com.airbnb.mvrx.MvRxState +import com.airbnb.mvrx.Uninitialized + +data class InviteUsersToRoomViewState( + val roomId: String, + val inviteState: Async = Uninitialized +) : MvRxState { + + constructor(args: InviteUsersToRoomArgs) : this(roomId = args.roomId) +} diff --git a/vector/src/main/java/im/vector/riotx/features/navigation/DefaultNavigator.kt b/vector/src/main/java/im/vector/riotx/features/navigation/DefaultNavigator.kt index 0f19a1292a..cb2adfc6b3 100644 --- a/vector/src/main/java/im/vector/riotx/features/navigation/DefaultNavigator.kt +++ b/vector/src/main/java/im/vector/riotx/features/navigation/DefaultNavigator.kt @@ -41,6 +41,7 @@ import im.vector.riotx.features.debug.DebugMenuActivity import im.vector.riotx.features.home.room.detail.RoomDetailActivity import im.vector.riotx.features.home.room.detail.RoomDetailArgs import im.vector.riotx.features.home.room.filtered.FilteredRoomsActivity +import im.vector.riotx.features.invite.InviteUsersToRoomActivity import im.vector.riotx.features.media.BigImageViewerActivity import im.vector.riotx.features.roomdirectory.RoomDirectoryActivity import im.vector.riotx.features.roomdirectory.createroom.CreateRoomActivity @@ -163,6 +164,11 @@ class DefaultNavigator @Inject constructor( context.startActivity(intent) } + override fun openInviteUsersToRoom(context: Context, roomId: String) { + val intent = InviteUsersToRoomActivity.getIntent(context, roomId) + context.startActivity(intent) + } + override fun openRoomsFiltering(context: Context) { val intent = FilteredRoomsActivity.newIntent(context) context.startActivity(intent) diff --git a/vector/src/main/java/im/vector/riotx/features/navigation/Navigator.kt b/vector/src/main/java/im/vector/riotx/features/navigation/Navigator.kt index bf99643912..cc8e7cac34 100644 --- a/vector/src/main/java/im/vector/riotx/features/navigation/Navigator.kt +++ b/vector/src/main/java/im/vector/riotx/features/navigation/Navigator.kt @@ -46,6 +46,8 @@ interface Navigator { fun openCreateDirectRoom(context: Context) + fun openInviteUsersToRoom(context: Context, roomId: String) + fun openRoomDirectory(context: Context, initialFilter: String = "") fun openRoomsFiltering(context: Context) diff --git a/vector/src/main/java/im/vector/riotx/features/roomprofile/members/RoomMemberListFragment.kt b/vector/src/main/java/im/vector/riotx/features/roomprofile/members/RoomMemberListFragment.kt index 2fbcf705fb..8a08cbae8a 100644 --- a/vector/src/main/java/im/vector/riotx/features/roomprofile/members/RoomMemberListFragment.kt +++ b/vector/src/main/java/im/vector/riotx/features/roomprofile/members/RoomMemberListFragment.kt @@ -49,7 +49,7 @@ class RoomMemberListFragment @Inject constructor( override fun onOptionsItemSelected(item: MenuItem): Boolean { when (item.itemId) { R.id.menu_room_member_list_add_member -> { - navigator.openCreateDirectRoom(requireContext()) + navigator.openInviteUsersToRoom(requireContext(), roomProfileArgs.roomId) return true } } diff --git a/vector/src/main/java/im/vector/riotx/features/userdirectory/KnownUsersFragment.kt b/vector/src/main/java/im/vector/riotx/features/userdirectory/KnownUsersFragment.kt index fe8b4ac6c0..c9f97e69fe 100644 --- a/vector/src/main/java/im/vector/riotx/features/userdirectory/KnownUsersFragment.kt +++ b/vector/src/main/java/im/vector/riotx/features/userdirectory/KnownUsersFragment.kt @@ -23,6 +23,7 @@ import android.view.View import android.widget.ScrollView import androidx.core.view.forEach import com.airbnb.mvrx.activityViewModel +import com.airbnb.mvrx.args import com.airbnb.mvrx.withState import com.google.android.material.chip.Chip import com.jakewharton.rxbinding3.widget.textChanges @@ -43,6 +44,8 @@ class KnownUsersFragment @Inject constructor( private val dimensionConverter: DimensionConverter ) : VectorBaseFragment(), KnownUsersController.Callback { + private val args: KnownUsersFragmentArgs by args() + override fun getLayoutResId() = R.layout.fragment_known_users override fun getMenuRes() = withState(viewModel) { @@ -55,6 +58,9 @@ class KnownUsersFragment @Inject constructor( override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) sharedActionViewModel = activityViewModelProvider.get(UserDirectorySharedActionViewModel::class.java) + + knownUsersTitle.text = args.title + vectorBaseActivity.setSupportActionBar(knownUsersToolbar) setupRecyclerView() setupFilterView() diff --git a/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryViewModel.kt b/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryViewModel.kt index 67cfa1c1f7..0253e47763 100644 --- a/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryViewModel.kt +++ b/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryViewModel.kt @@ -31,6 +31,7 @@ import im.vector.matrix.rx.rx import im.vector.riotx.core.extensions.toggle import im.vector.riotx.core.platform.VectorViewModel import im.vector.riotx.features.createdirect.CreateDirectRoomActivity +import im.vector.riotx.features.invite.InviteUsersToRoomActivity import io.reactivex.Single import io.reactivex.android.schedulers.AndroidSchedulers import java.util.concurrent.TimeUnit @@ -59,6 +60,7 @@ class UserDirectoryViewModel @AssistedInject constructor(@Assisted is ActivityViewModelContext -> { when (viewModelContext.activity()) { is CreateDirectRoomActivity -> viewModelContext.activity().userDirectoryViewModelFactory.create(state) + is InviteUsersToRoomActivity -> viewModelContext.activity().userDirectoryViewModelFactory.create(state) else -> error("Wrong activity or fragment") } } diff --git a/vector/src/main/res/menu/vector_invite_users_to_room.xml b/vector/src/main/res/menu/vector_invite_users_to_room.xml new file mode 100755 index 0000000000..2e799b5c03 --- /dev/null +++ b/vector/src/main/res/menu/vector_invite_users_to_room.xml @@ -0,0 +1,10 @@ + + + + + + diff --git a/vector/src/main/res/values/strings_riotX.xml b/vector/src/main/res/values/strings_riotX.xml index fac7795a34..861a0426fc 100644 --- a/vector/src/main/res/values/strings_riotX.xml +++ b/vector/src/main/res/values/strings_riotX.xml @@ -37,6 +37,11 @@ Double-check this link The link %1$s is taking you to another site: %2$s.\n\nAre you sure you want to continue? Add members + INVITE + Inviting users… + Invite Users + Invitation sent successfully + We could not invite users. Please check the users you want to invite and try again. From 5dc50195b336e2e444f4ceaf2af12806b5af7db4 Mon Sep 17 00:00:00 2001 From: onurays Date: Thu, 30 Apr 2020 15:28:20 +0300 Subject: [PATCH 005/156] Filter existing room members. --- .../src/main/java/im/vector/matrix/rx/RxSession.kt | 4 ++-- .../vector/matrix/android/api/session/user/UserService.kt | 2 +- .../android/internal/session/user/DefaultUserService.kt | 5 ++++- .../riotx/features/invite/InviteUsersToRoomActivity.kt | 3 ++- .../riotx/features/invite/InviteUsersToRoomViewModel.kt | 4 ++++ .../features/userdirectory/KnownUsersFragmentArgs.kt | 3 ++- .../features/userdirectory/UserDirectoryViewModel.kt | 8 ++++---- .../features/userdirectory/UserDirectoryViewState.kt | 3 ++- 8 files changed, 21 insertions(+), 11 deletions(-) diff --git a/matrix-sdk-android-rx/src/main/java/im/vector/matrix/rx/RxSession.kt b/matrix-sdk-android-rx/src/main/java/im/vector/matrix/rx/RxSession.kt index 87ff6f0390..dc95a3e40d 100644 --- a/matrix-sdk-android-rx/src/main/java/im/vector/matrix/rx/RxSession.kt +++ b/matrix-sdk-android-rx/src/main/java/im/vector/matrix/rx/RxSession.kt @@ -81,8 +81,8 @@ class RxSession(private val session: Session) { return session.getIgnoredUsersLive().asObservable() } - fun livePagedUsers(filter: String? = null): Observable> { - return session.getPagedUsersLive(filter).asObservable() + fun livePagedUsers(filter: String? = null, excludedUserIds: Set? = null): Observable> { + return session.getPagedUsersLive(filter, excludedUserIds).asObservable() } fun createRoom(roomParams: CreateRoomParams): Single = singleBuilder { diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/session/user/UserService.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/session/user/UserService.kt index 453400bc99..6a0d00fb4e 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/session/user/UserService.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/session/user/UserService.kt @@ -63,7 +63,7 @@ interface UserService { * @param filter the filter. It will look into userId and displayName. * @return a Livedata of users */ - fun getPagedUsersLive(filter: String? = null): LiveData> + fun getPagedUsersLive(filter: String? = null, excludedUserIds: Set? = null): LiveData> /** * Get list of ignored users diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/user/DefaultUserService.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/user/DefaultUserService.kt index 761c810b41..3a5d524347 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/user/DefaultUserService.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/user/DefaultUserService.kt @@ -91,7 +91,7 @@ internal class DefaultUserService @Inject constructor(private val monarchy: Mona ) } - override fun getPagedUsersLive(filter: String?): LiveData> { + override fun getPagedUsersLive(filter: String?, excludedUserIds: Set?): LiveData> { realmDataSourceFactory.updateQuery { realm -> val query = realm.where(UserEntity::class.java) if (filter.isNullOrEmpty()) { @@ -104,6 +104,9 @@ internal class DefaultUserService @Inject constructor(private val monarchy: Mona .contains(UserEntityFields.USER_ID, filter) .endGroup() } + excludedUserIds?.let { + query.not().`in`(UserEntityFields.USER_ID, it.toTypedArray()) + } query.sort(UserEntityFields.DISPLAY_NAME) } return monarchy.findAllPagedWithChanges(realmDataSourceFactory, livePagedListBuilder) diff --git a/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomActivity.kt b/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomActivity.kt index 3998a9bfa5..f687fe75cf 100644 --- a/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomActivity.kt +++ b/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomActivity.kt @@ -85,7 +85,8 @@ class InviteUsersToRoomActivity : SimpleFragmentActivity() { KnownUsersFragment::class.java, KnownUsersFragmentArgs( title = getString(R.string.invite_users_to_room_title), - menuResId = R.menu.vector_invite_users_to_room + menuResId = R.menu.vector_invite_users_to_room, + excludedUserIds = viewModel.getUserIdsOfRoomMembers() ) ) } diff --git a/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomViewModel.kt b/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomViewModel.kt index 554a64d33c..78d968c733 100644 --- a/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomViewModel.kt +++ b/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomViewModel.kt @@ -67,4 +67,8 @@ class InviteUsersToRoomViewModel @AssistedInject constructor(@Assisted _viewEvents.post(InviteUsersToRoomViewEvents.Failure(it)) }).disposeOnClear() } + + fun getUserIdsOfRoomMembers(): Set { + return room.roomSummary()?.otherMemberIds?.toSet() ?: emptySet() + } } diff --git a/vector/src/main/java/im/vector/riotx/features/userdirectory/KnownUsersFragmentArgs.kt b/vector/src/main/java/im/vector/riotx/features/userdirectory/KnownUsersFragmentArgs.kt index 2003f085d4..34f1eb826b 100644 --- a/vector/src/main/java/im/vector/riotx/features/userdirectory/KnownUsersFragmentArgs.kt +++ b/vector/src/main/java/im/vector/riotx/features/userdirectory/KnownUsersFragmentArgs.kt @@ -22,5 +22,6 @@ import kotlinx.android.parcel.Parcelize @Parcelize data class KnownUsersFragmentArgs( val title: String, - val menuResId: Int? = null + val menuResId: Int? = null, + val excludedUserIds: Set? = null ) : Parcelable diff --git a/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryViewModel.kt b/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryViewModel.kt index 0253e47763..3111a86bf7 100644 --- a/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryViewModel.kt +++ b/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryViewModel.kt @@ -96,7 +96,7 @@ class UserDirectoryViewModel @AssistedInject constructor(@Assisted setState { copy(selectedUsers = selectedUsers) } } - private fun observeDirectoryUsers() { + private fun observeDirectoryUsers() = withState { state -> directoryUsersSearch .debounce(300, TimeUnit.MILLISECONDS) .switchMapSingle { search -> @@ -104,7 +104,7 @@ class UserDirectoryViewModel @AssistedInject constructor(@Assisted Single.just(emptyList()) } else { session.rx() - .searchUsersDirectory(search, 50, emptySet()) + .searchUsersDirectory(search, 50, state.excludedUserIds ?: emptySet()) .map { users -> users.sortedBy { it.toMatrixItem().firstLetterOfDisplayName() } } @@ -117,12 +117,12 @@ class UserDirectoryViewModel @AssistedInject constructor(@Assisted .disposeOnClear() } - private fun observeKnownUsers() { + private fun observeKnownUsers() = withState { state -> knownUsersFilter .throttleLast(300, TimeUnit.MILLISECONDS) .observeOn(AndroidSchedulers.mainThread()) .switchMap { - session.rx().livePagedUsers(it.orNull()) + session.rx().livePagedUsers(it.orNull(), state.excludedUserIds) } .execute { async -> copy( diff --git a/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryViewState.kt b/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryViewState.kt index b5920aa695..76abad5a00 100644 --- a/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryViewState.kt +++ b/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryViewState.kt @@ -24,6 +24,7 @@ import com.airbnb.mvrx.Uninitialized import im.vector.matrix.android.api.session.user.model.User data class UserDirectoryViewState( + val excludedUserIds: Set? = null, val knownUsers: Async> = Uninitialized, val directoryUsers: Async> = Uninitialized, val selectedUsers: Set = emptySet(), @@ -34,7 +35,7 @@ data class UserDirectoryViewState( val menuResId: Int? ) : MvRxState { - constructor(args: KnownUsersFragmentArgs) : this(title = args.title, menuResId = args.menuResId) + constructor(args: KnownUsersFragmentArgs) : this(title = args.title, menuResId = args.menuResId, excludedUserIds = args.excludedUserIds) enum class DisplayMode { KNOWN_USERS, From 0aeb32706228355277a75fa3aa6ff0dea927b5e5 Mon Sep 17 00:00:00 2001 From: onurays Date: Thu, 30 Apr 2020 15:40:02 +0300 Subject: [PATCH 006/156] Changelog added. --- CHANGES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 550d013ba3..87645fad10 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -28,6 +28,7 @@ Improvements 🙌: - Restart broken Olm sessions ([MSC1719](https://github.com/matrix-org/matrix-doc/pull/1719)) - Cross-Signing | Hide Use recovery key when 4S is not setup (#1007) - Cross-Signing | Trust account xSigning keys by entering Recovery Key (select file or copy) #1199 + - Invite member(s) to an existing room #1276 Bugfix 🐛: - Fix summary notification staying after "mark as read" @@ -49,6 +50,7 @@ Translations 🗣: SDK API changes ⚠️: - Increase targetSdkVersion to 29 + - excludedUserIds parameter add to to UserService.getPagedUsersLive() function Build 🧱: - Compile with Android SDK 29 (Android Q) From cf5d89ea9b9e703f5c28cb1f237502c2670df684 Mon Sep 17 00:00:00 2001 From: onurays Date: Thu, 30 Apr 2020 15:40:54 +0300 Subject: [PATCH 007/156] Documentation added for new parameter excludedUserIds. --- .../im/vector/matrix/android/api/session/user/UserService.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/session/user/UserService.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/session/user/UserService.kt index 6a0d00fb4e..1abda8ec05 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/session/user/UserService.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/session/user/UserService.kt @@ -61,6 +61,7 @@ interface UserService { /** * Observe a live [PagedList] of users sorted alphabetically. You can filter the users. * @param filter the filter. It will look into userId and displayName. + * @param excludedUserIds userId list which will be excluded from the result list. * @return a Livedata of users */ fun getPagedUsersLive(filter: String? = null, excludedUserIds: Set? = null): LiveData> From db18272ef2f05ce2fa96f75bbed33d63ccb5bbc0 Mon Sep 17 00:00:00 2001 From: onurays Date: Thu, 30 Apr 2020 15:47:31 +0300 Subject: [PATCH 008/156] Remove strings from strings_riotX.xml --- vector/src/main/res/values/strings.xml | 9 +++++++++ vector/src/main/res/values/strings_riotX.xml | 9 +-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/vector/src/main/res/values/strings.xml b/vector/src/main/res/values/strings.xml index 370b7cf8f4..8248e7e857 100644 --- a/vector/src/main/res/values/strings.xml +++ b/vector/src/main/res/values/strings.xml @@ -2336,4 +2336,13 @@ Not all features in Riot are implemented in RiotX yet. Main missing (and coming Could not add media file to the Gallery Set a new account password… + Double-check this link + The link %1$s is taking you to another site: %2$s.\n\nAre you sure you want to continue? + Add members + INVITE + Inviting users… + Invite Users + Invitation sent successfully + We could not invite users. Please check the users you want to invite and try again. + diff --git a/vector/src/main/res/values/strings_riotX.xml b/vector/src/main/res/values/strings_riotX.xml index 861a0426fc..56456aaf5d 100644 --- a/vector/src/main/res/values/strings_riotX.xml +++ b/vector/src/main/res/values/strings_riotX.xml @@ -34,14 +34,7 @@ - Double-check this link - The link %1$s is taking you to another site: %2$s.\n\nAre you sure you want to continue? - Add members - INVITE - Inviting users… - Invite Users - Invitation sent successfully - We could not invite users. Please check the users you want to invite and try again. + From c1c0c6f2c6c4188dedfa28a5e84b5af47dc2aa43 Mon Sep 17 00:00:00 2001 From: onurays Date: Mon, 4 May 2020 11:22:27 +0300 Subject: [PATCH 009/156] Lint fixes. --- .../vector/riotx/features/invite/InviteUsersToRoomViewModel.kt | 3 ++- vector/src/main/res/values/strings.xml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomViewModel.kt b/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomViewModel.kt index 78d968c733..7a01ab2baa 100644 --- a/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomViewModel.kt +++ b/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomViewModel.kt @@ -65,7 +65,8 @@ class InviteUsersToRoomViewModel @AssistedInject constructor(@Assisted }, { _viewEvents.post(InviteUsersToRoomViewEvents.Failure(it)) - }).disposeOnClear() + }) + .disposeOnClear() } fun getUserIdsOfRoomMembers(): Set { diff --git a/vector/src/main/res/values/strings.xml b/vector/src/main/res/values/strings.xml index 65f96e5f04..698448811f 100644 --- a/vector/src/main/res/values/strings.xml +++ b/vector/src/main/res/values/strings.xml @@ -2375,4 +2375,4 @@ Not all features in Riot are implemented in RiotX yet. Main missing (and coming Invitation sent successfully We could not invite users. Please check the users you want to invite and try again. - + \ No newline at end of file From 3a0eed795a405ec76dfe1d110409cc0be0b43317 Mon Sep 17 00:00:00 2001 From: onurays Date: Mon, 4 May 2020 12:09:36 +0300 Subject: [PATCH 010/156] Lint fix. --- vector/src/main/res/values/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/res/values/strings.xml b/vector/src/main/res/values/strings.xml index 698448811f..fb52976d3f 100644 --- a/vector/src/main/res/values/strings.xml +++ b/vector/src/main/res/values/strings.xml @@ -2367,7 +2367,7 @@ Not all features in Riot are implemented in RiotX yet. Main missing (and coming The link %1$s is taking you to another site: %2$s.\n\nAre you sure you want to continue? "We couldn't create your DM. Please check the users you want to invite and try again." - + Add members INVITE Inviting users… From 6843ea113ba0f139dd43fbed7bc74a13df98550a Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 4 May 2020 16:06:41 +0200 Subject: [PATCH 011/156] Version++ --- CHANGES.md | 24 ++++++++++++++++++++++++ vector/build.gradle | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 3d43096e69..f0cf30af2d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,27 @@ +Changes in RiotX 0.20.0 (2020-XX-XX) +=================================================== + +Features ✨: + - + +Improvements 🙌: + - + +Bugfix 🐛: + - + +Translations 🗣: + - + +SDK API changes ⚠️: + - + +Build 🧱: + - + +Other changes: + - + Changes in RiotX 0.19.0 (2020-05-04) =================================================== diff --git a/vector/build.gradle b/vector/build.gradle index 69608cf712..459b297fd6 100644 --- a/vector/build.gradle +++ b/vector/build.gradle @@ -15,7 +15,7 @@ androidExtensions { } ext.versionMajor = 0 -ext.versionMinor = 19 +ext.versionMinor = 20 ext.versionPatch = 0 static def getGitTimestamp() { From 4e2878300f537b1d6af2892618652d06d1188af3 Mon Sep 17 00:00:00 2001 From: upgradetofreedom Date: Mon, 4 May 2020 18:27:27 +0000 Subject: [PATCH 012/156] Translated using Weblate (German) Currently translated at 96.4% (1611 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index c452fbc901..bc1f299d02 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2354,4 +2354,7 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Kopier es in deinen persönlichen Cloud-Speicher Verschlüsselung ist nicht aktiviert - +Dies kann nicht von einem mobilen Gerät erfolgen + + Wenn sich Raumversionen ändern + From eb6546d81c8b34ccebd8432840c84047899a26a7 Mon Sep 17 00:00:00 2001 From: Alexander Eisele Date: Mon, 4 May 2020 18:28:34 +0000 Subject: [PATCH 013/156] Translated using Weblate (German) Currently translated at 96.4% (1611 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index bc1f299d02..cc95dae1d6 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2357,4 +2357,10 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Dies kann nicht von einem mobilen Gerät erfolgen Wenn sich Raumversionen ändern + Verschlüsselung aktiviert + Nachrichten in diesem Raum sind Ende-zu-Ende verschlüsselt. Erfahre mehr & verifiziere Benutzer in deren Profil. + Die Verschlüsselung in diesem Raum wird nicht unterstützt + + Warte auf %s... + From 423f21b02e739bbe6cc7291387eedc96a0d7b1a6 Mon Sep 17 00:00:00 2001 From: aWeinzierl Date: Mon, 4 May 2020 18:34:16 +0000 Subject: [PATCH 014/156] Translated using Weblate (German) Currently translated at 96.4% (1611 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index cc95dae1d6..d4cf414b6f 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2363,4 +2363,6 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Warte auf %s... + Lege eine %s fest + Fehlerbehebung From a4b8dc9400f10342f176f6f064be6127acd95f8e Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 5 May 2020 11:49:03 +0200 Subject: [PATCH 015/156] Fix test compilation issue --- .../internal/crypto/keysbackup/KeysBackupScenarioData.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/matrix-sdk-android/src/androidTest/java/im/vector/matrix/android/internal/crypto/keysbackup/KeysBackupScenarioData.kt b/matrix-sdk-android/src/androidTest/java/im/vector/matrix/android/internal/crypto/keysbackup/KeysBackupScenarioData.kt index f10f2fef0e..0270c34a37 100644 --- a/matrix-sdk-android/src/androidTest/java/im/vector/matrix/android/internal/crypto/keysbackup/KeysBackupScenarioData.kt +++ b/matrix-sdk-android/src/androidTest/java/im/vector/matrix/android/internal/crypto/keysbackup/KeysBackupScenarioData.kt @@ -19,13 +19,13 @@ package im.vector.matrix.android.internal.crypto.keysbackup import im.vector.matrix.android.api.session.Session import im.vector.matrix.android.common.CommonTestHelper import im.vector.matrix.android.common.CryptoTestData -import im.vector.matrix.android.internal.crypto.model.OlmInboundGroupSessionWrapper +import im.vector.matrix.android.internal.crypto.model.OlmInboundGroupSessionWrapper2 /** * Data class to store result of [KeysBackupTestHelper.createKeysBackupScenarioWithPassword] */ data class KeysBackupScenarioData(val cryptoTestData: CryptoTestData, - val aliceKeys: List, + val aliceKeys: List, val prepareKeysBackupDataResult: PrepareKeysBackupDataResult, val aliceSession2: Session) { fun cleanUp(testHelper: CommonTestHelper) { From 4306cb781247df294e18e89e8948711e31ec55cd Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 5 May 2020 12:08:19 +0200 Subject: [PATCH 016/156] Upgrade build tools version (SDK 29) --- tools/release/sign_apk_unsafe.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/release/sign_apk_unsafe.sh b/tools/release/sign_apk_unsafe.sh index 022f3618eb..bf021e8345 100755 --- a/tools/release/sign_apk_unsafe.sh +++ b/tools/release/sign_apk_unsafe.sh @@ -23,7 +23,7 @@ PARAM_KS_PASS=$3 PARAM_KEY_PASS=$4 # Other params -BUILD_TOOLS_VERSION="28.0.3" +BUILD_TOOLS_VERSION="29.0.3" MIN_SDK_VERSION=19 echo "Signing APK with build-tools version ${BUILD_TOOLS_VERSION} for min SDK version ${MIN_SDK_VERSION}..." From 5fcf54cd573aec56d5489ee7ce86fe72a3db0fbf Mon Sep 17 00:00:00 2001 From: Alexander Eisele Date: Mon, 4 May 2020 18:43:44 +0000 Subject: [PATCH 017/156] Translated using Weblate (German) Currently translated at 96.5% (1613 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index d4cf414b6f..7ee6a37ea6 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2365,4 +2365,7 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Lege eine %s fest Fehlerbehebung + %s hat den Raum erstellt und konfiguriert. + + Fast geschaft! Zeigt das andere Gerät dasselbe Schild an\? From deb783f797cf1b1bfcca3c2418a1b46a2f2a3738 Mon Sep 17 00:00:00 2001 From: n3niu Date: Tue, 5 May 2020 13:27:57 +0000 Subject: [PATCH 018/156] Translated using Weblate (German) Currently translated at 96.5% (1613 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 7ee6a37ea6..1adf39f81d 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2363,7 +2363,7 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Warte auf %s... - Lege eine %s fest + %s setzen Fehlerbehebung %s hat den Raum erstellt und konfiguriert. From b2f3ba220e8269e4a7e147975533801dc3b3cb2e Mon Sep 17 00:00:00 2001 From: Christopher Rossbach Date: Tue, 5 May 2020 13:34:25 +0000 Subject: [PATCH 019/156] Translated using Weblate (German) Currently translated at 96.5% (1614 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 1adf39f81d..bb7d9c18b9 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2367,5 +2367,5 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Fehlerbehebung %s hat den Raum erstellt und konfiguriert. - Fast geschaft! Zeigt das andere Gerät dasselbe Schild an\? + Fast geschaft! Zeigt das andere Gerät das gleiche Schild an\? From ac5db838803caf4acf023b1bee0777e0f6cee0f4 Mon Sep 17 00:00:00 2001 From: Alexander Eisele Date: Tue, 5 May 2020 13:35:03 +0000 Subject: [PATCH 020/156] Translated using Weblate (German) Currently translated at 96.5% (1614 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/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 bb7d9c18b9..79b245ff3d 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2368,4 +2368,5 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine %s hat den Raum erstellt und konfiguriert. Fast geschaft! Zeigt das andere Gerät das gleiche Schild an\? + Fast geschaft! Warte auf Bestätigung... From 1491bddb3b43f6fc550b60f514658b3491011ce3 Mon Sep 17 00:00:00 2001 From: Dirmin Date: Tue, 5 May 2020 08:17:45 +0000 Subject: [PATCH 021/156] Translated using Weblate (French) Currently translated at 100.0% (1672 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/fr/ --- vector/src/main/res/values-fr/strings.xml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/vector/src/main/res/values-fr/strings.xml b/vector/src/main/res/values-fr/strings.xml index 190d781f2a..34434242ff 100644 --- a/vector/src/main/res/values-fr/strings.xml +++ b/vector/src/main/res/values-fr/strings.xml @@ -2,7 +2,8 @@ - fr + utiliser pour récupérer la liste des langues prises en charge +\ndoit avoir la même valeur que le nom FR Messages @@ -588,8 +589,8 @@ Veuillez noter que cette action redémarrera l’application et pourra prendre u Vous n’aurez aucune adresse principale spécifiée pour ce salon. Le chiffrement est activé sur ce salon. Le chiffrement est désactivé sur ce salon. - Activer le chiffrement -(attention : ne peut pas être désactivé ensuite !) + Activer le chiffrement +\n(attention : ne peut pas être désactivé ensuite !) %s a essayé de charger un point précis dans l’historique du salon mais ne l’a pas trouvé. From c7c6cf70e47c497030c76e0142634102ba882538 Mon Sep 17 00:00:00 2001 From: onurays Date: Wed, 6 May 2020 11:20:08 +0300 Subject: [PATCH 022/156] Code review fixes. --- .../session/user/DefaultUserService.kt | 8 ++++--- .../invite/InviteUsersToRoomActivity.kt | 21 +++++++------------ .../userdirectory/KnownUsersFragment.kt | 4 +--- .../userdirectory/KnownUsersFragmentArgs.kt | 2 +- .../userdirectory/UserDirectoryViewEvents.kt | 2 +- .../userdirectory/UserDirectoryViewState.kt | 11 ++-------- 6 files changed, 18 insertions(+), 30 deletions(-) diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/user/DefaultUserService.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/user/DefaultUserService.kt index 3a5d524347..7cd2f1b743 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/user/DefaultUserService.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/user/DefaultUserService.kt @@ -104,9 +104,11 @@ internal class DefaultUserService @Inject constructor(private val monarchy: Mona .contains(UserEntityFields.USER_ID, filter) .endGroup() } - excludedUserIds?.let { - query.not().`in`(UserEntityFields.USER_ID, it.toTypedArray()) - } + excludedUserIds + ?.takeIf { it.isNotEmpty() } + ?.let { + query.not().`in`(UserEntityFields.USER_ID, it.toTypedArray()) + } query.sort(UserEntityFields.DISPLAY_NAME) } return monarchy.findAllPagedWithChanges(realmDataSourceFactory, livePagedListBuilder) diff --git a/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomActivity.kt b/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomActivity.kt index f687fe75cf..08d2653ca9 100644 --- a/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomActivity.kt +++ b/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomActivity.kt @@ -26,7 +26,6 @@ import com.airbnb.mvrx.MvRx import com.airbnb.mvrx.viewModel import com.airbnb.mvrx.withState import im.vector.matrix.android.api.failure.Failure -import im.vector.matrix.android.api.session.room.failure.CreateRoomFailure import im.vector.riotx.R import im.vector.riotx.core.di.ScreenComponent import im.vector.riotx.core.error.ErrorFormatter @@ -114,20 +113,16 @@ class InviteUsersToRoomActivity : SimpleFragmentActivity() { private fun renderInviteFailure(error: Throwable) { hideWaitingView() - if (error is CreateRoomFailure.CreatedWithTimeout) { - finish() + val message = if (error is Failure.ServerError && error.httpCode == HttpURLConnection.HTTP_INTERNAL_ERROR /*500*/) { + // This error happen if the invited userId does not exist. + getString(R.string.invite_users_to_room_failure) } else { - val message = if (error is Failure.ServerError && error.httpCode == HttpURLConnection.HTTP_INTERNAL_ERROR /*500*/) { - // This error happen if the invited userId does not exist. - getString(R.string.invite_users_to_room_failure) - } else { - errorFormatter.toHumanReadable(error) - } - AlertDialog.Builder(this) - .setMessage(message) - .setPositiveButton(R.string.ok, null) - .show() + errorFormatter.toHumanReadable(error) } + AlertDialog.Builder(this) + .setMessage(message) + .setPositiveButton(R.string.ok, null) + .show() } private fun renderInvitationSuccess() = withState(viewModel) { diff --git a/vector/src/main/java/im/vector/riotx/features/userdirectory/KnownUsersFragment.kt b/vector/src/main/java/im/vector/riotx/features/userdirectory/KnownUsersFragment.kt index c9f97e69fe..78482e0b54 100644 --- a/vector/src/main/java/im/vector/riotx/features/userdirectory/KnownUsersFragment.kt +++ b/vector/src/main/java/im/vector/riotx/features/userdirectory/KnownUsersFragment.kt @@ -48,9 +48,7 @@ class KnownUsersFragment @Inject constructor( override fun getLayoutResId() = R.layout.fragment_known_users - override fun getMenuRes() = withState(viewModel) { - return@withState it.menuResId ?: -1 - } + override fun getMenuRes() = args.menuResId private val viewModel: UserDirectoryViewModel by activityViewModel() private lateinit var sharedActionViewModel: UserDirectorySharedActionViewModel diff --git a/vector/src/main/java/im/vector/riotx/features/userdirectory/KnownUsersFragmentArgs.kt b/vector/src/main/java/im/vector/riotx/features/userdirectory/KnownUsersFragmentArgs.kt index 34f1eb826b..9e87633608 100644 --- a/vector/src/main/java/im/vector/riotx/features/userdirectory/KnownUsersFragmentArgs.kt +++ b/vector/src/main/java/im/vector/riotx/features/userdirectory/KnownUsersFragmentArgs.kt @@ -22,6 +22,6 @@ import kotlinx.android.parcel.Parcelize @Parcelize data class KnownUsersFragmentArgs( val title: String, - val menuResId: Int? = null, + val menuResId: Int, val excludedUserIds: Set? = null ) : Parcelable diff --git a/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryViewEvents.kt b/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryViewEvents.kt index 8673e55622..435fce8b16 100644 --- a/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryViewEvents.kt +++ b/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryViewEvents.kt @@ -19,6 +19,6 @@ package im.vector.riotx.features.userdirectory import im.vector.riotx.core.platform.VectorViewEvents /** - * Transient events for create direct room screen + * Transient events for invite users to room screen */ sealed class UserDirectoryViewEvents : VectorViewEvents diff --git a/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryViewState.kt b/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryViewState.kt index 76abad5a00..52f92a9994 100644 --- a/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryViewState.kt +++ b/vector/src/main/java/im/vector/riotx/features/userdirectory/UserDirectoryViewState.kt @@ -30,15 +30,8 @@ data class UserDirectoryViewState( val selectedUsers: Set = emptySet(), val createAndInviteState: Async = Uninitialized, val directorySearchTerm: String = "", - val filterKnownUsersValue: Option = Option.empty(), - val title: String, - val menuResId: Int? + val filterKnownUsersValue: Option = Option.empty() ) : MvRxState { - constructor(args: KnownUsersFragmentArgs) : this(title = args.title, menuResId = args.menuResId, excludedUserIds = args.excludedUserIds) - - enum class DisplayMode { - KNOWN_USERS, - DIRECTORY_USERS - } + constructor(args: KnownUsersFragmentArgs) : this(excludedUserIds = args.excludedUserIds) } From cee8ae3af4ff0cbd0122ee0f267b3a8b7e90426e Mon Sep 17 00:00:00 2001 From: Valere Date: Wed, 6 May 2020 14:43:53 +0200 Subject: [PATCH 023/156] Fix #1329 + migration to remove duplicate --- .../internal/crypto/DefaultCryptoService.kt | 2 +- .../actions/SetDeviceVerificationAction.kt | 2 +- .../internal/crypto/store/IMXCryptoStore.kt | 10 +------ .../crypto/store/db/RealmCryptoStore.kt | 27 ++----------------- .../store/db/RealmCryptoStoreMigration.kt | 22 ++++++++++++++- 5 files changed, 26 insertions(+), 37 deletions(-) diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/DefaultCryptoService.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/DefaultCryptoService.kt index 1d3c0f4dcd..d529cf4ae5 100755 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/DefaultCryptoService.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/DefaultCryptoService.kt @@ -446,7 +446,7 @@ internal class DefaultCryptoService @Inject constructor( } override fun getCryptoDeviceInfo(userId: String): List { - return cryptoStore.getUserDevices(userId)?.map { it.value }?.sortedBy { it.deviceId } ?: emptyList() + return cryptoStore.getUserDeviceList(userId) ?: emptyList() } override fun getLiveCryptoDeviceInfo(): LiveData> { diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/actions/SetDeviceVerificationAction.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/actions/SetDeviceVerificationAction.kt index d6538f041d..d9fa8d5955 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/actions/SetDeviceVerificationAction.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/actions/SetDeviceVerificationAction.kt @@ -48,7 +48,7 @@ internal class SetDeviceVerificationAction @Inject constructor( if (device.trustLevel != trustLevel) { device.trustLevel = trustLevel - cryptoStore.storeUserDevice(userId, device) + cryptoStore.setDeviceTrust(userId, deviceId, trustLevel.crossSigningVerified, trustLevel.locallyVerified) } } } diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/store/IMXCryptoStore.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/store/IMXCryptoStore.kt index 888e436ea0..69f0985391 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/store/IMXCryptoStore.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/store/IMXCryptoStore.kt @@ -164,14 +164,6 @@ internal interface IMXCryptoStore { */ fun saveOlmAccount() - /** - * Store a device for a user. - * - * @param userId the user's id. - * @param device the device to store. - */ - fun storeUserDevice(userId: String?, deviceInfo: CryptoDeviceInfo?) - /** * Retrieve a device for a user. * @@ -415,7 +407,7 @@ internal interface IMXCryptoStore { fun getKeyBackupRecoveryKeyInfo() : SavedKeyBackupKeyInfo? fun setUserKeysAsTrusted(userId: String, trusted: Boolean = true) - fun setDeviceTrust(userId: String, deviceId: String, crossSignedVerified: Boolean, locallyVerified: Boolean) + fun setDeviceTrust(userId: String, deviceId: String, crossSignedVerified: Boolean, locallyVerified: Boolean?) fun clearOtherUserTrust() diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/store/db/RealmCryptoStore.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/store/db/RealmCryptoStore.kt index ac7f00b531..17f049512c 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/store/db/RealmCryptoStore.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/store/db/RealmCryptoStore.kt @@ -233,29 +233,6 @@ internal class RealmCryptoStore @Inject constructor( return olmAccount!! } - override fun storeUserDevice(userId: String?, deviceInfo: CryptoDeviceInfo?) { - if (userId == null || deviceInfo == null) { - return - } - - doRealmTransaction(realmConfiguration) { realm -> - val user = UserEntity.getOrCreate(realm, userId) - - // Create device info - val deviceInfoEntity = CryptoMapper.mapToEntity(deviceInfo) - realm.insertOrUpdate(deviceInfoEntity) -// val deviceInfoEntity = DeviceInfoEntity.getOrCreate(it, userId, deviceInfo.deviceId).apply { -// deviceId = deviceInfo.deviceId -// identityKey = deviceInfo.identityKey() -// putDeviceInfo(deviceInfo) -// } - - if (!user.devices.contains(deviceInfoEntity)) { - user.devices.add(deviceInfoEntity) - } - } - } - override fun getUserDevice(userId: String, deviceId: String): CryptoDeviceInfo? { return doWithRealm(realmConfiguration) { it.where() @@ -1276,7 +1253,7 @@ internal class RealmCryptoStore @Inject constructor( } } - override fun setDeviceTrust(userId: String, deviceId: String, crossSignedVerified: Boolean, locallyVerified: Boolean) { + override fun setDeviceTrust(userId: String, deviceId: String, crossSignedVerified: Boolean, locallyVerified: Boolean?) { doRealmTransaction(realmConfiguration) { realm -> realm.where(DeviceInfoEntity::class.java) .equalTo(DeviceInfoEntityFields.PRIMARY_KEY, DeviceInfoEntity.createPrimaryKey(userId, deviceId)) @@ -1289,7 +1266,7 @@ internal class RealmCryptoStore @Inject constructor( deviceInfoEntity.trustLevelEntity = it } } else { - trustEntity.locallyVerified = locallyVerified + locallyVerified?.let { trustEntity.locallyVerified = it } trustEntity.crossSignedVerified = crossSignedVerified } } diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/store/db/RealmCryptoStoreMigration.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/store/db/RealmCryptoStoreMigration.kt index c604250be7..2a55fa2f6d 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/store/db/RealmCryptoStoreMigration.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/store/db/RealmCryptoStoreMigration.kt @@ -26,6 +26,7 @@ import im.vector.matrix.android.internal.crypto.model.OlmInboundGroupSessionWrap import im.vector.matrix.android.internal.crypto.store.db.mapper.CrossSigningKeysMapper import im.vector.matrix.android.internal.crypto.store.db.model.CrossSigningInfoEntityFields import im.vector.matrix.android.internal.crypto.store.db.model.CryptoMetadataEntityFields +import im.vector.matrix.android.internal.crypto.store.db.model.DeviceInfoEntity import im.vector.matrix.android.internal.crypto.store.db.model.DeviceInfoEntityFields import im.vector.matrix.android.internal.crypto.store.db.model.GossipingEventEntityFields import im.vector.matrix.android.internal.crypto.store.db.model.IncomingGossipingRequestEntityFields @@ -45,7 +46,7 @@ internal class RealmCryptoStoreMigration @Inject constructor(private val crossSi // Version 1L added Cross Signing info persistence companion object { - const val CRYPTO_STORE_SCHEMA_VERSION = 5L + const val CRYPTO_STORE_SCHEMA_VERSION = 6L } override fun migrate(realm: DynamicRealm, oldVersion: Long, newVersion: Long) { @@ -56,6 +57,7 @@ internal class RealmCryptoStoreMigration @Inject constructor(private val crossSi if (oldVersion <= 2) migrateTo3(realm) if (oldVersion <= 3) migrateTo4(realm) if (oldVersion <= 4) migrateTo5(realm) + if (oldVersion <= 5) migrateTo6(realm) } private fun migrateTo1(realm: DynamicRealm) { @@ -255,4 +257,22 @@ internal class RealmCryptoStoreMigration @Inject constructor(private val crossSi } } } + + // Fixes duplicate devices in UserEntity#devices + private fun migrateTo6(realm: DynamicRealm) { + val userEntities = realm.where("UserEntity").findAll() + userEntities.forEach { + try { + val deviceList = it.getList(UserEntityFields.DEVICES.`$`) + ?: return@forEach + val distinct = deviceList.distinctBy { it.getString(DeviceInfoEntityFields.DEVICE_ID) } + if (distinct.size != deviceList.size) { + deviceList.clear() + deviceList.addAll(distinct) + } + } catch (failure: Throwable) { + Timber.w(failure, "Crypto Data base migration error for migrateTo6") + } + } + } } From 583139d51e1158054f815dce83581ba417625a11 Mon Sep 17 00:00:00 2001 From: Valere Date: Wed, 6 May 2020 15:06:34 +0200 Subject: [PATCH 024/156] klint --- .../internal/crypto/store/db/RealmCryptoStoreMigration.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/store/db/RealmCryptoStoreMigration.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/store/db/RealmCryptoStoreMigration.kt index 2a55fa2f6d..885abb776d 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/store/db/RealmCryptoStoreMigration.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/store/db/RealmCryptoStoreMigration.kt @@ -26,7 +26,6 @@ import im.vector.matrix.android.internal.crypto.model.OlmInboundGroupSessionWrap import im.vector.matrix.android.internal.crypto.store.db.mapper.CrossSigningKeysMapper import im.vector.matrix.android.internal.crypto.store.db.model.CrossSigningInfoEntityFields import im.vector.matrix.android.internal.crypto.store.db.model.CryptoMetadataEntityFields -import im.vector.matrix.android.internal.crypto.store.db.model.DeviceInfoEntity import im.vector.matrix.android.internal.crypto.store.db.model.DeviceInfoEntityFields import im.vector.matrix.android.internal.crypto.store.db.model.GossipingEventEntityFields import im.vector.matrix.android.internal.crypto.store.db.model.IncomingGossipingRequestEntityFields From da68212255cb2eb15e115ae9aa66a03f826c9d8f Mon Sep 17 00:00:00 2001 From: Valere Date: Wed, 6 May 2020 18:11:11 +0200 Subject: [PATCH 025/156] Crashes when private key missing --- CHANGES.md | 2 +- .../features/settings/devices/DevicesViewModel.kt | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index f0cf30af2d..295ec12608 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -8,7 +8,7 @@ Improvements 🙌: - Bugfix 🐛: - - + - Fix | Verify Manually by Text crashes if private SSK not known (#1337) Translations 🗣: - diff --git a/vector/src/main/java/im/vector/riotx/features/settings/devices/DevicesViewModel.kt b/vector/src/main/java/im/vector/riotx/features/settings/devices/DevicesViewModel.kt index cd5e53b7c3..d0369e7707 100644 --- a/vector/src/main/java/im/vector/riotx/features/settings/devices/DevicesViewModel.kt +++ b/vector/src/main/java/im/vector/riotx/features/settings/devices/DevicesViewModel.kt @@ -30,7 +30,6 @@ import com.squareup.inject.assisted.Assisted import com.squareup.inject.assisted.AssistedInject import im.vector.matrix.android.api.MatrixCallback import im.vector.matrix.android.api.NoOpMatrixCallback -import im.vector.matrix.android.api.extensions.tryThis import im.vector.matrix.android.api.failure.Failure import im.vector.matrix.android.api.session.Session import im.vector.matrix.android.api.session.crypto.verification.VerificationMethod @@ -48,6 +47,7 @@ import io.reactivex.Observable import io.reactivex.functions.BiFunction import io.reactivex.subjects.PublishSubject import kotlinx.coroutines.launch +import timber.log.Timber import java.util.concurrent.TimeUnit data class DevicesViewState( @@ -65,6 +65,7 @@ data class DeviceFullInfo( val deviceInfo: DeviceInfo, val cryptoDeviceInfo: CryptoDeviceInfo? ) + class DevicesViewModel @AssistedInject constructor( @Assisted initialState: DevicesViewState, private val session: Session @@ -215,8 +216,13 @@ class DevicesViewModel @AssistedInject constructor( private fun handleVerifyManually(action: DevicesAction.MarkAsManuallyVerified) = withState { state -> viewModelScope.launch { if (state.hasAccountCrossSigning) { - awaitCallback { - tryThis { session.cryptoService().crossSigningService().trustDevice(action.cryptoDeviceInfo.deviceId, it) } + try { + awaitCallback { + session.cryptoService().crossSigningService().trustDevice(action.cryptoDeviceInfo.deviceId, it) + } + } catch (failure: Throwable) { + Timber.e("Failed to manually cross sign device ${action.cryptoDeviceInfo.deviceId} : ${failure.localizedMessage}") + _viewEvents.post(DevicesViewEvents.Failure(failure)) } } else { // legacy From 0afa7a706afe810f5031d8be3cc70837026996a5 Mon Sep 17 00:00:00 2001 From: Valere Date: Wed, 6 May 2020 18:20:43 +0200 Subject: [PATCH 026/156] Update change log --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index f0cf30af2d..8bdd42636d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -8,7 +8,7 @@ Improvements 🙌: - Bugfix 🐛: - - + - Sometimes the same device appears twice in the list of devices of a user (#1329) Translations 🗣: - From d898bc71f73a8f77b0bbe54bb620f8f30d4f1eca Mon Sep 17 00:00:00 2001 From: Martijn de Boer Date: Wed, 6 May 2020 14:03:14 +0000 Subject: [PATCH 027/156] Translated using Weblate (Dutch) Currently translated at 68.4% (1144 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/nl/ --- vector/src/main/res/values-nl/strings.xml | 57 ++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) mode change 100755 => 100644 vector/src/main/res/values-nl/strings.xml diff --git a/vector/src/main/res/values-nl/strings.xml b/vector/src/main/res/values-nl/strings.xml old mode 100755 new mode 100644 index eac681e604..d9156a9efe --- a/vector/src/main/res/values-nl/strings.xml +++ b/vector/src/main/res/values-nl/strings.xml @@ -1605,4 +1605,59 @@ U gebruikt geen identiteitsserver Er is geen identiteitsserver geconfigureerd. Dit is vereist om uw wachtwoord opnieuw in te stellen. - +Vorige versies van Riot hadden een veiligheidsfout die er voor kon zorgen dat je Identiteits Server (%1$s) toegang tot je account had. Indien je %2$s vertrouwt, dan kun je dit negeren; anders log je uit en weer in. +\n +\nLees meer details hier: +\nhttps://medium.com/@RiotChat/36b4792ea0d6 + + Het lijkt er op dat je probeert verbinding te maken met een andere thuisserver. Wil je uitloggen\? + + Bewerken + Beantwoorden + + Opnieuw proberen + Betreed een kamer om de applicatie te gebruiken + Heeft je een uitnodiging gestuurd + Uitgenodigd door %s + + Je bent helemaal bij! + Je hebt geen ongelezen berichten meer + Welkom thuis! + Ongelezen berichten inhalen + Gesprekken + Je directe gesprekken zullen hier worden weergegeven + Kamers + Je kamers zullen hier worden weergegeven + + Reacties + Bevestigen + Leuk vinden + Reactie Toevoegen + Reacties Bekijken + Reacties + + Gebeurtenis verwijderd door gebruiker + Gebeurtenis gemodereerd door gesprek beheerder + Laatst bewerkt door %1$s op %2$s + + + Niet correcte gebeurtenis, kan niet weergeven + Maak een nieuw gesprek aan + Geen netwerk. Controleer uw internet verbinding. + Wijzigen + Wijzig netwerk + Even wachten… + Alle Gemeenschappen + + Dit gesprek kan niet worden voorvertoond + De voorvertoning van wereld-leesbare gesprekken zijn nog niet ondersteund in RiotX + + Gesprekken + Directe Berichten + + Nieuw Gesprek + AANMAKEN + Gespreksnaam + Publiek + Iedereen zal dit gesprek kunnen toetreden + From b1ba4e393ed381e25940e61fe6e375d2082467ed Mon Sep 17 00:00:00 2001 From: Ville Ranki Date: Tue, 5 May 2020 08:00:53 +0000 Subject: [PATCH 028/156] Translated using Weblate (Finnish) Currently translated at 93.8% (1568 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/fi/ --- vector/src/main/res/values-fi/strings.xml | 209 +++++++++++++++++++++- 1 file changed, 208 insertions(+), 1 deletion(-) diff --git a/vector/src/main/res/values-fi/strings.xml b/vector/src/main/res/values-fi/strings.xml index d044bb5c1a..046508524d 100644 --- a/vector/src/main/res/values-fi/strings.xml +++ b/vector/src/main/res/values-fi/strings.xml @@ -2075,4 +2075,211 @@ Jotta et menetä mitään, automaattiset päivitykset kannattaa pitää käytös Ei turvallinen Video. Kuva. - +Pyyntö annetun käyttäjä-ID:n vahvistamiseksi + Johonkin näistä on mahdollisesti murtauduttu: +\n +\n - Kotipalvelimesi +\n - Varmentamasi toisen käyttäjän kotipalvelin +\n - Sinun tai toisen käyttäjän Internet-yhteys +\n - Sinun tai toisen käyttäjän käyttämä laite + + Äänitiedosto + Tiedosto + + Varmennus lähetetty + Varmennuspyyntö + + + Varmenna istunto + Varmenna manuaalisesti + + Lue koodi toisen käyttäjän laitteesta varmentaaksenne toisenne tietoturvallisesti + Lue toisen käyttäjän koodi + Lukeminen ei onnistu + Vertailkaa emojeilla jos et ole toisen käyttäjän luona + + Varmenna vertaamalla emojeja + + Varmenna emojeilla + Jos koodin lukeminen ei onnistu, varmenna vertaamalla lyhyttä sarjaa emojeja. + + QR-koodi + + Varmenna %s + Varmennettu %s + Odotetaan käyttäjää %s… + Varmenna %s tarkistamalla teidän kummankin laitteella näkyvä koodi. +\n +\nJos mahdollista, tehkää tämä kummankin ollessa paikalla parhaan tietoturvan saavuttamiseksi. + Huoneessa olevat viesti eivät ole salattu osapuolten välisellä salauksella. + Huoneen viestit ovat salattu osapuolten välisellä salauksella. +\n +\nViestisi salataan niin, että vain sinä ja vastaanottaja pystytte avaamaan ne henkilökohtaisilla salausavaimillanne. + Tietoturva + Lisää + Huoneen asetukset + Tiedostojen lähetys + Ylläpitäjät + Moderaattorit + Käyttäjät + + Ylläpitäjä %1$s:ssä + Moderaattori %1$s:ssä + Siirry lukukuittaukseen + + RiotX ei osaa käsitellä tapahtumia joiden tyyppi on \'%1$s\' + RiotX ei osaa käsitellä viestejä joiden tyyppi on \'%1$s\' + RiotX ei osannut piirtää tapahtuman jonka tunniste on \'%1$s\' sisältöä + + Viimeaikaiset huoneet + Muut huoneet + + Lähettää annetun viestin väritettynä sateenkaaren väreillä + Ota käyttöön osapuolten välinen salaus + Salausta ei voi enää poistaa käytöstä sen jälkeen kun se on otettu käyttöön. + + Otetaanko salaus käyttöön\? + Salausta ei voi ottaa pois käytöstä sen jälkeen kun se on otettu käyttöön. Salattuja viestejä ei pysty lukemaan edes palvelin, vain ainoastaan huoneessa olijat. Salauksen käyttöönotto voi estää bottien ja siltojen toiminnan huoneessa. + Ota salaus käyttöön + + Salauksen mahdollistamiseksi varmenna %s tarkastamalla kertakäyttöinen koodi. + Tee tämä toisen käyttäjän ollessa läsnä tai käyttäkää toista viestintävälinettä tietoturvan varmistamiseksi. + + Verratkaa emojeja ja varmistakaa että ne ovat samassa järjestyksessä kummallakin. + Vertaa koodia joka näkyy toisen käyttäjän ruudulla. + Tämän käyttäjän kanssa käyty viestintä on nyt päästä päähän salattu ja sitä ei pysty kukaan ulkopuolinen vakoilemaan. + Istuntosi on nyt vahvistettu. Sillä on pääsy salattuihin viesteihisi ja muut käyttäjät näkevät sen luotettuna. + + + Aktiiviset istunnot + Näytä kaikki istunnot + Istuntojen hallinta + Kirjaudu ulos tästä istunnosta + + Ei salaukseen liittyvää tietoa + + Istunto on luotettu, koska olet vahvistanut sen: + Vahvista tämä istunto jotta se merkitään luotetuksi ja se saa pääsyn salattuihin viesteihin. Jos et ole kirjautunut tähän istuntoon, tunnuksesi on saattanut vuotaa hyökkääjälle: + + + %d käynnissä oleva istunto + %d käynnissä olevaa istuntoa + + + Varmenna tämä kirjautuminen + Muut käyttäjät eivät välttämättä luota siihen + Käytä olemassaolevaa istuntoa tämän istunnon varmentamiseksi jotta se saa oikeudet salattuihin viesteihin. + + + Varmenna + Varmennettu + Varoitus + + Ei saatu istuntoja + Istunnot + Luotettu + Ei luotettu + + "Tämä istunto on luotettu salattuun viestintään koska %1$s (%2$s) varmisti sen:" + %1$s (%2$s) kirjautui sisään uuteen istuntoon: + Tämän käyttäjän kanssa käyty viestintä merkitään virheiksi kunnes käyttäjä luottaa tähän istuntoon. Voit vaihtoehtoisesti käsin varmentaa sen. + + + Nollaa avaimet + + QR-koodi + + Melkein valmis! Näkyykä %s:lla sama kilven kuva\? + Kyllä + Ei + + Yhteys kotipalvelimeen on poikki + + Kehittäjän työkalut + + %d ääni + %d ääntä + + + %d ääni - lopulliset tulokset + %d ääntä - lopulliset tulokset + + Luo yksinkertaisen äänestyksen + Jos et pääse käsiksi olemassaolevaan istuntoon + + Uusi sisäänkirjautuminen + + Varoitus: + Poista… + Haluatko lähettää tämän liitteen %1$s\?:lle\? + + Lähetä kuva alkuperäisessä koossa + Lähetä kuvat alkuperäisessä koossa + + + Vahvista poisto + Haluatko varmasti poistaa tämän tapahtuman\? Huomaa, että jos poistat huoneen nimen tai otsikon muutostapahtuman, se voi perua muutoksen. + Anna syy + Käyttäjä poistanut tapahtuman, syynä: %1$s + Tapahtuma moderoitu huoneen ylläpitäjän toimesta, syynä: %1$s + + Avaimet ovat jo ajan tasalla! + + RiotX Android + + Avainpyynnöt + + Päivitä + + Uusi kirjautuminen. Olitko se sinä\? + Paina tarkastellaksesi ja varmentaaksesi + En ollut + Tilillesi saatetaan olla murtauduttu + + Jos perut, et voi lukea salattuja viestejäsi tällä laitteella eivätkä muut käyttäjät luota siihen + Jos perut, et voi lukea salattuja viestejäsi uudella laitteellasi eivätkä muut käyttäjät luota siihen + Varmenna laitteesi ohjelman asetuksista. + Vahvistus peruttu + + Palautussalasana + Tilin salasana + + Aseta %s + Vahvista %s + + Anna %s jatkaaksesi. + + Pura ja salaa salatut viestit ja luottamukset asettamalla %s + Anna %s uudestaan vahvistaaksesi sen. + Älä käytä tilisi salasanaa muualla. + + + Odota hetki, kiitos. + Alustetaan palautusta. + Palautusavaimesi + Valmista! + Pidä se turvassa + Lopeta + + Käytä %1$s:tä turvaverkkona jos onnistut unohtamaan %2$s:n. + + Julkaistaan luodut identiteettiavaimet + Luodaan salausavain salasanasta + Määritetään SSSS-oletusavain + Synkronoidaan pääavain + Synkronoidaan käyttäjän avain + Synkronoidaan allekirjoitusavain + Alustetaan avainten varmuuskopiointi + + + %2$s ja %1$s asetettu. +\n +\nPidä ne tallessa. Tarvitset ne salattujen viestiesi ja tietojesi avaamiseen, jos suljet kaikki istuntosi. + + Tulosta se jos mahdollista ja säilytä tuloste turvallisessa paikassa + Tallenna se muistitikulle tai varmuuskopiolevylle talteen + Kopioi se henkilökohtaiseen pilvitallennustilaasi + + Tätä ei pysty tekemään kännykällä + + From 13ebef334fed2ed795c7497b5ad7983bf02f0db2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20C?= Date: Wed, 6 May 2020 06:42:49 +0000 Subject: [PATCH 029/156] Translated using Weblate (French) Currently translated at 100.0% (1672 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/fr/ --- vector/src/main/res/values-fr/strings.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vector/src/main/res/values-fr/strings.xml b/vector/src/main/res/values-fr/strings.xml index 34434242ff..a8e72864f4 100644 --- a/vector/src/main/res/values-fr/strings.xml +++ b/vector/src/main/res/values-fr/strings.xml @@ -2,8 +2,7 @@ - utiliser pour récupérer la liste des langues prises en charge -\ndoit avoir la même valeur que le nom + fr FR Messages From b53c073b9010594555637680473644f3ac604dff Mon Sep 17 00:00:00 2001 From: Christopher Rossbach Date: Tue, 5 May 2020 13:35:18 +0000 Subject: [PATCH 030/156] Translated using Weblate (German) Currently translated at 96.9% (1621 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 79b245ff3d..869fcbc6be 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2367,6 +2367,6 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Fehlerbehebung %s hat den Raum erstellt und konfiguriert. - Fast geschaft! Zeigt das andere Gerät das gleiche Schild an\? - Fast geschaft! Warte auf Bestätigung... + Fast geschafft! Zeigt das andere Gerät das gleiche Schild an\? + Fast geschafft! Warte auf Bestätigung… From 18de0ca9516f1e20bddd6a3f167f8adc7d90c711 Mon Sep 17 00:00:00 2001 From: Alexander Eisele Date: Tue, 5 May 2020 13:36:33 +0000 Subject: [PATCH 031/156] Translated using Weblate (German) Currently translated at 96.9% (1621 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 869fcbc6be..6afd29ccc1 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2369,4 +2369,15 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Fast geschafft! Zeigt das andere Gerät das gleiche Schild an\? Fast geschafft! Warte auf Bestätigung… + Verschlüsselte Nachrichten in 1:1 Chats + Nachricht… + + Verifiziere dich & andere, um eure Chats zu schützen + + Gebe deinen %s ein um fortzufahren. + Datei benutzen + + Dies ist kein gültiger Wiederherstellungsschlüssel + Bitte gib deinen Wiederherstellungsschlüssel ein + From f5fd0ac323db0b2fee4eacdb12b9dcb999e8e3c4 Mon Sep 17 00:00:00 2001 From: Szimszon Date: Mon, 4 May 2020 14:30:49 +0000 Subject: [PATCH 032/156] Translated using Weblate (Hungarian) Currently translated at 100.0% (1672 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/hu/ --- vector/src/main/res/values-hu/strings.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/vector/src/main/res/values-hu/strings.xml b/vector/src/main/res/values-hu/strings.xml index ca32ce03f2..8587b82515 100644 --- a/vector/src/main/res/values-hu/strings.xml +++ b/vector/src/main/res/values-hu/strings.xml @@ -2382,4 +2382,10 @@ Ha nem te állítottad be a visszaállítási metódust, akkor egy támadó pró Kérlek válassz jelszót. Ezt a hivatkozást ellenőrizd le még egyszer A közvetlen üzenetedet nem sikerült elkészíteni. Ellenőrizd azokat a felhasználókat akiket meg szeretnél hívni és próbáld újra. - +Használd a legújabb Riotot a másik eszközödön, úgy mint Riot Web, Asztali Riot, RiotX for Android vagy más eszközök közötti hitelesítést támogató másik Matrix klienst + Erősítsd meg ebben a bejelentkezésben a személyazonosságodat egy másik munkamenetből, hogy hozzáférhess a titkosított üzenetekhez. + %1$s hivatkozás egy másik oldalra visz: %2$s. +\n +\nFolytatod\? + + From afbda4ac28b8dfeb67a70f1370d83f0e7f1ccf88 Mon Sep 17 00:00:00 2001 From: kujaw Date: Tue, 5 May 2020 16:41:23 +0000 Subject: [PATCH 033/156] Translated using Weblate (Polish) Currently translated at 93.1% (1556 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/pl/ --- vector/src/main/res/values-pl/strings.xml | 64 ++++++++++++----------- 1 file changed, 34 insertions(+), 30 deletions(-) diff --git a/vector/src/main/res/values-pl/strings.xml b/vector/src/main/res/values-pl/strings.xml index b0c1492acb..d36b9570b9 100644 --- a/vector/src/main/res/values-pl/strings.xml +++ b/vector/src/main/res/values-pl/strings.xml @@ -588,7 +588,7 @@ Możesz dodać adres e-mail do swojego profilu w ustawieniach. %d zmiana członkostwa %d zmiany członkostwa %d zmian członkostwa - + Rozmówca nie połączył się. @@ -615,13 +615,13 @@ Przyznaj dostęp w następnym oknie. Jeden aktywny członek Kilku aktywnych członków %d aktywnych członków - + 1 członek kilku członków %d członków - + Nie będziesz w stanie cofnąć tej zmiany, ponieważ przyznajesz użytkownikowi uprawnienia równe swoim. @@ -638,7 +638,7 @@ Jesteś pewien? Nowa wiadomość Kilka 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. @@ -652,13 +652,13 @@ Jesteś pewien? 1 pokój %d pokoje %d pokoi - + %1$s pokój znaleziony dla %2$s Kilka pokoi znalezionych dla %2$s %1$s pokoi znalezionych dla %2$s - + Wszystkie wiadomości (hałaśliwy) Wszystkie wiadomości @@ -804,13 +804,13 @@ Możesz to zrobić teraz lub później z poziomu ustawień aplikacji. 1 pokój %d pokoje %d pokoi - + 1 aktywny widżet %d aktywne widżety %d aktywnych widżetów - + Pokój %s nie jest widoczny. @@ -832,13 +832,13 @@ Czy chcesz dodać teraz kilka? 1 nieprzeczytana wiadomość powiadomienia %d nieprzeczytane wiadomości powiadomienia %d nieprzeczytanych wiadomości powiadomienia - + 1 nieprzeczytana wiadomość powiadomienia %d nieprzeczytane wiadomości powiadomienia %d nieprzeczytanych wiadomości powiadomienia - + %1$s w %2$s @@ -923,14 +923,14 @@ Widoczność wiadomości w Matrix jest podobna do wiadomości e-mail. Nasze zapo 1 członek %d członków - + 1 pokój %d pokoje %d pokoi - + Kliknij tutaj, aby zobaczyć starsze wiadomości @@ -945,22 +945,22 @@ Widoczność wiadomości w Matrix jest podobna do wiadomości e-mail. Nasze zapo 1 sekunda %d sek. - + 1 minuta %d min. - + 1 godzina %s godz. - + 1 dzień %d dni - + Pokazać wszystkie wiadomości od tego użytkownika? @@ -969,7 +969,7 @@ Pamiętaj ta akcja może zresetować aplikacje i potrwać jakiś czas. 1 zaznaczone %d zaznaczone %d zaznaczonych - + Wersja %s Podgląd mediów przed wysłaniem @@ -1040,7 +1040,7 @@ Pamiętaj ta akcja może zresetować aplikacje i potrwać jakiś czas. Czy chcesz wyrzucić tego użytkownika z rozmowy\? Czy chcesz wyrzucić tych użytkowników z rozmowy\? - + Formatowanie Markdown Pokaż zdarzenia dołączenia i wyjścia @@ -1167,7 +1167,7 @@ Spróbuj uruchomić ponownie aplikację. Przywrócono kopię zapasową z %d kluczem. Przywrócono kopię zapasową z %d kluczami. - + Użyj kopii zapasowej klucza Uruchamianie… (%1$d z %2$d) @@ -1486,12 +1486,12 @@ Spróbuj uruchomić ponownie aplikację. %1$s: 1 wiadomość %1$s: %2$d wiadomości - + %d powiadomienie %d powiadomień - + Nowe wydarzenie @@ -1621,7 +1621,7 @@ Spróbuj uruchomić ponownie aplikację. Kopiowanie %d klucza… Kopiowanie %d kluczy… - + Nieprawidłowa odpowiedź funkcji autoodkrywania serwera domowego @@ -1779,7 +1779,7 @@ Spróbuj uruchomić ponownie aplikację. 1 użytkownik odczytał %d użytkowników odczytało - + Wystąpił błąd poczas otrzymywania załącznika. @@ -1924,7 +1924,7 @@ Spróbuj uruchomić ponownie aplikację. 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… - + Wylogowałeś(-łaś) się @@ -2042,7 +2042,7 @@ Spróbuj uruchomić ponownie aplikację. Jedna osoba %1$d osób - + Opuszczanie pokoju… @@ -2117,7 +2117,7 @@ Spróbuj uruchomić ponownie aplikację. %d aktywna sesja %d aktywnych sesji - + Zweryfikuj tą sesję @@ -2154,12 +2154,12 @@ Spróbuj uruchomić ponownie aplikację. %d głos %d głosów - + %d głos - wyniki końcowe %d głosów - wyniki końcowe - + Wybrana Opcja Tworzy prostą ankietę @@ -2178,7 +2178,7 @@ Spróbuj uruchomić ponownie aplikację. Wyślij obraz w oryginalnym rozmiarze Wyślij obrazy w oryginalnym rozmiarze - + Potwierdź Usunięcie @@ -2239,4 +2239,8 @@ Spróbuj uruchomić ponownie aplikację. Tryb programisty aktywuje ukryte funkcje i może również spowodować, że aplikacja będzie mniej stabilna. Tylko dla programistów! Wiadomości w tym pokoju nie są szyfrowane end-to-end. Przesłane pliki - +Prośby o klucze + + Odblokuj historię zaszyfrowanych wiadomości + + From b6af2269d2f8f2d6bbba80fc4032ac089aded151 Mon Sep 17 00:00:00 2001 From: Besnik Bleta Date: Wed, 6 May 2020 18:14:27 +0000 Subject: [PATCH 034/156] Translated using Weblate (Albanian) Currently translated at 99.6% (1665 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/sq/ --- vector/src/main/res/values-sq/strings.xml | 77 +++++++++++++++++++++-- 1 file changed, 73 insertions(+), 4 deletions(-) diff --git a/vector/src/main/res/values-sq/strings.xml b/vector/src/main/res/values-sq/strings.xml index 970587e702..10ecd0af4d 100644 --- a/vector/src/main/res/values-sq/strings.xml +++ b/vector/src/main/res/values-sq/strings.xml @@ -592,7 +592,7 @@ Importo Jepni frazëkalimin Fshehtëzoje vetëm për sesione të verifikuar - JO i verifikuar + Jo i verifikuar I verifikuar Në Listë të Zezë @@ -916,8 +916,8 @@ Hiqi verifikimin Hiqe nga listë e zezë - Që të verifikoni se këtij sesioni mund t’i zihet besë, ju lutemi, lidhuni me të zotët e saj përmes ndonjë rruge tjetër (p.sh., personalisht, ose përmes një thirrjeje telefonike) dhe pyetini nëse përputhet apo jo kyçi që shohin te Rregullime të tyret të Përdoruesit për këtë sesion me kyçin më poshtë: - Nëse përputhet, shtypni butonin e verifikimit më poshtë. Nëse jo, atëherë dikush tjetër po e përgjon këtë sesion dhe duhet ta kaloni në listë të zezë. Në të ardhmen, ky proces verifikimi do të jetë më i sofistikuar. + Ripohojeni duke krahasuar sa vijon me Rregullimet e Përdoruesit te sesioni juaj tjetër: + Nëse s’përputhen, siguria e komunikimeve tuaja mund të jetë komprometuar. URL Shërbyesi Home 1 dhomë @@ -2182,7 +2182,7 @@ Që të garantoni se s’ju shpëton gjë, thjesht mbajeni të aktivizuar mekani Rifreskoje - Sesion i Ri + Hyrje e re. Ju qetë\? Prekeni, që ta shqyrtoni & verifikoni Përdoreni këtë sesion që të verifikoni atë të riun tuaj, duke i akorduar hyrje te mesazhe të fshehtëzuar. Ky s’qeshë unë @@ -2278,4 +2278,73 @@ Që të garantoni se s’ju shpëton gjë, thjesht mbajeni të aktivizuar mekani Emër përdoruesi dhe/ose fjalëkalim i pasaktë. Fjalëkalimi i dhënë fillon ose mbaron me hapësirë, ju lutemi, kontrollojeni. + + Po publikohen kyçe të krijuar identiteti + Mesazh… + + Ka të gatshëm përmirësim fshehtëzimi + Verifikoni veten & të tjerët, që t’i mbani bisedat tuaja të sigurta + + Që të vazhdohet, jepni %s tuaj + Përdor Kartelë + + Jepni %s + Frazëkalim Rikthimesh + S’është kyç rimarrjesh i vlefshëm + Ju lutemi, jepni një kyç rimarrjesh + + Po kontrollohet Kyç kopjeruajtjeje + Po kontrollohet Kyç kopjeruajtjeje (%s) + Po prodhohet kyç SSSS nga frazëkalim + Po prodhohet kyç SSSS prej frazëkalimi (%s) + Po prodhohet kyç SSSS nga kyç rimarrjesh + Po depozitohet e fshehtë kopjeruajtjeje kyçesh në SSSS + %1$s (%2$s) + + Që të vazhdohet, jepni Frazëkalim Kopjeruajtje Kyçesh. + përdorni kyçin tuaj të rimarrjeve të Kopjeruajtjes së Kyçeve + S’dihet Frazëkalimi juaj i Kopjeruajtjes së Kyçeve, mundeni të %s. + Kyç rimarrjesh Kopjeruajtjesh Kyçesh + + Pengo foto ekrani të aplikacionit + Aktivizimi i këtij rregullimi shton FLAG_SECURE te krejt Veprimtaritë. Që ndryshimi të hyjë në fuqi, rinisni aplikacionin. + + Te Galeria u shtua kartelë media + S’u shtua dot kartelë media te Galeria + Caktoni një fjalëkalim të ri llogarie… + + Përdorni Riot-in më të ri në pajisjet tuaja të tjera, Riot Web, Riot Desktop, Riot iOS, RiotX për Android, ose ose një tjetër klient Matrix i aftë për <em>cross-signing</em + Riot Web +\nRiot Desktop + Riot iOS +\nRiot X për Android + ose një tjetër klient Matrix i aftë për <em>cross-signing</em + Përdorni Riot-in më të ri në pajisjet tuaja të tjera: + Mbulohet vetëm për dhoma të fshehtëzuara + Përdorni %1$s tuaj ose përdorni %2$s tuaj që të vazhdohet. + Përdorni Kyçin Rimarrjesh + Përzgjidhni Kyçin tuaj të Rimarrjeve, ose jepeni dorazi duke e shtypur ose duke e ngjitur prej të papastrës tuaj + Kopjeruajtja s’u shfshehtëzua dot me këtë Kyç Rimarrjesh: ju lutemi, verifikoni se keni dhënë Kyçin e saktë të Rimarrjeve. + S\"u arrit të hyhet në depozitë të sigurt + + Të pafshehtëzuara + Fshehtëzuar nga një pajisje e paverifikuar + Shqyrtojini kur të jeni i futur + Verifikoni krejt sesionet tuaj që të siguroheni se llogaria & mesazhet tuaja janë të sigurt + Verifikoni kredencialet e reja për hyrje te llogaria juaj: %1$s + + Verifikojeni Dorazi përmes Teksti + Verifikoni kredenciale hyrjeje + Verifikojeni përmes Emoji-sh + Ripohoni identitetin tuaj duke verifikuar këto kredenciale hyrjesh prej një nga sesionet tuaj të tjerë, duke i akorduar hyrje te mesazhet e fshehtëzuar. + Vërini shenjë si i Besuar + + Ju lutemi zgjidhni një emër përdoruesi. + Ju lutemi, zgjidhni një fjalëkalim. + Kontrollojeni edhe një herë këtë lidhje + Lidhja %1$s po ju shpie te një tjetër sajt: %2$s. +\n +\nJeni i sigurt se doni të vazhdohet\? + + S’e krijuam dot DM-në tuaj. Ju lutemi, kontrolloni përdoruesit që doni të ftoni dhe riprovoni. From 750550ad3e8dcc3b47282c42db7c910b706f73dd Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 6 May 2020 22:14:49 +0200 Subject: [PATCH 035/156] Create a specific module for OpenId --- .../internal/session/SessionComponent.kt | 2 + .../session/openid/GetOpenIdTokenTask.kt | 37 ++++++++++++++ .../internal/session/openid/OpenIdAPI.kt | 38 +++++++++++++++ .../internal/session/openid/OpenIdModule.kt | 38 +++++++++++++++ .../openid/RequestOpenIdTokenResponse.kt | 48 +++++++++++++++++++ .../user/accountdata/AccountDataAPI.kt | 12 ----- 6 files changed, 163 insertions(+), 12 deletions(-) create mode 100644 matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/openid/GetOpenIdTokenTask.kt create mode 100644 matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/openid/OpenIdAPI.kt create mode 100644 matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/openid/OpenIdModule.kt create mode 100644 matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/openid/RequestOpenIdTokenResponse.kt diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/SessionComponent.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/SessionComponent.kt index b20235448a..0ebfc1c4c5 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/SessionComponent.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/SessionComponent.kt @@ -36,6 +36,7 @@ import im.vector.matrix.android.internal.session.filter.FilterModule import im.vector.matrix.android.internal.session.group.GetGroupDataWorker import im.vector.matrix.android.internal.session.group.GroupModule import im.vector.matrix.android.internal.session.homeserver.HomeServerCapabilitiesModule +import im.vector.matrix.android.internal.session.openid.OpenIdModule import im.vector.matrix.android.internal.session.profile.ProfileModule import im.vector.matrix.android.internal.session.pushers.AddHttpPusherWorker import im.vector.matrix.android.internal.session.pushers.PushersModule @@ -70,6 +71,7 @@ import im.vector.matrix.android.internal.util.MatrixCoroutineDispatchers CacheModule::class, CryptoModule::class, PushersModule::class, + OpenIdModule::class, AccountDataModule::class, ProfileModule::class, SessionAssistedInjectModule::class, diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/openid/GetOpenIdTokenTask.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/openid/GetOpenIdTokenTask.kt new file mode 100644 index 0000000000..c8f394dc47 --- /dev/null +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/openid/GetOpenIdTokenTask.kt @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2020 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.matrix.android.internal.session.openid + +import im.vector.matrix.android.internal.di.UserId +import im.vector.matrix.android.internal.network.executeRequest +import im.vector.matrix.android.internal.task.Task +import org.greenrobot.eventbus.EventBus +import javax.inject.Inject + +internal interface GetOpenIdTokenTask : Task + +internal class DefaultGetOpenIdTokenTask @Inject constructor( + @UserId private val userId: String, + private val openIdAPI: OpenIdAPI, + private val eventBus: EventBus) : GetOpenIdTokenTask { + + override suspend fun execute(params: Unit): RequestOpenIdTokenResponse { + return executeRequest(eventBus) { + apiCall = openIdAPI.openIdToken(userId) + } + } +} diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/openid/OpenIdAPI.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/openid/OpenIdAPI.kt new file mode 100644 index 0000000000..ee2e85a33e --- /dev/null +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/openid/OpenIdAPI.kt @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2020 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.matrix.android.internal.session.openid + +import im.vector.matrix.android.api.util.JsonDict +import im.vector.matrix.android.internal.network.NetworkConstants +import retrofit2.Call +import retrofit2.http.Body +import retrofit2.http.POST +import retrofit2.http.Path + +internal interface OpenIdAPI { + + /** + * Gets a bearer token from the homeserver that the user can + * present to a third party in order to prove their ownership + * of the Matrix account they are logged into. + * Ref: https://matrix.org/docs/spec/client_server/latest#post-matrix-client-r0-user-userid-openid-request-token + * + * @param userId the user id + */ + @POST(NetworkConstants.URI_API_PREFIX_PATH_R0 + "user/{userId}/openid/request_token") + fun openIdToken(@Path("userId") userId: String, @Body body: JsonDict = emptyMap()): Call +} diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/openid/OpenIdModule.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/openid/OpenIdModule.kt new file mode 100644 index 0000000000..c6993167e8 --- /dev/null +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/openid/OpenIdModule.kt @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2020 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.matrix.android.internal.session.openid + +import dagger.Binds +import dagger.Module +import dagger.Provides +import retrofit2.Retrofit + +@Module +internal abstract class OpenIdModule { + + @Module + companion object { + @JvmStatic + @Provides + fun providesOpenIdAPI(retrofit: Retrofit): OpenIdAPI { + return retrofit.create(OpenIdAPI::class.java) + } + } + + @Binds + abstract fun bindGetOpenIdTokenTask(task: DefaultGetOpenIdTokenTask): GetOpenIdTokenTask +} diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/openid/RequestOpenIdTokenResponse.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/openid/RequestOpenIdTokenResponse.kt new file mode 100644 index 0000000000..4beb3fe420 --- /dev/null +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/openid/RequestOpenIdTokenResponse.kt @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2020 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.matrix.android.internal.session.openid + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +@JsonClass(generateAdapter = true) +internal data class RequestOpenIdTokenResponse( + /** + * Required. An access token the consumer may use to verify the identity of the person who generated the token. + * This is given to the federation API GET /openid/userinfo to verify the user's identity. + */ + @Json(name = "access_token") + val openIdToken: String, + + /** + * Required. The string "Bearer". + */ + @Json(name = "token_type") + val tokenType: String, + + /** + * Required. The homeserver domain the consumer should use when attempting to verify the user's identity. + */ + @Json(name = "matrix_server_name") + val matrixServerName: String, + + /** + * Required. The number of seconds before this token expires and a new one must be generated. + */ + @Json(name = "expires_in") + val expiresIn: Int +) diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/user/accountdata/AccountDataAPI.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/user/accountdata/AccountDataAPI.kt index 824af2d1c3..65ec05e76e 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/user/accountdata/AccountDataAPI.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/user/accountdata/AccountDataAPI.kt @@ -19,7 +19,6 @@ package im.vector.matrix.android.internal.session.user.accountdata import im.vector.matrix.android.internal.network.NetworkConstants import retrofit2.Call import retrofit2.http.Body -import retrofit2.http.POST import retrofit2.http.PUT import retrofit2.http.Path @@ -34,15 +33,4 @@ interface AccountDataAPI { */ @PUT(NetworkConstants.URI_API_PREFIX_PATH_R0 + "user/{userId}/account_data/{type}") fun setAccountData(@Path("userId") userId: String, @Path("type") type: String, @Body params: Any): Call - - /** - * Gets a bearer token from the homeserver that the user can - * present to a third party in order to prove their ownership - * of the Matrix account they are logged into. - * - * @param userId the user id - * @param body the body content - */ - @POST(NetworkConstants.URI_API_PREFIX_PATH_R0 + "user/{userId}/openid/request_token") - fun openIdToken(@Path("userId") userId: String, @Body body: Map): Call> } From 439aa7854c409134051f9618709884473e69a22f Mon Sep 17 00:00:00 2001 From: laeberkaes Date: Wed, 6 May 2020 21:22:44 +0000 Subject: [PATCH 036/156] Translated using Weblate (German) Currently translated at 97.1% (1623 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/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 6afd29ccc1..f96cfda19c 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2380,4 +2380,5 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Dies ist kein gültiger Wiederherstellungsschlüssel Bitte gib deinen Wiederherstellungsschlüssel ein + Verschlüsselte Nachrichten und Verifizierungen mit einer %s absichern und entsperren. From d70a09ded85dcdd457ce5ba40cbd7a2125737b7e Mon Sep 17 00:00:00 2001 From: Alexander Eisele Date: Wed, 6 May 2020 21:26:12 +0000 Subject: [PATCH 037/156] Translated using Weblate (German) Currently translated at 97.1% (1623 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index f96cfda19c..ce06727e9b 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2381,4 +2381,7 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Bitte gib deinen Wiederherstellungsschlüssel ein Verschlüsselte Nachrichten und Verifizierungen mit einer %s absichern und entsperren. + Das setzen einer Wiederherstellungspassphrase ermöglicht das ver- & entschlüsseln von Nachrichten und Vertrauen. +\n +\nWenn du kein Nachrichtenpassword setzen willst, erzeuge stattdessen einen Nachrichtenschlüssel. From dd46798bda7597e3b289e638856820126787b964 Mon Sep 17 00:00:00 2001 From: laeberkaes Date: Wed, 6 May 2020 21:27:28 +0000 Subject: [PATCH 038/156] Translated using Weblate (German) Currently translated at 97.1% (1624 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index ce06727e9b..11425b8286 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2381,7 +2381,7 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Bitte gib deinen Wiederherstellungsschlüssel ein Verschlüsselte Nachrichten und Verifizierungen mit einer %s absichern und entsperren. - Das setzen einer Wiederherstellungspassphrase ermöglicht das ver- & entschlüsseln von Nachrichten und Vertrauen. + Das setzen eines Wiederherstellungspassworts ermöglicht das sichern & entsperren von verschlüsselten Nachrichten und Verifizierungen. \n -\nWenn du kein Nachrichtenpassword setzen willst, erzeuge stattdessen einen Nachrichtenschlüssel. +\nWenn du kein Nachrichtenpasswort setzen willst, erzeuge stattdessen einen Nachrichtenschlüssel. From a43ca5925c1b42b9a438186d48769f2ff7168ff1 Mon Sep 17 00:00:00 2001 From: Alexander Eisele Date: Wed, 6 May 2020 21:27:42 +0000 Subject: [PATCH 039/156] Translated using Weblate (German) Currently translated at 97.1% (1624 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 11425b8286..11cdf20cc5 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2384,4 +2384,8 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Das setzen eines Wiederherstellungspassworts ermöglicht das sichern & entsperren von verschlüsselten Nachrichten und Verifizierungen. \n \nWenn du kein Nachrichtenpasswort setzen willst, erzeuge stattdessen einen Nachrichtenschlüssel. + Das setzen einer Wiederherstellungspassphrase ermöglicht das ver- & entschlüsseln von Nachrichten und Vertrauen. +\n + + From e9bb95b3b378e8699cb62d15e81fba186aa99c35 Mon Sep 17 00:00:00 2001 From: laeberkaes Date: Wed, 6 May 2020 21:28:41 +0000 Subject: [PATCH 040/156] Translated using Weblate (German) Currently translated at 97.3% (1627 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 11cdf20cc5..517484cb8b 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2384,8 +2384,8 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Das setzen eines Wiederherstellungspassworts ermöglicht das sichern & entsperren von verschlüsselten Nachrichten und Verifizierungen. \n \nWenn du kein Nachrichtenpasswort setzen willst, erzeuge stattdessen einen Nachrichtenschlüssel. - Das setzen einer Wiederherstellungspassphrase ermöglicht das ver- & entschlüsseln von Nachrichten und Vertrauen. -\n + Das setzen eines Wiederherstellungspassworts ermöglicht das sichern & entsperren von verschlüsselten Nachrichten und Verifizierungen. + Verschlüsselungsupgrade verfügbar From 19e1da121675f5c8f8af385e20844a92e90e5ccd Mon Sep 17 00:00:00 2001 From: Alexander Eisele Date: Wed, 6 May 2020 21:30:12 +0000 Subject: [PATCH 041/156] Translated using Weblate (German) Currently translated at 97.3% (1627 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 517484cb8b..83429ee5f6 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2388,4 +2388,6 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Verschlüsselungsupgrade verfügbar + %s eingeben + Wiederherstellungs-Passphrase From daae030134ad7098e7f6b12c1e44f3d60079d64f Mon Sep 17 00:00:00 2001 From: laeberkaes Date: Wed, 6 May 2020 21:30:27 +0000 Subject: [PATCH 042/156] Translated using Weblate (German) Currently translated at 97.5% (1630 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 83429ee5f6..805dbf831b 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2389,5 +2389,5 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Verschlüsselungsupgrade verfügbar %s eingeben - Wiederherstellungs-Passphrase + Wiederherstellungspasswort From e1884e7c73ceec7f1028213a48a75f350840d766 Mon Sep 17 00:00:00 2001 From: Alexander Eisele Date: Wed, 6 May 2020 21:30:38 +0000 Subject: [PATCH 043/156] Translated using Weblate (German) Currently translated at 97.5% (1630 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 805dbf831b..d52380fe81 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2390,4 +2390,7 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Verschlüsselungsupgrade verfügbar %s eingeben Wiederherstellungspasswort + Überprüfe Wiederherstellungsschlüssel + Überprüfe Sicherungsstatus (%s) + Erzeuge Kurven-Schlüssel From b48113a3535af75754d294ad655ece701b4facc6 Mon Sep 17 00:00:00 2001 From: laeberkaes Date: Wed, 6 May 2020 21:32:01 +0000 Subject: [PATCH 044/156] Translated using Weblate (German) Currently translated at 97.5% (1631 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index d52380fe81..747b1ea6bd 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2392,5 +2392,5 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Wiederherstellungspasswort Überprüfe Wiederherstellungsschlüssel Überprüfe Sicherungsstatus (%s) - Erzeuge Kurven-Schlüssel + Erzeuge Kurvenschlüssel From da4b0290930974b8992ed1ecfef1b58fad0062fc Mon Sep 17 00:00:00 2001 From: Alexander Eisele Date: Wed, 6 May 2020 21:32:12 +0000 Subject: [PATCH 045/156] Translated using Weblate (German) Currently translated at 97.5% (1631 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/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 747b1ea6bd..70ccd8a17d 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2393,4 +2393,5 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Überprüfe Wiederherstellungsschlüssel Überprüfe Sicherungsstatus (%s) Erzeuge Kurvenschlüssel + Generiere SSSS Schlüssel aus der Passphrase From 8b3403c115d8946c8b82271f2dab2d03ab647cc4 Mon Sep 17 00:00:00 2001 From: laeberkaes Date: Wed, 6 May 2020 21:32:22 +0000 Subject: [PATCH 046/156] Translated using Weblate (German) Currently translated at 97.6% (1632 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 70ccd8a17d..f4368ed7dc 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2393,5 +2393,5 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Überprüfe Wiederherstellungsschlüssel Überprüfe Sicherungsstatus (%s) Erzeuge Kurvenschlüssel - Generiere SSSS Schlüssel aus der Passphrase + Generiere SSSS Schlüssel aus dem Passwort From 1e2d267fec377c5d7b0107d572f8911372957ec7 Mon Sep 17 00:00:00 2001 From: Alexander Eisele Date: Wed, 6 May 2020 21:32:27 +0000 Subject: [PATCH 047/156] Translated using Weblate (German) Currently translated at 97.6% (1632 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/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 f4368ed7dc..89cb67f461 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2394,4 +2394,5 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Überprüfe Sicherungsstatus (%s) Erzeuge Kurvenschlüssel Generiere SSSS Schlüssel aus dem Passwort + Generiere SSSS Schlüssel aus der Passphrase (%s) From e1286a0ed4222bdf7b9ddf48829cef78b4a25067 Mon Sep 17 00:00:00 2001 From: laeberkaes Date: Wed, 6 May 2020 21:32:36 +0000 Subject: [PATCH 048/156] Translated using Weblate (German) Currently translated at 97.7% (1634 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 89cb67f461..f8fd794a59 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2394,5 +2394,5 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Überprüfe Sicherungsstatus (%s) Erzeuge Kurvenschlüssel Generiere SSSS Schlüssel aus dem Passwort - Generiere SSSS Schlüssel aus der Passphrase (%s) + Generiere SSSS Schlüssel aus dem Passwort (%s) From 7966f6e30870364d2b2c83e76835a025dc656e09 Mon Sep 17 00:00:00 2001 From: Alexander Eisele Date: Wed, 6 May 2020 21:32:51 +0000 Subject: [PATCH 049/156] Translated using Weblate (German) Currently translated at 97.7% (1634 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index f8fd794a59..0b0c4ed847 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2395,4 +2395,6 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Erzeuge Kurvenschlüssel Generiere SSSS Schlüssel aus dem Passwort Generiere SSSS Schlüssel aus dem Passwort (%s) + Generiere SSSS Schlüssel aus dem Wiederherstellungsschlüssel + "Speichere Schlüssel-Backup Schlüssel in SSSS" From 7e3413eda799065eb227036304f40c7d077981cc Mon Sep 17 00:00:00 2001 From: laeberkaes Date: Wed, 6 May 2020 21:34:42 +0000 Subject: [PATCH 050/156] Translated using Weblate (German) Currently translated at 97.8% (1636 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 0b0c4ed847..310f552877 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2396,5 +2396,5 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Generiere SSSS Schlüssel aus dem Passwort Generiere SSSS Schlüssel aus dem Passwort (%s) Generiere SSSS Schlüssel aus dem Wiederherstellungsschlüssel - "Speichere Schlüssel-Backup Schlüssel in SSSS" + Speichere Schlüsselbackup Schlüssel in SSSS From e97d56580994a2d4a3e8b91280369c177d8bc046 Mon Sep 17 00:00:00 2001 From: Alexander Eisele Date: Wed, 6 May 2020 21:34:53 +0000 Subject: [PATCH 051/156] Translated using Weblate (German) Currently translated at 97.8% (1636 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 310f552877..5cea7204a1 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2397,4 +2397,7 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Generiere SSSS Schlüssel aus dem Passwort (%s) Generiere SSSS Schlüssel aus dem Wiederherstellungsschlüssel Speichere Schlüsselbackup Schlüssel in SSSS + %1$s (%2$s) + + Gebe dein Password für das Schlüssel-Backup ein um fortzufahren. From 89629ffe93c357a957f4c32ca7544c35a12de4a9 Mon Sep 17 00:00:00 2001 From: laeberkaes Date: Wed, 6 May 2020 21:35:28 +0000 Subject: [PATCH 052/156] Translated using Weblate (German) Currently translated at 97.9% (1637 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 5cea7204a1..c884f745e4 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2399,5 +2399,5 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Speichere Schlüsselbackup Schlüssel in SSSS %1$s (%2$s) - Gebe dein Password für das Schlüssel-Backup ein um fortzufahren. + Gib dein Passwort für das Schlüsselbackup ein, um fortzufahren. From fc8ab0d462bb6296c696cbf225dc5f1945887047 Mon Sep 17 00:00:00 2001 From: Alexander Eisele Date: Wed, 6 May 2020 21:35:48 +0000 Subject: [PATCH 053/156] Translated using Weblate (German) Currently translated at 97.9% (1637 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/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 c884f745e4..58ebc0254d 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2400,4 +2400,5 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine %1$s (%2$s) Gib dein Passwort für das Schlüsselbackup ein, um fortzufahren. + nutze deinen Schlüssel-Backup Wiederherstellungsschlüssel From 2d3e23ee1164809f24bf6f3ee1af7c07e5a36395 Mon Sep 17 00:00:00 2001 From: laeberkaes Date: Wed, 6 May 2020 21:36:10 +0000 Subject: [PATCH 054/156] Translated using Weblate (German) Currently translated at 98.0% (1638 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 58ebc0254d..52bff656b5 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2400,5 +2400,5 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine %1$s (%2$s) Gib dein Passwort für das Schlüsselbackup ein, um fortzufahren. - nutze deinen Schlüssel-Backup Wiederherstellungsschlüssel + nutze deinen Schlüsselbackup Wiederherstellungsschlüssel From c3b662fa1f06e7896c87b922018f1ebd129757f6 Mon Sep 17 00:00:00 2001 From: Alexander Eisele Date: Wed, 6 May 2020 21:39:44 +0000 Subject: [PATCH 055/156] Translated using Weblate (German) Currently translated at 98.0% (1638 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/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 52bff656b5..5204edfceb 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2401,4 +2401,5 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Gib dein Passwort für das Schlüsselbackup ein, um fortzufahren. nutze deinen Schlüsselbackup Wiederherstellungsschlüssel + Wenn du deine Schlüssel-Backup Passphrase nicht weißt, kannst du %s. From 361f0415bbd66ae5c347a32238fa5b09a73ee962 Mon Sep 17 00:00:00 2001 From: laeberkaes Date: Wed, 6 May 2020 21:40:01 +0000 Subject: [PATCH 056/156] Translated using Weblate (German) Currently translated at 98.0% (1639 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 5204edfceb..171030941d 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2401,5 +2401,5 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Gib dein Passwort für das Schlüsselbackup ein, um fortzufahren. nutze deinen Schlüsselbackup Wiederherstellungsschlüssel - Wenn du deine Schlüssel-Backup Passphrase nicht weißt, kannst du %s. + Wenn du dein Schlüsselbackup Passwort nicht weißt, kannst du %s. From e13915b0c740365c10c5855f0040b878ba366332 Mon Sep 17 00:00:00 2001 From: Alexander Eisele Date: Wed, 6 May 2020 21:40:11 +0000 Subject: [PATCH 057/156] Translated using Weblate (German) Currently translated at 98.0% (1639 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 171030941d..684a78b02d 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2402,4 +2402,6 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Gib dein Passwort für das Schlüsselbackup ein, um fortzufahren. nutze deinen Schlüsselbackup Wiederherstellungsschlüssel Wenn du dein Schlüsselbackup Passwort nicht weißt, kannst du %s. + Schlüssel-Backup Wiederherstellungsschlüssel + From 0e0b7245358a748144b46810a29ff1872a04c341 Mon Sep 17 00:00:00 2001 From: laeberkaes Date: Wed, 6 May 2020 21:40:19 +0000 Subject: [PATCH 058/156] Translated using Weblate (German) Currently translated at 98.1% (1640 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 684a78b02d..1b30439b3b 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2402,6 +2402,6 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Gib dein Passwort für das Schlüsselbackup ein, um fortzufahren. nutze deinen Schlüsselbackup Wiederherstellungsschlüssel Wenn du dein Schlüsselbackup Passwort nicht weißt, kannst du %s. - Schlüssel-Backup Wiederherstellungsschlüssel + Schlüsselbackup Wiederherstellungsschlüssel From 6d61848ed668ead824f599b0e78cc3e0a7e85b6e Mon Sep 17 00:00:00 2001 From: Alexander Eisele Date: Wed, 6 May 2020 21:42:45 +0000 Subject: [PATCH 059/156] Translated using Weblate (German) Currently translated at 98.1% (1640 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/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 1b30439b3b..5032037f69 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2404,4 +2404,5 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Wenn du dein Schlüsselbackup Passwort nicht weißt, kannst du %s. Schlüsselbackup Wiederherstellungsschlüssel + Verhindere Screenshots der Anwendung From 2d31402cf0c2353cabb386e6b02c8fdf0b7af1f4 Mon Sep 17 00:00:00 2001 From: laeberkaes Date: Wed, 6 May 2020 21:42:56 +0000 Subject: [PATCH 060/156] Translated using Weblate (German) Currently translated at 98.1% (1641 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 5032037f69..e558e90ed6 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2404,5 +2404,5 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Wenn du dein Schlüsselbackup Passwort nicht weißt, kannst du %s. Schlüsselbackup Wiederherstellungsschlüssel - Verhindere Screenshots der Anwendung + Verhindere Screenshots innerhalb der Anwendung From 2aa8512f6febecf5e605357e55509f70bcb6764e Mon Sep 17 00:00:00 2001 From: Alexander Eisele Date: Wed, 6 May 2020 21:44:42 +0000 Subject: [PATCH 061/156] Translated using Weblate (German) Currently translated at 98.1% (1641 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index e558e90ed6..bbe062fc99 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2405,4 +2405,6 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Schlüsselbackup Wiederherstellungsschlüssel Verhindere Screenshots innerhalb der Anwendung + Das aktivieren dieser Einstellung setzt das FLAG_SECURE in allen Aktivitäten. Starte die Anwendung neu, damit die Änderung wirksam wird. + From f1d2abc9b103fb7639b62cc7970ab2e1ef3d148c Mon Sep 17 00:00:00 2001 From: laeberkaes Date: Wed, 6 May 2020 21:53:27 +0000 Subject: [PATCH 062/156] Translated using Weblate (German) Currently translated at 98.3% (1644 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index bbe062fc99..b79742ab9e 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2405,6 +2405,8 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Schlüsselbackup Wiederherstellungsschlüssel Verhindere Screenshots innerhalb der Anwendung - Das aktivieren dieser Einstellung setzt das FLAG_SECURE in allen Aktivitäten. Starte die Anwendung neu, damit die Änderung wirksam wird. + Das Aktivieren dieser Einstellung setzt das FLAG_SECURE in allen Aktivitäten. Starte die Anwendung neu, damit die Änderung wirksam wird. + Datei wurde der Galerie hinzugefügt + Datei konnte nicht zur Galerie hinzugefügt werden From 89fb2cf39137b97ce3898b4542a7e83c9f228477 Mon Sep 17 00:00:00 2001 From: Alexander Eisele Date: Wed, 6 May 2020 21:55:42 +0000 Subject: [PATCH 063/156] Translated using Weblate (German) Currently translated at 98.3% (1644 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index b79742ab9e..3e9c6bd762 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2409,4 +2409,6 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Datei wurde der Galerie hinzugefügt Datei konnte nicht zur Galerie hinzugefügt werden + Neues Benutzerkonto-Passwort festlegen… + From 2f5fe59aa6231e04463fe99a58262d383d47c11f Mon Sep 17 00:00:00 2001 From: laeberkaes Date: Wed, 6 May 2020 21:55:58 +0000 Subject: [PATCH 064/156] Translated using Weblate (German) Currently translated at 98.7% (1650 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 3e9c6bd762..8991426c5b 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2409,6 +2409,6 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Datei wurde der Galerie hinzugefügt Datei konnte nicht zur Galerie hinzugefügt werden - Neues Benutzerkonto-Passwort festlegen… + Neues Benutzerpasswort festlegen… From be94921918da5edb16080208c2a6eb46b14debeb Mon Sep 17 00:00:00 2001 From: Alexander Eisele Date: Wed, 6 May 2020 21:56:57 +0000 Subject: [PATCH 065/156] Translated using Weblate (German) Currently translated at 98.7% (1650 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 8991426c5b..2a9ae7697e 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2411,4 +2411,12 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Datei konnte nicht zur Galerie hinzugefügt werden Neues Benutzerpasswort festlegen… + Nutze die neueste Version von Riot auf deinen anderen Geräten, Riot Web, Riot Desktop, Riot iOS, RiotX für Android oder einen anderen cross-signing fähigen Matrix client + Riot Web +\nRiot Desktop + Riot iOS +\nRiot X für Android + oder einen anderen cross-signing fähigen Matrix Client + Nutze die neueste Version von Riot auf deinen anderen Geräten: + Erzwingt, dass die aktuell ausgehende Gruppen-Sitzung in einem verschlüsseltem Raum verworfen wird From fa004c9d936bef19c527b46e5f42748b449b4ca7 Mon Sep 17 00:00:00 2001 From: laeberkaes Date: Wed, 6 May 2020 22:00:54 +0000 Subject: [PATCH 066/156] Translated using Weblate (German) Currently translated at 98.8% (1652 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 2a9ae7697e..d14b1d425e 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2418,5 +2418,5 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine \nRiot X für Android oder einen anderen cross-signing fähigen Matrix Client Nutze die neueste Version von Riot auf deinen anderen Geräten: - Erzwingt, dass die aktuell ausgehende Gruppen-Sitzung in einem verschlüsseltem Raum verworfen wird + Erzwingt das Verferfen der aktuell ausgehende Gruppensitzung in einem verschlüsseltem Raum From 53ba1c206817f32bc7208cc9381180088a96a682 Mon Sep 17 00:00:00 2001 From: Alexander Eisele Date: Wed, 6 May 2020 22:01:02 +0000 Subject: [PATCH 067/156] Translated using Weblate (German) Currently translated at 98.8% (1652 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index d14b1d425e..0b465650a6 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2419,4 +2419,6 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine oder einen anderen cross-signing fähigen Matrix Client Nutze die neueste Version von Riot auf deinen anderen Geräten: Erzwingt das Verferfen der aktuell ausgehende Gruppensitzung in einem verschlüsseltem Raum + Wird nur in verschlüsselten Räumen unterstützt + Benutze deine %1$s oder deinen %2$s um fortzufahren. From 26105dc25f733c349716d77885dd50c2b6ab873b Mon Sep 17 00:00:00 2001 From: laeberkaes Date: Wed, 6 May 2020 22:03:19 +0000 Subject: [PATCH 068/156] Translated using Weblate (German) Currently translated at 98.9% (1653 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 0b465650a6..ec0afc1520 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2420,5 +2420,5 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Nutze die neueste Version von Riot auf deinen anderen Geräten: Erzwingt das Verferfen der aktuell ausgehende Gruppensitzung in einem verschlüsseltem Raum Wird nur in verschlüsselten Räumen unterstützt - Benutze deine %1$s oder deinen %2$s um fortzufahren. + Benutze dein %1$s oder deinen %2$s um fortzufahren. From 14e8bbcec6bc381e4e5d208a055ba5a5d0f6e5a5 Mon Sep 17 00:00:00 2001 From: Alexander Eisele Date: Wed, 6 May 2020 22:03:31 +0000 Subject: [PATCH 069/156] Translated using Weblate (German) Currently translated at 98.9% (1653 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/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 ec0afc1520..0db2c4017e 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2421,4 +2421,5 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Erzwingt das Verferfen der aktuell ausgehende Gruppensitzung in einem verschlüsseltem Raum Wird nur in verschlüsselten Räumen unterstützt Benutze dein %1$s oder deinen %2$s um fortzufahren. + Nutze Wiederherstellungsschlüssel From be9fa268b1433fd2cb4aa69abc2e9a06229f1ce2 Mon Sep 17 00:00:00 2001 From: laeberkaes Date: Wed, 6 May 2020 22:03:45 +0000 Subject: [PATCH 070/156] Translated using Weblate (German) Currently translated at 98.9% (1654 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 0db2c4017e..dbef5fcf93 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2421,5 +2421,5 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Erzwingt das Verferfen der aktuell ausgehende Gruppensitzung in einem verschlüsseltem Raum Wird nur in verschlüsselten Räumen unterstützt Benutze dein %1$s oder deinen %2$s um fortzufahren. - Nutze Wiederherstellungsschlüssel + Wiederherstellungsschlüssel verwenden From 717e5161a6865cd9e5ccbf48f876dfc5220ef32f Mon Sep 17 00:00:00 2001 From: Alexander Eisele Date: Wed, 6 May 2020 22:04:09 +0000 Subject: [PATCH 071/156] Translated using Weblate (German) Currently translated at 98.9% (1654 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/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 dbef5fcf93..8f610068e8 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2422,4 +2422,5 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Wird nur in verschlüsselten Räumen unterstützt Benutze dein %1$s oder deinen %2$s um fortzufahren. Wiederherstellungsschlüssel verwenden + Wähle deinen Wiederherstellungsschüssel, geben ihn ein oder füge ihn aus der Zwischenablage ein From d51ee19f3fb9a2cd893df0bbaac65672afab5635 Mon Sep 17 00:00:00 2001 From: laeberkaes Date: Wed, 6 May 2020 22:05:07 +0000 Subject: [PATCH 072/156] Translated using Weblate (German) Currently translated at 99.3% (1660 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 8f610068e8..120f06f98b 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2422,5 +2422,5 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Wird nur in verschlüsselten Räumen unterstützt Benutze dein %1$s oder deinen %2$s um fortzufahren. Wiederherstellungsschlüssel verwenden - Wähle deinen Wiederherstellungsschüssel, geben ihn ein oder füge ihn aus der Zwischenablage ein + Wähle deinen Wiederherstellungsschüssel, gib ihn ein oder füge ihn aus der Zwischenablage ein From d6fe6e44bd3a299d229345271cc62f7be4404ed7 Mon Sep 17 00:00:00 2001 From: Alexander Eisele Date: Wed, 6 May 2020 22:05:34 +0000 Subject: [PATCH 073/156] Translated using Weblate (German) Currently translated at 99.3% (1660 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 120f06f98b..6ef0289a21 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2423,4 +2423,11 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Benutze dein %1$s oder deinen %2$s um fortzufahren. Wiederherstellungsschlüssel verwenden Wähle deinen Wiederherstellungsschüssel, gib ihn ein oder füge ihn aus der Zwischenablage ein + Sicherung konnte mit diesem Wiederherstellungsschlüssel nicht entschlüsselt werden. Bitte stelle sicher, dass du den korrekten Wiederherstellungsschlüssel eingegeben hast. + Konnte nicht auf gesicherten Speicher zugreifen + + Unverschlüsselt + Verschlüsselt von einem unbekannten Gerät + Überprüfe, wo du eingeloggt bist + Bestätige all deine Sitzungen, um sicher zu stellen, dass dein Konto & Nachrichten sicher sind From 22d06928c88247d51bf29c3071642947b5187c16 Mon Sep 17 00:00:00 2001 From: laeberkaes Date: Wed, 6 May 2020 22:06:48 +0000 Subject: [PATCH 074/156] Translated using Weblate (German) Currently translated at 99.6% (1665 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 6ef0289a21..bd2c3ba0a4 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2429,5 +2429,5 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Unverschlüsselt Verschlüsselt von einem unbekannten Gerät Überprüfe, wo du eingeloggt bist - Bestätige all deine Sitzungen, um sicher zu stellen, dass dein Konto & Nachrichten sicher sind + Verifiziere alle deine Sitzungen, um sicher zu stellen, dass dein Konto & deine Nachrichten sicher sind From 1785d4d0b4e36c33c447d28587a42bf30a17cb5a Mon Sep 17 00:00:00 2001 From: Alexander Eisele Date: Wed, 6 May 2020 22:07:11 +0000 Subject: [PATCH 075/156] Translated using Weblate (German) Currently translated at 99.6% (1665 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index bd2c3ba0a4..cbab7b4f2c 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2430,4 +2430,10 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Verschlüsselt von einem unbekannten Gerät Überprüfe, wo du eingeloggt bist Verifiziere alle deine Sitzungen, um sicher zu stellen, dass dein Konto & deine Nachrichten sicher sind + Bestätige neue Anmeldung für dein Konto: %1$s + + Verifiziere manuell mit einem Text + Verifiziere Anmeldung + Verifiziere interaktiv mit Emojis + Bestätige deine Identität indem du diesen Login von einer deiner anderen Sitzungen verifizierst um Zugriff auf deine verschlüsselten Nachrichten zu erhalten. From 07c625973494a34df18046270b712d78d309b5fb Mon Sep 17 00:00:00 2001 From: laeberkaes Date: Wed, 6 May 2020 22:08:11 +0000 Subject: [PATCH 076/156] Translated using Weblate (German) Currently translated at 99.9% (1671 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index cbab7b4f2c..2a35f87579 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2435,5 +2435,5 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Verifiziere manuell mit einem Text Verifiziere Anmeldung Verifiziere interaktiv mit Emojis - Bestätige deine Identität indem du diesen Login von einer deiner anderen Sitzungen verifizierst um Zugriff auf deine verschlüsselten Nachrichten zu erhalten. + Bestätige deine Identität, indem du diesen Login von einer deiner anderen Sitzungen verifizierst, um Zugriff auf deine verschlüsselten Nachrichten zu erhalten. From b44b0ec998f46eacb897393ebcdf0c3e41a5f4ac Mon Sep 17 00:00:00 2001 From: Alexander Eisele Date: Wed, 6 May 2020 22:08:16 +0000 Subject: [PATCH 077/156] Translated using Weblate (German) Currently translated at 99.9% (1671 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 2a35f87579..9b720eef4d 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2436,4 +2436,14 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Verifiziere Anmeldung Verifiziere interaktiv mit Emojis Bestätige deine Identität, indem du diesen Login von einer deiner anderen Sitzungen verifizierst, um Zugriff auf deine verschlüsselten Nachrichten zu erhalten. - + Als vertraut markieren + + Bitte wähle einen Benutzernamen. + Bitte wähle ein Passwort. + Überprüfe diesen Link genau + Dieser Link %1$s bringt dich zu einer anderen Seite: %2$s. +\n +\nWillst du wirklich fortfahren\? + + Konnte Direkt-Nachrichten Raum nicht erzeugen. Prüfe die Nutzer, die du einladen willst und versuche es erneut. + From 0aa90c3eea6ea168a6acc15e922a05a630f963df Mon Sep 17 00:00:00 2001 From: Ville Ranki Date: Thu, 7 May 2020 06:15:01 +0000 Subject: [PATCH 078/156] Translated using Weblate (Finnish) Currently translated at 100.0% (163 of 163 strings) Translation: Riot Android/RiotX Matrix SDK Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/fi/ --- matrix-sdk-android/src/main/res/values-fi/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/matrix-sdk-android/src/main/res/values-fi/strings.xml b/matrix-sdk-android/src/main/res/values-fi/strings.xml index 9487aa7db4..cdad3f3e41 100644 --- a/matrix-sdk-android/src/main/res/values-fi/strings.xml +++ b/matrix-sdk-android/src/main/res/values-fi/strings.xml @@ -209,4 +209,6 @@ %1$s laittoi päälle osapuolten välisen salauksen. %1$s laittoi päälle osapuolisten välisen salauksen (tuntematon algoritmi %2$s). +%s haluaa vahvistaa salausavaimesi, mutta asiakasohjelmasi ei tue keskustelun aikana tapahtuvaa avainten vahvistusta. Joudut käyttämään perinteistä vahvistustapaa avainten vahvistamiseen. + From 6bbded1e65ab00a3035bbe2440e3afefa64ecf58 Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Thu, 7 May 2020 15:14:31 +0000 Subject: [PATCH 079/156] Use string resource for generating ticker text. --- .../riotx/features/notifications/NotificationDrawerManager.kt | 4 ++-- vector/src/main/res/values/strings.xml | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/vector/src/main/java/im/vector/riotx/features/notifications/NotificationDrawerManager.kt b/vector/src/main/java/im/vector/riotx/features/notifications/NotificationDrawerManager.kt index 7307e08c56..66a80be89e 100644 --- a/vector/src/main/java/im/vector/riotx/features/notifications/NotificationDrawerManager.kt +++ b/vector/src/main/java/im/vector/riotx/features/notifications/NotificationDrawerManager.kt @@ -344,9 +344,9 @@ class NotificationDrawerManager @Inject constructor(private val context: Context } val tickerText = if (roomEventGroupInfo.isDirect) { - String.format("%s: %s", events[0].senderName, events[0].description) + stringProvider.getString(R.string.notification_ticker_text_dm, events[0].senderName, events[0].description) } else { - String.format("%s: %s %s", roomName, events[0].senderName, events[0].description) + stringProvider.getString(R.string.notification_ticker_text_group, roomName, events[0].senderName, events[0].description) } val notification = notificationUtils.buildMessagesListNotification( diff --git a/vector/src/main/res/values/strings.xml b/vector/src/main/res/values/strings.xml index ae2cb7bbbb..9d20908b14 100644 --- a/vector/src/main/res/values/strings.xml +++ b/vector/src/main/res/values/strings.xml @@ -1089,6 +1089,8 @@ New Invitation Me ** Failed to send - please open room + %1$s: %2$s + %1$s: %2$s %3$s Search for historical From 6e8e7164c6f0c5cc365d97d09879b19074eed9fe Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Thu, 7 May 2020 15:29:42 +0000 Subject: [PATCH 080/156] Use last event when generating ticker text. --- .../riotx/features/notifications/NotificationDrawerManager.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vector/src/main/java/im/vector/riotx/features/notifications/NotificationDrawerManager.kt b/vector/src/main/java/im/vector/riotx/features/notifications/NotificationDrawerManager.kt index 66a80be89e..9e3a298378 100644 --- a/vector/src/main/java/im/vector/riotx/features/notifications/NotificationDrawerManager.kt +++ b/vector/src/main/java/im/vector/riotx/features/notifications/NotificationDrawerManager.kt @@ -344,9 +344,9 @@ class NotificationDrawerManager @Inject constructor(private val context: Context } val tickerText = if (roomEventGroupInfo.isDirect) { - stringProvider.getString(R.string.notification_ticker_text_dm, events[0].senderName, events[0].description) + stringProvider.getString(R.string.notification_ticker_text_dm, events.last().senderName, events.last().description) } else { - stringProvider.getString(R.string.notification_ticker_text_group, roomName, events[0].senderName, events[0].description) + stringProvider.getString(R.string.notification_ticker_text_group, roomName, events.last().senderName, events.last().description) } val notification = notificationUtils.buildMessagesListNotification( From 35ee7f0b40bc03d1f659c366750d7ae2b98659b9 Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Thu, 7 May 2020 15:38:28 +0000 Subject: [PATCH 081/156] Add changelog entry. --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index 16b39cc6b1..2bdef0f177 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -17,6 +17,7 @@ Improvements 🙌: - Cross-Signing | Restore history after recover from passphrase (#1214) - Cross-Sign | QR code scan confirmation screens design update (#1187) - Emoji Verification | It's not the same butterfly! (#1220) + - Improve notification accessibility with ticker text (#1226) Bugfix 🐛: - Missing avatar/displayname after verification request message (#841) From 44f946513f22b1410427e7cf956fa18cae22d058 Mon Sep 17 00:00:00 2001 From: LinAGKar Date: Fri, 8 May 2020 06:15:51 +0000 Subject: [PATCH 082/156] Added translation using Weblate (Swedish) --- vector/src/main/res/values-sv/strings.xml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 vector/src/main/res/values-sv/strings.xml diff --git a/vector/src/main/res/values-sv/strings.xml b/vector/src/main/res/values-sv/strings.xml new file mode 100644 index 0000000000..a6b3daec93 --- /dev/null +++ b/vector/src/main/res/values-sv/strings.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file From c2b2b856a1438c6f6a1b00714e51b45f987ac7fe Mon Sep 17 00:00:00 2001 From: Besnik Bleta Date: Wed, 6 May 2020 20:04:35 +0000 Subject: [PATCH 083/156] Translated using Weblate (Albanian) Currently translated at 99.6% (1665 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/sq/ --- vector/src/main/res/values-sq/strings.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/vector/src/main/res/values-sq/strings.xml b/vector/src/main/res/values-sq/strings.xml index 10ecd0af4d..7f771a81ea 100644 --- a/vector/src/main/res/values-sq/strings.xml +++ b/vector/src/main/res/values-sq/strings.xml @@ -592,7 +592,7 @@ Importo Jepni frazëkalimin Fshehtëzoje vetëm për sesione të verifikuar - Jo i verifikuar + Jo i Verifikuar I verifikuar Në Listë të Zezë @@ -2147,7 +2147,7 @@ Që të garantoni se s’ju shpëton gjë, thjesht mbajeni të aktivizuar mekani Mundësi e Përzgjedhur Krijoni një pyetësor të thjeshtë - Përdorni metodë rimarrjesh + Përdorni Frazëkalim Rikthimesh ose Kyç Nëse s’hyni dot në një sesion ekzistues Hyrje e Re @@ -2204,7 +2204,7 @@ Që të garantoni se s’ju shpëton gjë, thjesht mbajeni të aktivizuar mekani Verifikoni pajisjet tuaja që prej Rregullimeve. Verifikimi u Anulua - Fjalëkalim Mesazhesh + Frazëkalim Rikthimesh Kyç Mesazhesh Fjalëkalim Llogarie @@ -2278,7 +2278,7 @@ Që të garantoni se s’ju shpëton gjë, thjesht mbajeni të aktivizuar mekani Emër përdoruesi dhe/ose fjalëkalim i pasaktë. Fjalëkalimi i dhënë fillon ose mbaron me hapësirë, ju lutemi, kontrollojeni. - + Po publikohen kyçe të krijuar identiteti Mesazh… @@ -2325,7 +2325,7 @@ Që të garantoni se s’ju shpëton gjë, thjesht mbajeni të aktivizuar mekani Përdorni Kyçin Rimarrjesh Përzgjidhni Kyçin tuaj të Rimarrjeve, ose jepeni dorazi duke e shtypur ose duke e ngjitur prej të papastrës tuaj Kopjeruajtja s’u shfshehtëzua dot me këtë Kyç Rimarrjesh: ju lutemi, verifikoni se keni dhënë Kyçin e saktë të Rimarrjeve. - S\"u arrit të hyhet në depozitë të sigurt + S’u arrit të hyhet në depozitë të sigurt Të pafshehtëzuara Fshehtëzuar nga një pajisje e paverifikuar @@ -2335,11 +2335,11 @@ Që të garantoni se s’ju shpëton gjë, thjesht mbajeni të aktivizuar mekani Verifikojeni Dorazi përmes Teksti Verifikoni kredenciale hyrjeje - Verifikojeni përmes Emoji-sh + Verifikojeni Në Mënyrë Interaktive përmes Emoji-sh Ripohoni identitetin tuaj duke verifikuar këto kredenciale hyrjesh prej një nga sesionet tuaj të tjerë, duke i akorduar hyrje te mesazhet e fshehtëzuar. Vërini shenjë si i Besuar - Ju lutemi zgjidhni një emër përdoruesi. + Ju lutemi, zgjidhni një emër përdoruesi. Ju lutemi, zgjidhni një fjalëkalim. Kontrollojeni edhe një herë këtë lidhje Lidhja %1$s po ju shpie te një tjetër sajt: %2$s. From 67d1c2dc801298e18151c993b9b61ed8076c8fbd Mon Sep 17 00:00:00 2001 From: Besnik Bleta Date: Wed, 6 May 2020 17:31:43 +0000 Subject: [PATCH 084/156] Translated using Weblate (Albanian) Currently translated at 98.8% (161 of 163 strings) Translation: Riot Android/RiotX Matrix SDK Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/sq/ --- matrix-sdk-android/src/main/res/values-sq/strings.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/matrix-sdk-android/src/main/res/values-sq/strings.xml b/matrix-sdk-android/src/main/res/values-sq/strings.xml index e966f22064..521c805be8 100644 --- a/matrix-sdk-android/src/main/res/values-sq/strings.xml +++ b/matrix-sdk-android/src/main/res/values-sq/strings.xml @@ -4,8 +4,8 @@ %1$s dërgoi një figurë. %1$s ftoi %2$s %1$s ju ftoi - %1$s u bë pjesë - %1$s iku + %1$s hyri në dhomë + %1$s doli nga dhoma %1$s hodhi tej ftesën %1$s përzuri %2$s %1$s dëboi %2$s @@ -172,8 +172,8 @@ Ftesë e %1$s. Arsye: %2$s %1$s ftoi %2$s. Arsye: %3$s %1$s ju ftoi. Arsye: %2$s - %1$s erdhi. Arsye: %2$s - %1$s iku. Arsye: %2$s + %1$s erdhi në dhomë. Arsye: %2$s + %1$s doli nga dhoma. Arsye: %2$s %1$s hodhi poshtë ftesën. Arsye: %2$s %1$s përzuri %2$s. Arsye: %3$s %1$s hoqi dëbimin për %2$s. Arsye: %3$s From f1613eacbb729a0485ea54794e126496d04b5bf8 Mon Sep 17 00:00:00 2001 From: Ville Ranki Date: Thu, 7 May 2020 06:10:18 +0000 Subject: [PATCH 085/156] Translated using Weblate (Finnish) Currently translated at 94.0% (1572 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/fi/ --- vector/src/main/res/values-fi/strings.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vector/src/main/res/values-fi/strings.xml b/vector/src/main/res/values-fi/strings.xml index 046508524d..fcd2dcad43 100644 --- a/vector/src/main/res/values-fi/strings.xml +++ b/vector/src/main/res/values-fi/strings.xml @@ -2282,4 +2282,10 @@ Jotta et menetä mitään, automaattiset päivitykset kannattaa pitää käytös Tätä ei pysty tekemään kännykällä + Mukautettu + Mukautettu (%1$d) %2$s:ssä + + Syy poistoon + + Viestin avain From 6c1c1ca8b026712e897683fb317ca5952d2a0592 Mon Sep 17 00:00:00 2001 From: Samu Voutilainen Date: Thu, 7 May 2020 06:15:43 +0000 Subject: [PATCH 086/156] Translated using Weblate (Finnish) Currently translated at 100.0% (163 of 163 strings) Translation: Riot Android/RiotX Matrix SDK Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/fi/ --- matrix-sdk-android/src/main/res/values-fi/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matrix-sdk-android/src/main/res/values-fi/strings.xml b/matrix-sdk-android/src/main/res/values-fi/strings.xml index cdad3f3e41..ecb2edd303 100644 --- a/matrix-sdk-android/src/main/res/values-fi/strings.xml +++ b/matrix-sdk-android/src/main/res/values-fi/strings.xml @@ -209,6 +209,6 @@ %1$s laittoi päälle osapuolten välisen salauksen. %1$s laittoi päälle osapuolisten välisen salauksen (tuntematon algoritmi %2$s). -%s haluaa vahvistaa salausavaimesi, mutta asiakasohjelmasi ei tue keskustelun aikana tapahtuvaa avainten vahvistusta. Joudut käyttämään perinteistä vahvistustapaa avainten vahvistamiseen. +%s haluaa varmentaa salausavaimesi, mutta asiakasohjelmasi ei tue keskustelun aikana tapahtuvaa avainten varmennusta. Joudut käyttämään perinteistä varmennustapaa. From 17db994d35593ffcc5efdf89dcc5a40d8b728069 Mon Sep 17 00:00:00 2001 From: laeberkaes Date: Wed, 6 May 2020 22:10:26 +0000 Subject: [PATCH 087/156] Translated using Weblate (German) Currently translated at 99.9% (1671 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 9b720eef4d..f3663c59af 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -2445,5 +2445,5 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine \n \nWillst du wirklich fortfahren\? - Konnte Direkt-Nachrichten Raum nicht erzeugen. Prüfe die Nutzer, die du einladen willst und versuche es erneut. + Konnte Direktnachricht nicht erzeugen. Prüfe die Nutzer, die du einladen willst und versuche es erneut. From 8616c454e1cc58d079da847ad91f487d69d21c0b Mon Sep 17 00:00:00 2001 From: laeberkaes Date: Wed, 6 May 2020 21:10:52 +0000 Subject: [PATCH 088/156] Translated using Weblate (German) Currently translated at 100.0% (163 of 163 strings) Translation: Riot Android/RiotX Matrix SDK Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/de/ --- matrix-sdk-android/src/main/res/values-de/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/matrix-sdk-android/src/main/res/values-de/strings.xml b/matrix-sdk-android/src/main/res/values-de/strings.xml index dc874c2b94..871d01175e 100644 --- a/matrix-sdk-android/src/main/res/values-de/strings.xml +++ b/matrix-sdk-android/src/main/res/values-de/strings.xml @@ -179,8 +179,8 @@ %1$s\'s Einladung. Grund: %2$s %1$s hat %2$s eingeladen. Grund: %3$s %1$s hat dich eingeladen. Grund: %2$s - %1$s beigetreten. Grund: %2$s - %1$s ging. Grund: %2$s + %1$s ist dem Raum beigetreten. Grund: %2$s + %1$s hat den Raum verlassen. Grund: %2$s %1$s hat die Einladung abgelehnt. Grund: %2$s %1$s hat %2$s gekickt. Grund: %3$s %1$s hat Sperre von %2$s aufgehoben. Grund: %3$s From c33f3b76fa3c0e07f74cb652e6527188248a1f06 Mon Sep 17 00:00:00 2001 From: LinAGKar Date: Fri, 8 May 2020 06:21:21 +0000 Subject: [PATCH 089/156] Translated using Weblate (Swedish) Currently translated at 0.5% (8 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/sv/ --- vector/src/main/res/values-sv/strings.xml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/vector/src/main/res/values-sv/strings.xml b/vector/src/main/res/values-sv/strings.xml index a6b3daec93..dbcb290594 100644 --- a/vector/src/main/res/values-sv/strings.xml +++ b/vector/src/main/res/values-sv/strings.xml @@ -1,2 +1,12 @@ - - \ No newline at end of file + +sv + SE + Latn + + Ljust tema + Mörkt tema + Svart tema + Status.im-tema + + Initialiserar tjänsten + From 690d05aeca44d691e9e9a3ef6dd2ec3fd51812c0 Mon Sep 17 00:00:00 2001 From: LinAGKar Date: Sat, 9 May 2020 10:13:31 +0000 Subject: [PATCH 090/156] Translated using Weblate (Danish) Currently translated at 23.8% (398 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/da/ --- vector/src/main/res/values-da/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/res/values-da/strings.xml b/vector/src/main/res/values-da/strings.xml index 62383f40bb..411a8d4099 100644 --- a/vector/src/main/res/values-da/strings.xml +++ b/vector/src/main/res/values-da/strings.xml @@ -378,7 +378,7 @@ Er du sikker? Er du sikker på, at du ønsker at starte en ny chat med %s? Er du sikker på, at du ønsker at starte et opkald? - Er du sikker på, at du ønsker at du ønsker at starte et videoopkald? + Er du sikker på, at du ønsker at starte et videoopkald\? Inviter Liste over grupper From 247ffc12707c84c9b1a7b43d335187f52ede124d Mon Sep 17 00:00:00 2001 From: Tirifto Date: Fri, 8 May 2020 14:33:37 +0000 Subject: [PATCH 091/156] Translated using Weblate (Esperanto) Currently translated at 82.2% (134 of 163 strings) Translation: Riot Android/RiotX Matrix SDK Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/eo/ --- .../src/main/res/values-eo/strings.xml | 162 +++++++++++++++++- 1 file changed, 154 insertions(+), 8 deletions(-) diff --git a/matrix-sdk-android/src/main/res/values-eo/strings.xml b/matrix-sdk-android/src/main/res/values-eo/strings.xml index c88d96d610..32e05589f6 100644 --- a/matrix-sdk-android/src/main/res/values-eo/strings.xml +++ b/matrix-sdk-android/src/main/res/values-eo/strings.xml @@ -3,20 +3,166 @@ %1$s sendis bildon. %1$s sendis glumarkon. - invito de %s - %1$s invitis %2$s + Invito de %s + %1$s invitis uzanton %2$s %1$s invitis vin %1$s alvenis %1$s foriris %1$s malakceptis la inviton - %1$s forpelis %2$s - %1$s malforbaris %2$s - %1$s forbaris %2$s - %1$s malinvitis %2$s + %1$s forpelis uzanton %2$s + %1$s malforbaris uzanton %2$s + %1$s forbaris uzanton %2$s + %1$s nuligis inviton por %2$s %1$s ŝanĝis sian profilbildon ** Ne eblas malĉifri: %s ** La aparato de la sendanto ne sendis al ni la ŝlosilojn por tiu mesaĝo. - Respondanta al + Responde al - +%1$s: %2$s + %1$s ŝanĝis sian vidigan nomon al %2$s + %1$s ŝanĝis sian vidigan nomon de %2$s al %3$s + %1$s forigis sian vidigan nomon (%2$s) + %1$s ŝanĝis la temon al: %2$s + %1$s ŝanĝis nomon de la ĉambro al: %2$s + %s vidvokis. + %s voĉvokis. + %s respondis la vokon. + %s finis la vokon. + %1$s videbligis estontan historion de ĉambro al %2$s + ĉiuj ĉambranoj, ekde iliaj invitoj. + ĉiuj ĉambranoj, ekde iliaj aliĝoj. + ĉiuj ĉambranoj. + ĉiu ajn. + nekonata (%s). + %1$s ŝaltis tutvojan ĉifradon (%2$s) + %s gradaltigis la ĉambron. + + Mesaĝo foriĝis + Mesaĝo foriĝis de %1$s + Mesaĝo foriĝis [kialo: %1$s] + Mesaĝo foriĝis de %1$s [kialo: %2$s] + %1$s ĝisdatigis sian profilon %2$s + %1$s sendis aliĝan inviton al %2$s + %1$s nuligis la aliĝan inviton por %2$s + %1$s akceptis la inviton por %2$s + + Ne povis redakti + Ne povas sendi mesaĝon + + Malsukcesis alŝuti bildon + + Reta eraro + Matrix-eraro + + Nun ne eblas re-aliĝi al malplena ĉambro + + Ĉifrita mesaĝo + + Retpoŝtadreso + Telefonnumero + + sendis bildon. + sendis filmon. + sendis sondosieron. + sendis dosieron. + + Invito de %s + Ĉambra invito + + %1$s kaj %2$s + + + %1$s kaj 1 alia + %1$s kaj %2$d aliaj + + + Malplena ĉambro + + + Hundo + Kato + Leono + Ĉevalo + Unukorno + Porko + Elefanto + Kuniklo + Pando + Koko + Pingveno + Testudo + Fiŝo + Polpo + Papilio + Floro + Arbo + Kakto + Fungo + Globo + Luno + Nubo + Fajro + Banano + Pomo + Frago + Maizo + Pico + Kuko + Koro + Mieneto + Roboto + Ĉapelo + Okulvitroj + Boltilo + Kristnaska viro + Dikfingro supren + Ombrelo + Sablohorloĝo + Horloĝo + Donaco + Lampo + Libro + Grifelo + Paperkuntenilo + Tondilo + Seruro + Ŝlosilo + Martelo + Telefono + Flago + Vagonaro + Biciklo + Aviadilo + Raketo + Trofeo + Pilko + Gitaro + Trumpeto + Sonorilo + Ankro + Kapaŭdilo + Dosierujo + Pinglo + + Komenca spegulado: +\nEnportante konton… + Komenca spegulado: +\nEnportante ĉifrilojn + Komenca spegulado: +\nEnportante ĉambrojn + Komenca spegulado: +\nEnportante aliĝitajn ĉambrojn + Komenca spegulado: +\nEnportante ĉambrojn de invitoj + Komenca spegulado: +\nEnportante forlasitajn ĉambrojn + Komenca spegulado: +\nEnportante komunumojn + Komenca spegulado: +\nEnportante datumojn de konto + + Sendante mesaĝon… + Vakigi sendan atendovicon + + From 9a9f0c200eac379f2a060750d520a8a3cf4ff91e Mon Sep 17 00:00:00 2001 From: Alexander Eisele Date: Fri, 8 May 2020 10:31:56 +0000 Subject: [PATCH 092/156] Translated using Weblate (German) Currently translated at 100.0% (1672 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index f3663c59af..f6377e20d7 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -247,9 +247,9 @@ Information Riot benötigt die Berechtigung, auf deine Fotos und Videos zugreifen zu können, um Anhänge zu senden und zu speichern.\n\nBitte erlaube den Zugriff im nächsten Dialog, um Dateien von deinem Gerät zu versenden. Riot benötigt die Berechtigung, auf deine Kamera zugreifen zu können, um Bilder aufzunehmen und Video-Anrufe durchzuführen. - - -Bitte erlaube den Zugriff im nächsten Dialog, um den Anruf zu durchzuführen. + " +\n +\nBitte erlaube den Zugriff im nächsten Dialog, um den Anruf zu durchzuführen." Riot benötigt die Berechtigung, auf dein Mikrofon zugreifen zu können, um (Sprach-)Anrufe tätigen zu können. @@ -768,12 +768,12 @@ Du kannst sie jetzt aktivieren oder später über das Einstellungsmenü.Lädt… Schließen - Communities + Gemeinschaften Community-Namen filtern Einladen - Communities + Gemeinschaften Keine Gruppen Bist du sicher, dass du einen neuen Chat mit %s starten möchtest? @@ -2356,7 +2356,7 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Verschlüsselung ist nicht aktiviert Dies kann nicht von einem mobilen Gerät erfolgen - Wenn sich Raumversionen ändern + Wenn Räume verbessert werden Verschlüsselung aktiviert Nachrichten in diesem Raum sind Ende-zu-Ende verschlüsselt. Erfahre mehr & verifiziere Benutzer in deren Profil. Die Verschlüsselung in diesem Raum wird nicht unterstützt From d8d78b124deb8aba78ce263e1571fbb920f05c48 Mon Sep 17 00:00:00 2001 From: "@a2sc:matrix.org" Date: Fri, 8 May 2020 10:32:59 +0000 Subject: [PATCH 093/156] Translated using Weblate (German) Currently translated at 100.0% (1672 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index f6377e20d7..9cba959593 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -251,9 +251,9 @@ \n \nBitte erlaube den Zugriff im nächsten Dialog, um den Anruf zu durchzuführen." Riot benötigt die Berechtigung, auf dein Mikrofon zugreifen zu können, um (Sprach-)Anrufe tätigen zu können. - - -Bitte erlaube den Zugriff im nächsten Dialog, um den Anruf durchzuführen. + " +\n +\nBitte erlaube den Zugriff im nächsten Dialog, um den Anruf durchzuführen." Riot benötigt die Berechtigung, auf deine Kamera und dein Mikrofon zugreifen zu können, um Video-Anrufe durchführen zu können. Bitte erlaube den Zugriff im nächsten Dialog, um den Anruf durchzuführen. @@ -646,8 +646,8 @@ Achtung: Diese Datei wird vielleicht gelöscht, wenn die App deinstalliert wird. Zulassen Sitzung verifizieren - Um zu verifizieren, dass dieser Sitzung vertraut werden kann, kontaktiere bitte den/die Eigentümer!n der Sitzung über andere Kommunikationsmittel (z. B. persönlich oder telefonisch) und vergewissere dich, ob der Schüssel, den er/sie in den Benutzereinstellungen für diese Sitzung sieht, mit folgendem übereinstimmt: - Wenn er übereinstimmt, drücke unten den Bestätigen-Button. Stimmt er nicht überein, überwacht jemand anderes diese Sitzung und du solltest ggf. den Blockieren-Button drücken. In Zukunft wird dieser Bestätigungsprozess noch komfortabler gestaltet. + Vergleiche die folgenden Zeichen mit den Einstellungen in der Sitzung des/der anderen Nutzer!n und bestätige: + Falls sie nicht übereinstimmen, wurde die Kommunikation vielleicht kompromittiert. Ich bestätige, dass die Schlüssel übereinstimmen Riot unterstützt jetzt Ende-zu-Ende-Verschlüsselung, du musst dich jedoch erneut anmelden, um sie zu aktivieren. @@ -1302,9 +1302,9 @@ Dieser Fehler ist außerhalb von Riot passiert. Es gibt kein Google-Konto auf de Sicherung wiederhergestellt %s ! %1$d Sitzungsschlüssel wurde(n) wiederhergestellt und %2$d vorher unbekannte(r) Schlüssel wurde(n) hinzugefügt - Backup mit %d Schlüssel wiederhergestellt. - Backup mit %d Schlüssel wiederhergestellt. - + Backup mit %d Schlüssel wiederhergestellt. + Backup mit %d Schlüsseln wiederhergestellt. + %d neuer Schlüssel wurde dieser Sitzung hinzugefügt. %d neue Schlüssel wurden dieser Sitzung hinzugefügt. From 969f0701756529333317cced1a90faab09ea6b16 Mon Sep 17 00:00:00 2001 From: LinAGKar Date: Fri, 8 May 2020 06:54:58 +0000 Subject: [PATCH 094/156] Translated using Weblate (Swedish) Currently translated at 10.6% (178 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/sv/ --- vector/src/main/res/values-sv/strings.xml | 204 +++++++++++++++++++++- 1 file changed, 203 insertions(+), 1 deletion(-) diff --git a/vector/src/main/res/values-sv/strings.xml b/vector/src/main/res/values-sv/strings.xml index dbcb290594..ef8e94c9e5 100644 --- a/vector/src/main/res/values-sv/strings.xml +++ b/vector/src/main/res/values-sv/strings.xml @@ -8,5 +8,207 @@ Svart tema Status.im-tema - Initialiserar tjänsten + Initialiserar tjänst + Synkroniserar… + Lyssnar efter händelser + Högljudda notifikationer + Tysta notifikationer + + Meddelanden + Rum + Inställningar + Medlemsdetaljer + Historisk + Buggrapport + Gemenskapsdetaljer + Skicka ett klistermärke + Säkerhetskopiering av nycklar + Använd säkerhetskopiering av nycklar + Verifiera session + + Säkerhetskopiering av nycklar är inte färdig, vänligen vänta… + Du kommer att förlora dina krypterade meddelanden om du loggar ut nu + Säkerhetskopiering av nycklar pågår. Om du loggar ut nu så kommer du att förlora åtkomst till dina krypterade meddelanden. + Säker säkerhetskopiering av nycklar bör vara aktivt i alla dina sessioner för att förhindra att du förlorar åtkomst till dina krypterade meddelanden. + Jag vill inte ha mina krypterade meddelanden + Säkerhetskopierar nycklar… + Använd säkerhetskopiering av nycklar + Är du säker\? + Säkerhetskopiera + Du kommer att förlora åtkomst till dina krypterade meddelanden om du inte säkerhetskopierar dina nycklar innan du loggar ut. + + Tredjepartslicenser + + Laddar… + + OK + Avbryt + Spara + Lämna + Stanna + Skicka + Kopiera + Skicka igen + Ta bort + Citat + Ladda ner + Dela + Prata + Rensa + Senare + Vidarebefordra + Permanent länk + Visa källa + Visa avkrypterad källa + Radera + Döp om + Ingen + Återkalla + Koppla ifrån + Rapportera innehåll + Aktivt samtal + Pågående gruppsamtal. +\nAnslut som %1$s eller %2$s + Röst + Video + Kan inte starta samtalet, vänligen försök senare + På grund av saknade rättigheter, så kan vissa funktioner saknas… + På grund av saknade rättigheter så kan denna handling inte utföras. + Du behöver ha rätt att bjuda in för att starta ett gruppsamtal i detta rum + Kan inte starta samtal + Sessionsinformation + Gruppsamtal stöds inte i krypterade rum + Ring ändå + Skicka ändå + eller + Bjud in + Bortkopplad + Godkänn + Hoppa över + Färdig + Avbryt + Ignorera + Granska + Avslå + + Avsluta + Handlingar + Logga ut + Är du säker på att du vill logga ut\? + Röstsamtal + Videosamtal + Global sökning + Markera alla som skickade + Historisk + Snabbsvar + Markera som läst + Öppna + Stäng + Kopierat till klippbordet + Stäng av + + Bekräftelse + Varning + Fel + + Hem + Favoriter + Personer + Rum + Gemenskaper + + Filtrera rumsnamn + Filtrera favoriter + Filtrera personer + Filtrera rumsnamn + Filtrera gemenskapsnamn + + Inbjudningar + Låg prioritet + Systemvarningar + + Konversationer + Lokal adressbok + Användarkatalog + Bara Matrix-kontakter + Inga konversationer + Du gav inte Riot tillgång till dina lokala kontakter + Inga resultat + Ingen identitetsserver konfigurerad. + + Rum + Rumskatalog + Inga rum + Inga publika rum tillgängliga + + 1 användare + %d användare + + + Bjud in + Gemenskaper + Inga grupper + + Skicka loggar + Skicka kraschloggar + Skicka skärmdump + Rapportera bugg + Vänligen beskriv buggen. Vad gjorde du\? Vad förväntade du dig skulle hända\? Vad hände istället\? + Om möjligt, skriv vänligen beskrivningen på engelska. + Beskriv ditt problem här + För att diagnostisera problemet kommer loggar från den här klienten att skickas med den här buggrapporten. Denna buggrapport, inklusive loggarna och skärmdumpen, kommer att vara publikt synlig. Om du skulle föredra att endast skicka texten ovan, vänligen avmarkera: + Du verkar skaka din telefon i frustration. Vill du skicka en buggrapport\? + Appen kraschade senaste gången. Vill du skicka en buggrapport\? + Raseriskaka för att rapportera bugg + + Buggrapporten har skickats framgångsrikt + Sändning av buggrapporten misslyckades (%s) + Framsteg (%s%%) + + Skicka in i + Läs + + Gå med i rummet + Användarnamn + Skapa konto + Logga in + Logga ut + URL för hemserver + URL för identitetsserver + Sök + + Starta ny chatt + Starta röstsamtal + Starta videosamtal + + Skicka röst + + Är du säker på att du vill skapa en ny chatt med %s\? + Är du säker på att du vill starta ett röstsamtal\? + Är du säker på att du vill skapa ett videosamtal\? + Samtal misslyckades p.g.a. felkonfigurerad server + Vänligen be administratören för din hemserver (%1$s) att konfigurera en TURN-server för att samtal ska funka pålitligt. +\n +\nAlternativt så kan du försöka använda den publika servern på %2$s, men detta kommer inte att vara lika pålitligt, och kommer att dela din IP-adress med den servern. Du kan också hantera detta i inställningarna. + Försök med %s + Fråga mig inte igen + + Skicka filer + Skicka klistermärke + Ta foto eller video + Ta ett foto + Ta en video + + Du har för närvarande inga klistermärkespaket aktiva. +\n +\nLägg till några nu\? + + fortsätt med… + Tyvärr har ingen extern applikation hittats som kan fullfölja denna handling. + + Logga in + Logga in med externt konto + Skapa konto + Skicka in + Hoppa över From 738a368a6f475a898c2ebcb7d9330275116a96b7 Mon Sep 17 00:00:00 2001 From: kujaw Date: Sat, 9 May 2020 18:02:14 +0000 Subject: [PATCH 095/156] Translated using Weblate (Polish) Currently translated at 93.1% (1557 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/pl/ --- vector/src/main/res/values-pl/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vector/src/main/res/values-pl/strings.xml b/vector/src/main/res/values-pl/strings.xml index d36b9570b9..d6b8392744 100644 --- a/vector/src/main/res/values-pl/strings.xml +++ b/vector/src/main/res/values-pl/strings.xml @@ -2243,4 +2243,6 @@ Spróbuj uruchomić ponownie aplikację. Odblokuj historię zaszyfrowanych wiadomości + " RiotX Android" + From 54ecc25831d5ccedfb5870a92790d70de8d3c684 Mon Sep 17 00:00:00 2001 From: Emma Vanbrabant Date: Sat, 9 May 2020 19:52:27 +0100 Subject: [PATCH 096/156] Create ShortcutBuilder and use --- .../riotx/features/home/AvatarRenderer.kt | 33 +++++++ .../riotx/features/home/HomeActivity.kt | 3 + .../features/home/HomeDetailViewModel.kt | 1 + .../riotx/features/home/ShortcutsHandler.kt | 97 +++++++++++++++++++ .../home/room/detail/RoomDetailActivity.kt | 19 +++- 5 files changed, 151 insertions(+), 2 deletions(-) create mode 100644 vector/src/main/java/im/vector/riotx/features/home/ShortcutsHandler.kt diff --git a/vector/src/main/java/im/vector/riotx/features/home/AvatarRenderer.kt b/vector/src/main/java/im/vector/riotx/features/home/AvatarRenderer.kt index 6d85dd8a3e..fb0bd121f1 100644 --- a/vector/src/main/java/im/vector/riotx/features/home/AvatarRenderer.kt +++ b/vector/src/main/java/im/vector/riotx/features/home/AvatarRenderer.kt @@ -72,6 +72,27 @@ class AvatarRenderer @Inject constructor(private val activeSessionHolder: Active .into(target) } + @AnyThread + fun shortcutDrawable(context: Context, glideRequest: GlideRequests, matrixItem: MatrixItem): Drawable { + return glideRequest + .asDrawable() + .apply { + val resolvedUrl = resolvedUrl(matrixItem.avatarUrl) + if (resolvedUrl != null) { + load(resolvedUrl) + } else { + val avatarColor = avatarColor(matrixItem, context) + load(TextDrawable.builder() + .beginConfig() + .bold() + .endConfig() + .buildRect(matrixItem.firstLetterOfDisplayName(), avatarColor)) + } + } + .submit() + .get() + } + @AnyThread fun getCachedDrawable(glideRequest: GlideRequests, matrixItem: MatrixItem): Drawable { return buildGlideRequest(glideRequest, matrixItem.avatarUrl) @@ -103,4 +124,16 @@ class AvatarRenderer @Inject constructor(private val activeSessionHolder: Active .load(resolvedUrl) .apply(RequestOptions.circleCropTransform()) } + + private fun resolvedUrl(avatarUrl: String?): String? { + return activeSessionHolder.getSafeActiveSession()?.contentUrlResolver() + ?.resolveThumbnail(avatarUrl, THUMBNAIL_SIZE, THUMBNAIL_SIZE, ContentUrlResolver.ThumbnailMethod.SCALE) + } + + private fun avatarColor(matrixItem: MatrixItem, context: Context): Int { + return when (matrixItem) { + is MatrixItem.UserItem -> ContextCompat.getColor(context, getColorFromUserId(matrixItem.id)) + else -> ContextCompat.getColor(context, getColorFromRoomId(matrixItem.id)) + } + } } diff --git a/vector/src/main/java/im/vector/riotx/features/home/HomeActivity.kt b/vector/src/main/java/im/vector/riotx/features/home/HomeActivity.kt index 60c974c291..839763ffc0 100644 --- a/vector/src/main/java/im/vector/riotx/features/home/HomeActivity.kt +++ b/vector/src/main/java/im/vector/riotx/features/home/HomeActivity.kt @@ -65,6 +65,7 @@ class HomeActivity : VectorBaseActivity(), ToolbarConfigurable { @Inject lateinit var notificationDrawerManager: NotificationDrawerManager @Inject lateinit var vectorPreferences: VectorPreferences @Inject lateinit var popupAlertManager: PopupAlertManager + @Inject lateinit var shortcutsHandler: ShortcutsHandler private val drawerListener = object : DrawerLayout.SimpleDrawerListener() { override fun onDrawerStateChanged(newState: Int) { @@ -144,6 +145,8 @@ class HomeActivity : VectorBaseActivity(), ToolbarConfigurable { && activeSessionHolder.getSafeActiveSession()?.hasAlreadySynced() == true) { promptCompleteSecurityIfNeeded() } + + shortcutsHandler.observeRoomsAndBuildShortcuts(context = this) } private fun promptCompleteSecurityIfNeeded() { diff --git a/vector/src/main/java/im/vector/riotx/features/home/HomeDetailViewModel.kt b/vector/src/main/java/im/vector/riotx/features/home/HomeDetailViewModel.kt index 3824ba7922..e91de984b8 100644 --- a/vector/src/main/java/im/vector/riotx/features/home/HomeDetailViewModel.kt +++ b/vector/src/main/java/im/vector/riotx/features/home/HomeDetailViewModel.kt @@ -16,6 +16,7 @@ package im.vector.riotx.features.home +import androidx.core.content.pm.ShortcutInfoCompat import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.ViewModelContext diff --git a/vector/src/main/java/im/vector/riotx/features/home/ShortcutsHandler.kt b/vector/src/main/java/im/vector/riotx/features/home/ShortcutsHandler.kt new file mode 100644 index 0000000000..d59e84ffa6 --- /dev/null +++ b/vector/src/main/java/im/vector/riotx/features/home/ShortcutsHandler.kt @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2020 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.riotx.features.home + +import android.annotation.SuppressLint +import android.content.Context +import android.graphics.Bitmap +import android.graphics.Canvas +import android.graphics.drawable.Drawable +import android.os.Build +import androidx.core.content.pm.ShortcutInfoCompat +import androidx.core.content.pm.ShortcutManagerCompat +import androidx.core.graphics.drawable.IconCompat +import im.vector.matrix.android.api.session.room.model.RoomSummary +import im.vector.matrix.android.api.session.room.model.tag.RoomTag +import im.vector.matrix.android.api.util.toMatrixItem +import im.vector.riotx.core.glide.GlideApp +import im.vector.riotx.core.utils.DimensionConverter +import im.vector.riotx.features.home.room.detail.RoomDetailActivity +import io.reactivex.schedulers.Schedulers +import javax.inject.Inject + +private val useAdaptiveIcon = Build.VERSION.SDK_INT >= Build.VERSION_CODES.O +private const val adaptiveIconSizeDp = 108 +private const val adaptiveIconOuterSidesDp = 18 + +class ShortcutsHandler @Inject constructor( + private val homeRoomListStore: HomeRoomListDataSource, + private val avatarRenderer: AvatarRenderer, + private val dimensionConverter: DimensionConverter +) { + + @SuppressLint("CheckResult") + fun observeRoomsAndBuildShortcuts(context: Context) { + homeRoomListStore + .observe() + .observeOn(Schedulers.computation()) + .subscribe { rooms -> + val shortcuts = rooms + .favoriteRooms() + .map { room -> + val intent = RoomDetailActivity.shortcutIntent(context, room.roomId) + val drawable = avatarRenderer.shortcutDrawable(context, GlideApp.with(context), room.toMatrixItem()) + + ShortcutInfoCompat.Builder(context, room.roomId) + .setShortLabel(room.displayName) + .setIcon(drawable.toProfileImageIcon()) + .setIntent(intent) + .build() + } + + ShortcutManagerCompat.removeAllDynamicShortcuts(context) + ShortcutManagerCompat.addDynamicShortcuts(context, shortcuts) + } + } + + // PRIVATE API ********************************************************************************* + + private fun List.favoriteRooms(): List { + return filter { room -> room.tags.any { it.name == RoomTag.ROOM_TAG_FAVOURITE } } + .take(n = 4) // Android only allows us to create 4 shortcuts + } + + private fun Drawable.toProfileImageIcon(): IconCompat { + val adaptiveIconSize = dimensionConverter.dpToPx(adaptiveIconSizeDp) + val adaptiveIconOuterSides = dimensionConverter.dpToPx(adaptiveIconOuterSidesDp) + + val bitmap = Bitmap.createBitmap(adaptiveIconSize, adaptiveIconSize, Bitmap.Config.ARGB_8888) + val canvas = Canvas(bitmap) + + return if (useAdaptiveIcon) { + setBounds(adaptiveIconOuterSides, adaptiveIconOuterSides, adaptiveIconSize - adaptiveIconOuterSides, adaptiveIconSize - adaptiveIconOuterSides) + draw(canvas) + + IconCompat.createWithAdaptiveBitmap(bitmap) + } else { + setBounds(0, 0, bitmap.width, bitmap.height) + draw(canvas) + + IconCompat.createWithBitmap(bitmap) + } + } +} diff --git a/vector/src/main/java/im/vector/riotx/features/home/room/detail/RoomDetailActivity.kt b/vector/src/main/java/im/vector/riotx/features/home/room/detail/RoomDetailActivity.kt index fe4d0ae1f7..6507bf6030 100644 --- a/vector/src/main/java/im/vector/riotx/features/home/room/detail/RoomDetailActivity.kt +++ b/vector/src/main/java/im/vector/riotx/features/home/room/detail/RoomDetailActivity.kt @@ -44,8 +44,14 @@ class RoomDetailActivity : VectorBaseActivity(), ToolbarConfigurable { super.onCreate(savedInstanceState) waitingView = waiting_view if (isFirstCreation()) { - val roomDetailArgs: RoomDetailArgs = intent?.extras?.getParcelable(EXTRA_ROOM_DETAIL_ARGS) - ?: return + val roomDetailArgs: RoomDetailArgs? = if (intent?.action == ACTION_ROOM_DETAILS_FROM_SHORTCUT) { + RoomDetailArgs(roomId = intent?.extras?.getString(EXTRA_ROOM_ID)!!) + } else { + intent?.extras?.getParcelable(EXTRA_ROOM_DETAIL_ARGS) + } + + if (roomDetailArgs == null) return + currentRoomId = roomDetailArgs.roomId replaceFragment(R.id.roomDetailContainer, RoomDetailFragment::class.java, roomDetailArgs) replaceFragment(R.id.roomDetailDrawerContainer, BreadcrumbsFragment::class.java) @@ -110,11 +116,20 @@ class RoomDetailActivity : VectorBaseActivity(), ToolbarConfigurable { companion object { const val EXTRA_ROOM_DETAIL_ARGS = "EXTRA_ROOM_DETAIL_ARGS" + const val EXTRA_ROOM_ID = "EXTRA_ROOM_ID" + const val ACTION_ROOM_DETAILS_FROM_SHORTCUT = "ROOM_DETAILS_FROM_SHORTCUT" fun newIntent(context: Context, roomDetailArgs: RoomDetailArgs): Intent { return Intent(context, RoomDetailActivity::class.java).apply { putExtra(EXTRA_ROOM_DETAIL_ARGS, roomDetailArgs) } } + + fun shortcutIntent(context: Context, roomId: String): Intent { + return Intent(context, RoomDetailActivity::class.java).apply { + action = ACTION_ROOM_DETAILS_FROM_SHORTCUT + putExtra(EXTRA_ROOM_ID, roomId) + } + } } } From 957d51cf3fb1bf9a0d7f313902fd512a463a038d Mon Sep 17 00:00:00 2001 From: Emma Vanbrabant Date: Sat, 9 May 2020 20:46:37 +0100 Subject: [PATCH 097/156] Fix placeholder icons --- .../riotx/features/home/AvatarRenderer.kt | 20 ++++----- .../riotx/features/home/ShortcutsHandler.kt | 42 +++++++------------ 2 files changed, 25 insertions(+), 37 deletions(-) diff --git a/vector/src/main/java/im/vector/riotx/features/home/AvatarRenderer.kt b/vector/src/main/java/im/vector/riotx/features/home/AvatarRenderer.kt index fb0bd121f1..2edb2c4edf 100644 --- a/vector/src/main/java/im/vector/riotx/features/home/AvatarRenderer.kt +++ b/vector/src/main/java/im/vector/riotx/features/home/AvatarRenderer.kt @@ -17,11 +17,13 @@ package im.vector.riotx.features.home import android.content.Context +import android.graphics.Bitmap import android.graphics.drawable.Drawable import android.widget.ImageView import androidx.annotation.AnyThread import androidx.annotation.UiThread import androidx.core.content.ContextCompat +import androidx.core.graphics.drawable.toBitmap import com.amulyakhare.textdrawable.TextDrawable import com.bumptech.glide.request.RequestOptions import com.bumptech.glide.request.target.DrawableImageViewTarget @@ -73,9 +75,9 @@ class AvatarRenderer @Inject constructor(private val activeSessionHolder: Active } @AnyThread - fun shortcutDrawable(context: Context, glideRequest: GlideRequests, matrixItem: MatrixItem): Drawable { + fun shortcutDrawable(context: Context, glideRequest: GlideRequests, matrixItem: MatrixItem, iconSize: Int): Bitmap { return glideRequest - .asDrawable() + .asBitmap() .apply { val resolvedUrl = resolvedUrl(matrixItem.avatarUrl) if (resolvedUrl != null) { @@ -86,10 +88,11 @@ class AvatarRenderer @Inject constructor(private val activeSessionHolder: Active .beginConfig() .bold() .endConfig() - .buildRect(matrixItem.firstLetterOfDisplayName(), avatarColor)) + .buildRect(matrixItem.firstLetterOfDisplayName(), avatarColor) + .toBitmap(width = iconSize, height = iconSize)) } } - .submit() + .submit(iconSize, iconSize) .get() } @@ -103,10 +106,7 @@ class AvatarRenderer @Inject constructor(private val activeSessionHolder: Active @AnyThread fun getPlaceholderDrawable(context: Context, matrixItem: MatrixItem): Drawable { - val avatarColor = when (matrixItem) { - is MatrixItem.UserItem -> ContextCompat.getColor(context, getColorFromUserId(matrixItem.id)) - else -> ContextCompat.getColor(context, getColorFromRoomId(matrixItem.id)) - } + val avatarColor = avatarColor(matrixItem, context) return TextDrawable.builder() .beginConfig() .bold() @@ -117,9 +117,7 @@ class AvatarRenderer @Inject constructor(private val activeSessionHolder: Active // PRIVATE API ********************************************************************************* private fun buildGlideRequest(glideRequest: GlideRequests, avatarUrl: String?): GlideRequest { - val resolvedUrl = activeSessionHolder.getSafeActiveSession()?.contentUrlResolver() - ?.resolveThumbnail(avatarUrl, THUMBNAIL_SIZE, THUMBNAIL_SIZE, ContentUrlResolver.ThumbnailMethod.SCALE) - + val resolvedUrl = resolvedUrl(avatarUrl) return glideRequest .load(resolvedUrl) .apply(RequestOptions.circleCropTransform()) diff --git a/vector/src/main/java/im/vector/riotx/features/home/ShortcutsHandler.kt b/vector/src/main/java/im/vector/riotx/features/home/ShortcutsHandler.kt index d59e84ffa6..1211389a12 100644 --- a/vector/src/main/java/im/vector/riotx/features/home/ShortcutsHandler.kt +++ b/vector/src/main/java/im/vector/riotx/features/home/ShortcutsHandler.kt @@ -19,13 +19,10 @@ package im.vector.riotx.features.home import android.annotation.SuppressLint import android.content.Context import android.graphics.Bitmap -import android.graphics.Canvas -import android.graphics.drawable.Drawable import android.os.Build import androidx.core.content.pm.ShortcutInfoCompat import androidx.core.content.pm.ShortcutManagerCompat import androidx.core.graphics.drawable.IconCompat -import im.vector.matrix.android.api.session.room.model.RoomSummary import im.vector.matrix.android.api.session.room.model.tag.RoomTag import im.vector.matrix.android.api.util.toMatrixItem import im.vector.riotx.core.glide.GlideApp @@ -51,14 +48,24 @@ class ShortcutsHandler @Inject constructor( .observeOn(Schedulers.computation()) .subscribe { rooms -> val shortcuts = rooms - .favoriteRooms() + .filter { room -> room.tags.any { it.name == RoomTag.ROOM_TAG_FAVOURITE } } + .take(n = 4) // Android only allows us to create 4 shortcuts .map { room -> val intent = RoomDetailActivity.shortcutIntent(context, room.roomId) - val drawable = avatarRenderer.shortcutDrawable(context, GlideApp.with(context), room.toMatrixItem()) + + val adaptiveIconSize = dimensionConverter.dpToPx(adaptiveIconSizeDp) + val adaptiveIconOuterSides = dimensionConverter.dpToPx(adaptiveIconOuterSidesDp) + val size = if (useAdaptiveIcon) { + adaptiveIconSize - adaptiveIconOuterSides + } else { + dimensionConverter.dpToPx(72) + } + + val bitmap = avatarRenderer.shortcutDrawable(context, GlideApp.with(context), room.toMatrixItem(), size) ShortcutInfoCompat.Builder(context, room.roomId) .setShortLabel(room.displayName) - .setIcon(drawable.toProfileImageIcon()) + .setIcon(bitmap.toProfileImageIcon()) .setIntent(intent) .build() } @@ -70,28 +77,11 @@ class ShortcutsHandler @Inject constructor( // PRIVATE API ********************************************************************************* - private fun List.favoriteRooms(): List { - return filter { room -> room.tags.any { it.name == RoomTag.ROOM_TAG_FAVOURITE } } - .take(n = 4) // Android only allows us to create 4 shortcuts - } - - private fun Drawable.toProfileImageIcon(): IconCompat { - val adaptiveIconSize = dimensionConverter.dpToPx(adaptiveIconSizeDp) - val adaptiveIconOuterSides = dimensionConverter.dpToPx(adaptiveIconOuterSidesDp) - - val bitmap = Bitmap.createBitmap(adaptiveIconSize, adaptiveIconSize, Bitmap.Config.ARGB_8888) - val canvas = Canvas(bitmap) - + private fun Bitmap.toProfileImageIcon(): IconCompat { return if (useAdaptiveIcon) { - setBounds(adaptiveIconOuterSides, adaptiveIconOuterSides, adaptiveIconSize - adaptiveIconOuterSides, adaptiveIconSize - adaptiveIconOuterSides) - draw(canvas) - - IconCompat.createWithAdaptiveBitmap(bitmap) + IconCompat.createWithAdaptiveBitmap(this) } else { - setBounds(0, 0, bitmap.width, bitmap.height) - draw(canvas) - - IconCompat.createWithBitmap(bitmap) + IconCompat.createWithBitmap(this) } } } From 92c9d4fc22e476defef1b5c70ad59f9be8534454 Mon Sep 17 00:00:00 2001 From: Emma Vanbrabant Date: Sat, 9 May 2020 20:52:30 +0100 Subject: [PATCH 098/156] remove unused import Signed-off-by: Emma Vanbrabant --- .../java/im/vector/riotx/features/home/HomeDetailViewModel.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/vector/src/main/java/im/vector/riotx/features/home/HomeDetailViewModel.kt b/vector/src/main/java/im/vector/riotx/features/home/HomeDetailViewModel.kt index e91de984b8..3824ba7922 100644 --- a/vector/src/main/java/im/vector/riotx/features/home/HomeDetailViewModel.kt +++ b/vector/src/main/java/im/vector/riotx/features/home/HomeDetailViewModel.kt @@ -16,7 +16,6 @@ package im.vector.riotx.features.home -import androidx.core.content.pm.ShortcutInfoCompat import com.airbnb.mvrx.FragmentViewModelContext import com.airbnb.mvrx.MvRxViewModelFactory import com.airbnb.mvrx.ViewModelContext From f568553d21791cb68a3edf902bb6016159089454 Mon Sep 17 00:00:00 2001 From: Emma Vanbrabant Date: Sat, 9 May 2020 21:07:03 +0100 Subject: [PATCH 099/156] Add to changes --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 8bdd42636d..be546a1f36 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,7 +2,7 @@ Changes in RiotX 0.20.0 (2020-XX-XX) =================================================== Features ✨: - - + - Add Direct Shortcuts Improvements 🙌: - From 9124844e3ec19f1f409913f2311e69a2ab67fa87 Mon Sep 17 00:00:00 2001 From: zurtel22 Date: Sun, 10 May 2020 20:54:30 +0000 Subject: [PATCH 100/156] Translated using Weblate (German) Currently translated at 99.9% (1671 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 9cba959593..f4bd3a0e7f 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -37,7 +37,7 @@ Sprache Video Das Gespräch kann nicht gestartet werden, bitte später erneut versuchen - Aufgrund fehlender Berechtigungen stehen eventuell einige Funktionen vielleicht nicht zur Verfügung… + Aufgrund fehlender Berechtigungen stehen eventuell manche Funktionen nicht zur Verfügung… Dir fehlt das Recht ein Konferenzgespräch in diesem Raum zu starten Kann Gespräch nicht starten Sitzungsinformationen @@ -768,12 +768,12 @@ Du kannst sie jetzt aktivieren oder später über das Einstellungsmenü.Lädt… Schließen - Gemeinschaften + Communities Community-Namen filtern Einladen - Gemeinschaften + Communities Keine Gruppen Bist du sicher, dass du einen neuen Chat mit %s starten möchtest? @@ -1045,7 +1045,7 @@ Beachte: Diese Aktion wird die App neu starten und einige Zeit brauchen.Entschuldige, ein Fehler trat auf Version %s - Status.im-Thema + Status.im Design Bitte eine Passphrase erstellen um exportierte Schlüssel zu verschlüsseln. Du musst dieselbe Passphrase eingeben um die Schlüssel importieren zu können. Erzeuge Passphrase @@ -1212,7 +1212,7 @@ Um sicherzustellen, dass du nichts verpasst, lass deine Updates einfach aktivier Schlüsselsicherung ist nicht abgeschlossen. Bitte warten… Überspringen - Erledigt + Fertig Erweiterte Benachrichtigungseinstellungen Angepasste Einstellungen. From 0eb68b531cffd51e427c3e2c6c9c6cdd61b2030e Mon Sep 17 00:00:00 2001 From: nikonak Date: Sun, 10 May 2020 21:03:48 +0000 Subject: [PATCH 101/156] Translated using Weblate (German) Currently translated at 99.9% (1671 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index f4bd3a0e7f..e77b587242 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -38,7 +38,7 @@ Video Das Gespräch kann nicht gestartet werden, bitte später erneut versuchen Aufgrund fehlender Berechtigungen stehen eventuell manche Funktionen nicht zur Verfügung… - Dir fehlt das Recht ein Konferenzgespräch in diesem Raum zu starten + Ihnen fehlt das Recht, ein Konferenzgespräch in diesem Raum zu starten Kann Gespräch nicht starten Sitzungsinformationen Konferenzgespräche werden in verschlüsselten Räumen nicht unterstützt @@ -84,7 +84,7 @@ Lokales Adressbuch Nur Matrix-Kontakte Keine Konversationen - Du hast Riot nicht erlaubt auf deine lokalen Kontakte zuzugreifen + Sie haben Riot nicht erlaubt, auf deine lokalen Kontakte zuzugreifen Keine Ergebnisse @@ -982,7 +982,7 @@ Willst du welche hinzufügen? Zeige alle Nachrichten dieses Benutzers? Beachte: Diese Aktion wird die App neu starten und einige Zeit brauchen. - Nicht berechtigt diese Aktion durchzuführen. + Nicht berechtigt, diese Aktion durchzuführen. 1s %ds @@ -1330,20 +1330,20 @@ Dieser Fehler ist außerhalb von Riot passiert. Es gibt kein Google-Konto auf de Um die Schlüsselsicherung für diese Sitzung zu verwenden, stelle sie jetzt mit deiner Passphrase oder deinem Wiederherstellungsschlüssel wieder her. Deine gesicherten Verschlüsselungsschlüssel vom Server löschen\? Du wirst deinen Wiederherstellungsschlüssel nicht mehr nutzen können, um deinen verschlüsselten Chatverlauf zu lesen. - Beim Ausloggen gehen ihre verschlüsselten Nachrichten verloren - Schlüssel-Sicherung wird durchgeführt. Wenn sie sich jetzt ausloggen, dann gehen ihre verschlüsselten Nachrichten verloren. - Schlüssel-Sicherung sollte bei all deinen Sitzungen aktiviert sein um einen Verlust deiner verschlüsselten Nachrichten zu verhindern. + Beim Ausloggen gehen Ihre verschlüsselten Nachrichten verloren + Schlüssel-Sicherung wird durchgeführt. Wenn Sie sich jetzt ausloggen, dann gehen Ihre verschlüsselten Nachrichten verloren. + Schlüssel-Sicherung sollte bei all Ihren Sitzungen aktiviert sein, um einen Verlust Ihrer verschlüsselten Nachrichten zu verhindern. Ich möchte meine verschlüsselten Nachrichten nicht Sichere Schlüssel… Schlüssel-Sicherung verwenden - Bist du sicher\? + Sind Sie sicher\? Sicherung Alle verschlüsselten Nachrichten gehen verloren wenn du dich ausloggst ohne diese vorher zu sichern. Bleiben Abbrechen - Bist du sicher, dass du dich ausloggen möchtest\? + Sind Sie sicher, dass Sie sich ausloggen möchten\? Wiederherstellung verschlüsselter Nachrichten Bitte gib einen Benutzernamen ein. From 98bf02efa91cb45b658d65d17cb73a4622c49713 Mon Sep 17 00:00:00 2001 From: zurtel22 Date: Sun, 10 May 2020 21:47:22 +0000 Subject: [PATCH 102/156] Translated using Weblate (German) Currently translated at 99.9% (1671 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index e77b587242..1a0d94011a 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -84,7 +84,7 @@ Lokales Adressbuch Nur Matrix-Kontakte Keine Konversationen - Sie haben Riot nicht erlaubt, auf deine lokalen Kontakte zuzugreifen + Sie haben Riot nicht erlaubt, auf lokale Kontakte zuzugreifen Keine Ergebnisse @@ -124,7 +124,7 @@ Neuen Chat starten Sprachanruf starten - Video-Anruf starten + Videoanruf starten Dateien senden Foto oder Video aufnehmen @@ -952,7 +952,7 @@ Willst du welche hinzufügen? Bitte gib dein Passwort ein. - Wenn möglich, beschreibe bitte in Englisch. + Wenn möglich, schreiben Sie bitte auf Englisch. Sende verschlüsselte Antwort… Sende unverschlüsselte Antwort… Zeige Medien vor dem Senden From 75f84fe1f431023e2a728db0fa8403544074e488 Mon Sep 17 00:00:00 2001 From: nikonak Date: Sun, 10 May 2020 21:49:42 +0000 Subject: [PATCH 103/156] Translated using Weblate (German) Currently translated at 99.9% (1671 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 1a0d94011a..6518ff695a 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -101,10 +101,10 @@ Absturzberichte übermitteln Screenshot übermitteln Problem melden - Bitte beschreibe das Problem. Was hast du genau gemacht? Was sollte passieren? Was passierte tatsächlich? + Bitte beschreiben Sie das Problem. Was haben Sie genau gemacht\? Was sollte passieren\? Was passierte tatsächlich\? Problembeschreibung - Um Probleme diagnostizieren zu können, werden Protokolle dieses Clients zusammen mit dem Fehlerbericht übermittelt. Dieser Fehlerbericht wird, wie die Protokolle und Screenshot, nicht öffentlich sichtbar sein. Wenn du nur den oben eingegebenen Text senden möchtest, bitte die nachfolgenden Haken entsprechend entfernen: - Du scheinst dein Telefon frustriert zu schütteln. Möchtest du das Fenster zum Senden eines Fehlerberichts öffnen? + Um Probleme diagnostizieren zu können, werden Protokolle dieses Clients zusammen mit dem Fehlerbericht übermittelt. Dieser Fehlerbericht wird, wie die Protokolle und der Screenshot, nicht öffentlich sichtbar sein. Wenn Sie nur den oben eingegebenen Text senden möchten, bitte die nachfolgenden Haken entsprechend entfernen: + Sie scheinen Ihr Telefon frustriert zu schütteln. Möchten Sie das Fenster zum Senden eines Fehlerberichts öffnen\? Der Fehlerbericht wurde erfolgreich übermittelt Der Fehlerbericht konnte nicht übermittelt werden (%s) Fortschritt (%s%%) @@ -776,9 +776,9 @@ Du kannst sie jetzt aktivieren oder später über das Einstellungsmenü.Communities Keine Gruppen - Bist du sicher, dass du einen neuen Chat mit %s starten möchtest? - Bist du sicher, dass du einen Sprachanruf starten möchtest? - Bist du sicher, dass du einen Videoanruf starten möchtest? + Sind Sie sicher, dass Sie einen neuen Chat mit %s starten möchten\? + Sind Sie sicher, dass Sie einen Sprachanruf starten möchten\? + Sind Sie sicher, dass Sie einen Videoanruf starten möchten\? Gruppenliste @@ -828,7 +828,7 @@ Du kannst sie jetzt aktivieren oder später über das Einstellungsmenü.Flair - Schüttele um einen Fehler zu melden + Schüttele, um einen Fehler zu melden Aktionen Mitglieder auflisten @@ -1708,9 +1708,9 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Konnte keine Verbindung zum Heimserver herstellen Latn - Bitte frage die Administration deines Heimservers (%1$s) um einen TURN-Server einzurichten, damit Anrufe zuverlässig funktionieren. + Bitte bitten Sie den Administrator Ihres Heimservers (%1$s), einen TURN server einzurichten, damit Anrufe zuverlässig funktionieren. \n -\nAlternativ kannst du einen öffentlichen Server auf %2$s nutzen, doch wird das nicht zu zuverlässig sein und es wird deine IP-Adresse mit dem Server geteilt. Du kannst dies auch in den Einstellungen konfigurieren. +\nAlternativ können Sie einen öffentlichen Server auf %2$s nutzen, doch wird das nicht so zuverlässig sein und es wird Ihre IP-Adresse mit dem Server teilen. Sie können dies auch in den Einstellungen konfigurieren. Dies ist keine Adresse eines Matrixservers Kann Home-Server nicht bei dieser URL erreichen. Bitte überprüfen Wir nutzen %s als Assistenten wenn dein Home-Server keinen anbietet (Deine IP-Adresse wird während des Anrufs geteilt) From 431b285806aee32a9edbdd99deec38f403a9367e Mon Sep 17 00:00:00 2001 From: zurtel22 Date: Sun, 10 May 2020 22:20:28 +0000 Subject: [PATCH 104/156] Translated using Weblate (German) Currently translated at 99.9% (1671 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 6518ff695a..12fa952933 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -1708,9 +1708,9 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Konnte keine Verbindung zum Heimserver herstellen Latn - Bitte bitten Sie den Administrator Ihres Heimservers (%1$s), einen TURN server einzurichten, damit Anrufe zuverlässig funktionieren. + Bitte fragen Sie den Administrator Ihres Home-Servers nach der Einrichtung eines TURN-Servers, damit Anrufe zuverlässig funktionieren. \n -\nAlternativ können Sie einen öffentlichen Server auf %2$s nutzen, doch wird das nicht so zuverlässig sein und es wird Ihre IP-Adresse mit dem Server teilen. Sie können dies auch in den Einstellungen konfigurieren. +\nAlternativ können Sie einen öffentlichen Server auf %2$s nutzen. Dies wird jedoch weniger zuverlässig sein und Ihre IP-Adresse gegenüber diesem Server preisgeben. Sie können dies auch in den Einstellungen anpassen. Dies ist keine Adresse eines Matrixservers Kann Home-Server nicht bei dieser URL erreichen. Bitte überprüfen Wir nutzen %s als Assistenten wenn dein Home-Server keinen anbietet (Deine IP-Adresse wird während des Anrufs geteilt) From 40649e9c3c8455bc6a15324019018300f7136721 Mon Sep 17 00:00:00 2001 From: nikonak Date: Sun, 10 May 2020 22:20:41 +0000 Subject: [PATCH 105/156] Translated using Weblate (German) Currently translated at 99.9% (1671 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 12fa952933..e283a6a6d5 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -902,9 +902,7 @@ Du kannst sie jetzt aktivieren oder später über das Einstellungsmenü.Sende einen Sticker Sende Sticker - Du hast aktuell keine Stickerpackete aktiviert. - -Willst du welche hinzufügen? + Sie haben aktuell keine Stickerpackete aktiviert. Wollen Sie welche hinzufügen\? Deaktiviere Account Deaktivere meinen Account @@ -1660,7 +1658,7 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Kein Integrationsserver konfiguriert. Anruf aufgrund eines falsch konfigurierten Servers fehlgeschlagen - Versuche es mit %s + Versuchen Sie es mit %s Nicht erneut fragen Richte eine E-Mail für die Kontowiederherstellung ein. Optional, kannst du später einrichten, dass Personen dich über diese Adresse finden. From d0c722eae1ea7637bc8254dfefac2c523a974720 Mon Sep 17 00:00:00 2001 From: "Pepper.Cabbit.Snoopy" Date: Sun, 10 May 2020 09:27:59 +0000 Subject: [PATCH 106/156] Translated using Weblate (Chinese (Simplified)) Currently translated at 64.5% (1078 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/zh_Hans/ --- vector/src/main/res/values-zh-rCN/strings.xml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/vector/src/main/res/values-zh-rCN/strings.xml b/vector/src/main/res/values-zh-rCN/strings.xml index 6f6d809624..f460df6d24 100644 --- a/vector/src/main/res/values-zh-rCN/strings.xml +++ b/vector/src/main/res/values-zh-rCN/strings.xml @@ -210,9 +210,7 @@ 此主服务器想确认您不是机器人 一封电子邮件已发送至 %s。点击了其中的链接后,请点击下面。 电子邮箱地址验证失败:请确保您已点击邮件中的链接 - 密码已重设。 - -您已从所有设备注销并且不再接受推送通知。要重新启用通知,请重新在相应设备上登录。 + 密码已重置。 您已从所有设备注销并且不再接受推送通知。要重新启用通知,请重新在相应设备上登录。 原始 %d 秒 @@ -519,7 +517,7 @@ 这只会发生一次。 请谅解由此造成的不便。 已读标签清单 - "发送为 " + 发送为 Riot 需要访问您的通讯录,才能根据电子邮箱地址和手机号码查找其他 Matrix 用户。 请在接下来的弹出窗口中授权允许访问。 @@ -888,7 +886,7 @@ Matrix 中的消息可见性类似于电子邮件。我们忘记您的消息意 已发送密钥共享请求。 已请求 - 请在可解密此消息的设备上启动 Riot,以便其将密钥发送至当前设备。 + 请在其他可解密此消息的设备上启动 Riot,以便其将密钥发送至当前设备。 在此输入… From 82df62a60094d55ed70d845928c0737954d7c792 Mon Sep 17 00:00:00 2001 From: zurtel22 Date: Sun, 10 May 2020 22:23:53 +0000 Subject: [PATCH 107/156] Translated using Weblate (German) Currently translated at 99.9% (1671 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index e283a6a6d5..2252cde49d 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -150,8 +150,8 @@ Nutzernamen dürfen nur Buchstaben, Nummern, Punkte, Binde- und Unterstriche enthalten Passwort zu kurz (min. 6 Zeichen) Passwort fehlt - Dies sieht nicht nach einer gültigen E-Mail-Adresse aus - Dies sieht nicht nach einer gültigen Telefonnummer aus + Dies scheint keine gültige E-Mail-Adresse zu sein + Dies scheint keine gültige Telefonnummer zu sein Diese E-Mail-Adresse wird bereits verwendet. E-Mail-Adresse fehlt Telefonnummer fehlt @@ -902,7 +902,7 @@ Du kannst sie jetzt aktivieren oder später über das Einstellungsmenü.Sende einen Sticker Sende Sticker - Sie haben aktuell keine Stickerpackete aktiviert. Wollen Sie welche hinzufügen\? + Sie haben aktuell keine Stickerpakete aktiviert. Möchten Sie welche hinzufügen\? Deaktiviere Account Deaktivere meinen Account From 7f55e4fb1e2b332f56030d4c0600545f37e3c907 Mon Sep 17 00:00:00 2001 From: nikonak Date: Sun, 10 May 2020 22:25:11 +0000 Subject: [PATCH 108/156] Translated using Weblate (German) Currently translated at 99.9% (1671 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 2252cde49d..8e02f01157 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -136,7 +136,7 @@ Überspringen Rücksetz-E-Mail senden Zur Anmeldemaske zurückkehren - E-Mail oder Nutzername + E-Mail oder Benutzername Passwort Neues Passwort Benutzername @@ -147,7 +147,7 @@ Passwort wiederholen Neues Passwort bestätigen Benutzername und/oder Passwort falsch - Nutzernamen dürfen nur Buchstaben, Nummern, Punkte, Binde- und Unterstriche enthalten + Benutzernamen dürfen nur Buchstaben, Nummern, Punkte, Binde- und Unterstriche enthalten Passwort zu kurz (min. 6 Zeichen) Passwort fehlt Dies scheint keine gültige E-Mail-Adresse zu sein @@ -1396,7 +1396,7 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Importiere Schlüssel… Ignorieren - Mit single-sign-on anmelden + Mit Single-Sign-On anmelden Diese URL ist nicht erreichbar, bitte prüfen Dein Gerät nutzt eine veraltetes TLS-Sicherheitsprotokoll, das anfällig für Angriffe ist. Zu deiner Sicherheit wirst du nicht in der Lage sein, dich zu verbinden Schicke Nachricht mit Eingabetaste From 7119403cde855fb3775eba8e8312ffa4fb6637f0 Mon Sep 17 00:00:00 2001 From: tctovsli Date: Sat, 9 May 2020 19:15:52 +0000 Subject: [PATCH 109/156] =?UTF-8?q?Translated=20using=20Weblate=20(Norwegi?= =?UTF-8?q?an=20Bokm=C3=A5l)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently translated at 34.5% (577 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/nb_NO/ --- vector/src/main/res/values-nb-rNO/strings.xml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/vector/src/main/res/values-nb-rNO/strings.xml b/vector/src/main/res/values-nb-rNO/strings.xml index 54cac5a112..86cb713dbb 100644 --- a/vector/src/main/res/values-nb-rNO/strings.xml +++ b/vector/src/main/res/values-nb-rNO/strings.xml @@ -723,4 +723,12 @@ Send inn i Hjemmetjener URL Start ny chat - +Start lydsamtale + Start videosamtale + + Send lydopptak + + Er du sikker på du vil starte en samtale med %s\? + Er du sikker på du vil starte en lydsamtale\? + Er du sikker på du vil starte en videosamtale\? + From 9e29533aad677a317d80ed8f8ea16e0ef88da8ba Mon Sep 17 00:00:00 2001 From: Frisk Date: Sat, 9 May 2020 18:02:25 +0000 Subject: [PATCH 110/156] Translated using Weblate (Polish) Currently translated at 93.3% (1560 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/pl/ --- vector/src/main/res/values-pl/strings.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vector/src/main/res/values-pl/strings.xml b/vector/src/main/res/values-pl/strings.xml index d6b8392744..ca0ae9e542 100644 --- a/vector/src/main/res/values-pl/strings.xml +++ b/vector/src/main/res/values-pl/strings.xml @@ -2243,6 +2243,10 @@ Spróbuj uruchomić ponownie aplikację. Odblokuj historię zaszyfrowanych wiadomości - " RiotX Android" + RiotX Android + Odśwież + + Użyj tej sesji do weryfikacji nowej, nadając jej dostęp do zaszyfrowanych wiadomości. + To nie ja From a98916c9857c9f0da7d7e31b12cba32af17a2f9e Mon Sep 17 00:00:00 2001 From: LinAGKar Date: Sun, 10 May 2020 09:07:28 +0000 Subject: [PATCH 111/156] Translated using Weblate (Swedish) Currently translated at 11.1% (186 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/sv/ --- vector/src/main/res/values-sv/strings.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/vector/src/main/res/values-sv/strings.xml b/vector/src/main/res/values-sv/strings.xml index ef8e94c9e5..6ba74af043 100644 --- a/vector/src/main/res/values-sv/strings.xml +++ b/vector/src/main/res/values-sv/strings.xml @@ -211,4 +211,12 @@ Skapa konto Skicka in Hoppa över + Skicka e-brev för återställning + Gå tillbaka till inloggningsskärmen + E-postadress eller användarnamn + Lösenord + Nytt lösenord + Användarnamn + Sätt en e-postadress för kontoåterförvärv, och senare för att valfritt vara upptäckbar av folk som som känner dig. + Sätt ett telefonnummer som folk som känner dig kan använda för att hitta dig. From fe013f803e3c44f080922ab29d81f98e0b4fdf1a Mon Sep 17 00:00:00 2001 From: onurays Date: Mon, 11 May 2020 22:43:55 +0300 Subject: [PATCH 112/156] Add action menu icon to invite users. --- .../src/main/res/drawable/ic_invite_users.xml | 18 ++++++++++++++++++ .../main/res/menu/menu_room_member_list.xml | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 vector/src/main/res/drawable/ic_invite_users.xml diff --git a/vector/src/main/res/drawable/ic_invite_users.xml b/vector/src/main/res/drawable/ic_invite_users.xml new file mode 100644 index 0000000000..64e5a3788d --- /dev/null +++ b/vector/src/main/res/drawable/ic_invite_users.xml @@ -0,0 +1,18 @@ + + + + + + diff --git a/vector/src/main/res/menu/menu_room_member_list.xml b/vector/src/main/res/menu/menu_room_member_list.xml index c8d9bd31f4..ef452de70f 100644 --- a/vector/src/main/res/menu/menu_room_member_list.xml +++ b/vector/src/main/res/menu/menu_room_member_list.xml @@ -5,7 +5,7 @@ From 700fd47f22efc923426d0313044ef52c87314d14 Mon Sep 17 00:00:00 2001 From: onurays Date: Tue, 12 May 2020 12:10:45 +0300 Subject: [PATCH 113/156] Toast message formatting of invited users. --- .../invite/InviteUsersToRoomActivity.kt | 7 +++---- .../invite/InviteUsersToRoomViewEvents.kt | 2 +- .../invite/InviteUsersToRoomViewModel.kt | 17 +++++++++++++++-- vector/src/main/res/values/strings.xml | 4 +++- 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomActivity.kt b/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomActivity.kt index 08d2653ca9..839a0767d8 100644 --- a/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomActivity.kt +++ b/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomActivity.kt @@ -24,7 +24,6 @@ import android.view.View import androidx.appcompat.app.AlertDialog import com.airbnb.mvrx.MvRx import com.airbnb.mvrx.viewModel -import com.airbnb.mvrx.withState import im.vector.matrix.android.api.failure.Failure import im.vector.riotx.R import im.vector.riotx.core.di.ScreenComponent @@ -102,7 +101,7 @@ class InviteUsersToRoomActivity : SimpleFragmentActivity() { private fun renderInviteEvents(viewEvent: InviteUsersToRoomViewEvents) { when (viewEvent) { is InviteUsersToRoomViewEvents.Loading -> renderInviteLoading() - is InviteUsersToRoomViewEvents.Success -> renderInvitationSuccess() + is InviteUsersToRoomViewEvents.Success -> renderInvitationSuccess(viewEvent.successMessage) is InviteUsersToRoomViewEvents.Failure -> renderInviteFailure(viewEvent.throwable) } } @@ -125,8 +124,8 @@ class InviteUsersToRoomActivity : SimpleFragmentActivity() { .show() } - private fun renderInvitationSuccess() = withState(viewModel) { - toast(R.string.invitations_sent_successfully) + private fun renderInvitationSuccess(successMessage: String) { + toast(successMessage) finish() } diff --git a/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomViewEvents.kt b/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomViewEvents.kt index b4ecfc5a52..a76d4a4077 100644 --- a/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomViewEvents.kt +++ b/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomViewEvents.kt @@ -21,5 +21,5 @@ import im.vector.riotx.core.platform.VectorViewEvents sealed class InviteUsersToRoomViewEvents : VectorViewEvents { object Loading : InviteUsersToRoomViewEvents() data class Failure(val throwable: Throwable) : InviteUsersToRoomViewEvents() - object Success : InviteUsersToRoomViewEvents() + data class Success(val successMessage: String) : InviteUsersToRoomViewEvents() } diff --git a/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomViewModel.kt b/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomViewModel.kt index 7a01ab2baa..2d033fdf35 100644 --- a/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomViewModel.kt +++ b/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomViewModel.kt @@ -24,12 +24,15 @@ import com.squareup.inject.assisted.AssistedInject import im.vector.matrix.android.api.session.Session import im.vector.matrix.android.api.session.user.model.User import im.vector.matrix.rx.rx +import im.vector.riotx.R import im.vector.riotx.core.platform.VectorViewModel +import im.vector.riotx.core.resources.StringProvider import io.reactivex.Observable class InviteUsersToRoomViewModel @AssistedInject constructor(@Assisted initialState: InviteUsersToRoomViewState, - session: Session) + session: Session, + val stringProvider: StringProvider) : VectorViewModel(initialState) { private val room = session.getRoom(initialState.roomId)!! @@ -61,7 +64,17 @@ class InviteUsersToRoomViewModel @AssistedInject constructor(@Assisted room.rx().invite(user.userId, null) }.subscribe( { - _viewEvents.post(InviteUsersToRoomViewEvents.Success) + val successMessage = when (selectedUsers.size) { + 1 -> stringProvider.getString(R.string.invitation_sent_to_one_user, + selectedUsers.first().displayName) + 2 -> stringProvider.getString(R.string.invitations_sent_to_two_users, + selectedUsers.first().displayName, + selectedUsers.last().displayName) + else -> stringProvider.getString(R.string.invitations_sent_to_three_and_more_users, + selectedUsers.first().displayName, + selectedUsers.size - 1) + } + _viewEvents.post(InviteUsersToRoomViewEvents.Success(successMessage)) }, { _viewEvents.post(InviteUsersToRoomViewEvents.Failure(it)) diff --git a/vector/src/main/res/values/strings.xml b/vector/src/main/res/values/strings.xml index fb52976d3f..caaf1a6439 100644 --- a/vector/src/main/res/values/strings.xml +++ b/vector/src/main/res/values/strings.xml @@ -2372,7 +2372,9 @@ Not all features in Riot are implemented in RiotX yet. Main missing (and coming INVITE Inviting users… Invite Users - Invitation sent successfully + Invitation sent to %1$s + Invitations sent to %1$s and %2$s + Invitations sent to %1$s and %2$d more We could not invite users. Please check the users you want to invite and try again. \ No newline at end of file From 04dd13d03b58aacd49fb7851187cbdd08d87e75f Mon Sep 17 00:00:00 2001 From: onurays Date: Tue, 12 May 2020 14:10:23 +0300 Subject: [PATCH 114/156] Use plurals in case of 3 or more invited users. --- .../riotx/features/invite/InviteUsersToRoomViewModel.kt | 3 ++- vector/src/main/res/values/strings.xml | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomViewModel.kt b/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomViewModel.kt index 2d033fdf35..07c0cdbc7d 100644 --- a/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomViewModel.kt +++ b/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomViewModel.kt @@ -70,7 +70,8 @@ class InviteUsersToRoomViewModel @AssistedInject constructor(@Assisted 2 -> stringProvider.getString(R.string.invitations_sent_to_two_users, selectedUsers.first().displayName, selectedUsers.last().displayName) - else -> stringProvider.getString(R.string.invitations_sent_to_three_and_more_users, + else -> stringProvider.getQuantityString(R.plurals.invitations_sent_to_one_and_more_users, + selectedUsers.size - 1, selectedUsers.first().displayName, selectedUsers.size - 1) } diff --git a/vector/src/main/res/values/strings.xml b/vector/src/main/res/values/strings.xml index caaf1a6439..ecaf5f42b0 100644 --- a/vector/src/main/res/values/strings.xml +++ b/vector/src/main/res/values/strings.xml @@ -2374,7 +2374,10 @@ Not all features in Riot are implemented in RiotX yet. Main missing (and coming Invite Users Invitation sent to %1$s Invitations sent to %1$s and %2$s - Invitations sent to %1$s and %2$d more + + Invitations sent to %1$s and 2 more + Invitations sent to %1$s and %2$d more + We could not invite users. Please check the users you want to invite and try again. \ No newline at end of file From 684972185fa18d28b19242bc46809fac0c2d6d74 Mon Sep 17 00:00:00 2001 From: Tirifto Date: Mon, 11 May 2020 13:49:44 +0000 Subject: [PATCH 115/156] Translated using Weblate (Esperanto) Currently translated at 14.7% (245 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/eo/ --- vector/src/main/res/values-eo/strings.xml | 252 +++++++++++++++++++--- 1 file changed, 225 insertions(+), 27 deletions(-) diff --git a/vector/src/main/res/values-eo/strings.xml b/vector/src/main/res/values-eo/strings.xml index 8d4f587fc8..a6e7de2020 100644 --- a/vector/src/main/res/values-eo/strings.xml +++ b/vector/src/main/res/values-eo/strings.xml @@ -5,23 +5,23 @@ Malhela haŭto Nigra haŭto - Sinkroniganta - Atentanta pri eventoj + Spegulante… + Atentante eventojn Laŭtaj sciigoj Silentaj sciigoj Mesaĝoj - Babilejo + Ĉambro EO Agordoj - Cimraporto - Komunumaj detaloj + Erar-raporto + Detaloj pri komunumo Sendi glumarkon Permesiloj de eksteraj liverantoj - Ŝarganta… + Enlegante… Bone Nuligi @@ -33,7 +33,7 @@ Forigi Citi Elŝuti - Diskonigi + Kunhavigi Paroli Forviŝi Poste @@ -43,40 +43,41 @@ Vidi malĉifritan fonton Forigi Renomi - Membro-Detaloj + Detaloj pri ano Historia Raporti enhavon - Aktiva alvoko - Cimraporto - Daŭranta telekonferenco.\nAliĝi %1$s aŭ %2$s. - voĉe - videe - Ne eblas ekigi la alvokon, bonvolu provi poste - Ne eblas ekigi alvokon - Pro mankantaj permesoj, kelkaj ebloj eble mankos… + Aktiva voko + Raporti eraron + Daŭranta grupa voko. +\nAliĝi kiel %1$s aŭ %2$s. + Voĉe + Vide + Ne eblas ekigi la vokon, bonvolu provi poste + Ne eblas ekigi vokon + Pro mankantaj permesoj, kelkaj funkcioj eble mankos… Pro mankantaj permesoj, tiu ago ne eblas. - Aparata informo + Informoj pri salutaĵo Tamen sendi Inviti - Malinterrete + Eksterrete Eliri Agoj - Telefono - videotelefono + Voĉvoko + Vidvoko Universala serĉo - Tamen alvoki + Tamen voki Rapida respondo Malfermi Fermi Sendi ĉifritan respondon… Sendi respondon (neĉifritan)… Homoj - Babilejoj + Ĉambroj Komunumoj - Filtri nomojn de babilejoj + Filtri nomojn de ĉambroj Filtri homojn Filtri nomojn de babilejoj Homoj @@ -93,9 +94,206 @@ Babilejoj Salti al unua nelegita mesaĝo. - Ŝlosilo-Sekukopio - Usi Ŝlosilo-Sekukopion - Kontroli aparaton + Savkopiado de ŝlosiloj + Uzi savkopiadon de ŝlosiloj + Kontroli salutaĵon Kontroli aparaton - +Latn + + Haŭto de Status.im + + Savkopio de ŝlosiloj ne finiĝis; bonvolu atendi… + Vi perdos viajn ĉifritajn mesaĝojn se vi nun adiaŭos + Savkopio de ŝlosiloj progresas. Se vi nun adiaŭos, vi perdos aliron al viaj ĉifritaj mesaĝoj. + Sekura savkopiado de ŝlosiloj devus esti aktiva en ĉiuj viaj salutaĵoj por eviti perdon de aliro al viaj ĉifritaj mesaĝoj. + Mi ne volas miajn ĉifritajn mesaĝojn + Savkopiante ŝlosilojn… + Uzi savkopiadon de ŝolsiloj + Ĉu vi certas\? + Savkopii + Vi perdos aliron al viaj ĉifritaj mesaĝoj malse vi savkopios viajn ŝlosilojn antaŭ adiaŭo. + + Resti + Neniu + Senvalidigi + Malkonekti + Vi bezonas permeson inviti por komenci grupan vokon en ĉi tiu ĉambro + Grupaj vokoj ne estas subtenataj de ĉifrataj ĉambroj + Akcepti + Preterpasi + Finite + Ĉesigi + Malatenti + Kontroli + Rifuzi + + Adiaŭi + Ĉu vi certe volas adiaŭi\? + Marki ĉion legita + Historia + Marki legita + Kopiiĝis al tondujo + Malŝalti + + Konfirmo + Averto + Eraro + + Hejmo + Elstarigitaj + Filtri elstarigitajn + Filtri nomojn de komunumoj + + Invitoj + Malalta prioritato + Sistemaj avertoj + + Interparoloj + Loka adresaro + Neniuj interparoloj + Vi ne permesis al Riot aliron al viaj lokaj kontaktoj + Neniuj rezultoj + Neniu identiga servilo estas agordita. + + Ĉambroj + Neniuj ĉambroj + Neniuj publikaj ĉambroj disponeblas + + 1 uzanto + %d uzantoj + + + Inviti + Komunumoj + Neniuj grupoj + + Sendi protokolon + Sendi protokolon pri fiasko + Sendi ekrankopion + Bonvolu priskribi la eraron. Kion vi faris\? Kion vi atendis\? Kio tamen vere okazis\? + Se tio eblas, bonvolu priskribi per la angla lingvo. + Priskribu vian problemon ĉi tie + Sukcese sendis la erar-raporton + Malsukcesis sendi la erar-raporton (%s) + Progreso (%s%%) + + Sendi al + Legite + + Aliĝi al ĉambro + Uzantonomo + Krei konton + Saluti + Adiaŭi + URL de hejmservilo + URL de identiga servilo + Serĉi + + Komenci novan babilon + Komenci voĉvokon + Komenci vidvokon + + Sendi voĉon + + Ĉu vi certe volas komenci novan babilon kun %s\? + Ĉu vi certe volas komenci novan voĉvokon kun %s\? + Ĉu vi certe volas komenci novan vidvokon kun %s\? + Voko malsukcesis pro misagordita servilo + Bonvolu peti de la administranto de via hejmservilo (%1$s) agordon de TURN-servilo, por dependebla funkciigo de vokoj. +\n +\nAlternative vi povas provi publikan servilon je %2$s, sed tio ne funkcios same dependeble, kaj montros vian IP-adreson al tiu servilo. Vi ankaŭ povas administri tion en la Agordoj. + Provu uzon de %s + Ne demandi ree + + Sendi dosierojn + Sendi glumarkon + Foti aŭ filmi + Foti + Filmi + + Vi havas neniujn ŝaltitajn glumarkarojn. +\n +\nĈu vi volas iujn aldoni nun\? + + Pluiĝi per… + Pardonu, troviĝis neniu ekstera aplikaĵo por ĉi tiu ago. + + Saluti + Saluti per ununura saluto + Krei konton + Preterpasi + Sendi restarigan retleteron + Reiri al salutejo + Retpoŝtadreso aŭ uzantonomo + Pasvorto + Nova pasvorto + Uzantonomo + Retpoŝtadreso + Retpoŝtadreso (malnepra) + Telefonnumero + Telefonnumero (malnepra) + Ripetu pasvorton + Konfirmu vian novan pasvorton + Malĝusta uzantonomo kaj/aŭ pasvorto + Uzantonomoj povas enhavi nur literojn, ciferojn, punktojn, streketojn, kaj substrekojn + Pasvorto estas tro mallonga (almenaŭ 6 signoj) + Mankas pasvorto + Ĉi tio ne ŝajnas esti valida retpoŝtadreso + Ĉi tio ne ŝajnas esti valida telefonnumero + Ĉi tiu retpoŝtadreso jam estas difinita + Mankas retpoŝtadreso + Mankas telefonnumero + Mankas retpoŝtadreso aŭ telefonnumero + Pasvortoj ne akordas + Ĉu vi forgesis pasvorton\? + Uzi proprajn agordojn pri servilo (altnivela) + Bonvolu kontroli vian retpoŝton por daŭrigi la registriĝon + Registriĝo per retpoŝtadreso kaj telefonnumero samtempe ankoraŭ ne estas subtenata, ĝis la «API» ekekzistos. Nur la telefonnumero estos konsiderata. +\n +\nVi povas aldoni vian retpoŝtadreson al via profilo en agordoj. + Ĉi tiu hejmservilo volas certiĝi, ke vi ne estas roboto + Uzantonomo jam uziĝas + Hejmservilo: + Identiga servilo: + Mi kontrolis mian retpoŝtadreson + Por restarigi vian pasvorton, enigu la retpoŝtadreson ligitan al via konto: + Necesas enigi la retpoŝtadreson ligitan al via konto. + Necesas enigi novan pasvorton. + Retletero sendiĝis al %s. Vizitinte la enhavitan ligilon, klaku sube. + Malsukcesis kontroli retpoŝtadreson: certiĝu, ke vi klakis la ligilon en la retletero + Via pasvorto restariĝis. +\n +\nVi adiaŭis ĉiujn viajn salutaĵojn kaj ne plu ricevos pasivajn sciigojn. Por reŝalti sciigojn, resalutu ĉiun vian aparaton. + Bonvolu tralegi kaj akcepti la politikojn de ĉi tiu hejmservilo: + + URL komenciĝu per http[s]:// + Ne povas asluti: reta eraro + Ne povas saluti + Ne povas registriĝi: reta eraro + Ne povas registriĝi + Ne povas registriĝi: fiasko pri posedo de retpoŝtadreso + Nevalida uzantonomo/pasvorto + Listo de legokonfirmoj + + Listo de grupoj + + Sendi en formato + Originala + Granda + Meza + Malgranda + + Ĉu nuligi la elŝuton\? + Ĉu nuligi la alŝuton\? + %d s + %1$dm %2$ds + + Hieraŭ + Hodiaŭ + + Nomo de ĉambro + Temo de ĉambro + + Vokoj + From df762e40bb5c97a385f831543c71828d41169732 Mon Sep 17 00:00:00 2001 From: Tirifto Date: Mon, 11 May 2020 12:24:27 +0000 Subject: [PATCH 116/156] Translated using Weblate (Esperanto) Currently translated at 100.0% (163 of 163 strings) Translation: Riot Android/RiotX Matrix SDK Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/eo/ --- .../src/main/res/values-eo/strings.xml | 46 ++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/matrix-sdk-android/src/main/res/values-eo/strings.xml b/matrix-sdk-android/src/main/res/values-eo/strings.xml index 32e05589f6..db73db86e2 100644 --- a/matrix-sdk-android/src/main/res/values-eo/strings.xml +++ b/matrix-sdk-android/src/main/res/values-eo/strings.xml @@ -165,4 +165,48 @@ Sendante mesaĝon… Vakigi sendan atendovicon - + %1$s petis grupan vokon + Grupa voko komenciĝis + Grupa voko finiĝis + + (ankaŭ profilbildo ŝanĝiĝis) + %1$s forigis nomon de la ĉambro + %1$s forigis temon de la ĉambro + Invito de %1$s. Kialo: %2$s + %1$s invitis uzanton %2$s. Kialo: %3$s + %1$s invitis vin. Kialo: %2$s + %1$s aliĝis al la ĉambro. Kialo: %2$s + %1$s foriris de la ĉambro. Kialo: %2$s + %1$s rifuzis la inviton. Kialo: %2$s + %1$s forpelis uzanton %2$s. Kialo: %3$s + %1$s malforbaris uzanton %2$s. Kialo: %3$s + %1$s forbaris uzanton %2$s. Kialo: %3$s + %1$s sendis inviton al la ĉambro al %2$s. Kialo: %3$s + %1$s nuligis la inviton al la ĉambro al %2$s. Kialo: %3$s + %1$s akceptis la inviton por %2$s. Kialo: %3$s + %1$s nuligis la inviton al %2$s. Kialo: %3$s + + + %1$s aldonis %2$s kiel adreson por ĉi tiu ĉambro. + %1$s aldonis %2$s kiel adresojn por ĉi tiu ĉambro. + + + + %1$s forigis %2$s kiel adreson por ĉi tiu ĉambro. + %1$s forigis %2$s kiel adresojn por ĉi tiu ĉambro. + + + %1$s aldonis %2$s kaj forigis %3$s kiel adresojn por ĉi tiu ĉambro. + + %1$s agordis la ĉefadreson por ĉi tiu ĉambro al %2$s. + %1$s forigis la ĉefadreson de ĉi tiu ĉambro. + + %1$s permesis al gastoj aliĝi al la ĉambro. + %1$s malpermesis al gastoj aliĝi al la ĉambro. + + %1$s ŝaltis tutvojan ĉifradon. + %1$s ŝaltis tutvojan ĉifradon (kun nerekonita algoritmo %2$s). + + %s petas kontrolon de via ŝlosilo, sed via kliento ne subtenas kontrolon de ŝlosiloj en la babilujo. Vi devos uzi malnovecan kontrolon de ŝlosiloj. + + From 14b1b105562c15db5a3761b2bae52e66d69c1e57 Mon Sep 17 00:00:00 2001 From: HaHaNoname Date: Mon, 11 May 2020 11:40:00 +0000 Subject: [PATCH 117/156] Translated using Weblate (Russian) Currently translated at 75.2% (1258 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/ru/ --- vector/src/main/res/values-ru/strings.xml | 35 ++++++++++++----------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/vector/src/main/res/values-ru/strings.xml b/vector/src/main/res/values-ru/strings.xml index 014a8ae65c..9028a80a71 100644 --- a/vector/src/main/res/values-ru/strings.xml +++ b/vector/src/main/res/values-ru/strings.xml @@ -96,7 +96,7 @@ %d пользователь %d пользователя %d пользователей - + Отправить логи @@ -838,13 +838,13 @@ %d комната %d комнаты %d комнат - + %d комната %d комнаты %d комнат - + %1$s в %2$s @@ -852,7 +852,7 @@ %d активный виджет %d активных виджета %d активных виджетов - + @@ -862,45 +862,45 @@ %d активный участник %d активных участника %d активных участников - + %d участник %d участника %d участников - + %d новое сообщение %d новых сообщения %d новых сообщений - + %1$s комната найдена для %2$s %1$s комнаты найдено для %2$s %1$s комнат найдено для %2$s - + %d изменение членства %d изменения членства %d изменений членства - + %d непрочитанное уведомление %d непрочитанных уведомления %d непрочитанных уведомлений - + %d непрочитанное уведомление %d непрочитанных уведомления %d непрочитанных уведомлений - + Получить аватар Заметка аватара @@ -1038,20 +1038,20 @@ %d выбран %d выбрано %d выбраны - + %d участник %d участника %d участников - + %d комната %d комнаты %d комнат - + Системные оповещения @@ -1339,7 +1339,7 @@ %d новый ключ был добавлен к этому устройству. %d новых ключа были добавлены к этому устройству. %d новых ключей были добавлены к этому устройству. - + @@ -1391,7 +1391,7 @@ Резервное копирование %d ключа… Резервное копирование %d ключей… Резервное копирование %d ключей… - + Все ключи сохранены @@ -1847,4 +1847,5 @@ Подробные логи помогут разработчикам, предоставив больше информации, когда вы отправляете RageShake. Даже когда они разрешены, приложение не логирует ваши сообщения и другие приватные данные. - +Закройте меню создания комнаты… + From 4eaed945e2f839848e44eb2cd779e294684f72e0 Mon Sep 17 00:00:00 2001 From: onurays Date: Tue, 12 May 2020 15:31:15 +0300 Subject: [PATCH 118/156] Fix plurals. --- vector/src/main/res/values/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/res/values/strings.xml b/vector/src/main/res/values/strings.xml index ecaf5f42b0..c72f91b5c4 100644 --- a/vector/src/main/res/values/strings.xml +++ b/vector/src/main/res/values/strings.xml @@ -2375,7 +2375,7 @@ Not all features in Riot are implemented in RiotX yet. Main missing (and coming Invitation sent to %1$s Invitations sent to %1$s and %2$s - Invitations sent to %1$s and 2 more + Invitations sent to %1$s and one more Invitations sent to %1$s and %2$d more We could not invite users. Please check the users you want to invite and try again. From d08b4e1ea092b1c313776a1c9ece8b4ec26b37a8 Mon Sep 17 00:00:00 2001 From: Emma Vanbrabant Date: Tue, 12 May 2020 19:37:03 +0100 Subject: [PATCH 119/156] PR feedback --- CHANGES.md | 2 +- .../riotx/features/home/HomeActivity.kt | 3 +- .../riotx/features/home/ShortcutsHandler.kt | 29 ++++++++++--------- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index be546a1f36..1aa0c8d7ca 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,7 +2,7 @@ Changes in RiotX 0.20.0 (2020-XX-XX) =================================================== Features ✨: - - Add Direct Shortcuts + - Add Direct Shortcuts (#652) Improvements 🙌: - diff --git a/vector/src/main/java/im/vector/riotx/features/home/HomeActivity.kt b/vector/src/main/java/im/vector/riotx/features/home/HomeActivity.kt index 839763ffc0..b6e3cbcd76 100644 --- a/vector/src/main/java/im/vector/riotx/features/home/HomeActivity.kt +++ b/vector/src/main/java/im/vector/riotx/features/home/HomeActivity.kt @@ -146,7 +146,8 @@ class HomeActivity : VectorBaseActivity(), ToolbarConfigurable { promptCompleteSecurityIfNeeded() } - shortcutsHandler.observeRoomsAndBuildShortcuts(context = this) + shortcutsHandler.observeRoomsAndBuildShortcuts() + .disposeOnDestroy() } private fun promptCompleteSecurityIfNeeded() { diff --git a/vector/src/main/java/im/vector/riotx/features/home/ShortcutsHandler.kt b/vector/src/main/java/im/vector/riotx/features/home/ShortcutsHandler.kt index 1211389a12..657942457e 100644 --- a/vector/src/main/java/im/vector/riotx/features/home/ShortcutsHandler.kt +++ b/vector/src/main/java/im/vector/riotx/features/home/ShortcutsHandler.kt @@ -16,7 +16,6 @@ package im.vector.riotx.features.home -import android.annotation.SuppressLint import android.content.Context import android.graphics.Bitmap import android.os.Build @@ -28,6 +27,7 @@ import im.vector.matrix.android.api.util.toMatrixItem import im.vector.riotx.core.glide.GlideApp import im.vector.riotx.core.utils.DimensionConverter import im.vector.riotx.features.home.room.detail.RoomDetailActivity +import io.reactivex.disposables.Disposable import io.reactivex.schedulers.Schedulers import javax.inject.Inject @@ -36,15 +36,25 @@ private const val adaptiveIconSizeDp = 108 private const val adaptiveIconOuterSidesDp = 18 class ShortcutsHandler @Inject constructor( + private val context: Context, private val homeRoomListStore: HomeRoomListDataSource, private val avatarRenderer: AvatarRenderer, private val dimensionConverter: DimensionConverter ) { + private val adaptiveIconSize = dimensionConverter.dpToPx(adaptiveIconSizeDp) + private val adaptiveIconOuterSides = dimensionConverter.dpToPx(adaptiveIconOuterSidesDp) + private val iconSize by lazy { + if (useAdaptiveIcon) { + adaptiveIconSize - adaptiveIconOuterSides + } else { + dimensionConverter.dpToPx(72) + } + } - @SuppressLint("CheckResult") - fun observeRoomsAndBuildShortcuts(context: Context) { - homeRoomListStore + fun observeRoomsAndBuildShortcuts(): Disposable { + return homeRoomListStore .observe() + .distinct() .observeOn(Schedulers.computation()) .subscribe { rooms -> val shortcuts = rooms @@ -52,16 +62,7 @@ class ShortcutsHandler @Inject constructor( .take(n = 4) // Android only allows us to create 4 shortcuts .map { room -> val intent = RoomDetailActivity.shortcutIntent(context, room.roomId) - - val adaptiveIconSize = dimensionConverter.dpToPx(adaptiveIconSizeDp) - val adaptiveIconOuterSides = dimensionConverter.dpToPx(adaptiveIconOuterSidesDp) - val size = if (useAdaptiveIcon) { - adaptiveIconSize - adaptiveIconOuterSides - } else { - dimensionConverter.dpToPx(72) - } - - val bitmap = avatarRenderer.shortcutDrawable(context, GlideApp.with(context), room.toMatrixItem(), size) + val bitmap = avatarRenderer.shortcutDrawable(context, GlideApp.with(context), room.toMatrixItem(), iconSize) ShortcutInfoCompat.Builder(context, room.roomId) .setShortLabel(room.displayName) From 037b2e1d6071fb5109e3944642f8ce07a8fa5c9d Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 13 May 2020 00:34:03 +0200 Subject: [PATCH 120/156] PR merged after a release, move 2 lines --- CHANGES.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 835d449de1..f7f471a969 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,6 +5,7 @@ Features ✨: - Add Direct Shortcuts (#652) Improvements 🙌: + - - Invite member(s) to an existing room (#1276) - Improve notification accessibility with ticker text (#1226) Bugfix 🐛: @@ -14,7 +15,7 @@ Translations 🗣: - SDK API changes ⚠️: - - + - excludedUserIds parameter add to to UserService.getPagedUsersLive() function Build 🧱: - @@ -52,7 +53,6 @@ Improvements 🙌: - Restart broken Olm sessions ([MSC1719](https://github.com/matrix-org/matrix-doc/pull/1719)) - Cross-Signing | Hide Use recovery key when 4S is not setup (#1007) - Cross-Signing | Trust account xSigning keys by entering Recovery Key (select file or copy) #1199 - - Invite member(s) to an existing room #1276 - E2E timeline decoration (#1279) - Manage Session Settings / Cross Signing update (#1295) - Cross-Signing | Review sessions toast update old vs new (#1293, #1306) @@ -80,7 +80,6 @@ Translations 🗣: SDK API changes ⚠️: - Increase targetSdkVersion to 29 - - excludedUserIds parameter add to to UserService.getPagedUsersLive() function Build 🧱: - Compile with Android SDK 29 (Android Q) From 63c18e82c8edb9b814642cffee0f36c34022a25e Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 13 May 2020 00:34:33 +0200 Subject: [PATCH 121/156] typo... --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index f7f471a969..52896df63d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,7 +5,7 @@ Features ✨: - Add Direct Shortcuts (#652) Improvements 🙌: - - - Invite member(s) to an existing room (#1276) + - Invite member(s) to an existing room (#1276) - Improve notification accessibility with ticker text (#1226) Bugfix 🐛: From c9bc6f4a9e38b75057c3aa8e85017fee3d6508af Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 2 Mar 2020 17:34:31 +0100 Subject: [PATCH 122/156] Support homeserver discovery from MXID - Wellknown (#476) --- CHANGES.md | 1 + .../android/api/auth/AuthenticationService.kt | 18 +- .../matrix/android/api/auth/data/WellKnown.kt | 3 +- .../api/auth/data/WellKnownManagerConfig.kt | 2 +- .../api/auth/wellknown/WellknownResult.kt | 55 +++++ .../android/internal/auth/AuthModule.kt | 18 +- .../auth/DefaultAuthenticationService.kt | 30 ++- .../auth/wellknown/DirectLoginTask.kt | 61 ++++++ .../auth/wellknown/GetWellknownTask.kt | 199 ++++++++++++++++++ .../internal/auth/wellknown/WellKnownAPI.kt | 26 +++ .../internal/identity/IdentityPingApi.kt | 34 +++ .../internal/network/NetworkConstants.kt | 6 + .../internal/session/user/SearchUserAPI.kt | 4 +- .../matrix/android/internal/util/UrlUtils.kt | 28 +++ .../riotx/features/login/LoginActivity.kt | 19 +- .../riotx/features/login/LoginFragment.kt | 76 ++++--- .../login/LoginServerSelectionFragment.kt | 6 + .../riotx/features/login/LoginViewModel.kt | 93 +++++++- .../vector/riotx/features/login/SignMode.kt | 4 +- .../fragment_login_server_selection.xml | 25 ++- vector/src/main/res/values/strings_riotX.xml | 8 + 21 files changed, 653 insertions(+), 63 deletions(-) create mode 100644 matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/wellknown/WellknownResult.kt create mode 100644 matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/wellknown/DirectLoginTask.kt create mode 100644 matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/wellknown/GetWellknownTask.kt create mode 100644 matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/wellknown/WellKnownAPI.kt create mode 100644 matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/identity/IdentityPingApi.kt create mode 100644 matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/util/UrlUtils.kt diff --git a/CHANGES.md b/CHANGES.md index 52896df63d..2b36909c33 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -7,6 +7,7 @@ Features ✨: Improvements 🙌: - Invite member(s) to an existing room (#1276) - Improve notification accessibility with ticker text (#1226) + - Support homeserver discovery from MXID (#476) Bugfix 🐛: - Sometimes the same device appears twice in the list of devices of a user (#1329) diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/AuthenticationService.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/AuthenticationService.kt index 140d1c259f..5150420de2 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/AuthenticationService.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/AuthenticationService.kt @@ -23,6 +23,7 @@ import im.vector.matrix.android.api.auth.data.LoginFlowResult import im.vector.matrix.android.api.auth.data.SessionParams import im.vector.matrix.android.api.auth.login.LoginWizard import im.vector.matrix.android.api.auth.registration.RegistrationWizard +import im.vector.matrix.android.api.auth.wellknown.WellknownResult import im.vector.matrix.android.api.session.Session import im.vector.matrix.android.api.util.Cancelable @@ -30,7 +31,6 @@ import im.vector.matrix.android.api.util.Cancelable * This interface defines methods to authenticate or to create an account to a matrix server. */ interface AuthenticationService { - /** * Request the supported login flows for this homeserver. * This is the first method to call to be able to get a wizard to login or the create an account @@ -89,4 +89,20 @@ interface AuthenticationService { fun createSessionFromSso(homeServerConnectionConfig: HomeServerConnectionConfig, credentials: Credentials, callback: MatrixCallback): Cancelable + + /** + * Perform a wellknown request, using the domain from the matrixId + */ + fun getWellKnownData(matrixId: String, + callback: MatrixCallback): Cancelable + + /** + * Authenticate with a matrixId and a password + * Usually call this after a successful call to getWellKnownData() + */ + fun directAuthentication(homeServerConnectionConfig: HomeServerConnectionConfig, + matrixId: String, + password: String, + initialDeviceName: String, + callback: MatrixCallback): Cancelable } diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/data/WellKnown.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/data/WellKnown.kt index bdad4702b7..9dd1fa2012 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/data/WellKnown.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/data/WellKnown.kt @@ -18,6 +18,7 @@ package im.vector.matrix.android.api.auth.data import com.squareup.moshi.Json import com.squareup.moshi.JsonClass +import im.vector.matrix.android.api.util.JsonDict /** * https://matrix.org/docs/spec/client_server/r0.4.0.html#server-discovery @@ -52,7 +53,7 @@ data class WellKnown( val identityServer: WellKnownBaseConfig? = null, @Json(name = "m.integrations") - val integrations: Map? = null + val integrations: JsonDict? = null ) { /** * Returns the list of integration managers proposed diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/data/WellKnownManagerConfig.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/data/WellKnownManagerConfig.kt index 33ed412a2a..ffdea37afe 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/data/WellKnownManagerConfig.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/data/WellKnownManagerConfig.kt @@ -16,6 +16,6 @@ package im.vector.matrix.android.api.auth.data data class WellKnownManagerConfig( - val apiUrl : String, + val apiUrl: String, val uiUrl: String ) diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/wellknown/WellknownResult.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/wellknown/WellknownResult.kt new file mode 100644 index 0000000000..974a65adbc --- /dev/null +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/wellknown/WellknownResult.kt @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2020 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.matrix.android.api.auth.wellknown + +import im.vector.matrix.android.api.auth.data.WellKnown + +/** + * Ref: https://matrix.org/docs/spec/client_server/latest#well-known-uri + */ +sealed class WellknownResult { + /** + * The provided matrixId is no valid. Unable to extract a domain name. + */ + object InvalidMatrixId : WellknownResult() + + /** + * Retrieve the specific piece of information from the user in a way which fits within the existing client user experience, + * if the client is inclined to do so. Failure can take place instead if no good user experience for this is possible at this point. + */ + data class Prompt(val homerServerUrl: String, + val identityServerUrl: String?, + val wellKnown: WellKnown) : WellknownResult() + + /** + * Stop the current auto-discovery mechanism. If no more auto-discovery mechanisms are available, + * then the client may use other methods of determining the required parameters, such as prompting the user, or using default values. + */ + object Ignore : WellknownResult() + + /** + * Inform the user that auto-discovery failed due to invalid/empty data and PROMPT for the parameter. + */ + object FailPrompt : WellknownResult() + + /** + * Inform the user that auto-discovery did not return any usable URLs. Do not continue further with the current login process. + * At this point, valid data was obtained, but no homeserver is available to serve the client. + * No further guess should be attempted and the user should make a conscientious decision what to do next. + */ + object FailError : WellknownResult() +} diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/AuthModule.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/AuthModule.kt index 6b6321de36..232cb3f541 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/AuthModule.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/AuthModule.kt @@ -25,6 +25,10 @@ import im.vector.matrix.android.internal.auth.db.AuthRealmMigration import im.vector.matrix.android.internal.auth.db.AuthRealmModule import im.vector.matrix.android.internal.auth.db.RealmPendingSessionStore import im.vector.matrix.android.internal.auth.db.RealmSessionParamsStore +import im.vector.matrix.android.internal.auth.wellknown.DefaultDirectLoginTask +import im.vector.matrix.android.internal.auth.wellknown.DefaultGetWellknownTask +import im.vector.matrix.android.internal.auth.wellknown.DirectLoginTask +import im.vector.matrix.android.internal.auth.wellknown.GetWellknownTask import im.vector.matrix.android.internal.database.RealmKeysUtils import im.vector.matrix.android.internal.di.AuthDatabase import io.realm.RealmConfiguration @@ -59,14 +63,20 @@ internal abstract class AuthModule { } @Binds - abstract fun bindSessionParamsStore(sessionParamsStore: RealmSessionParamsStore): SessionParamsStore + abstract fun bindSessionParamsStore(store: RealmSessionParamsStore): SessionParamsStore @Binds - abstract fun bindPendingSessionStore(pendingSessionStore: RealmPendingSessionStore): PendingSessionStore + abstract fun bindPendingSessionStore(store: RealmPendingSessionStore): PendingSessionStore @Binds - abstract fun bindAuthenticationService(authenticationService: DefaultAuthenticationService): AuthenticationService + abstract fun bindAuthenticationService(service: DefaultAuthenticationService): AuthenticationService @Binds - abstract fun bindSessionCreator(sessionCreator: DefaultSessionCreator): SessionCreator + abstract fun bindSessionCreator(creator: DefaultSessionCreator): SessionCreator + + @Binds + abstract fun bindGetWellknownTask(task: DefaultGetWellknownTask): GetWellknownTask + + @Binds + abstract fun bindDirectLoginTask(task: DefaultDirectLoginTask): DirectLoginTask } diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/DefaultAuthenticationService.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/DefaultAuthenticationService.kt index 85c2cdbf3d..b2c2dc12a5 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/DefaultAuthenticationService.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/DefaultAuthenticationService.kt @@ -29,6 +29,7 @@ import im.vector.matrix.android.api.auth.data.isLoginAndRegistrationSupportedByS import im.vector.matrix.android.api.auth.data.isSupportedBySdk import im.vector.matrix.android.api.auth.login.LoginWizard import im.vector.matrix.android.api.auth.registration.RegistrationWizard +import im.vector.matrix.android.api.auth.wellknown.WellknownResult import im.vector.matrix.android.api.failure.Failure import im.vector.matrix.android.api.session.Session import im.vector.matrix.android.api.util.Cancelable @@ -38,9 +39,13 @@ import im.vector.matrix.android.internal.auth.data.RiotConfig import im.vector.matrix.android.internal.auth.db.PendingSessionData import im.vector.matrix.android.internal.auth.login.DefaultLoginWizard import im.vector.matrix.android.internal.auth.registration.DefaultRegistrationWizard +import im.vector.matrix.android.internal.auth.wellknown.DirectLoginTask +import im.vector.matrix.android.internal.auth.wellknown.GetWellknownTask import im.vector.matrix.android.internal.di.Unauthenticated import im.vector.matrix.android.internal.network.RetrofitFactory import im.vector.matrix.android.internal.network.executeRequest +import im.vector.matrix.android.internal.task.TaskExecutor +import im.vector.matrix.android.internal.task.configureWith import im.vector.matrix.android.internal.task.launchToCallback import im.vector.matrix.android.internal.util.MatrixCoroutineDispatchers import im.vector.matrix.android.internal.util.toCancelable @@ -59,7 +64,10 @@ internal class DefaultAuthenticationService @Inject constructor( private val sessionParamsStore: SessionParamsStore, private val sessionManager: SessionManager, private val sessionCreator: SessionCreator, - private val pendingSessionStore: PendingSessionStore + private val pendingSessionStore: PendingSessionStore, + private val getWellknownTask: GetWellknownTask, + private val directLoginTask: DirectLoginTask, + private val taskExecutor: TaskExecutor ) : AuthenticationService { private var pendingSessionData: PendingSessionData? = pendingSessionStore.getPendingSessionData() @@ -260,6 +268,26 @@ internal class DefaultAuthenticationService @Inject constructor( } } + override fun getWellKnownData(matrixId: String, callback: MatrixCallback): Cancelable { + return getWellknownTask + .configureWith(GetWellknownTask.Params(matrixId)) { + this.callback = callback + } + .executeBy(taskExecutor) + } + + override fun directAuthentication(homeServerConnectionConfig: HomeServerConnectionConfig, + matrixId: String, + password: String, + initialDeviceName: String, + callback: MatrixCallback): Cancelable { + return directLoginTask + .configureWith(DirectLoginTask.Params(homeServerConnectionConfig, matrixId, password, initialDeviceName)) { + this.callback = callback + } + .executeBy(taskExecutor) + } + private suspend fun createSessionFromSso(credentials: Credentials, homeServerConnectionConfig: HomeServerConnectionConfig): Session = withContext(coroutineDispatchers.computation) { sessionCreator.createSession(credentials, homeServerConnectionConfig) diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/wellknown/DirectLoginTask.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/wellknown/DirectLoginTask.kt new file mode 100644 index 0000000000..01a3ab192d --- /dev/null +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/wellknown/DirectLoginTask.kt @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2020 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.matrix.android.internal.auth.wellknown + +import dagger.Lazy +import im.vector.matrix.android.api.auth.data.Credentials +import im.vector.matrix.android.api.auth.data.HomeServerConnectionConfig +import im.vector.matrix.android.api.session.Session +import im.vector.matrix.android.internal.auth.AuthAPI +import im.vector.matrix.android.internal.auth.SessionCreator +import im.vector.matrix.android.internal.auth.data.PasswordLoginParams +import im.vector.matrix.android.internal.di.Unauthenticated +import im.vector.matrix.android.internal.network.RetrofitFactory +import im.vector.matrix.android.internal.network.executeRequest +import im.vector.matrix.android.internal.task.Task +import okhttp3.OkHttpClient +import javax.inject.Inject + +internal interface DirectLoginTask : Task { + data class Params( + val homeServerConnectionConfig: HomeServerConnectionConfig, + val userId: String, + val password: String, + val deviceName: String + ) +} + +internal class DefaultDirectLoginTask @Inject constructor( + @Unauthenticated + private val okHttpClient: Lazy, + private val retrofitFactory: RetrofitFactory, + private val sessionCreator: SessionCreator +) : DirectLoginTask { + + override suspend fun execute(params: DirectLoginTask.Params): Session { + val authAPI = retrofitFactory.create(okHttpClient, params.homeServerConnectionConfig.homeServerUri.toString()) + .create(AuthAPI::class.java) + + val loginParams = PasswordLoginParams.userIdentifier(params.userId, params.password, params.deviceName) + + val credentials = executeRequest(null) { + apiCall = authAPI.login(loginParams) + } + + return sessionCreator.createSession(credentials, params.homeServerConnectionConfig) + } +} diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/wellknown/GetWellknownTask.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/wellknown/GetWellknownTask.kt new file mode 100644 index 0000000000..8ed2cb3b0f --- /dev/null +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/wellknown/GetWellknownTask.kt @@ -0,0 +1,199 @@ +/* + * Copyright (c) 2020 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.matrix.android.internal.auth.wellknown + +import android.util.MalformedJsonException +import dagger.Lazy +import im.vector.matrix.android.api.MatrixPatterns +import im.vector.matrix.android.api.auth.data.WellKnown +import im.vector.matrix.android.api.auth.wellknown.WellknownResult +import im.vector.matrix.android.api.failure.Failure +import im.vector.matrix.android.internal.di.Unauthenticated +import im.vector.matrix.android.internal.identity.IdentityPingApi +import im.vector.matrix.android.internal.network.RetrofitFactory +import im.vector.matrix.android.internal.network.executeRequest +import im.vector.matrix.android.internal.session.homeserver.CapabilitiesAPI +import im.vector.matrix.android.internal.task.Task +import im.vector.matrix.android.internal.util.isValidUrl +import okhttp3.OkHttpClient +import java.io.EOFException +import javax.inject.Inject +import javax.net.ssl.HttpsURLConnection + +internal interface GetWellknownTask : Task { + data class Params( + val matrixId: String + ) +} + +/** + * Inspired from AutoDiscovery class from legacy Matrix Android SDK + */ +internal class DefaultGetWellknownTask @Inject constructor( + @Unauthenticated + private val okHttpClient: Lazy, + private val retrofitFactory: RetrofitFactory +) : GetWellknownTask { + + override suspend fun execute(params: GetWellknownTask.Params): WellknownResult { + if (!MatrixPatterns.isUserId(params.matrixId)) { + return WellknownResult.InvalidMatrixId + } + + val homeServerDomain = params.matrixId.substringAfter(":") + + return findClientConfig(homeServerDomain) + } + + /** + * Find client config + * + * - Do the .well-known request + * - validate homeserver url and identity server url if provide in .well-known result + * - return action and .well-known data + * + * @param domain: homeserver domain, deduced from mx userId (ex: "matrix.org" from userId "@user:matrix.org") + */ + private suspend fun findClientConfig(domain: String): WellknownResult { + val wellKnownAPI = retrofitFactory.create(okHttpClient, "https://dummy.org") + .create(WellKnownAPI::class.java) + + return try { + val wellKnown = executeRequest(null) { + apiCall = wellKnownAPI.getWellKnown(domain) + } + + // Success + val homeServerBaseUrl = wellKnown.homeServer?.baseURL + if (homeServerBaseUrl.isNullOrBlank()) { + WellknownResult.FailPrompt + } else { + if (homeServerBaseUrl.isValidUrl()) { + // Check that HS is a real one + validateHomeServer(homeServerBaseUrl, wellKnown) + } else { + WellknownResult.FailError + } + } + } catch (throwable: Throwable) { + when (throwable) { + is Failure.NetworkConnection -> { + WellknownResult.Ignore + } + is Failure.OtherServerError -> { + when (throwable.httpCode) { + HttpsURLConnection.HTTP_NOT_FOUND -> WellknownResult.Ignore + else -> WellknownResult.FailPrompt + } + } + is MalformedJsonException, is EOFException -> { + WellknownResult.FailPrompt + } + else -> { + throw throwable + } + } + } + } + + /** + * Return true if home server is valid, and (if applicable) if identity server is pingable + */ + private suspend fun validateHomeServer(homeServerBaseUrl: String, wellKnown: WellKnown): WellknownResult { + val capabilitiesAPI = retrofitFactory.create(okHttpClient, homeServerBaseUrl) + .create(CapabilitiesAPI::class.java) + + try { + executeRequest(null) { + apiCall = capabilitiesAPI.getVersions() + } + } catch (throwable: Throwable) { + return WellknownResult.FailError + } + + return if (wellKnown.identityServer == null) { + // No identity server + WellknownResult.Prompt(homeServerBaseUrl, null, wellKnown) + } else { + // if m.identity_server is present it must be valid + val identityServerBaseUrl = wellKnown.identityServer.baseURL + if (identityServerBaseUrl.isNullOrBlank()) { + WellknownResult.FailError + } else { + if (identityServerBaseUrl.isValidUrl()) { + if (validateIdentityServer(identityServerBaseUrl)) { + // All is ok + WellknownResult.Prompt(homeServerBaseUrl, identityServerBaseUrl, wellKnown) + } else { + WellknownResult.FailError + } + } else { + WellknownResult.FailError + } + } + } + } + + /** + * Return true if identity server is pingable + */ + private suspend fun validateIdentityServer(identityServerBaseUrl: String): Boolean { + val identityPingApi = retrofitFactory.create(okHttpClient, identityServerBaseUrl) + .create(IdentityPingApi::class.java) + + return try { + executeRequest(null) { + apiCall = identityPingApi.ping() + } + + true + } catch (throwable: Throwable) { + false + } + } + + /** + * Try to get an identity server URL from a home server URL, using a .wellknown request + */ + /* + fun getIdentityServer(homeServerUrl: String, callback: ApiCallback) { + if (homeServerUrl.startsWith("https://")) { + wellKnownRestClient.getWellKnown(homeServerUrl.substring("https://".length), + object : SimpleApiCallback(callback) { + override fun onSuccess(info: WellKnown) { + callback.onSuccess(info.identityServer?.baseURL) + } + }) + } else { + callback.onUnexpectedError(InvalidParameterException("malformed url")) + } + } + + fun getServerPreferredIntegrationManagers(homeServerUrl: String, callback: ApiCallback>) { + if (homeServerUrl.startsWith("https://")) { + wellKnownRestClient.getWellKnown(homeServerUrl.substring("https://".length), + object : SimpleApiCallback(callback) { + override fun onSuccess(info: WellKnown) { + callback.onSuccess(info.getIntegrationManagers()) + } + }) + } else { + callback.onUnexpectedError(InvalidParameterException("malformed url")) + } + } + */ +} diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/wellknown/WellKnownAPI.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/wellknown/WellKnownAPI.kt new file mode 100644 index 0000000000..71928123bf --- /dev/null +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/wellknown/WellKnownAPI.kt @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2020 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.matrix.android.internal.auth.wellknown + +import im.vector.matrix.android.api.auth.data.WellKnown +import retrofit2.Call +import retrofit2.http.GET +import retrofit2.http.Path + +internal interface WellKnownAPI { + @GET("https://{domain}/.well-known/matrix/client") + fun getWellKnown(@Path("domain") domain: String): Call +} diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/identity/IdentityPingApi.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/identity/IdentityPingApi.kt new file mode 100644 index 0000000000..2a0e00704c --- /dev/null +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/identity/IdentityPingApi.kt @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2020 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.matrix.android.internal.identity + +import im.vector.matrix.android.internal.network.NetworkConstants +import retrofit2.Call +import retrofit2.http.GET + +internal interface IdentityPingApi { + + /** + * https://matrix.org/docs/spec/client_server/r0.4.0.html#server-discovery + * Simple ping call to check if server alive + * + * Ref: https://matrix.org/docs/spec/identity_service/unstable#status-check + * + * @return 200 in case of success + */ + @GET(NetworkConstants.URI_API_PREFIX_IDENTITY) + fun ping(): Call +} diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/network/NetworkConstants.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/network/NetworkConstants.kt index c6c10d9a8f..ab6745148f 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/network/NetworkConstants.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/network/NetworkConstants.kt @@ -26,4 +26,10 @@ internal object NetworkConstants { // Media private const val URI_API_MEDIA_PREFIX_PATH = "_matrix/media" const val URI_API_MEDIA_PREFIX_PATH_R0 = "$URI_API_MEDIA_PREFIX_PATH/r0/" + + // Identity server + const val URI_IDENTITY_PATH = "_matrix/identity/api/v1/" + const val URI_IDENTITY_PATH_V2 = "_matrix/identity/v2/" + + const val URI_API_PREFIX_IDENTITY = "_matrix/identity/api/v1" } diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/user/SearchUserAPI.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/user/SearchUserAPI.kt index e57daed617..4adcee88aa 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/user/SearchUserAPI.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/user/SearchUserAPI.kt @@ -16,7 +16,7 @@ package im.vector.matrix.android.internal.session.user -import im.vector.matrix.android.internal.network.NetworkConstants.URI_API_PREFIX_PATH_R0 +import im.vector.matrix.android.internal.network.NetworkConstants import im.vector.matrix.android.internal.session.user.model.SearchUsersParams import im.vector.matrix.android.internal.session.user.model.SearchUsersResponse import retrofit2.Call @@ -30,6 +30,6 @@ internal interface SearchUserAPI { * * @param searchUsersParams the search params. */ - @POST(URI_API_PREFIX_PATH_R0 + "user_directory/search") + @POST(NetworkConstants.URI_API_PREFIX_PATH_R0 + "user_directory/search") fun searchUsers(@Body searchUsersParams: SearchUsersParams): Call } diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/util/UrlUtils.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/util/UrlUtils.kt new file mode 100644 index 0000000000..8ad5e89605 --- /dev/null +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/util/UrlUtils.kt @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2020 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.matrix.android.internal.util + +import java.net.URL + +internal fun String.isValidUrl(): Boolean { + return try { + URL(this) + true + } catch (t: Throwable) { + false + } +} diff --git a/vector/src/main/java/im/vector/riotx/features/login/LoginActivity.kt b/vector/src/main/java/im/vector/riotx/features/login/LoginActivity.kt index c67e45d9e7..cd8c1df46e 100644 --- a/vector/src/main/java/im/vector/riotx/features/login/LoginActivity.kt +++ b/vector/src/main/java/im/vector/riotx/features/login/LoginActivity.kt @@ -38,6 +38,7 @@ import im.vector.riotx.core.di.ScreenComponent import im.vector.riotx.core.extensions.POP_BACK_STACK_EXCLUSIVE import im.vector.riotx.core.extensions.addFragment import im.vector.riotx.core.extensions.addFragmentToBackstack +import im.vector.riotx.core.extensions.exhaustive import im.vector.riotx.core.platform.ToolbarConfigurable import im.vector.riotx.core.platform.VectorBaseActivity import im.vector.riotx.features.home.HomeActivity @@ -125,9 +126,7 @@ open class LoginActivity : VectorBaseActivity(), ToolbarConfigurable { } private fun handleLoginNavigation(loginNavigation: LoginNavigation) { - // Assigning to dummy make sure we do not forget a case - @Suppress("UNUSED_VARIABLE") - val dummy = when (loginNavigation) { + when (loginNavigation) { is LoginNavigation.OpenServerSelection -> addFragmentToBackstack(R.id.loginFragmentContainer, LoginServerSelectionFragment::class.java, @@ -177,7 +176,7 @@ open class LoginActivity : VectorBaseActivity(), ToolbarConfigurable { LoginGenericTextInputFormFragmentArgument(TextInputFormFragmentMode.ConfirmMsisdn, true, loginNavigation.msisdn), tag = FRAGMENT_REGISTRATION_STAGE_TAG, option = commonOption) - } + }.exhaustive } private fun handleLoginViewEvents(loginViewEvents: LoginViewEvents) { @@ -254,11 +253,11 @@ open class LoginActivity : VectorBaseActivity(), ToolbarConfigurable { private fun onSignModeSelected() = withState(loginViewModel) { state -> when (state.signMode) { - SignMode.Unknown -> error("Sign mode has to be set before calling this method") - SignMode.SignUp -> { + SignMode.Unknown -> error("Sign mode has to be set before calling this method") + SignMode.SignUp -> { // This is managed by the LoginViewEvents } - SignMode.SignIn -> { + SignMode.SignIn -> { // It depends on the LoginMode when (state.loginMode) { LoginMode.Unknown -> error("Developer error") @@ -272,7 +271,11 @@ open class LoginActivity : VectorBaseActivity(), ToolbarConfigurable { LoginMode.Unsupported -> onLoginModeNotSupported(state.loginModeSupportedTypes) } } - } + SignMode.SignInWithMatrixId -> addFragmentToBackstack(R.id.loginFragmentContainer, + LoginFragment::class.java, + tag = FRAGMENT_LOGIN_TAG, + option = commonOption) + }.exhaustive } private fun onRegistrationStageNotSupported() { diff --git a/vector/src/main/java/im/vector/riotx/features/login/LoginFragment.kt b/vector/src/main/java/im/vector/riotx/features/login/LoginFragment.kt index 8b89aeda2a..371f669736 100644 --- a/vector/src/main/java/im/vector/riotx/features/login/LoginFragment.kt +++ b/vector/src/main/java/im/vector/riotx/features/login/LoginFragment.kt @@ -31,6 +31,7 @@ import im.vector.matrix.android.api.failure.Failure import im.vector.matrix.android.api.failure.MatrixError import im.vector.matrix.android.api.failure.isInvalidPassword import im.vector.riotx.R +import im.vector.riotx.core.extensions.exhaustive import im.vector.riotx.core.extensions.hideKeyboard import im.vector.riotx.core.extensions.showPassword import im.vector.riotx.core.extensions.toReducedUrl @@ -73,16 +74,17 @@ class LoginFragment @Inject constructor() : AbstractLoginFragment() { private fun setupAutoFill(state: LoginViewState) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { when (state.signMode) { - SignMode.Unknown -> error("developer error") - SignMode.SignUp -> { + SignMode.Unknown -> error("developer error") + SignMode.SignUp -> { loginField.setAutofillHints(HintConstants.AUTOFILL_HINT_NEW_USERNAME) passwordField.setAutofillHints(HintConstants.AUTOFILL_HINT_NEW_PASSWORD) } - SignMode.SignIn -> { + SignMode.SignIn, + SignMode.SignInWithMatrixId -> { loginField.setAutofillHints(HintConstants.AUTOFILL_HINT_USERNAME) passwordField.setAutofillHints(HintConstants.AUTOFILL_HINT_PASSWORD) } - } + }.exhaustive } } @@ -116,35 +118,44 @@ class LoginFragment @Inject constructor() : AbstractLoginFragment() { } private fun setupUi(state: LoginViewState) { - val resId = when (state.signMode) { - SignMode.Unknown -> error("developer error") - SignMode.SignUp -> R.string.login_signup_to - SignMode.SignIn -> R.string.login_connect_to - } - loginFieldTil.hint = getString(when (state.signMode) { - SignMode.Unknown -> error("developer error") - SignMode.SignUp -> R.string.login_signup_username_hint - SignMode.SignIn -> R.string.login_signin_username_hint + SignMode.Unknown -> error("developer error") + SignMode.SignUp -> R.string.login_signup_username_hint + SignMode.SignIn -> R.string.login_signin_username_hint + SignMode.SignInWithMatrixId -> R.string.login_signin_matrix_id_hint }) - when (state.serverType) { - ServerType.MatrixOrg -> { - loginServerIcon.isVisible = true - loginServerIcon.setImageResource(R.drawable.ic_logo_matrix_org) - loginTitle.text = getString(resId, state.homeServerUrl.toReducedUrl()) - loginNotice.text = getString(R.string.login_server_matrix_org_text) + // Handle direct signin first + if (state.signMode == SignMode.SignInWithMatrixId) { + loginServerIcon.isVisible = false + loginTitle.text = getString(R.string.login_signin_matrix_id_title) + loginNotice.text = getString(R.string.login_signin_matrix_id_notice) + } else { + val resId = when (state.signMode) { + SignMode.Unknown -> error("developer error") + SignMode.SignUp -> R.string.login_signup_to + SignMode.SignIn -> R.string.login_connect_to + SignMode.SignInWithMatrixId -> R.string.login_connect_to } - ServerType.Modular -> { - loginServerIcon.isVisible = true - loginServerIcon.setImageResource(R.drawable.ic_logo_modular) - loginTitle.text = getString(resId, "Modular") - loginNotice.text = getString(R.string.login_server_modular_text) - } - ServerType.Other -> { - loginServerIcon.isVisible = false - loginTitle.text = getString(resId, state.homeServerUrl.toReducedUrl()) - loginNotice.text = getString(R.string.login_server_other_text) + + when (state.serverType) { + ServerType.MatrixOrg -> { + loginServerIcon.isVisible = true + loginServerIcon.setImageResource(R.drawable.ic_logo_matrix_org) + loginTitle.text = getString(resId, state.homeServerUrl.toReducedUrl()) + loginNotice.text = getString(R.string.login_server_matrix_org_text) + } + ServerType.Modular -> { + loginServerIcon.isVisible = true + loginServerIcon.setImageResource(R.drawable.ic_logo_modular) + loginTitle.text = getString(resId, "Modular") + loginNotice.text = getString(R.string.login_server_modular_text) + } + ServerType.Other -> { + loginServerIcon.isVisible = false + loginTitle.text = getString(resId, state.homeServerUrl.toReducedUrl()) + loginNotice.text = getString(R.string.login_server_other_text) + } } } } @@ -153,9 +164,10 @@ class LoginFragment @Inject constructor() : AbstractLoginFragment() { forgetPasswordButton.isVisible = state.signMode == SignMode.SignIn loginSubmit.text = getString(when (state.signMode) { - SignMode.Unknown -> error("developer error") - SignMode.SignUp -> R.string.login_signup_submit - SignMode.SignIn -> R.string.login_signin + SignMode.Unknown -> error("developer error") + SignMode.SignUp -> R.string.login_signup_submit + SignMode.SignIn, + SignMode.SignInWithMatrixId -> R.string.login_signin }) } diff --git a/vector/src/main/java/im/vector/riotx/features/login/LoginServerSelectionFragment.kt b/vector/src/main/java/im/vector/riotx/features/login/LoginServerSelectionFragment.kt index 9050ea2688..ddd56c314e 100644 --- a/vector/src/main/java/im/vector/riotx/features/login/LoginServerSelectionFragment.kt +++ b/vector/src/main/java/im/vector/riotx/features/login/LoginServerSelectionFragment.kt @@ -99,6 +99,12 @@ class LoginServerSelectionFragment @Inject constructor() : AbstractLoginFragment } } + @OnClick(R.id.loginServerIKnowMyIdSubmit) + fun loginWithMatrixId() { + loginViewModel.handle(LoginAction.UpdateSignMode(SignMode.SignInWithMatrixId)) + loginSharedActionViewModel.post(LoginNavigation.OnSignModeSelected) + } + override fun resetViewModel() { loginViewModel.handle(LoginAction.ResetHomeServerType) } diff --git a/vector/src/main/java/im/vector/riotx/features/login/LoginViewModel.kt b/vector/src/main/java/im/vector/riotx/features/login/LoginViewModel.kt index 80b04fe062..05f841269f 100644 --- a/vector/src/main/java/im/vector/riotx/features/login/LoginViewModel.kt +++ b/vector/src/main/java/im/vector/riotx/features/login/LoginViewModel.kt @@ -17,6 +17,7 @@ package im.vector.riotx.features.login import android.content.Context +import android.net.Uri import androidx.fragment.app.FragmentActivity import com.airbnb.mvrx.ActivityViewModelContext import com.airbnb.mvrx.Fail @@ -29,19 +30,24 @@ import com.squareup.inject.assisted.Assisted import com.squareup.inject.assisted.AssistedInject import im.vector.matrix.android.api.MatrixCallback import im.vector.matrix.android.api.auth.AuthenticationService +import im.vector.matrix.android.api.auth.data.HomeServerConnectionConfig import im.vector.matrix.android.api.auth.data.LoginFlowResult import im.vector.matrix.android.api.auth.login.LoginWizard import im.vector.matrix.android.api.auth.registration.FlowResult import im.vector.matrix.android.api.auth.registration.RegistrationResult import im.vector.matrix.android.api.auth.registration.RegistrationWizard import im.vector.matrix.android.api.auth.registration.Stage +import im.vector.matrix.android.api.auth.wellknown.WellknownResult import im.vector.matrix.android.api.session.Session import im.vector.matrix.android.api.util.Cancelable import im.vector.matrix.android.internal.auth.data.LoginFlowTypes import im.vector.matrix.android.internal.crypto.model.rest.UserPasswordAuth +import im.vector.riotx.R import im.vector.riotx.core.di.ActiveSessionHolder import im.vector.riotx.core.extensions.configureAndStart +import im.vector.riotx.core.extensions.exhaustive import im.vector.riotx.core.platform.VectorViewModel +import im.vector.riotx.core.resources.StringProvider import im.vector.riotx.features.notifications.PushRuleTriggerListener import im.vector.riotx.features.session.SessionListener import im.vector.riotx.features.signout.soft.SoftLogoutActivity @@ -51,14 +57,16 @@ import java.util.concurrent.CancellationException /** * */ -class LoginViewModel @AssistedInject constructor(@Assisted initialState: LoginViewState, - private val applicationContext: Context, - private val authenticationService: AuthenticationService, - private val activeSessionHolder: ActiveSessionHolder, - private val pushRuleTriggerListener: PushRuleTriggerListener, - private val homeServerConnectionConfigFactory: HomeServerConnectionConfigFactory, - private val sessionListener: SessionListener, - private val reAuthHelper: ReAuthHelper) +class LoginViewModel @AssistedInject constructor( + @Assisted initialState: LoginViewState, + private val applicationContext: Context, + private val authenticationService: AuthenticationService, + private val activeSessionHolder: ActiveSessionHolder, + private val pushRuleTriggerListener: PushRuleTriggerListener, + private val homeServerConnectionConfigFactory: HomeServerConnectionConfigFactory, + private val sessionListener: SessionListener, + private val reAuthHelper: ReAuthHelper, + private val stringProvider: StringProvider) : VectorViewModel(initialState) { @AssistedInject.Factory @@ -421,10 +429,73 @@ class LoginViewModel @AssistedInject constructor(@Assisted initialState: LoginVi private fun handleLoginOrRegister(action: LoginAction.LoginOrRegister) = withState { state -> when (state.signMode) { - SignMode.SignIn -> handleLogin(action) - SignMode.SignUp -> handleRegisterWith(action) - else -> error("Developer error, invalid sign mode") + SignMode.Unknown -> error("Developer error, invalid sign mode") + SignMode.SignIn -> handleLogin(action) + SignMode.SignUp -> handleRegisterWith(action) + SignMode.SignInWithMatrixId -> handleDirectLogin(action) + }.exhaustive + } + + private fun handleDirectLogin(action: LoginAction.LoginOrRegister) { + setState { + copy( + asyncLoginAction = Loading() + ) } + + authenticationService.getWellKnownData(action.username, object : MatrixCallback { + override fun onSuccess(data: WellknownResult) { + when (data) { + is WellknownResult.Prompt -> + onWellknownSuccess(action, data) + is WellknownResult.InvalidMatrixId -> { + setState { + copy( + asyncLoginAction = Uninitialized + ) + } + _viewEvents.post(LoginViewEvents.Failure(Exception(stringProvider.getString(R.string.login_signin_matrix_id_error_invalid_matrix_id)))) + } + else -> { + setState { + copy( + asyncLoginAction = Uninitialized + ) + } + _viewEvents.post(LoginViewEvents.Failure(Exception(stringProvider.getString(R.string.autodiscover_well_known_error)))) + } + }.exhaustive + } + + override fun onFailure(failure: Throwable) { + setState { + copy( + asyncLoginAction = Fail(failure) + ) + } + } + }) + } + + private fun onWellknownSuccess(action: LoginAction.LoginOrRegister, wellKnownPrompt: WellknownResult.Prompt) { + val homeServerConnectionConfig = HomeServerConnectionConfig( + homeServerUri = Uri.parse(wellKnownPrompt.homerServerUrl), + identityServerUri = wellKnownPrompt.identityServerUrl?.let { Uri.parse(it) } + ) + + authenticationService.directAuthentication(homeServerConnectionConfig, action.username, action.password, action.initialDeviceName, object : MatrixCallback { + override fun onSuccess(data: Session) { + onSessionCreated(data) + } + + override fun onFailure(failure: Throwable) { + setState { + copy( + asyncLoginAction = Fail(failure) + ) + } + } + }) } private fun handleLogin(action: LoginAction.LoginOrRegister) { diff --git a/vector/src/main/java/im/vector/riotx/features/login/SignMode.kt b/vector/src/main/java/im/vector/riotx/features/login/SignMode.kt index b793a0fe1d..ad06f1f4a9 100644 --- a/vector/src/main/java/im/vector/riotx/features/login/SignMode.kt +++ b/vector/src/main/java/im/vector/riotx/features/login/SignMode.kt @@ -21,5 +21,7 @@ enum class SignMode { // Account creation SignUp, // Login - SignIn + SignIn, + // Login directly with matrix Id + SignInWithMatrixId } diff --git a/vector/src/main/res/layout/fragment_login_server_selection.xml b/vector/src/main/res/layout/fragment_login_server_selection.xml index c97b32bd21..dc04f202fa 100644 --- a/vector/src/main/res/layout/fragment_login_server_selection.xml +++ b/vector/src/main/res/layout/fragment_login_server_selection.xml @@ -184,11 +184,34 @@ android:layout_marginTop="24dp" android:text="@string/login_continue" android:transitionName="loginSubmitTransition" - app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintBottom_toTopOf="@+id/loginServerIKnowMyIdNotice" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/loginServerChoiceOther" /> + + + + diff --git a/vector/src/main/res/values/strings_riotX.xml b/vector/src/main/res/values/strings_riotX.xml index 585102d46a..dd1043819d 100644 --- a/vector/src/main/res/values/strings_riotX.xml +++ b/vector/src/main/res/values/strings_riotX.xml @@ -57,4 +57,12 @@ + Alternatively, if you already have an account and you know your Matrix identifier and your password, you can use this method: + Sign in with my Matrix identifier + Sign in + Enter your identifier and your password + User identifier + This is not a valid user identifier. Expected format: \'@user:homeserver.org\' + Unable to find a valid homeserver. Please check your identifier + From f74b1e6c2e1d4b2008a8cca6f9b49a201c9ca7fa Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 2 Mar 2020 19:11:52 +0100 Subject: [PATCH 123/156] Migrate Login Navigation view model to regular ViewEvents --- .../vector/riotx/core/di/ViewModelModule.kt | 8 +- .../features/login/AbstractLoginFragment.kt | 3 - .../riotx/features/login/LoginAction.kt | 2 + .../riotx/features/login/LoginActivity.kt | 121 ++++++++---------- .../riotx/features/login/LoginFragment.kt | 2 +- .../LoginGenericTextInputFormFragment.kt | 4 +- .../riotx/features/login/LoginNavigation.kt | 36 ------ .../login/LoginResetPasswordFragment.kt | 2 +- ...inResetPasswordMailConfirmationFragment.kt | 2 +- .../LoginResetPasswordSuccessFragment.kt | 2 +- .../login/LoginServerSelectionFragment.kt | 5 +- .../login/LoginServerUrlFormFragment.kt | 2 +- .../login/LoginSharedActionViewModel.kt | 22 ---- .../LoginSignUpSignInSelectionFragment.kt | 1 - .../features/login/LoginSplashFragment.kt | 2 +- .../riotx/features/login/LoginViewEvents.kt | 18 ++- .../riotx/features/login/LoginViewModel.kt | 20 ++- .../riotx/features/login/LoginWebFragment.kt | 2 +- .../signout/soft/SoftLogoutFragment.kt | 6 +- 19 files changed, 102 insertions(+), 158 deletions(-) delete mode 100644 vector/src/main/java/im/vector/riotx/features/login/LoginNavigation.kt delete mode 100644 vector/src/main/java/im/vector/riotx/features/login/LoginSharedActionViewModel.kt diff --git a/vector/src/main/java/im/vector/riotx/core/di/ViewModelModule.kt b/vector/src/main/java/im/vector/riotx/core/di/ViewModelModule.kt index e480cf22ca..8046f67668 100644 --- a/vector/src/main/java/im/vector/riotx/core/di/ViewModelModule.kt +++ b/vector/src/main/java/im/vector/riotx/core/di/ViewModelModule.kt @@ -30,11 +30,10 @@ import im.vector.riotx.features.home.HomeSharedActionViewModel import im.vector.riotx.features.home.room.detail.RoomDetailSharedActionViewModel import im.vector.riotx.features.home.room.detail.timeline.action.MessageSharedActionViewModel import im.vector.riotx.features.home.room.list.actions.RoomListQuickActionsSharedActionViewModel -import im.vector.riotx.features.login.LoginSharedActionViewModel -import im.vector.riotx.features.userdirectory.UserDirectorySharedActionViewModel import im.vector.riotx.features.reactions.EmojiChooserViewModel import im.vector.riotx.features.roomdirectory.RoomDirectorySharedActionViewModel import im.vector.riotx.features.roomprofile.RoomProfileSharedActionViewModel +import im.vector.riotx.features.userdirectory.UserDirectorySharedActionViewModel import im.vector.riotx.features.workers.signout.SignOutViewModel @Module @@ -110,11 +109,6 @@ interface ViewModelModule { @ViewModelKey(RoomDirectorySharedActionViewModel::class) fun bindRoomDirectorySharedActionViewModel(viewModel: RoomDirectorySharedActionViewModel): ViewModel - @Binds - @IntoMap - @ViewModelKey(LoginSharedActionViewModel::class) - fun bindLoginSharedActionViewModel(viewModel: LoginSharedActionViewModel): ViewModel - @Binds @IntoMap @ViewModelKey(RoomDetailSharedActionViewModel::class) diff --git a/vector/src/main/java/im/vector/riotx/features/login/AbstractLoginFragment.kt b/vector/src/main/java/im/vector/riotx/features/login/AbstractLoginFragment.kt index 83263d05a2..8fceaad07f 100644 --- a/vector/src/main/java/im/vector/riotx/features/login/AbstractLoginFragment.kt +++ b/vector/src/main/java/im/vector/riotx/features/login/AbstractLoginFragment.kt @@ -38,7 +38,6 @@ import javax.net.ssl.HttpsURLConnection abstract class AbstractLoginFragment : VectorBaseFragment(), OnBackPressed { protected val loginViewModel: LoginViewModel by activityViewModel() - protected lateinit var loginSharedActionViewModel: LoginSharedActionViewModel private var isResetPasswordStarted = false @@ -57,8 +56,6 @@ abstract class AbstractLoginFragment : VectorBaseFragment(), OnBackPressed { override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) - loginSharedActionViewModel = activityViewModelProvider.get(LoginSharedActionViewModel::class.java) - loginViewModel.observeViewEvents { handleLoginViewEvents(it) } diff --git a/vector/src/main/java/im/vector/riotx/features/login/LoginAction.kt b/vector/src/main/java/im/vector/riotx/features/login/LoginAction.kt index 90d6754448..3403760136 100644 --- a/vector/src/main/java/im/vector/riotx/features/login/LoginAction.kt +++ b/vector/src/main/java/im/vector/riotx/features/login/LoginAction.kt @@ -58,4 +58,6 @@ sealed class LoginAction : VectorViewModelAction { // For the soft logout case data class SetupSsoForSessionRecovery(val homeServerUrl: String, val deviceId: String) : LoginAction() + + data class PostViewEvent(val viewEvent: LoginViewEvents) : LoginAction() } diff --git a/vector/src/main/java/im/vector/riotx/features/login/LoginActivity.kt b/vector/src/main/java/im/vector/riotx/features/login/LoginActivity.kt index cd8c1df46e..96da88f15c 100644 --- a/vector/src/main/java/im/vector/riotx/features/login/LoginActivity.kt +++ b/vector/src/main/java/im/vector/riotx/features/login/LoginActivity.kt @@ -55,7 +55,6 @@ import javax.inject.Inject open class LoginActivity : VectorBaseActivity(), ToolbarConfigurable { private val loginViewModel: LoginViewModel by viewModel() - private lateinit var loginSharedActionViewModel: LoginSharedActionViewModel @Inject lateinit var loginViewModelFactory: LoginViewModel.Factory @@ -99,14 +98,6 @@ open class LoginActivity : VectorBaseActivity(), ToolbarConfigurable { loginViewModel.handle(LoginAction.InitWith(loginConfig)) } - loginSharedActionViewModel = viewModelProvider.get(LoginSharedActionViewModel::class.java) - loginSharedActionViewModel - .observe() - .subscribe { - handleLoginNavigation(it) - } - .disposeOnDestroy() - loginViewModel .subscribe(this) { updateWithState(it) @@ -125,63 +116,9 @@ open class LoginActivity : VectorBaseActivity(), ToolbarConfigurable { addFragment(R.id.loginFragmentContainer, LoginSplashFragment::class.java) } - private fun handleLoginNavigation(loginNavigation: LoginNavigation) { - when (loginNavigation) { - is LoginNavigation.OpenServerSelection -> - addFragmentToBackstack(R.id.loginFragmentContainer, - LoginServerSelectionFragment::class.java, - option = { ft -> - findViewById(R.id.loginSplashLogo)?.let { ft.addSharedElement(it, ViewCompat.getTransitionName(it) ?: "") } - findViewById(R.id.loginSplashTitle)?.let { ft.addSharedElement(it, ViewCompat.getTransitionName(it) ?: "") } - findViewById(R.id.loginSplashSubmit)?.let { ft.addSharedElement(it, ViewCompat.getTransitionName(it) ?: "") } - // TODO Disabled because it provokes a flickering - // ft.setCustomAnimations(enterAnim, exitAnim, popEnterAnim, popExitAnim) - }) - is LoginNavigation.OnServerSelectionDone -> onServerSelectionDone() - is LoginNavigation.OnSignModeSelected -> onSignModeSelected() - is LoginNavigation.OnLoginFlowRetrieved -> - addFragmentToBackstack(R.id.loginFragmentContainer, - LoginSignUpSignInSelectionFragment::class.java, - option = commonOption) - is LoginNavigation.OnWebLoginError -> onWebLoginError(loginNavigation) - is LoginNavigation.OnForgetPasswordClicked -> - addFragmentToBackstack(R.id.loginFragmentContainer, - LoginResetPasswordFragment::class.java, - option = commonOption) - is LoginNavigation.OnResetPasswordSendThreePidDone -> { - supportFragmentManager.popBackStack(FRAGMENT_LOGIN_TAG, POP_BACK_STACK_EXCLUSIVE) - addFragmentToBackstack(R.id.loginFragmentContainer, - LoginResetPasswordMailConfirmationFragment::class.java, - option = commonOption) - } - is LoginNavigation.OnResetPasswordMailConfirmationSuccess -> { - supportFragmentManager.popBackStack(FRAGMENT_LOGIN_TAG, POP_BACK_STACK_EXCLUSIVE) - addFragmentToBackstack(R.id.loginFragmentContainer, - LoginResetPasswordSuccessFragment::class.java, - option = commonOption) - } - is LoginNavigation.OnResetPasswordMailConfirmationSuccessDone -> { - // Go back to the login fragment - supportFragmentManager.popBackStack(FRAGMENT_LOGIN_TAG, POP_BACK_STACK_EXCLUSIVE) - } - is LoginNavigation.OnSendEmailSuccess -> - addFragmentToBackstack(R.id.loginFragmentContainer, - LoginWaitForEmailFragment::class.java, - LoginWaitForEmailFragmentArgument(loginNavigation.email), - tag = FRAGMENT_REGISTRATION_STAGE_TAG, - option = commonOption) - is LoginNavigation.OnSendMsisdnSuccess -> - addFragmentToBackstack(R.id.loginFragmentContainer, - LoginGenericTextInputFormFragment::class.java, - LoginGenericTextInputFormFragmentArgument(TextInputFormFragmentMode.ConfirmMsisdn, true, loginNavigation.msisdn), - tag = FRAGMENT_REGISTRATION_STAGE_TAG, - option = commonOption) - }.exhaustive - } - private fun handleLoginViewEvents(loginViewEvents: LoginViewEvents) { when (loginViewEvents) { - is LoginViewEvents.RegistrationFlowResult -> { + is LoginViewEvents.RegistrationFlowResult -> { // Check that all flows are supported by the application if (loginViewEvents.flowResult.missingStages.any { !it.isSupported() }) { // Display a popup to propose use web fallback @@ -202,15 +139,65 @@ open class LoginActivity : VectorBaseActivity(), ToolbarConfigurable { } } } - is LoginViewEvents.OutdatedHomeserver -> + is LoginViewEvents.OutdatedHomeserver -> AlertDialog.Builder(this) .setTitle(R.string.login_error_outdated_homeserver_title) .setMessage(R.string.login_error_outdated_homeserver_content) .setPositiveButton(R.string.ok, null) .show() - is LoginViewEvents.Failure -> + is LoginViewEvents.Failure -> // This is handled by the Fragments Unit + is LoginViewEvents.OpenServerSelection -> + addFragmentToBackstack(R.id.loginFragmentContainer, + LoginServerSelectionFragment::class.java, + option = { ft -> + findViewById(R.id.loginSplashLogo)?.let { ft.addSharedElement(it, ViewCompat.getTransitionName(it) ?: "") } + findViewById(R.id.loginSplashTitle)?.let { ft.addSharedElement(it, ViewCompat.getTransitionName(it) ?: "") } + findViewById(R.id.loginSplashSubmit)?.let { ft.addSharedElement(it, ViewCompat.getTransitionName(it) ?: "") } + // TODO Disabled because it provokes a flickering + // ft.setCustomAnimations(enterAnim, exitAnim, popEnterAnim, popExitAnim) + }) + is LoginViewEvents.OnServerSelectionDone -> onServerSelectionDone() + is LoginViewEvents.OnSignModeSelected -> onSignModeSelected() + is LoginViewEvents.OnLoginFlowRetrieved -> + addFragmentToBackstack(R.id.loginFragmentContainer, + LoginSignUpSignInSelectionFragment::class.java, + option = commonOption) + is LoginViewEvents.OnWebLoginError -> onWebLoginError(loginViewEvents) + is LoginViewEvents.OnForgetPasswordClicked -> + addFragmentToBackstack(R.id.loginFragmentContainer, + LoginResetPasswordFragment::class.java, + option = commonOption) + is LoginViewEvents.OnResetPasswordSendThreePidDone -> { + supportFragmentManager.popBackStack(FRAGMENT_LOGIN_TAG, POP_BACK_STACK_EXCLUSIVE) + addFragmentToBackstack(R.id.loginFragmentContainer, + LoginResetPasswordMailConfirmationFragment::class.java, + option = commonOption) + } + is LoginViewEvents.OnResetPasswordMailConfirmationSuccess -> { + supportFragmentManager.popBackStack(FRAGMENT_LOGIN_TAG, POP_BACK_STACK_EXCLUSIVE) + addFragmentToBackstack(R.id.loginFragmentContainer, + LoginResetPasswordSuccessFragment::class.java, + option = commonOption) + } + is LoginViewEvents.OnResetPasswordMailConfirmationSuccessDone -> { + // Go back to the login fragment + supportFragmentManager.popBackStack(FRAGMENT_LOGIN_TAG, POP_BACK_STACK_EXCLUSIVE) + } + is LoginViewEvents.OnSendEmailSuccess -> + addFragmentToBackstack(R.id.loginFragmentContainer, + LoginWaitForEmailFragment::class.java, + LoginWaitForEmailFragmentArgument(loginViewEvents.email), + tag = FRAGMENT_REGISTRATION_STAGE_TAG, + option = commonOption) + is LoginViewEvents.OnSendMsisdnSuccess -> + addFragmentToBackstack(R.id.loginFragmentContainer, + LoginGenericTextInputFormFragment::class.java, + LoginGenericTextInputFormFragmentArgument(TextInputFormFragmentMode.ConfirmMsisdn, true, loginViewEvents.msisdn), + tag = FRAGMENT_REGISTRATION_STAGE_TAG, + option = commonOption) + } } @@ -229,7 +216,7 @@ open class LoginActivity : VectorBaseActivity(), ToolbarConfigurable { loginLoading.isVisible = loginViewState.isLoading() } - private fun onWebLoginError(onWebLoginError: LoginNavigation.OnWebLoginError) { + private fun onWebLoginError(onWebLoginError: LoginViewEvents.OnWebLoginError) { // Pop the backstack supportFragmentManager.popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE) diff --git a/vector/src/main/java/im/vector/riotx/features/login/LoginFragment.kt b/vector/src/main/java/im/vector/riotx/features/login/LoginFragment.kt index 371f669736..c2bd02b817 100644 --- a/vector/src/main/java/im/vector/riotx/features/login/LoginFragment.kt +++ b/vector/src/main/java/im/vector/riotx/features/login/LoginFragment.kt @@ -190,7 +190,7 @@ class LoginFragment @Inject constructor() : AbstractLoginFragment() { @OnClick(R.id.forgetPasswordButton) fun forgetPasswordClicked() { - loginSharedActionViewModel.post(LoginNavigation.OnForgetPasswordClicked) + loginViewModel.handle(LoginAction.PostViewEvent(LoginViewEvents.OnForgetPasswordClicked)) } private fun setupPasswordReveal() { diff --git a/vector/src/main/java/im/vector/riotx/features/login/LoginGenericTextInputFormFragment.kt b/vector/src/main/java/im/vector/riotx/features/login/LoginGenericTextInputFormFragment.kt index 3ee1cd6d64..5203e60b26 100644 --- a/vector/src/main/java/im/vector/riotx/features/login/LoginGenericTextInputFormFragment.kt +++ b/vector/src/main/java/im/vector/riotx/features/login/LoginGenericTextInputFormFragment.kt @@ -217,7 +217,7 @@ class LoginGenericTextInputFormFragment @Inject constructor() : AbstractLoginFra TextInputFormFragmentMode.SetEmail -> { if (throwable.is401()) { // This is normal use case, we go to the mail waiting screen - loginSharedActionViewModel.post(LoginNavigation.OnSendEmailSuccess(loginViewModel.currentThreePid ?: "")) + loginViewModel.handle(LoginAction.PostViewEvent(LoginViewEvents.OnSendEmailSuccess(loginViewModel.currentThreePid ?: ""))) } else { loginGenericTextInputFormTil.error = errorFormatter.toHumanReadable(throwable) } @@ -225,7 +225,7 @@ class LoginGenericTextInputFormFragment @Inject constructor() : AbstractLoginFra TextInputFormFragmentMode.SetMsisdn -> { if (throwable.is401()) { // This is normal use case, we go to the enter code screen - loginSharedActionViewModel.post(LoginNavigation.OnSendMsisdnSuccess(loginViewModel.currentThreePid ?: "")) + loginViewModel.handle(LoginAction.PostViewEvent(LoginViewEvents.OnSendMsisdnSuccess(loginViewModel.currentThreePid ?: ""))) } else { loginGenericTextInputFormTil.error = errorFormatter.toHumanReadable(throwable) } diff --git a/vector/src/main/java/im/vector/riotx/features/login/LoginNavigation.kt b/vector/src/main/java/im/vector/riotx/features/login/LoginNavigation.kt deleted file mode 100644 index 79c6409a3f..0000000000 --- a/vector/src/main/java/im/vector/riotx/features/login/LoginNavigation.kt +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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.riotx.features.login - -import im.vector.riotx.core.platform.VectorSharedAction - -// Supported navigation actions for LoginActivity -sealed class LoginNavigation : VectorSharedAction { - object OpenServerSelection : LoginNavigation() - object OnServerSelectionDone : LoginNavigation() - object OnLoginFlowRetrieved : LoginNavigation() - object OnSignModeSelected : LoginNavigation() - object OnForgetPasswordClicked : LoginNavigation() - object OnResetPasswordSendThreePidDone : LoginNavigation() - object OnResetPasswordMailConfirmationSuccess : LoginNavigation() - object OnResetPasswordMailConfirmationSuccessDone : LoginNavigation() - - data class OnSendEmailSuccess(val email: String) : LoginNavigation() - data class OnSendMsisdnSuccess(val msisdn: String) : LoginNavigation() - - data class OnWebLoginError(val errorCode: Int, val description: String, val failingUrl: String) : LoginNavigation() -} diff --git a/vector/src/main/java/im/vector/riotx/features/login/LoginResetPasswordFragment.kt b/vector/src/main/java/im/vector/riotx/features/login/LoginResetPasswordFragment.kt index d3a86ef769..d90cfc77e5 100644 --- a/vector/src/main/java/im/vector/riotx/features/login/LoginResetPasswordFragment.kt +++ b/vector/src/main/java/im/vector/riotx/features/login/LoginResetPasswordFragment.kt @@ -149,7 +149,7 @@ class LoginResetPasswordFragment @Inject constructor() : AbstractLoginFragment() resetPasswordEmailTil.error = errorFormatter.toHumanReadable(state.asyncResetPassword.error) } is Success -> { - loginSharedActionViewModel.post(LoginNavigation.OnResetPasswordSendThreePidDone) + Unit } } } diff --git a/vector/src/main/java/im/vector/riotx/features/login/LoginResetPasswordMailConfirmationFragment.kt b/vector/src/main/java/im/vector/riotx/features/login/LoginResetPasswordMailConfirmationFragment.kt index cace48b7f2..f340fb8f9f 100644 --- a/vector/src/main/java/im/vector/riotx/features/login/LoginResetPasswordMailConfirmationFragment.kt +++ b/vector/src/main/java/im/vector/riotx/features/login/LoginResetPasswordMailConfirmationFragment.kt @@ -64,7 +64,7 @@ class LoginResetPasswordMailConfirmationFragment @Inject constructor() : Abstrac .show() } is Success -> { - loginSharedActionViewModel.post(LoginNavigation.OnResetPasswordMailConfirmationSuccess) + Unit } } } diff --git a/vector/src/main/java/im/vector/riotx/features/login/LoginResetPasswordSuccessFragment.kt b/vector/src/main/java/im/vector/riotx/features/login/LoginResetPasswordSuccessFragment.kt index 4faeef1269..fd3c5e6377 100644 --- a/vector/src/main/java/im/vector/riotx/features/login/LoginResetPasswordSuccessFragment.kt +++ b/vector/src/main/java/im/vector/riotx/features/login/LoginResetPasswordSuccessFragment.kt @@ -29,7 +29,7 @@ class LoginResetPasswordSuccessFragment @Inject constructor() : AbstractLoginFra @OnClick(R.id.resetPasswordSuccessSubmit) fun submit() { - loginSharedActionViewModel.post(LoginNavigation.OnResetPasswordMailConfirmationSuccessDone) + loginViewModel.handle(LoginAction.PostViewEvent(LoginViewEvents.OnResetPasswordMailConfirmationSuccessDone)) } override fun resetViewModel() { diff --git a/vector/src/main/java/im/vector/riotx/features/login/LoginServerSelectionFragment.kt b/vector/src/main/java/im/vector/riotx/features/login/LoginServerSelectionFragment.kt index ddd56c314e..0e234d3da8 100644 --- a/vector/src/main/java/im/vector/riotx/features/login/LoginServerSelectionFragment.kt +++ b/vector/src/main/java/im/vector/riotx/features/login/LoginServerSelectionFragment.kt @@ -95,14 +95,13 @@ class LoginServerSelectionFragment @Inject constructor() : AbstractLoginFragment // Request login flow here loginViewModel.handle(LoginAction.UpdateHomeServer(getString(R.string.matrix_org_server_url))) } else { - loginSharedActionViewModel.post(LoginNavigation.OnServerSelectionDone) + loginViewModel.handle(LoginAction.PostViewEvent(LoginViewEvents.OnServerSelectionDone)) } } @OnClick(R.id.loginServerIKnowMyIdSubmit) fun loginWithMatrixId() { loginViewModel.handle(LoginAction.UpdateSignMode(SignMode.SignInWithMatrixId)) - loginSharedActionViewModel.post(LoginNavigation.OnSignModeSelected) } override fun resetViewModel() { @@ -114,7 +113,7 @@ class LoginServerSelectionFragment @Inject constructor() : AbstractLoginFragment if (state.loginMode != LoginMode.Unknown) { // LoginFlow for matrix.org has been retrieved - loginSharedActionViewModel.post(LoginNavigation.OnLoginFlowRetrieved) + loginViewModel.handle(LoginAction.PostViewEvent(LoginViewEvents.OnLoginFlowRetrieved)) } } } diff --git a/vector/src/main/java/im/vector/riotx/features/login/LoginServerUrlFormFragment.kt b/vector/src/main/java/im/vector/riotx/features/login/LoginServerUrlFormFragment.kt index 898ee97656..92dcfcc8aa 100644 --- a/vector/src/main/java/im/vector/riotx/features/login/LoginServerUrlFormFragment.kt +++ b/vector/src/main/java/im/vector/riotx/features/login/LoginServerUrlFormFragment.kt @@ -126,7 +126,7 @@ class LoginServerUrlFormFragment @Inject constructor() : AbstractLoginFragment() if (state.loginMode != LoginMode.Unknown) { // The home server url is valid - loginSharedActionViewModel.post(LoginNavigation.OnLoginFlowRetrieved) + loginViewModel.handle(LoginAction.PostViewEvent(LoginViewEvents.OnLoginFlowRetrieved)) } } } diff --git a/vector/src/main/java/im/vector/riotx/features/login/LoginSharedActionViewModel.kt b/vector/src/main/java/im/vector/riotx/features/login/LoginSharedActionViewModel.kt deleted file mode 100644 index 625208b682..0000000000 --- a/vector/src/main/java/im/vector/riotx/features/login/LoginSharedActionViewModel.kt +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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.riotx.features.login - -import im.vector.riotx.core.platform.VectorSharedActionViewModel -import javax.inject.Inject - -class LoginSharedActionViewModel @Inject constructor() : VectorSharedActionViewModel() diff --git a/vector/src/main/java/im/vector/riotx/features/login/LoginSignUpSignInSelectionFragment.kt b/vector/src/main/java/im/vector/riotx/features/login/LoginSignUpSignInSelectionFragment.kt index 9f084299b7..f09053c883 100644 --- a/vector/src/main/java/im/vector/riotx/features/login/LoginSignUpSignInSelectionFragment.kt +++ b/vector/src/main/java/im/vector/riotx/features/login/LoginSignUpSignInSelectionFragment.kt @@ -78,7 +78,6 @@ class LoginSignUpSignInSelectionFragment @Inject constructor() : AbstractLoginFr @OnClick(R.id.loginSignupSigninSignIn) fun signIn() { loginViewModel.handle(LoginAction.UpdateSignMode(SignMode.SignIn)) - loginSharedActionViewModel.post(LoginNavigation.OnSignModeSelected) } override fun resetViewModel() { diff --git a/vector/src/main/java/im/vector/riotx/features/login/LoginSplashFragment.kt b/vector/src/main/java/im/vector/riotx/features/login/LoginSplashFragment.kt index 53de8c2c43..c860d02fec 100644 --- a/vector/src/main/java/im/vector/riotx/features/login/LoginSplashFragment.kt +++ b/vector/src/main/java/im/vector/riotx/features/login/LoginSplashFragment.kt @@ -29,7 +29,7 @@ class LoginSplashFragment @Inject constructor() : AbstractLoginFragment() { @OnClick(R.id.loginSplashSubmit) fun getStarted() { - loginSharedActionViewModel.post(LoginNavigation.OpenServerSelection) + loginViewModel.handle(LoginAction.PostViewEvent(LoginViewEvents.OpenServerSelection)) } override fun resetViewModel() { diff --git a/vector/src/main/java/im/vector/riotx/features/login/LoginViewEvents.kt b/vector/src/main/java/im/vector/riotx/features/login/LoginViewEvents.kt index 25747df3d4..c7c2ee6273 100644 --- a/vector/src/main/java/im/vector/riotx/features/login/LoginViewEvents.kt +++ b/vector/src/main/java/im/vector/riotx/features/login/LoginViewEvents.kt @@ -23,10 +23,26 @@ import im.vector.riotx.core.platform.VectorViewEvents /** * Transient events for Login */ -sealed class LoginViewEvents: VectorViewEvents { +sealed class LoginViewEvents : VectorViewEvents { data class Loading(val message: CharSequence? = null) : LoginViewEvents() data class Failure(val throwable: Throwable) : LoginViewEvents() data class RegistrationFlowResult(val flowResult: FlowResult, val isRegistrationStarted: Boolean) : LoginViewEvents() object OutdatedHomeserver : LoginViewEvents() + + // Navigation event + + object OpenServerSelection : LoginViewEvents() + object OnServerSelectionDone : LoginViewEvents() + object OnLoginFlowRetrieved : LoginViewEvents() + object OnSignModeSelected : LoginViewEvents() + object OnForgetPasswordClicked : LoginViewEvents() + object OnResetPasswordSendThreePidDone : LoginViewEvents() + object OnResetPasswordMailConfirmationSuccess : LoginViewEvents() + object OnResetPasswordMailConfirmationSuccessDone : LoginViewEvents() + + data class OnSendEmailSuccess(val email: String) : LoginViewEvents() + data class OnSendMsisdnSuccess(val msisdn: String) : LoginViewEvents() + + data class OnWebLoginError(val errorCode: Int, val description: String, val failingUrl: String) : LoginViewEvents() } diff --git a/vector/src/main/java/im/vector/riotx/features/login/LoginViewModel.kt b/vector/src/main/java/im/vector/riotx/features/login/LoginViewModel.kt index 05f841269f..47360e7c12 100644 --- a/vector/src/main/java/im/vector/riotx/features/login/LoginViewModel.kt +++ b/vector/src/main/java/im/vector/riotx/features/login/LoginViewModel.kt @@ -116,7 +116,8 @@ class LoginViewModel @AssistedInject constructor( is LoginAction.RegisterAction -> handleRegisterAction(action) is LoginAction.ResetAction -> handleResetAction(action) is LoginAction.SetupSsoForSessionRecovery -> handleSetupSsoForSessionRecovery(action) - } + is LoginAction.PostViewEvent -> _viewEvents.post(action.viewEvent) + }.exhaustive } private fun handleSetupSsoForSessionRecovery(action: LoginAction.SetupSsoForSessionRecovery) { @@ -328,11 +329,12 @@ class LoginViewModel @AssistedInject constructor( ) } - if (action.signMode == SignMode.SignUp) { - startRegistrationFlow() - } else if (action.signMode == SignMode.SignIn) { - startAuthenticationFlow() - } + when (action.signMode) { + SignMode.SignUp -> startRegistrationFlow() + SignMode.SignIn -> startAuthenticationFlow() + SignMode.SignInWithMatrixId -> _viewEvents.post(LoginViewEvents.OnSignModeSelected) + SignMode.Unknown -> Unit + }.exhaustive } private fun handleUpdateServerType(action: LoginAction.UpdateServerType) { @@ -373,6 +375,8 @@ class LoginViewModel @AssistedInject constructor( resetPasswordEmail = action.email ) } + + _viewEvents.post(LoginViewEvents.OnResetPasswordSendThreePidDone) } override fun onFailure(failure: Throwable) { @@ -413,6 +417,8 @@ class LoginViewModel @AssistedInject constructor( resetPasswordEmail = null ) } + + _viewEvents.post(LoginViewEvents.OnResetPasswordMailConfirmationSuccess) } override fun onFailure(failure: Throwable) { @@ -548,6 +554,8 @@ class LoginViewModel @AssistedInject constructor( private fun startAuthenticationFlow() { // Ensure Wizard is ready loginWizard + + _viewEvents.post(LoginViewEvents.OnSignModeSelected) } private fun onFlowResponse(flowResult: FlowResult) { diff --git a/vector/src/main/java/im/vector/riotx/features/login/LoginWebFragment.kt b/vector/src/main/java/im/vector/riotx/features/login/LoginWebFragment.kt index f9b0b98f29..cf3b39ebb0 100644 --- a/vector/src/main/java/im/vector/riotx/features/login/LoginWebFragment.kt +++ b/vector/src/main/java/im/vector/riotx/features/login/LoginWebFragment.kt @@ -173,7 +173,7 @@ class LoginWebFragment @Inject constructor( override fun onReceivedError(view: WebView, errorCode: Int, description: String, failingUrl: String) { super.onReceivedError(view, errorCode, description, failingUrl) - loginSharedActionViewModel.post(LoginNavigation.OnWebLoginError(errorCode, description, failingUrl)) + loginViewModel.handle(LoginAction.PostViewEvent(LoginViewEvents.OnWebLoginError(errorCode, description, failingUrl))) } override fun onPageStarted(view: WebView?, url: String?, favicon: Bitmap?) { diff --git a/vector/src/main/java/im/vector/riotx/features/signout/soft/SoftLogoutFragment.kt b/vector/src/main/java/im/vector/riotx/features/signout/soft/SoftLogoutFragment.kt index d3288c5b2e..13b90f26e8 100644 --- a/vector/src/main/java/im/vector/riotx/features/signout/soft/SoftLogoutFragment.kt +++ b/vector/src/main/java/im/vector/riotx/features/signout/soft/SoftLogoutFragment.kt @@ -30,7 +30,7 @@ import im.vector.riotx.core.extensions.hideKeyboard import im.vector.riotx.features.login.AbstractLoginFragment import im.vector.riotx.features.login.LoginAction import im.vector.riotx.features.login.LoginMode -import im.vector.riotx.features.login.LoginNavigation +import im.vector.riotx.features.login.LoginViewEvents import kotlinx.android.synthetic.main.fragment_generic_recycler.* import javax.inject.Inject @@ -94,7 +94,7 @@ class SoftLogoutFragment @Inject constructor( } override fun signinFallbackSubmit() { - loginSharedActionViewModel.post(LoginNavigation.OnSignModeSelected) + loginViewModel.handle(LoginAction.PostViewEvent(LoginViewEvents.OnSignModeSelected)) } override fun clearData() { @@ -124,7 +124,7 @@ class SoftLogoutFragment @Inject constructor( } override fun forgetPasswordClicked() { - loginSharedActionViewModel.post(LoginNavigation.OnForgetPasswordClicked) + loginViewModel.handle(LoginAction.PostViewEvent(LoginViewEvents.OnForgetPasswordClicked)) } override fun revealPasswordClicked() { From c173235ee3efdcdd3139f12dcd26f403f7d186f1 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 2 Mar 2020 19:31:19 +0100 Subject: [PATCH 124/156] ktlint --- .../riotx/features/login/LoginActivity.kt | 1 - .../riotx/features/login/LoginViewModel.kt | 29 +++++++++++-------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/vector/src/main/java/im/vector/riotx/features/login/LoginActivity.kt b/vector/src/main/java/im/vector/riotx/features/login/LoginActivity.kt index 96da88f15c..99d8da490d 100644 --- a/vector/src/main/java/im/vector/riotx/features/login/LoginActivity.kt +++ b/vector/src/main/java/im/vector/riotx/features/login/LoginActivity.kt @@ -197,7 +197,6 @@ open class LoginActivity : VectorBaseActivity(), ToolbarConfigurable { LoginGenericTextInputFormFragmentArgument(TextInputFormFragmentMode.ConfirmMsisdn, true, loginViewEvents.msisdn), tag = FRAGMENT_REGISTRATION_STAGE_TAG, option = commonOption) - } } diff --git a/vector/src/main/java/im/vector/riotx/features/login/LoginViewModel.kt b/vector/src/main/java/im/vector/riotx/features/login/LoginViewModel.kt index 47360e7c12..ea25523be5 100644 --- a/vector/src/main/java/im/vector/riotx/features/login/LoginViewModel.kt +++ b/vector/src/main/java/im/vector/riotx/features/login/LoginViewModel.kt @@ -489,19 +489,24 @@ class LoginViewModel @AssistedInject constructor( identityServerUri = wellKnownPrompt.identityServerUrl?.let { Uri.parse(it) } ) - authenticationService.directAuthentication(homeServerConnectionConfig, action.username, action.password, action.initialDeviceName, object : MatrixCallback { - override fun onSuccess(data: Session) { - onSessionCreated(data) - } + authenticationService.directAuthentication( + homeServerConnectionConfig, + action.username, + action.password, + action.initialDeviceName, + object : MatrixCallback { + override fun onSuccess(data: Session) { + onSessionCreated(data) + } - override fun onFailure(failure: Throwable) { - setState { - copy( - asyncLoginAction = Fail(failure) - ) - } - } - }) + override fun onFailure(failure: Throwable) { + setState { + copy( + asyncLoginAction = Fail(failure) + ) + } + } + }) } private fun handleLogin(action: LoginAction.LoginOrRegister) { From a70fdedce5c340d98b8ff81a7bd11677bac7f677 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 27 Apr 2020 00:07:47 +0200 Subject: [PATCH 125/156] Try to use wellKnown request, when user is entering a homeserver URL --- .../auth/DefaultAuthenticationService.kt | 83 ++++++++++++++----- 1 file changed, 64 insertions(+), 19 deletions(-) diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/DefaultAuthenticationService.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/DefaultAuthenticationService.kt index b2c2dc12a5..99aff475e4 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/DefaultAuthenticationService.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/DefaultAuthenticationService.kt @@ -48,6 +48,7 @@ import im.vector.matrix.android.internal.task.TaskExecutor import im.vector.matrix.android.internal.task.configureWith import im.vector.matrix.android.internal.task.launchToCallback import im.vector.matrix.android.internal.util.MatrixCoroutineDispatchers +import im.vector.matrix.android.internal.util.exhaustive import im.vector.matrix.android.internal.util.toCancelable import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.launch @@ -156,27 +157,71 @@ internal class DefaultAuthenticationService @Inject constructor( val authAPI = buildAuthAPI(homeServerConnectionConfig) // Ok, try to get the config.json file of a RiotWeb client - val riotConfig = executeRequest(null) { - apiCall = authAPI.getRiotConfig() - } - - if (riotConfig.defaultHomeServerUrl?.isNotBlank() == true) { - // Ok, good sign, we got a default hs url - val newHomeServerConnectionConfig = homeServerConnectionConfig.copy( - homeServerUri = Uri.parse(riotConfig.defaultHomeServerUrl) - ) - - val newAuthAPI = buildAuthAPI(newHomeServerConnectionConfig) - - val versions = executeRequest(null) { - apiCall = newAuthAPI.versions() + return runCatching { + executeRequest(null) { + apiCall = authAPI.getRiotConfig() } - - return getLoginFlowResult(newAuthAPI, versions, riotConfig.defaultHomeServerUrl) - } else { - // Config exists, but there is no default homeserver url (ex: https://riot.im/app) - throw Failure.OtherServerError("", HttpsURLConnection.HTTP_NOT_FOUND /* 404 */) } + .map { riotConfig -> + if (riotConfig.defaultHomeServerUrl?.isNotBlank() == true) { + // Ok, good sign, we got a default hs url + val newHomeServerConnectionConfig = homeServerConnectionConfig.copy( + homeServerUri = Uri.parse(riotConfig.defaultHomeServerUrl) + ) + + val newAuthAPI = buildAuthAPI(newHomeServerConnectionConfig) + + val versions = executeRequest(null) { + apiCall = newAuthAPI.versions() + } + + getLoginFlowResult(newAuthAPI, versions, riotConfig.defaultHomeServerUrl) + } else { + // Config exists, but there is no default homeserver url (ex: https://riot.im/app) + throw Failure.OtherServerError("", HttpsURLConnection.HTTP_NOT_FOUND /* 404 */) + } + } + .fold( + { + it + }, + { + if (it is Failure.OtherServerError + && it.httpCode == HttpsURLConnection.HTTP_NOT_FOUND /* 404 */) { + // Try with wellknown + getWellknownLoginFlowInternal(homeServerConnectionConfig) + } else { + throw it + } + } + ) + } + + private suspend fun getWellknownLoginFlowInternal(homeServerConnectionConfig: HomeServerConnectionConfig): LoginFlowResult { + val domain = homeServerConnectionConfig.homeServerUri.host + ?: throw Failure.OtherServerError("", HttpsURLConnection.HTTP_NOT_FOUND /* 404 */) + + // Create a fake userId, for the getWellknown task + val fakeUserId = "@alice:$domain" + val wellknownResult = getWellknownTask.execute(GetWellknownTask.Params(fakeUserId)) + + return when (wellknownResult) { + is WellknownResult.Prompt -> { + val newHomeServerConnectionConfig = homeServerConnectionConfig.copy( + homeServerUri = Uri.parse(wellknownResult.homerServerUrl), + identityServerUri = wellknownResult.identityServerUrl?.let { Uri.parse(it) } + ) + + val newAuthAPI = buildAuthAPI(newHomeServerConnectionConfig) + + val versions = executeRequest(null) { + apiCall = newAuthAPI.versions() + } + + getLoginFlowResult(newAuthAPI, versions, wellknownResult.homerServerUrl) + } + else -> throw Failure.OtherServerError("", HttpsURLConnection.HTTP_NOT_FOUND /* 404 */) + }.exhaustive } private suspend fun getLoginFlowResult(authAPI: AuthAPI, versions: Versions, homeServerUrl: String): LoginFlowResult { From cf7de8bb8b6e2846a4f9b86f8b098276dc13ec7f Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 27 Apr 2020 00:12:11 +0200 Subject: [PATCH 126/156] Typo --- .../matrix/android/api/auth/wellknown/WellknownResult.kt | 2 +- .../android/internal/auth/DefaultAuthenticationService.kt | 4 ++-- .../java/im/vector/riotx/features/login/LoginViewModel.kt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/wellknown/WellknownResult.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/wellknown/WellknownResult.kt index 974a65adbc..58c7cf730e 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/wellknown/WellknownResult.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/wellknown/WellknownResult.kt @@ -31,7 +31,7 @@ sealed class WellknownResult { * Retrieve the specific piece of information from the user in a way which fits within the existing client user experience, * if the client is inclined to do so. Failure can take place instead if no good user experience for this is possible at this point. */ - data class Prompt(val homerServerUrl: String, + data class Prompt(val homeServerUrl: String, val identityServerUrl: String?, val wellKnown: WellKnown) : WellknownResult() diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/DefaultAuthenticationService.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/DefaultAuthenticationService.kt index 99aff475e4..997cf70e5a 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/DefaultAuthenticationService.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/DefaultAuthenticationService.kt @@ -208,7 +208,7 @@ internal class DefaultAuthenticationService @Inject constructor( return when (wellknownResult) { is WellknownResult.Prompt -> { val newHomeServerConnectionConfig = homeServerConnectionConfig.copy( - homeServerUri = Uri.parse(wellknownResult.homerServerUrl), + homeServerUri = Uri.parse(wellknownResult.homeServerUrl), identityServerUri = wellknownResult.identityServerUrl?.let { Uri.parse(it) } ) @@ -218,7 +218,7 @@ internal class DefaultAuthenticationService @Inject constructor( apiCall = newAuthAPI.versions() } - getLoginFlowResult(newAuthAPI, versions, wellknownResult.homerServerUrl) + getLoginFlowResult(newAuthAPI, versions, wellknownResult.homeServerUrl) } else -> throw Failure.OtherServerError("", HttpsURLConnection.HTTP_NOT_FOUND /* 404 */) }.exhaustive diff --git a/vector/src/main/java/im/vector/riotx/features/login/LoginViewModel.kt b/vector/src/main/java/im/vector/riotx/features/login/LoginViewModel.kt index ea25523be5..81dcfcea9f 100644 --- a/vector/src/main/java/im/vector/riotx/features/login/LoginViewModel.kt +++ b/vector/src/main/java/im/vector/riotx/features/login/LoginViewModel.kt @@ -485,7 +485,7 @@ class LoginViewModel @AssistedInject constructor( private fun onWellknownSuccess(action: LoginAction.LoginOrRegister, wellKnownPrompt: WellknownResult.Prompt) { val homeServerConnectionConfig = HomeServerConnectionConfig( - homeServerUri = Uri.parse(wellKnownPrompt.homerServerUrl), + homeServerUri = Uri.parse(wellKnownPrompt.homeServerUrl), identityServerUri = wellKnownPrompt.identityServerUrl?.let { Uri.parse(it) } ) From 57fca80cbb87455cc3b1b2968d961a24f2ee0b0c Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 13 May 2020 13:33:12 +0200 Subject: [PATCH 127/156] Disable possibility to login using matrixId (waiting for design) --- CHANGES.md | 2 +- .../src/main/res/layout/fragment_login_server_selection.xml | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 2b36909c33..03817341bc 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -7,7 +7,7 @@ Features ✨: Improvements 🙌: - Invite member(s) to an existing room (#1276) - Improve notification accessibility with ticker text (#1226) - - Support homeserver discovery from MXID (#476) + - Support homeserver discovery from MXID (DISABLED: waiting for design) (#476) Bugfix 🐛: - Sometimes the same device appears twice in the list of devices of a user (#1329) diff --git a/vector/src/main/res/layout/fragment_login_server_selection.xml b/vector/src/main/res/layout/fragment_login_server_selection.xml index dc04f202fa..ba74ce26f8 100644 --- a/vector/src/main/res/layout/fragment_login_server_selection.xml +++ b/vector/src/main/res/layout/fragment_login_server_selection.xml @@ -16,7 +16,9 @@ style="@style/LoginFormScrollView" tools:ignore="MissingConstraints"> - + @@ -207,6 +210,7 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:text="@string/login_connect_using_matrix_id_submit" + android:visibility="gone" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" From 678cf50dbdde21be489d8b64741c2a167639bd89 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 13 May 2020 13:53:01 +0200 Subject: [PATCH 128/156] Add Javadoc --- .../android/api/auth/data/Credentials.kt | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/data/Credentials.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/data/Credentials.kt index 72affe24bb..e2181a7b2a 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/data/Credentials.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/data/Credentials.kt @@ -24,15 +24,36 @@ import im.vector.matrix.android.internal.util.md5 * This data class hold credentials user data. * You shouldn't have to instantiate it. * The access token should be use to authenticate user in all server requests. + * Ref: https://matrix.org/docs/spec/client_server/latest#post-matrix-client-r0-login */ @JsonClass(generateAdapter = true) data class Credentials( + /** + * The fully-qualified Matrix ID that has been registered. + */ @Json(name = "user_id") val userId: String, - @Json(name = "home_server") val homeServer: String, + /** + * An access token for the account. This access token can then be used to authorize other requests. + */ @Json(name = "access_token") val accessToken: String, + /** + * Not documented + */ @Json(name = "refresh_token") val refreshToken: String?, + /** + * The server_name of the homeserver on which the account has been registered. + * @Deprecated. Clients should extract the server_name from user_id (by splitting at the first colon) if they require it. Note also that homeserver is not spelt this way. + */ + @Json(name = "home_server") val homeServer: String, + /** + * ID of the logged-in device. Will be the same as the corresponding parameter in the request, if one was specified. + */ @Json(name = "device_id") val deviceId: String?, - // Optional data that may contain info to override home server and/or identity server + /** + * Optional client configuration provided by the server. If present, clients SHOULD use the provided object to + * reconfigure themselves, optionally validating the URLs within. + * This object takes the same form as the one returned from .well-known autodiscovery. + */ @Json(name = "well_known") val wellKnown: WellKnown? = null ) From d8b1372a0f27174f5e68156a8c3bb9118579c180 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 13 May 2020 14:00:06 +0200 Subject: [PATCH 129/156] Login request does not provide the full Wellknown data. Change the model to reflect that, to avoid misunderstanding. --- .../android/api/auth/data/Credentials.kt | 2 +- .../api/auth/data/DiscoveryInformation.kt | 40 +++++++++++++++++++ .../android/internal/auth/SessionCreator.kt | 4 +- 3 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/data/DiscoveryInformation.kt diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/data/Credentials.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/data/Credentials.kt index e2181a7b2a..963e8e928c 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/data/Credentials.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/data/Credentials.kt @@ -54,7 +54,7 @@ data class Credentials( * reconfigure themselves, optionally validating the URLs within. * This object takes the same form as the one returned from .well-known autodiscovery. */ - @Json(name = "well_known") val wellKnown: WellKnown? = null + @Json(name = "well_known") val discoveryInformation: DiscoveryInformation? = null ) internal fun Credentials.sessionId(): String { diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/data/DiscoveryInformation.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/data/DiscoveryInformation.kt new file mode 100644 index 0000000000..2aa741bad3 --- /dev/null +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/data/DiscoveryInformation.kt @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2020 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.matrix.android.api.auth.data + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * This is a light version of Wellknown model, used for login response + * Ref: https://matrix.org/docs/spec/client_server/latest#post-matrix-client-r0-login + */ +@JsonClass(generateAdapter = true) +data class DiscoveryInformation( + /** + * Required. Used by clients to discover homeserver information. + */ + @Json(name = "m.homeserver") + val homeServer: WellKnownBaseConfig? = null, + + /** + * Used by clients to discover identity server information. + * Note: matrix.org does not send this field + */ + @Json(name = "m.identity_server") + val identityServer: WellKnownBaseConfig? = null +) diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/SessionCreator.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/SessionCreator.kt index 95a9fbb506..74f7cad67d 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/SessionCreator.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/SessionCreator.kt @@ -46,14 +46,14 @@ internal class DefaultSessionCreator @Inject constructor( val sessionParams = SessionParams( credentials = credentials, homeServerConnectionConfig = homeServerConnectionConfig.copy( - homeServerUri = credentials.wellKnown?.homeServer?.baseURL + homeServerUri = credentials.discoveryInformation?.homeServer?.baseURL // remove trailing "/" ?.trim { it == '/' } ?.takeIf { it.isNotBlank() } ?.also { Timber.d("Overriding homeserver url to $it") } ?.let { Uri.parse(it) } ?: homeServerConnectionConfig.homeServerUri, - identityServerUri = credentials.wellKnown?.identityServer?.baseURL + identityServerUri = credentials.discoveryInformation?.identityServer?.baseURL // remove trailing "/" ?.trim { it == '/' } ?.takeIf { it.isNotBlank() } From f717a37a4a8eefd2745549b3ab5825b5d27ab87c Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 13 May 2020 15:28:05 +0200 Subject: [PATCH 130/156] Split long line --- .../java/im/vector/matrix/android/api/auth/data/Credentials.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/data/Credentials.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/data/Credentials.kt index 963e8e928c..d88cd5e74d 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/data/Credentials.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/data/Credentials.kt @@ -42,7 +42,8 @@ data class Credentials( @Json(name = "refresh_token") val refreshToken: String?, /** * The server_name of the homeserver on which the account has been registered. - * @Deprecated. Clients should extract the server_name from user_id (by splitting at the first colon) if they require it. Note also that homeserver is not spelt this way. + * @Deprecated. Clients should extract the server_name from user_id (by splitting at the first colon) + * if they require it. Note also that homeserver is not spelt this way. */ @Json(name = "home_server") val homeServer: String, /** From 8d32c27ce01c6635614cc874eaed6cf21dbdfe65 Mon Sep 17 00:00:00 2001 From: Valere Date: Wed, 13 May 2020 16:23:34 +0200 Subject: [PATCH 131/156] Fix crash 1364 --- CHANGES.md | 1 + .../matrix/android/internal/crypto/store/db/RealmCryptoStore.kt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 12ecb2e027..803b974413 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -12,6 +12,7 @@ Improvements 🙌: Bugfix 🐛: - Fix | Verify Manually by Text crashes if private SSK not known (#1337) - Sometimes the same device appears twice in the list of devices of a user (#1329) + - Random Crashes while doing sth with cross signing keys (#1364) Translations 🗣: - diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/store/db/RealmCryptoStore.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/store/db/RealmCryptoStore.kt index 17f049512c..7064663995 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/store/db/RealmCryptoStore.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/store/db/RealmCryptoStore.kt @@ -1406,7 +1406,7 @@ internal class RealmCryptoStore @Inject constructor( } else { // Just override existing, caller should check and untrust id needed val existing = CrossSigningInfoEntity.getOrCreate(realm, userId) - existing.crossSigningKeys.forEach { it.deleteFromRealm() } + existing.crossSigningKeys.deleteAllFromRealm() existing.crossSigningKeys.addAll( info.crossSigningKeys.map { crossSigningKeysMapper.map(it) From 040deea65599819fbcaf2ce7e6343c088a6fc165 Mon Sep 17 00:00:00 2001 From: Valere Date: Wed, 13 May 2020 16:46:36 +0200 Subject: [PATCH 132/156] Fix crash on restore backup from ky --- CHANGES.md | 1 + .../keysbackup/restore/KeysBackupRestoreFromKeyViewModel.kt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 803b974413..836ecdfaf9 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -13,6 +13,7 @@ Bugfix 🐛: - Fix | Verify Manually by Text crashes if private SSK not known (#1337) - Sometimes the same device appears twice in the list of devices of a user (#1329) - Random Crashes while doing sth with cross signing keys (#1364) + - Crash | crash while restoring key backup (#1366) Translations 🗣: - diff --git a/vector/src/main/java/im/vector/riotx/features/crypto/keysbackup/restore/KeysBackupRestoreFromKeyViewModel.kt b/vector/src/main/java/im/vector/riotx/features/crypto/keysbackup/restore/KeysBackupRestoreFromKeyViewModel.kt index c8406570d3..faada7ba3e 100644 --- a/vector/src/main/java/im/vector/riotx/features/crypto/keysbackup/restore/KeysBackupRestoreFromKeyViewModel.kt +++ b/vector/src/main/java/im/vector/riotx/features/crypto/keysbackup/restore/KeysBackupRestoreFromKeyViewModel.kt @@ -51,7 +51,7 @@ class KeysBackupRestoreFromKeyViewModel @Inject constructor( try { sharedViewModel.recoverUsingBackupPass(recoveryKey) } catch (failure: Throwable) { - recoveryCodeErrorText.value = stringProvider.getString(R.string.keys_backup_recovery_code_error_decrypt) + recoveryCodeErrorText.postValue(stringProvider.getString(R.string.keys_backup_recovery_code_error_decrypt)) } } } From aad4b3dc39d547301ccbd54b07b757c9ca4c5653 Mon Sep 17 00:00:00 2001 From: Dominik Mahnkopf Date: Wed, 13 May 2020 18:51:35 +0000 Subject: [PATCH 133/156] Translated using Weblate (German) Currently translated at 99.9% (1671 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 8e02f01157..23ea722c48 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -633,7 +633,7 @@ Achtung: Diese Datei wird vielleicht gelöscht, wenn die App deinstalliert wird. Nur zu verifizierten Sitzungen verschlüsseln Von dieser Sitzung aus keine verschlüsselten Nachrichten an nicht-verifizierte Sitzungen senden. - NICHT verifiziert + Nicht verifiziert Verifiziert Auf der Blockierliste @@ -1043,7 +1043,7 @@ Beachte: Diese Aktion wird die App neu starten und einige Zeit brauchen.Entschuldige, ein Fehler trat auf Version %s - Status.im Design + Status.im-Design Bitte eine Passphrase erstellen um exportierte Schlüssel zu verschlüsseln. Du musst dieselbe Passphrase eingeben um die Schlüssel importieren zu können. Erzeuge Passphrase From 0144764f69444ec4a99d9f48d1d06cd515fb172f Mon Sep 17 00:00:00 2001 From: nikonak Date: Wed, 13 May 2020 18:58:38 +0000 Subject: [PATCH 134/156] Translated using Weblate (German) Currently translated at 99.9% (1671 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 23ea722c48..0c04342504 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -1244,7 +1244,7 @@ Um sicherzustellen, dass du nichts verpasst, lass deine Updates einfach aktivier Wiederherstellungsschlüssel Unerwarteter Fehler Sicherung gestartet - Bist du sicher? + Sind Sie sicher\? Wiederherstellungsschlüssel eingeben Nachrichtenwiederherstellung @@ -1282,7 +1282,7 @@ Dieser Fehler ist außerhalb von Riot passiert. Es gibt kein Google-Konto auf de Deine Verschlüsselungsschlüssel werden nun im Hintergrund auf deinem Heimserver gesichert. Die initiale Sicherung kann mehrere Minuten dauern. - Du kannst den Zugang zu deinen Nachrichten verlieren, wenn du dich abmeldest oder das Gerät verlierst. + Sie können den Zugang zu Ihren Nachrichten verlieren wenn Sie sich abmeldest oder das Gerät verlieren. Rufe Backupversion ab… Nutze deine Wiederherstellungspassphrase um deinen sicheren Chatverlauf zu entschlüsseln From 0d2acec73e406c5b12a2f1ca4098c5f03b64d21d Mon Sep 17 00:00:00 2001 From: Dominik Mahnkopf Date: Wed, 13 May 2020 19:34:47 +0000 Subject: [PATCH 135/156] Translated using Weblate (German) Currently translated at 99.9% (1671 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 0c04342504..6c15d204b9 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -1282,14 +1282,14 @@ Dieser Fehler ist außerhalb von Riot passiert. Es gibt kein Google-Konto auf de Deine Verschlüsselungsschlüssel werden nun im Hintergrund auf deinem Heimserver gesichert. Die initiale Sicherung kann mehrere Minuten dauern. - Sie können den Zugang zu Ihren Nachrichten verlieren wenn Sie sich abmeldest oder das Gerät verlieren. + Sie verlieren möglicherweise den Zugang zu Ihren Nachrichten, wenn Sie sich abmelden oder das Gerät verlieren. - Rufe Backupversion ab… - Nutze deine Wiederherstellungspassphrase um deinen sicheren Chatverlauf zu entschlüsseln - nutze deinen Wiederherstellungsschlüssel + Rufe Backup-Version ab… + Nutzen Sie Ihre Wiederherstellungspassphrase, um Ihren verschlüsselten Chatverlauf lesen zu können + nutzen Sie Ihren Wiederherstellungsschlüssel Wen du deine Wiederherstellungspassphrase nicht weißt, kannst du %s. - Nutze deinen Wiederherstellungsschlüssel um deinen verschlüsselten Chatverlauf zu entschlüsseln + Nutzen Sie Ihren Wiederherstellungsschlüssel, um Ihren verschlüsselten Chatverlauf lesen zu können Wiederherstellungsschlüssel verloren\? Du kannst einen neuen in den Einstellungen einrichten. Sicherung konnte mit dieser Passphrase nicht entschlüsselt werden. Bitte stelle sicher, dass du die korrekte Wiederherstellungspassphrase eingegeben hast. Netzwerkfehler: Bitte überprüfe deine Verbindung und versuche es erneut. @@ -2313,7 +2313,7 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Dies könnte einige Sekunden dauern, gedulde dich bitte. Wiederherstellung einrichten. Dein Wiederherstellungsschlüssel - Du bist fertig! + Geschafft! Bewahre es sicher auf Abschließen @@ -2359,7 +2359,7 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Nachrichten in diesem Raum sind Ende-zu-Ende verschlüsselt. Erfahre mehr & verifiziere Benutzer in deren Profil. Die Verschlüsselung in diesem Raum wird nicht unterstützt - Warte auf %s... + Warte auf %s… %s setzen Fehlerbehebung @@ -2372,7 +2372,7 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Verifiziere dich & andere, um eure Chats zu schützen - Gebe deinen %s ein um fortzufahren. + Geben Sie zum Fortfahren Ihren %s ein Datei benutzen Dies ist kein gültiger Wiederherstellungsschlüssel From ce304ace2bc6fdb088ff5da7cafd4bb2827cb242 Mon Sep 17 00:00:00 2001 From: nikonak Date: Wed, 13 May 2020 19:44:05 +0000 Subject: [PATCH 136/156] Translated using Weblate (German) Currently translated at 99.9% (1671 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 6c15d204b9..8d0c76218a 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -37,7 +37,7 @@ Sprache Video Das Gespräch kann nicht gestartet werden, bitte später erneut versuchen - Aufgrund fehlender Berechtigungen stehen eventuell manche Funktionen nicht zur Verfügung… + Aufgrund fehlender Berechtigungen stehen einige Funktionen eventuell nicht zur Verfügung Ihnen fehlt das Recht, ein Konferenzgespräch in diesem Raum zu starten Kann Gespräch nicht starten Sitzungsinformationen @@ -1287,15 +1287,15 @@ Dieser Fehler ist außerhalb von Riot passiert. Es gibt kein Google-Konto auf de Rufe Backup-Version ab… Nutzen Sie Ihre Wiederherstellungspassphrase, um Ihren verschlüsselten Chatverlauf lesen zu können nutzen Sie Ihren Wiederherstellungsschlüssel - Wen du deine Wiederherstellungspassphrase nicht weißt, kannst du %s. + Wenn Sie Ihre Wiederherstellungspassphrase nicht wissen, können Sie %s. Nutzen Sie Ihren Wiederherstellungsschlüssel, um Ihren verschlüsselten Chatverlauf lesen zu können - Wiederherstellungsschlüssel verloren\? Du kannst einen neuen in den Einstellungen einrichten. - Sicherung konnte mit dieser Passphrase nicht entschlüsselt werden. Bitte stelle sicher, dass du die korrekte Wiederherstellungspassphrase eingegeben hast. - Netzwerkfehler: Bitte überprüfe deine Verbindung und versuche es erneut. + Haben Sie Ihren Wiederherstellungsschlüssel verloren\? Sie können einen neuen in den Einstellungen einrichten. + Sicherung konnte mit dieser Passphrase nicht entschlüsselt werden. Bitte stellen Sie sicher, dass Sie die korrekte Wiederherstellungspassphrase eingegeben haben. + Netzwerkfehler: Bitte überprüfen Sie Ihre Verbindung und versuchen Sie es erneut. - Bitte gib deinen Wiederherstellungsschlüssel ein - Sicherung konnte mit diesem Wiederherstellungsschlüssel nicht entschlüsselt werden. Bitte stelle sicher, dass du den korrekten Wiederherstellungsschlüssel eingegeben hast. + Bitte geben Sie Ihren Wiederherstellungsschlüssel ein + Sicherung konnte mit diesem Wiederherstellungsschlüssel nicht entschlüsselt werden. Bitte stellen Sie sicher, dass Sie den korrekten Wiederherstellungsschlüssel eingegeben haben. Sicherung wiederhergestellt %s ! %1$d Sitzungsschlüssel wurde(n) wiederhergestellt und %2$d vorher unbekannte(r) Schlüssel wurde(n) hinzugefügt From ebdf75091a72011ddb238c96671cd9cc77805119 Mon Sep 17 00:00:00 2001 From: Dominik Mahnkopf Date: Wed, 13 May 2020 20:24:09 +0000 Subject: [PATCH 137/156] Translated using Weblate (German) Currently translated at 99.9% (1671 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 8d0c76218a..eef29e8ab1 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -37,7 +37,7 @@ Sprache Video Das Gespräch kann nicht gestartet werden, bitte später erneut versuchen - Aufgrund fehlender Berechtigungen stehen einige Funktionen eventuell nicht zur Verfügung + Aufgrund fehlender Berechtigungen stehen einige Funktionen eventuell nicht zur Verfügung… Ihnen fehlt das Recht, ein Konferenzgespräch in diesem Raum zu starten Kann Gespräch nicht starten Sitzungsinformationen From 84f2fc41b3cf18349e9f5ac7714783112637f50a Mon Sep 17 00:00:00 2001 From: nikonak Date: Wed, 13 May 2020 20:46:28 +0000 Subject: [PATCH 138/156] Translated using Weblate (German) Currently translated at 99.9% (1671 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index eef29e8ab1..988eaaebcf 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -1336,7 +1336,7 @@ Dieser Fehler ist außerhalb von Riot passiert. Es gibt kein Google-Konto auf de Schlüssel-Sicherung verwenden Sind Sie sicher\? Sicherung - Alle verschlüsselten Nachrichten gehen verloren wenn du dich ausloggst ohne diese vorher zu sichern. + Alle verschlüsselten Nachrichten gehen verloren wenn Sie sich ausloggen, ohne diese vorher zu sichern. Bleiben Abbrechen From 37392b5495dfa2eb93994428a622df1ac04f5c38 Mon Sep 17 00:00:00 2001 From: tleydxdy Date: Tue, 12 May 2020 22:59:31 +0000 Subject: [PATCH 139/156] Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (163 of 163 strings) Translation: Riot Android/RiotX Matrix SDK Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/zh_Hans/ --- matrix-sdk-android/src/main/res/values-zh-rCN/strings.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/matrix-sdk-android/src/main/res/values-zh-rCN/strings.xml b/matrix-sdk-android/src/main/res/values-zh-rCN/strings.xml index 38affc0599..cdd9c5eb8d 100644 --- a/matrix-sdk-android/src/main/res/values-zh-rCN/strings.xml +++ b/matrix-sdk-android/src/main/res/values-zh-rCN/strings.xml @@ -5,8 +5,8 @@ %s 的邀请 %1$s 邀请了 %2$s %1$s 邀请了您 - %1$s 加入了 - %1$s 离开了 + %1$s 加入了聊天室 + %1$s 离开了聊天室 %1$s 拒绝了邀请 %1$s 移除了 %2$s %1$s 解封了 %2$s @@ -173,8 +173,8 @@ %1$s 的邀请。理由:%2$s %1$s 邀请了 %2$s。理由:%3$s %1$s 邀请了您。理由:%2$s - %1$s 已加入。理由:%2$s - %1$s 已离开。理由:%2$s + %1$s 加入了聊天室。理由:%2$s + %1$s 离开了聊天室。理由:%2$s %1$s 已拒绝邀请。理由:%2$s %1$s 踢走了 %2$s。理由:%3$s %1$s 取消封锁了 %2$s。理由:%3$s From 36b1717fc1eae0698baebbf2445ec8876c15d094 Mon Sep 17 00:00:00 2001 From: Dominik Mahnkopf Date: Wed, 13 May 2020 20:32:50 +0000 Subject: [PATCH 140/156] Translated using Weblate (Dutch) Currently translated at 68.4% (1144 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/nl/ --- vector/src/main/res/values-nl/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/res/values-nl/strings.xml b/vector/src/main/res/values-nl/strings.xml index d9156a9efe..8880cd2b5e 100644 --- a/vector/src/main/res/values-nl/strings.xml +++ b/vector/src/main/res/values-nl/strings.xml @@ -1616,7 +1616,7 @@ Beantwoorden Opnieuw proberen - Betreed een kamer om de applicatie te gebruiken + Betreed een kamer om de applicatie te gebruiken. Heeft je een uitnodiging gestuurd Uitgenodigd door %s From 0e5f741b6bde3222b9688c6363ec4534ecdcaf7d Mon Sep 17 00:00:00 2001 From: Tirifto Date: Tue, 12 May 2020 18:23:55 +0000 Subject: [PATCH 141/156] Translated using Weblate (Esperanto) Currently translated at 21.2% (355 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/eo/ --- vector/src/main/res/values-eo/strings.xml | 145 +++++++++++++++++++++- 1 file changed, 144 insertions(+), 1 deletion(-) diff --git a/vector/src/main/res/values-eo/strings.xml b/vector/src/main/res/values-eo/strings.xml index a6e7de2020..2a2aceb733 100644 --- a/vector/src/main/res/values-eo/strings.xml +++ b/vector/src/main/res/values-eo/strings.xml @@ -296,4 +296,147 @@ Temo de ĉambro Vokoj - + Pravalorigante servon + + 1 elektita + %d elektitaj + + Misformita identigilo. Ĝi devus esti retpoŝtadreso aŭ identigilo de Matrix, kiel «@lokaparto:mallokaparto» + INVITITA + ALIĜINTA + + Kialo pro raporto de ĉi tiu enhavo + Ĉu vi volas kaŝi ĉiujn mesaĝojn de ĉi tiu uzanto\? +\n +\nRimarku, ke tia ago reekigos la aplikaĵon kaj eble daŭros iom da tempo. + Nuligi alŝuton + Nuligi elŝuton + + Serĉi + Filtri ĉambranojn + Neniuj rezultoj + ĈAMBROJ + MESAĜOJ + ELSTARIGITAJ + ĈAMBROJ + INVITOJ + Komenci babilon + Krei ĉambron + Aliĝi al ĉambro + Aliĝi al ĉambro + + 1 ĉambro + %d ĉambroj + + Ĉiuj mesaĝoj + Nur mencioj + Silentigi + Elstarigi + Forgesi + Mesaĝoj + Agordoj + Versio + Versio %s + Kiam mi estas invitita al ĉambro + Invitoj al vokoj + Mesaĝoj senditaj de roboto + + Fona spegulado + Reĝimo de fona spegulado (eksperimenta) + Optimumigita por baterio + Riot spegulos fone, per maniero konservanta la limigitajn rimedojn de la aparato (ĉefe la baterion). +\nDepende de la stato de la rimedoj de via aparato, la spegulado povus esti prokrastita de la operaciumo. + Optimumigita por tujeco + Riot spegulos fone, ripete, je preciza tempo (agordebla). +\nĈi tio influos uzadon de baterio kaj radiilo, kaj aperigos ĉiaman sciigon pri tio, ke Riot aŭskultas okazojn. + Neniu fona spegulado + Vi sciiĝos pri envenaj mesaĝoj dum la aplikaĵo estas fone. + Malsukcesis ĝisdatigi agordojn. + + + Ruliĝi je eko de sistemo + Ŝalti fonan speguladon + Tempolimo de petoj por spegulado + Preferata intertempo de spegulado + %s +\nLa spegulado povas esti prokrastita, depende de la rimedoj (baterio) aŭ la stato de la aparato (dormeto). + Prokrasto inter ĉiu spegulado + sekundo + sekundoj + + Versio + Versio de olm + Uzokondiĉoj + Kopirajto + Privateca politiko + Vakigi kaŝmemoron + Vakigi kaŝmemoron de vidaŭdaĵoj + + Agordoj de uzanto + Sciigoj + Malatentataj uzantoj + Aliaj + Altnivelaj + Kunigoj + Uzu kunigilon por administri robotojn, pontojn, fenestraĵojn kaj glumarkarojn. +\nKunigiloj ricevas datumojn pri agordoj kaj povas modifi fenestraĵojn, sendi invitojn al ĉambroj, kaj agordi povnivelojn laŭ via rajtigo. + Ĉifroteĥnikaro + Administrado de ĉifraj ŝlasiloj + Celoj de sciigoj + Lokaj kontaktoj + Salutaĵoj + Sendi sciigojn pri tajpado + MarkDown-formatado + Formati mesaĝojn per la sintakso de MarkDown antaŭ sendo. Tio ebligas altnivelan formatadon, ekzemple uzon de steletoj por montri kursivan tekston. + Averto! + Grupa vokado ankoraŭ estas programata kaj eble ne estos dependebla. + + MarkDown ŝaltiĝis. + MarkDown malŝaltiĝis. + + Silente + Laŭte + + Ĉifrita mesaĝo + + Krei + Krei komunumon + Nomo de komunumo + Ekzemplo + Identigilo de komunumo + ekzemplo + + Hejmo + Aliĝintaj + Invititaj + Registriĝi + Saluti + Pluiĝi per ununura saluto + + Via pasvorto estas restarigita. + Vi adiaŭis ĉiujn viajn salutaĵojn kaj ne plu ricevados pasivajn sciigojn. Por reŝalti sciigojn, resalutu per ĉiu via aparato. + Reen al salutejo + + Averto + Via pasvorto ankoraŭ ne ŝanĝiĝis. +\n +\nĈu haltigi la ŝanĝan procedon\? + + Agordi retpoŝtadreson + Neĉifrita + Ĉifrita de nekonata aparato + Mane kontroli per teksto + Kontroli saluton + Interage kontroli per bildsignoj + Konfirmu vian identecon per kontrolo de ĉi tiu saluto el unu el viaj aliaj salutaĵoj, donante al ĝi aliron al viaj ĉifritaj mesaĝoj. + Marki fidata + + Bonvolu elekti uzantonomon. + Bonvolu elekti pasvorton. + Bone kontrolu ĉi tiun ligilon + La ligilo %1$s kondukas vin al alia retejo: %2$s. +\n +\nĈu vi certe volas daŭrigi\? + + Ni ne povis krei vian rektan babilon. Bonvolu kontroli la invitotajn uzantojn kaj reprovi. + From 878e093b6b1c682e1e2a5921fa6da9c697cef804 Mon Sep 17 00:00:00 2001 From: Dominik Mahnkopf Date: Wed, 13 May 2020 20:46:48 +0000 Subject: [PATCH 142/156] Translated using Weblate (German) Currently translated at 99.9% (1671 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 988eaaebcf..ca599663a1 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -1336,7 +1336,7 @@ Dieser Fehler ist außerhalb von Riot passiert. Es gibt kein Google-Konto auf de Schlüssel-Sicherung verwenden Sind Sie sicher\? Sicherung - Alle verschlüsselten Nachrichten gehen verloren wenn Sie sich ausloggen, ohne diese vorher zu sichern. + Alle verschlüsselten Nachrichten gehen verloren, wenn Sie sich ausloggen, ohne diese vorher zu sichern. Bleiben Abbrechen From 535148e68af9d89900720e7507d8c4e6b30d211f Mon Sep 17 00:00:00 2001 From: zurtel22 Date: Wed, 13 May 2020 20:47:17 +0000 Subject: [PATCH 143/156] Translated using Weblate (German) Currently translated at 99.9% (1671 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/de/ --- vector/src/main/res/values-de/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index ca599663a1..8cb293fc1b 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -38,7 +38,7 @@ Video Das Gespräch kann nicht gestartet werden, bitte später erneut versuchen Aufgrund fehlender Berechtigungen stehen einige Funktionen eventuell nicht zur Verfügung… - Ihnen fehlt das Recht, ein Konferenzgespräch in diesem Raum zu starten + Ihnen fehlt die Berechtigung, ein Konferenzgespräch in diesem Raum zu starten Kann Gespräch nicht starten Sitzungsinformationen Konferenzgespräche werden in verschlüsselten Räumen nicht unterstützt From 0f22b55786f586132dec3a0ea53399d0143c1563 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BC=D1=91=D0=B1=D0=B0?= Date: Tue, 12 May 2020 16:29:55 +0000 Subject: [PATCH 144/156] Translated using Weblate (Russian) Currently translated at 82.5% (1380 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/ru/ --- vector/src/main/res/values-ru/strings.xml | 219 +++++++++++++++++++--- 1 file changed, 196 insertions(+), 23 deletions(-) diff --git a/vector/src/main/res/values-ru/strings.xml b/vector/src/main/res/values-ru/strings.xml index 9028a80a71..654b12c712 100644 --- a/vector/src/main/res/values-ru/strings.xml +++ b/vector/src/main/res/values-ru/strings.xml @@ -21,11 +21,11 @@ Копировать Повторить отправку Удалить - Цитата + Цитировать Поделиться Позже Переслать - Постоянная ссылка + Копировать ссылку Просмотр исходного кода Просмотр расшифрованного исходного кода Удалить @@ -80,7 +80,7 @@ Маловажные - Диалоги + Беседы Локальные контакты Только Matrix контакты Нет диалогов @@ -116,7 +116,7 @@ Прочитан Войти в Комнату - Логин + Имя пользователя Создать аккаунт Войти Выйти @@ -145,7 +145,7 @@ Адрес электронной почты Адрес электронной почты (не обязательно) Номер телефона - Номер телефона (дополнительный) + Номер телефона (по желанию) Повтор пароля Подтвердите ваш новый пароль Неверный логин и/или пароль @@ -208,7 +208,7 @@ Оригинал Крупный Средний - Маленький + Мелкий "Отменить загрузку? @@ -290,7 +290,7 @@ 1 пользователь - Покинуть чат + Покинуть комнату Вы уверены, что хотите покинуть чат? Вы уверены, что хотите исключить %s из чата? Создать @@ -460,7 +460,7 @@ Параметры пользователя Уведомления Игнорируемые - Другое + Другой Дополнительно Криптография Отправлять уведомления на @@ -703,8 +703,8 @@ Сохранить медиа Светлая тема - Темная тема - Черная тема + Тёмная тема + Чёрная тема Звук уведомлений Показывать метки времени в 12-часовом формате @@ -1245,7 +1245,7 @@ Резервное копирование ключей не завершено, пожалуйста, подождите… Пропустить - Skip + Готово Расширенные настройки уведомлений Установка важности уведомления по событию, Настроить звук, светодиод, вибрацию @@ -1364,7 +1364,7 @@ [%1$s] Эта ошибка вне контроля Riot. Причины могут быть разными. Возможно, это будет работать, если вы повторите попытку позже, вы также можете проверить, что службы Google Play не ограничены в использовании данных в настройках системы, или что часы вашего устройства установлены правильно, или это может произойти на модифицированных прошивках. [%1$s] Эта ошибка вне контроля Riot, и, по словам Google, эта ошибка означает, что на устройстве слишком много приложений, зарегистрированных в FCM. Ошибка возникает только в тех случаях, когда существует огромное количество приложений, поэтому она не должна влиять на обычного пользователя. - Ваши зашифрованные сообщения будут потеряны если выйдете сейчас + Ваши зашифрованные сообщения будут потеряны, если выйдете сейчас Выполняется резервное копирование ключа. Если выйти сейчас, Вы потеряете доступ к Вашим зашифрованным сообщениям. Мне не нужны мои зашифрованные сообщения Выполняется резервное копирование ключей… @@ -1550,7 +1550,7 @@ Вы вышли из системы из-за недействительных или истекших учетных данных. Редактировать - Ответ + Ответить Повторить Присоединитесь к комнате, чтобы начать использовать приложение. @@ -1566,19 +1566,19 @@ Комнаты Ваши комнаты будут отображаться здесь - Реакция - Соглашаться + Отсебятины + Принять Нравиться - Добавить действие - Посмотреть реакции + Добавить отсебятину + Просмотреть отсебятины Менеджер интеграции Менеджер интеграции не настроен. - Реакции + Отсебятины - Удаленное пользователем событие + Событие удалено пользователем Мероприятие, модерируемое администратором помещения - Последний раз редактировался %1$s на %2$s + Последний раз редактировалось %1$s на %2$s Некорректное событие, не может быть отображено @@ -1591,7 +1591,7 @@ Эту комнату нельзя предварительно просмотреть Комнаты - Прямые сообщения + Личная переписка Новая комната СОЗДАТЬ @@ -1656,7 +1656,7 @@ Предварительный просмотр открытой комнаты в RiotX пока не поддерживается - Прямые сообщения + Личная переписка Ждите… Шифрование миниатюры… @@ -1839,7 +1839,7 @@ Заблокировать пользователя Все сообщения - Только упоминания + Только при упоминаниях Настройки Покинуть комнату %1$s сделал комнату доступной для всех, у кого есть ссылка. @@ -1848,4 +1848,177 @@ Закройте меню создания комнаты… + Вниз + + Контакт + Стикер + Причина отчёта о контенте + ОТЧЁТ + Заблокировать пользователя + + Все сообщения (громко) + Без звука + Отправить данное сообщение под спойлером + Спойлер + Введите ключевые слова, чтобы найти отсебятину. + + Длительный щелчок по комнате открывает опции + + + Непрочитанные сообщения + + Развяжите своё общение + Общайтесь с людьми напрямую или в группах + Начать + + Выберите сервер + Как и электронная почта, учетные записи имеют один дом, хотя вы можете общаться с кем угодно + Премиум-хостинг для организаций + Узнать больше + Другое + Пользовательские и расширенные настройки + + Продолжить + Подключиться к %1$s + Подключиться к Modular + Подключиться к пользовательскому серверу + Зарегистрироваться + Войти в систему + Продолжить с SSO + + Модульный адрес + Адрес + Премиум-хостинг для организаций + Введите адрес Modular Riot или сервера, который вы хотите использовать. + Произошла ошибка при загрузке страницы: %1$s (%2$d) + Приложение не может войти на этот сервер, так как он поддерживает следующие типы входа: %1$s. +\nВы хотите войти с помощью веб-клиента\? + Извините, этот сервер не принимает новые учётные записи. + Приложение не может создать учётную запись на сём сервере. +\n +\nЖелаете зарегистрироваться через веб-клиент\? + + Сей адрес электронной почты не связан ни с одной учетной записью. + + Сбросить пароль на %1$s + Далее + Email + Новый пароль + + Внимание! + Смена пароля приведёт к сбросу всех сквозных ключей шифрования во всех ваших сеансах, что сделает зашифрованную историю разговоров нечитаемой. Настройте резервное копирование ключей или экспортируйте ключи от комнаты из другого сеанса, прежде чем сбрасывать пароль. + Продолжить + + Данный email не связан ни с одним аккаунтом + + Проверьте свою почту + Письмо с подтверждением было отправлено на %1$s. + Нажмите на ссылку, чтобы подтвердить свой новый пароль. Как только вы перейдете по ссылке, которую он содержит, нажмите ниже. + Успешно! + Ваш пароль был сброшен. + Вы вышли из всех сеансов и больше не будете получать push-уведомления. Чтобы снова иметь возможность получать уведомления, необходимо повторно войти в систему. + Назад, чтобы войти в систему + + Предупреждение + Ваш пароль еще не изменен. +\n +\nОстановить процесс смены пароля\? + + Установить адрес электронной почты + Электронная почта + Электронная почта (по желанию) + Далее + + Установить номер телефона + Укажите номер своего телефона, ежели желаете, чтобы люди, которым вы небезразличны, смогли вас найти. + Пожалуйста, используйте международный формат. + Номер телефона + Номер телефона (по желанию) + Далее + + Подтвердить номер телефона + Мы только что отправили код на %1$s. Введите его ниже, чтобы подтвердить, что это вы. + Введите код + Отправить повторно + Далее + + Международные телефонные номера должны начинаться с \'+\' + Номер телефона кажется недействительным. Пожалуйста, проверьте его + + Зарегистрироваться в %1$s + Имя пользователя или email + Имя пользователя + Пароль + Далее + Это имя пользователя занято + Предупреждение + Ваш аккаунт еще не создан. +\n +\nОстановить процесс регистрации\? + + Выбрать matrix.org + Выбрать modular + Выбрать учреждённый сервер + Пожалуйста, пройдите проверку на каптчу + Принять условия для продолжения + + Пожалуйста, проверьте ваш email + Мы только что отправили email на %1$s. +\nПожалуйста, нажмите на содержащуюся в нём ссылку, чтобы продолжить создание аккаунта. + Домашний сервер устарел + Сей домашний сервер использует слишком старую версию для подключения. Попросите вашего администратора обновить версию на домашнем сервере. + + + Слишком много запросов было отправлено. Вы сможете повторить попытку через %1$d секунду… + Слишком много запросов было отправлено. Вы сможете повторить попытку через %1$d секунды… + Слишком много запросов было отправлено. Вы сможете повторить попытку через %1$d секунд… + + + Вы вышли из системы + Сие может быть обусловлено различными причинами: +\n +\n- Вы сменили пароль в другом сеансе. +\n +\n- Вы удалили сей сеанс из иного сеанса. +\n +\n- Администратор вашего сервера заблокировал вам доступ из соображений безопасности. + Войти снова + + Вы вышли из системы + Войти + Администратор вашего домашнего сервера (%1$s) вывел вас из вашего аккаунта %2$s (%3$s). + Войдите, чтобы восстановить ключи шифрования, хранящиеся исключительно на сём устройстве. Они нужны вам для чтения всех ваших защищённых сообщений на любом устройстве. + Войти + Пароль + Очистить личные данные + Внимание: Ваши личные данные (включая ключи шифрования) всё ещё хранятся на сём устройстве. +\n +\nОчистите его, если вы закончили использовать сие устройство или хотите войти в другую учётную запись. + Очистить все данные + + Очистить данные + Очистить все данные, хранящиеся в данный момент на сём устройстве\? +\nВойдите ещё раз, чтобы получить доступ к данным своего аккаунта и сообщениям. + Вы потеряете доступ к защищённым сообщениям, если не войдёте в систему для восстановления ключей шифрования. + Очистить данные + Текущая сессия предназначена для пользователя %1$s, а вы предоставляете учётные данные для пользователя %2$s. Такая безалаберность не поддерживается в RiotX. +\nПожалуйста, сначала очистите данные, а затем снова войдите под другим аккаунтом. + + Ваша ссылка на matrix.to неверна + Описание слишком короткое + + Посмотреть все мои сеансы + Дополнительные настройки + Режим разработчика + Режим разработчика активирует скрытые функции, а также может сделать приложение менее стабильным. Только для разработчиков! + Настройки + Текущий сеанс + Другие сеансы + + Включено шифрование + Недоверительный вход + Отправленные файлы + Интерактивная проверка по отсебятинам + Пожалуйста, выберите имя пользователя. + Пожалуйста, выберите пароль. From c9fb231714debfedf173deacdf1e5e680cb76d42 Mon Sep 17 00:00:00 2001 From: LinAGKar Date: Wed, 13 May 2020 11:32:29 +0000 Subject: [PATCH 145/156] Translated using Weblate (Swedish) Currently translated at 12.0% (200 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/sv/ --- vector/src/main/res/values-sv/strings.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/vector/src/main/res/values-sv/strings.xml b/vector/src/main/res/values-sv/strings.xml index 6ba74af043..118290b1a0 100644 --- a/vector/src/main/res/values-sv/strings.xml +++ b/vector/src/main/res/values-sv/strings.xml @@ -219,4 +219,18 @@ Användarnamn Sätt en e-postadress för kontoåterförvärv, och senare för att valfritt vara upptäckbar av folk som som känner dig. Sätt ett telefonnummer som folk som känner dig kan använda för att hitta dig. + Sätt en e-postadress för kontoåterförvärv. Senare kan e-postadresser och telefonnummer valfritt användas för att vara upptäckbar av folk som känner dig. + Sätt en e-postadress för kontoåterförvärv. Senare kan e-postadresser och telefonnummer valfritt användas för att vara upptäckbar av folk som känner dig. + E-postadress + E-postadress (valfritt) + Telefonnummer + Telefonnummer (valfritt) + Repetera lösenordet + Bekräfta ditt nya lösenord + Fel användarnamn och/eller lösenord + Användarnamn får endast innehålla bokstäver, siffror, punkter, bindestreck och understreck + Lösenordet är för kort (minst 6 tecken) + Lösenord saknas + Det här ser inte ut som en giltig e-postadress + Det här ser inte ut som ett giltigt telefonnummer From 8cc82fe5ba7800488075f139123729359c0f04c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Thu, 14 May 2020 08:13:31 +0000 Subject: [PATCH 146/156] Added translation using Weblate (Estonian) --- matrix-sdk-android/src/main/res/values-et/strings.xml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 matrix-sdk-android/src/main/res/values-et/strings.xml diff --git a/matrix-sdk-android/src/main/res/values-et/strings.xml b/matrix-sdk-android/src/main/res/values-et/strings.xml new file mode 100644 index 0000000000..a6b3daec93 --- /dev/null +++ b/matrix-sdk-android/src/main/res/values-et/strings.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file From 5004fba986b140a51b6e0e44f1551b0121cf8a23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Thu, 14 May 2020 08:16:34 +0000 Subject: [PATCH 147/156] Added translation using Weblate (Estonian) --- vector/src/main/res/values-et/strings.xml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 vector/src/main/res/values-et/strings.xml diff --git a/vector/src/main/res/values-et/strings.xml b/vector/src/main/res/values-et/strings.xml new file mode 100644 index 0000000000..a6b3daec93 --- /dev/null +++ b/vector/src/main/res/values-et/strings.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file From 06defaf14ef861263b0e3131de9ebe85e02599ab Mon Sep 17 00:00:00 2001 From: Tirifto Date: Thu, 14 May 2020 17:10:05 +0000 Subject: [PATCH 148/156] Translated using Weblate (Esperanto) Currently translated at 24.2% (404 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/eo/ --- vector/src/main/res/values-eo/strings.xml | 79 ++++++++++++++++++++++- 1 file changed, 76 insertions(+), 3 deletions(-) diff --git a/vector/src/main/res/values-eo/strings.xml b/vector/src/main/res/values-eo/strings.xml index 2a2aceb733..dd6cc11f21 100644 --- a/vector/src/main/res/values-eo/strings.xml +++ b/vector/src/main/res/values-eo/strings.xml @@ -216,7 +216,7 @@ \n \nĈu vi volas iujn aldoni nun\? - Pluiĝi per… + pluiĝi per… Pardonu, troviĝis neniu ekstera aplikaĵo por ĉi tiu ago. Saluti @@ -241,7 +241,7 @@ Mankas pasvorto Ĉi tio ne ŝajnas esti valida retpoŝtadreso Ĉi tio ne ŝajnas esti valida telefonnumero - Ĉi tiu retpoŝtadreso jam estas difinita + Ĉi tiu retpoŝtadreso jam estas difinita. Mankas retpoŝtadreso Mankas telefonnumero Mankas retpoŝtadreso aŭ telefonnumero @@ -439,4 +439,77 @@ \nĈu vi certe volas daŭrigi\? Ni ne povis krei vian rektan babilon. Bonvolu kontroli la invitotajn uzantojn kaj reprovi. - +Por diagnozi problemojn, protokolo de ĉi tiu kliento sendiĝos kune kun ĉi tiu erar-raporto. Ĉi tiu erar-raporto, inkluzive la protokolon kaj la ekrankopion, ne estos publike videbla. Se vi preferus sendi nur la ĉi-supran tekston, bonvolu malmarki: + Ŝajnas, ke vi kolere skuas la telefonon. Ĉu vi volas malfermi la erar-raportilon\? + La aplikaĵo lastatempe fiaskis. Ĉu vi volas malfermi la fiasko-raportilon\? + Kolere skuu por raporti eraron + + Bonvolu enigi validan URL-on + La URL ne estas atingebla, bonvolu kontroli ĝin + Ĉi tio ne estas valida adreso de servilo de Matrix + Ne povas atingi hejmservilon je ĉi tiu URL, bonvolu kontroli ĝin + Via aparato uzas eksdatan sekurecan protokolon TLS, neŝirmatan kontraŭ atakoj; por via sekureco vi ne povos konektiĝi + Misformita JSON + Ne enhavis valdiajn JSON-datumojn + Tro multaj petoj sendiĝis + Ĉi tiu uzantonomo jam estas uzata + La retpoŝt-ligilo, kiu ankoraŭ ne estas klakita + + "Vi bezonas resaluti por generi tutvoje ĉifrajn ŝlosilojn por ĉi tiu salutaĵo kaj sendi la publikan ŝlosilon al via hejmservilo. +\nĈi tio necesas nur unufoje. +\nPardonu la maloportunon." + + Repeti ĉifrajn ŝlosilojn de aliaj viaj salutaĵoj. + + Peto de ŝlosilo sendiĝis. + + Peto sendiĝis. + Bonvolu ruli Rioton sur alia aparato kiu scipovas malĉifri la mesaĝon, por ke ĝi povu sendi al vi la ŝlosilojn al ĉi tiu salutaĵo. + + Envena voko + Envena vidvoko + Envena voĉvoko + Voko progresas… + Vidvoko progresas… + + Ne povas iniciati la filmilon + Foti aŭ filmi + Ne povas filmi + + Informoj + Riot bezonas permeson aliri viajn fotojn kaj filmojn, por sendi kaj konservi kunsendaĵojn. +\n +\nBonvolu permesi aliron per la sekva ŝprucpeto, por povi sendi dosierojn el via telefono. + Riot bezonas permeson aliri vian filmilon por foti kaj vidvoki. + " +\n +\nBonvolu permesi aliron per la sekva ŝprucpeto, por ebligi la vokon." + Riot bezonas permeson aliri vian mikrofonon por fari voĉvokojn. + " +\n +\nBonvolu permesi aliron per la sekva ŝprucpeto, por ebligi la vokon." + Riot bezonsa premeson aliri viajn filmilon kaj mikrofonon por fari vidvokojn. +\n +\nBonvolu permesi aliron per la sekva ŝprucpeto, por ebligi la vokon. + Riot povas kontroli vian adresaron por trovi aliajn uzantojn de Matrix per iliaj retpoŝtadresoj kaj telefonnumeroj. Se vi konsentas kunhavi vian adresaron por tiu celo, bonvolu permesi aliron per la sekva ŝprucpeto. + Riot povas kontroli vian adresaron por trovi aliajn uzantojn de Matrix per iliaj retpoŝtadresoj kaj telefonnumeroj. +\n +\nĈu vi konsentas kunhavi vian adresaron por tiu celo\? + + Pardonu. Ago ne efektiviĝis, pro mankantaj permesoj + + Konservite + Ĉu konservi al elŝutujo\? + JES + NE + Daŭrigi + + Forigi + Aliĝi + Antaŭrigardi + Rifuzi + + Listigi ĉambranojn + Spegulante… + Vi estis invitita al ĉi tiu ĉambro de %s + From b2bacdfa4ec53ec01a474f3721e56bf7667a0f9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Thu, 14 May 2020 08:14:10 +0000 Subject: [PATCH 149/156] Translated using Weblate (Estonian) Currently translated at 92.6% (151 of 163 strings) Translation: Riot Android/RiotX Matrix SDK Translate-URL: https://translate.riot.im/projects/riot-android/riotx-matrix-sdk/et/ --- .../src/main/res/values-et/strings.xml | 189 +++++++++++++++++- 1 file changed, 187 insertions(+), 2 deletions(-) diff --git a/matrix-sdk-android/src/main/res/values-et/strings.xml b/matrix-sdk-android/src/main/res/values-et/strings.xml index a6b3daec93..e51360b6c9 100644 --- a/matrix-sdk-android/src/main/res/values-et/strings.xml +++ b/matrix-sdk-android/src/main/res/values-et/strings.xml @@ -1,2 +1,187 @@ - - \ No newline at end of file + +%1$s: %2$s + %1$s saatis pildi. + %1$s saatis kleepsu. + + Kasutaja %s kutse + %1$s kutsus kasutajat %2$s + %1$s kutsus sind + %1$s liitus jututoaga + %1$s lahkus jututoast + %1$s lükkas tagasi kutse + %1$s müksas kasutajat %2$s + %1$s võttis tagasi kutse kasutajale %2$s + %1$s muutis oma avatari + %1$s määras oma kuvatavaks nimeks %2$s + %1$s muutis senise kuvatava nime %2$s uueks nimeks %3$s + %1$s eemaldas oma kuvatava nime (%2$s) + %1$s muutis uueks teemaks %2$s + %1$s muutis jututoa uueks nimeks %2$s + %s alustas videokõnet. + %s alustas häälkõnet. + %s vastas kõnele. + %s lõpetas kõne. + %1$s seadistas, et tulevane jututoa ajalugu on nähtav kasutajale %2$s + kõikidele jututoa liikmetele alates kutsumise hetkest. + kõikidele jututoa liikmetele alates liitumise hetkest. + kõikidele jututoa liikmetele. + kõikidele. + teadmata (%s). + %1$s lülitas sisse läbiva krüptimise (%2$s) + %s uuendas seda jututuba. + + %1$s saatis VoIP konverentsi kutse + VoIP-konverents algas + VoIP-konverents lõppes + + (samuti sai avatar muudetud) + %1$s eemaldas jututoa nime + %1$s eemaldas jututoa teema + Sõnum on eemaldatud + Sõnum on eemaldatud %1$s poolt + Sõnum on eemaldatud [põhjus: %1$s] + Sõnum on eemaldatud %1$s poolt [põhjus: %2$s] + %1$s uuendas oma profiili %2$s + %1$s saatis jututoaga liitumiseks kutse kasutajale %2$s + %1$s võttis tagasi jututoaga liitumise kutse kasutajalt %2$s + %1$s võttis vastu kutse %2$s nimel + + ** Ei õnnestu dekrüptida: %s ** + Sõnumi saatja seade ei ole selle sõnumi jaoks saatnud dekrüptimisvõtmeid. + + Vastuseks kasutajale + + Ei saanud muuta sõnumit + Sõnumi saatmine ei õnnestunud + + Faili üles laadimine ei õnnestunud + + Võrguühenduse viga + Matrix\'i viga + + Hetkel ei ole võimalik uuesti liituda tühja jututoaga. + + Krüptitud sõnum + + E-posti aadress + Telefoninumber + + saatis pildi. + saatis video. + saatis helifaili. + saatis faili. + + Kutse kasutajalt %s + Kutse jututuppa + + %1$s ja %2$s + + + %1$s ja üks muu + %1$s ja %2$d muud + + + Tühi jututuba + + + Koer + Kass + Lõvi + Hobune + Ükssarvik + Siga + Elevant + Jänes + Panda + Kukk + Pingviin + Kilpkonn + Kala + Kaheksajalg + Liblikas + Lill + Puu + Kaktus + Seen + Maakera + Kuu + Pilv + Tuli + Banaan + Õun + Maasikas + Mais + Pitsa + Kook + Süda + Smaili + Robot + Müts + Prillid + Mutrivõti + Jõuluvana + Pöidlad püsti + Vihmavari + Liivakell + Kell + Kingitus + Lambipirn + Raamat + Pliiats + Kirjaklamber + Käärid + Lukk + Võti + Haamer + Telefon + Lipp + Rong + Jalgratas + Lennuk + Rakett + Auhind + Pall + Kitarr + Trompet + Kelluke + Ankur + Kõrvaklapid + Kaust + Knopka + + Alglaadimine: +\nImpordin kontot… + Alglaadimine: +\nImpordin krüptoseadistusi + Alglaadimine: +\nImpordin jututubasid + Alglaadimine: +\nImpordin liitutud jututubasid + Alglaadimine: +\nImpordin kutsutud jututubasid + Alglaadimine: +\nImpordin lahkutud jututubasid + Alglaadimine: +\nImpordin kogukondi + Alglaadimine: +\nImpordin kontoandmeid + + Saadan sõnumit… + Tühjenda saatmisjärjekord + + Kasutaja %1$s kutse. Põhjus: %2$s + %1$s kutsus kasutajat %2$s. Põhjus: %3$s + %1$s kutsus sind. Põhjus: %2$s + %1$s liitus jututoaga. Põhjus: %2$s + %1$s lahkus jututoast. Põhjus: %2$s + %1$s lükkas kutse tagasi. Põhjus: %2$s + %1$s müksas välja kasutaja %2$s. Põhjus: %3$s + %1$s saatis kasutajale %2$s kutse jututoaga liitumiseks. Põhjus: %3$s + %1$s tühistas kasutajale %2$s saadetud kutse jututoaga liitumiseks. Põhjus: %3$s + %1$s võttis vastu kutse %2$s jututoaga liitumiseks. Põhjus: %3$s + %1$s võttis tagasi kasutajale %2$s saadetud kutse. Põhjus: %3$s + + %1$s lülitas sisse läbiva krüptimise. + %1$s lülitas sisse läbiva krüptimise (tundmatu algoritm %2$s). + + From c03d61e09f8cfdb0ad7178305990079b2d56c800 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Priit=20J=C3=B5er=C3=BC=C3=BCt?= Date: Thu, 14 May 2020 08:17:24 +0000 Subject: [PATCH 150/156] Translated using Weblate (Estonian) Currently translated at 1.5% (25 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/et/ --- vector/src/main/res/values-et/strings.xml | 34 +++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/vector/src/main/res/values-et/strings.xml b/vector/src/main/res/values-et/strings.xml index a6b3daec93..88f6d84c7d 100644 --- a/vector/src/main/res/values-et/strings.xml +++ b/vector/src/main/res/values-et/strings.xml @@ -1,2 +1,32 @@ - - \ No newline at end of file + +et + EE + Latn + + Hele teema + Tume teema + Must teema + Status.im teema + + Käivitan teenuse + Sünkroniseerin… + Kuulan, kas leidub sündmusi + Lärmakad teavitused + Vaiksed teavitused + + Sõnumid + Jututuba + Seadistused + Jututoa liikme üksikasjad + Ajalooline + Veateade + Kogukonna üksikasjad + Saada kleeps + Võtmete varundus + Kasuta võtmete varundust + Verifitseeri sessioon + + Võtmete varundus pole veel valmis, oota natuke… + Krüptitud sõnum + + From 885dac4ad16a5a25a597bbb0d96bcbf20289561c Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 15 May 2020 09:59:57 +0000 Subject: [PATCH 151/156] Translated using Weblate (French) Currently translated at 100.0% (1672 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/fr/ --- vector/src/main/res/values-fr/strings.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vector/src/main/res/values-fr/strings.xml b/vector/src/main/res/values-fr/strings.xml index a8e72864f4..13f3808328 100644 --- a/vector/src/main/res/values-fr/strings.xml +++ b/vector/src/main/res/values-fr/strings.xml @@ -1560,7 +1560,7 @@ Si vous n’avez pas configuré de nouvelle méthode de récupération, un attaq Merci, la suggestion a bien été envoyée Échec d’envoi de la suggestion (%s) - Afficher les évènements cachés dans l’historique + Afficher les évènements cachés dans les discussions RiotX − Client Matrix nouvelle génération Un client pour Matrix plus rapide et plus léger utilisant les derniers frameworks Android @@ -1600,7 +1600,7 @@ Si vous n’avez pas configuré de nouvelle méthode de récupération, un attaq Nom ou identifiant (#exemple:matrix.org) - Activer le balayement pour répondre dans l’historique + Activer le balayement pour répondre dans les discussions Lien copié dans le presse-papiers @@ -2102,7 +2102,7 @@ Si vous n’avez pas configuré de nouvelle méthode de récupération, un attaq Envoie le message fourni coloré comme un arc-en-ciel Envoie la réaction fournie colorée comme un arc-en-ciel - Historique + Discussions Éditeur de messages From 308828ef502379bf66fe6235cb39ce95b82b94a2 Mon Sep 17 00:00:00 2001 From: LinAGKar Date: Thu, 14 May 2020 18:11:02 +0000 Subject: [PATCH 152/156] Translated using Weblate (Swedish) Currently translated at 14.3% (239 of 1672 strings) Translation: Riot Android/RiotX application Translate-URL: https://translate.riot.im/projects/riot-android/riotx-application/sv/ --- vector/src/main/res/values-sv/strings.xml | 45 +++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/vector/src/main/res/values-sv/strings.xml b/vector/src/main/res/values-sv/strings.xml index 118290b1a0..abbd157553 100644 --- a/vector/src/main/res/values-sv/strings.xml +++ b/vector/src/main/res/values-sv/strings.xml @@ -233,4 +233,49 @@ Lösenord saknas Det här ser inte ut som en giltig e-postadress Det här ser inte ut som ett giltigt telefonnummer + Den här e-postadressen är redan definierad. + E-postadress saknas + Telefonnummer saknas + E-postadress eller telefonnummer saknas + Felaktig token + Lösenorden matchar inte + Glömt lösenordet\? + Använd anpassade server-inställningar (avancerat) + Vänligen kolla din e-post för att fortsätta med registreringen + Registrering med e-postadress och telefonnummer samtidigt så stöds inte än, fram tills API:t finns. Endast telefonnumret kommer användas. +\n +\nDu kan lägga till ett telefonnummer till din profil i inställningarna. + Denna hemserver skulle vilja verifiera att du inte är en robot + Användarnamnet är upptagen + Hemserver: + Identitetsserver: + Jag har verifierat min e-postadress + För att återställa ditt lösenord, skriv in e-postadressen länkad till ditt konto: + Du måste skriva in e-postadressen länkad till ditt konto. + Du måste skriva in ett nytt lösenord. + Ett e-brev har skickats till %s. När du har följt länken i det, klicka nedan. + Misslyckades att verifiera e-postadressen: se till att du klickade på länken i e-brevet + Ditt lösenord har blivit återställt. +\n +\nDu har loggats ut ur alla sessioner och kommer inte längre motta pushnotifikationer. För att återaktivera notifikationer, logga in igen på varje enhet. + Vänligen granska och acceptera villkoren för denna hemserver: + + URLen måste börja med http[s]:// + Kan inte logga in: Nätverksfel + Kan inte logga in + Kan inte registrera: Nätverksfel + Kan inte registrera + Kan inte registrera: fel vid med e-postägandeskap + Vänligen skriv in en giltig URL + Den här URLen kan inte nås, vänligen kolla den + Det här är inte en giltig Matrixserveradress + Kan inte nå en hemserver på den här URLen, vänligen kolla den + Din enhet använder ett utdaterat TLS-protokoll, sårbart för anfall, så för din säkerhets skull så kommer du inte kunna ansluta + Mobil + + Felaktigt användarnamn/lösenord + Den åtkomsttoken du specificerade kändes inte igen + Felformaterad JSON + Innehöll inte giltig JSON + För många förfrågningar har skickats From 7a2aefd8fb19265393d6f09b6d1872f7e85a9264 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 15 May 2020 12:45:23 +0200 Subject: [PATCH 153/156] Format string resources --- .../src/main/res/values-eo/strings.xml | 20 +++--- .../src/main/res/values-et/strings.xml | 11 ++-- .../src/main/res/values-fi/strings.xml | 2 +- vector/src/main/res/values-de/strings.xml | 8 +-- vector/src/main/res/values-eo/strings.xml | 24 +++---- vector/src/main/res/values-et/strings.xml | 5 +- vector/src/main/res/values-fi/strings.xml | 28 ++++----- vector/src/main/res/values-hu/strings.xml | 4 +- vector/src/main/res/values-nb-rNO/strings.xml | 4 +- vector/src/main/res/values-nl/strings.xml | 4 +- vector/src/main/res/values-pl/strings.xml | 62 +++++++++---------- vector/src/main/res/values-ru/strings.xml | 44 ++++++------- vector/src/main/res/values-sq/strings.xml | 2 +- vector/src/main/res/values-sv/strings.xml | 11 ++-- 14 files changed, 116 insertions(+), 113 deletions(-) diff --git a/matrix-sdk-android/src/main/res/values-eo/strings.xml b/matrix-sdk-android/src/main/res/values-eo/strings.xml index db73db86e2..69600394ac 100644 --- a/matrix-sdk-android/src/main/res/values-eo/strings.xml +++ b/matrix-sdk-android/src/main/res/values-eo/strings.xml @@ -19,7 +19,7 @@ Responde al -%1$s: %2$s + %1$s: %2$s %1$s ŝanĝis sian vidigan nomon al %2$s %1$s ŝanĝis sian vidigan nomon de %2$s al %3$s %1$s forigis sian vidigan nomon (%2$s) @@ -73,9 +73,9 @@ %1$s kaj %2$s - %1$s kaj 1 alia - %1$s kaj %2$d aliaj - + %1$s kaj 1 alia + %1$s kaj %2$d aliaj + Malplena ĉambro @@ -187,14 +187,14 @@ %1$s nuligis la inviton al %2$s. Kialo: %3$s - %1$s aldonis %2$s kiel adreson por ĉi tiu ĉambro. - %1$s aldonis %2$s kiel adresojn por ĉi tiu ĉambro. - + %1$s aldonis %2$s kiel adreson por ĉi tiu ĉambro. + %1$s aldonis %2$s kiel adresojn por ĉi tiu ĉambro. + - %1$s forigis %2$s kiel adreson por ĉi tiu ĉambro. - %1$s forigis %2$s kiel adresojn por ĉi tiu ĉambro. - + %1$s forigis %2$s kiel adreson por ĉi tiu ĉambro. + %1$s forigis %2$s kiel adresojn por ĉi tiu ĉambro. + %1$s aldonis %2$s kaj forigis %3$s kiel adresojn por ĉi tiu ĉambro. diff --git a/matrix-sdk-android/src/main/res/values-et/strings.xml b/matrix-sdk-android/src/main/res/values-et/strings.xml index e51360b6c9..1d52c2a7a1 100644 --- a/matrix-sdk-android/src/main/res/values-et/strings.xml +++ b/matrix-sdk-android/src/main/res/values-et/strings.xml @@ -1,5 +1,6 @@ -%1$s: %2$s + + %1$s: %2$s %1$s saatis pildi. %1$s saatis kleepsu. @@ -77,9 +78,9 @@ %1$s ja %2$s - %1$s ja üks muu - %1$s ja %2$d muud - + %1$s ja üks muu + %1$s ja %2$d muud + Tühi jututuba @@ -184,4 +185,4 @@ %1$s lülitas sisse läbiva krüptimise. %1$s lülitas sisse läbiva krüptimise (tundmatu algoritm %2$s). - + diff --git a/matrix-sdk-android/src/main/res/values-fi/strings.xml b/matrix-sdk-android/src/main/res/values-fi/strings.xml index ecb2edd303..8dd87b6b6a 100644 --- a/matrix-sdk-android/src/main/res/values-fi/strings.xml +++ b/matrix-sdk-android/src/main/res/values-fi/strings.xml @@ -209,6 +209,6 @@ %1$s laittoi päälle osapuolten välisen salauksen. %1$s laittoi päälle osapuolisten välisen salauksen (tuntematon algoritmi %2$s). -%s haluaa varmentaa salausavaimesi, mutta asiakasohjelmasi ei tue keskustelun aikana tapahtuvaa avainten varmennusta. Joudut käyttämään perinteistä varmennustapaa. + %s haluaa varmentaa salausavaimesi, mutta asiakasohjelmasi ei tue keskustelun aikana tapahtuvaa avainten varmennusta. Joudut käyttämään perinteistä varmennustapaa. diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index 8cb293fc1b..c0c967fd63 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -1300,9 +1300,9 @@ Dieser Fehler ist außerhalb von Riot passiert. Es gibt kein Google-Konto auf de Sicherung wiederhergestellt %s ! %1$d Sitzungsschlüssel wurde(n) wiederhergestellt und %2$d vorher unbekannte(r) Schlüssel wurde(n) hinzugefügt - Backup mit %d Schlüssel wiederhergestellt. - Backup mit %d Schlüsseln wiederhergestellt. - + Backup mit %d Schlüssel wiederhergestellt. + Backup mit %d Schlüsseln wiederhergestellt. + %d neuer Schlüssel wurde dieser Sitzung hinzugefügt. %d neue Schlüssel wurden dieser Sitzung hinzugefügt. @@ -2352,7 +2352,7 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Kopier es in deinen persönlichen Cloud-Speicher Verschlüsselung ist nicht aktiviert -Dies kann nicht von einem mobilen Gerät erfolgen + Dies kann nicht von einem mobilen Gerät erfolgen Wenn Räume verbessert werden Verschlüsselung aktiviert diff --git a/vector/src/main/res/values-eo/strings.xml b/vector/src/main/res/values-eo/strings.xml index dd6cc11f21..f3e7c65d67 100644 --- a/vector/src/main/res/values-eo/strings.xml +++ b/vector/src/main/res/values-eo/strings.xml @@ -99,7 +99,7 @@ Kontroli salutaĵon Kontroli aparaton -Latn + Latn Haŭto de Status.im @@ -160,9 +160,9 @@ Neniuj ĉambroj Neniuj publikaj ĉambroj disponeblas - 1 uzanto - %d uzantoj - + 1 uzanto + %d uzantoj + Inviti Komunumoj @@ -298,9 +298,9 @@ Vokoj Pravalorigante servon - 1 elektita - %d elektitaj - + 1 elektita + %d elektitaj + Misformita identigilo. Ĝi devus esti retpoŝtadreso aŭ identigilo de Matrix, kiel «@lokaparto:mallokaparto» INVITITA ALIĜINTA @@ -325,9 +325,9 @@ Aliĝi al ĉambro Aliĝi al ĉambro - 1 ĉambro - %d ĉambroj - + 1 ĉambro + %d ĉambroj + Ĉiuj mesaĝoj Nur mencioj Silentigi @@ -439,7 +439,7 @@ \nĈu vi certe volas daŭrigi\? Ni ne povis krei vian rektan babilon. Bonvolu kontroli la invitotajn uzantojn kaj reprovi. -Por diagnozi problemojn, protokolo de ĉi tiu kliento sendiĝos kune kun ĉi tiu erar-raporto. Ĉi tiu erar-raporto, inkluzive la protokolon kaj la ekrankopion, ne estos publike videbla. Se vi preferus sendi nur la ĉi-supran tekston, bonvolu malmarki: + Por diagnozi problemojn, protokolo de ĉi tiu kliento sendiĝos kune kun ĉi tiu erar-raporto. Ĉi tiu erar-raporto, inkluzive la protokolon kaj la ekrankopion, ne estos publike videbla. Se vi preferus sendi nur la ĉi-supran tekston, bonvolu malmarki: Ŝajnas, ke vi kolere skuas la telefonon. Ĉu vi volas malfermi la erar-raportilon\? La aplikaĵo lastatempe fiaskis. Ĉu vi volas malfermi la fiasko-raportilon\? Kolere skuu por raporti eraron @@ -512,4 +512,4 @@ Listigi ĉambranojn Spegulante… Vi estis invitita al ĉi tiu ĉambro de %s - + diff --git a/vector/src/main/res/values-et/strings.xml b/vector/src/main/res/values-et/strings.xml index 88f6d84c7d..3ec6bf684a 100644 --- a/vector/src/main/res/values-et/strings.xml +++ b/vector/src/main/res/values-et/strings.xml @@ -1,5 +1,6 @@ -et + + et EE Latn @@ -29,4 +30,4 @@ Võtmete varundus pole veel valmis, oota natuke… Krüptitud sõnum - + diff --git a/vector/src/main/res/values-fi/strings.xml b/vector/src/main/res/values-fi/strings.xml index fcd2dcad43..72addef9e4 100644 --- a/vector/src/main/res/values-fi/strings.xml +++ b/vector/src/main/res/values-fi/strings.xml @@ -2075,7 +2075,7 @@ Jotta et menetä mitään, automaattiset päivitykset kannattaa pitää käytös Ei turvallinen Video. Kuva. -Pyyntö annetun käyttäjä-ID:n vahvistamiseksi + Pyyntö annetun käyttäjä-ID:n vahvistamiseksi Johonkin näistä on mahdollisesti murtauduttu: \n \n - Kotipalvelimesi @@ -2162,9 +2162,9 @@ Jotta et menetä mitään, automaattiset päivitykset kannattaa pitää käytös Vahvista tämä istunto jotta se merkitään luotetuksi ja se saa pääsyn salattuihin viesteihin. Jos et ole kirjautunut tähän istuntoon, tunnuksesi on saattanut vuotaa hyökkääjälle: - %d käynnissä oleva istunto - %d käynnissä olevaa istuntoa - + %d käynnissä oleva istunto + %d käynnissä olevaa istuntoa + Varmenna tämä kirjautuminen Muut käyttäjät eivät välttämättä luota siihen @@ -2197,13 +2197,13 @@ Jotta et menetä mitään, automaattiset päivitykset kannattaa pitää käytös Kehittäjän työkalut - %d ääni - %d ääntä - + %d ääni + %d ääntä + - %d ääni - lopulliset tulokset - %d ääntä - lopulliset tulokset - + %d ääni - lopulliset tulokset + %d ääntä - lopulliset tulokset + Luo yksinkertaisen äänestyksen Jos et pääse käsiksi olemassaolevaan istuntoon @@ -2213,9 +2213,9 @@ Jotta et menetä mitään, automaattiset päivitykset kannattaa pitää käytös Poista… Haluatko lähettää tämän liitteen %1$s\?:lle\? - Lähetä kuva alkuperäisessä koossa - Lähetä kuvat alkuperäisessä koossa - + Lähetä kuva alkuperäisessä koossa + Lähetä kuvat alkuperäisessä koossa + Vahvista poisto Haluatko varmasti poistaa tämän tapahtuman\? Huomaa, että jos poistat huoneen nimen tai otsikon muutostapahtuman, se voi perua muutoksen. @@ -2288,4 +2288,4 @@ Jotta et menetä mitään, automaattiset päivitykset kannattaa pitää käytös Syy poistoon Viestin avain - + diff --git a/vector/src/main/res/values-hu/strings.xml b/vector/src/main/res/values-hu/strings.xml index 8587b82515..acdb4bf5b2 100644 --- a/vector/src/main/res/values-hu/strings.xml +++ b/vector/src/main/res/values-hu/strings.xml @@ -2382,10 +2382,10 @@ Ha nem te állítottad be a visszaállítási metódust, akkor egy támadó pró Kérlek válassz jelszót. Ezt a hivatkozást ellenőrizd le még egyszer A közvetlen üzenetedet nem sikerült elkészíteni. Ellenőrizd azokat a felhasználókat akiket meg szeretnél hívni és próbáld újra. -Használd a legújabb Riotot a másik eszközödön, úgy mint Riot Web, Asztali Riot, RiotX for Android vagy más eszközök közötti hitelesítést támogató másik Matrix klienst + Használd a legújabb Riotot a másik eszközödön, úgy mint Riot Web, Asztali Riot, RiotX for Android vagy más eszközök közötti hitelesítést támogató másik Matrix klienst Erősítsd meg ebben a bejelentkezésben a személyazonosságodat egy másik munkamenetből, hogy hozzáférhess a titkosított üzenetekhez. %1$s hivatkozás egy másik oldalra visz: %2$s. \n \nFolytatod\? - + diff --git a/vector/src/main/res/values-nb-rNO/strings.xml b/vector/src/main/res/values-nb-rNO/strings.xml index 86cb713dbb..26aa4c3ff8 100644 --- a/vector/src/main/res/values-nb-rNO/strings.xml +++ b/vector/src/main/res/values-nb-rNO/strings.xml @@ -723,7 +723,7 @@ Send inn i Hjemmetjener URL Start ny chat -Start lydsamtale + Start lydsamtale Start videosamtale Send lydopptak @@ -731,4 +731,4 @@ Er du sikker på du vil starte en samtale med %s\? Er du sikker på du vil starte en lydsamtale\? Er du sikker på du vil starte en videosamtale\? - + diff --git a/vector/src/main/res/values-nl/strings.xml b/vector/src/main/res/values-nl/strings.xml index 8880cd2b5e..7d7e8e72e0 100644 --- a/vector/src/main/res/values-nl/strings.xml +++ b/vector/src/main/res/values-nl/strings.xml @@ -1605,7 +1605,7 @@ U gebruikt geen identiteitsserver Er is geen identiteitsserver geconfigureerd. Dit is vereist om uw wachtwoord opnieuw in te stellen. -Vorige versies van Riot hadden een veiligheidsfout die er voor kon zorgen dat je Identiteits Server (%1$s) toegang tot je account had. Indien je %2$s vertrouwt, dan kun je dit negeren; anders log je uit en weer in. + Vorige versies van Riot hadden een veiligheidsfout die er voor kon zorgen dat je Identiteits Server (%1$s) toegang tot je account had. Indien je %2$s vertrouwt, dan kun je dit negeren; anders log je uit en weer in. \n \nLees meer details hier: \nhttps://medium.com/@RiotChat/36b4792ea0d6 @@ -1660,4 +1660,4 @@ Gespreksnaam Publiek Iedereen zal dit gesprek kunnen toetreden - + diff --git a/vector/src/main/res/values-pl/strings.xml b/vector/src/main/res/values-pl/strings.xml index ca0ae9e542..301ae3299e 100644 --- a/vector/src/main/res/values-pl/strings.xml +++ b/vector/src/main/res/values-pl/strings.xml @@ -588,7 +588,7 @@ Możesz dodać adres e-mail do swojego profilu w ustawieniach. %d zmiana członkostwa %d zmiany członkostwa %d zmian członkostwa - + Rozmówca nie połączył się. @@ -615,13 +615,13 @@ Przyznaj dostęp w następnym oknie. Jeden aktywny członek Kilku aktywnych członków %d aktywnych członków - + 1 członek kilku członków %d członków - + Nie będziesz w stanie cofnąć tej zmiany, ponieważ przyznajesz użytkownikowi uprawnienia równe swoim. @@ -638,7 +638,7 @@ Jesteś pewien? Nowa wiadomość Kilka 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. @@ -652,13 +652,13 @@ Jesteś pewien? 1 pokój %d pokoje %d pokoi - + %1$s pokój znaleziony dla %2$s Kilka pokoi znalezionych dla %2$s %1$s pokoi znalezionych dla %2$s - + Wszystkie wiadomości (hałaśliwy) Wszystkie wiadomości @@ -804,13 +804,13 @@ Możesz to zrobić teraz lub później z poziomu ustawień aplikacji. 1 pokój %d pokoje %d pokoi - + 1 aktywny widżet %d aktywne widżety %d aktywnych widżetów - + Pokój %s nie jest widoczny. @@ -832,13 +832,13 @@ Czy chcesz dodać teraz kilka? 1 nieprzeczytana wiadomość powiadomienia %d nieprzeczytane wiadomości powiadomienia %d nieprzeczytanych wiadomości powiadomienia - + 1 nieprzeczytana wiadomość powiadomienia %d nieprzeczytane wiadomości powiadomienia %d nieprzeczytanych wiadomości powiadomienia - + %1$s w %2$s @@ -923,14 +923,14 @@ Widoczność wiadomości w Matrix jest podobna do wiadomości e-mail. Nasze zapo 1 członek %d członków - + 1 pokój %d pokoje %d pokoi - + Kliknij tutaj, aby zobaczyć starsze wiadomości @@ -945,22 +945,22 @@ Widoczność wiadomości w Matrix jest podobna do wiadomości e-mail. Nasze zapo 1 sekunda %d sek. - + 1 minuta %d min. - + 1 godzina %s godz. - + 1 dzień %d dni - + Pokazać wszystkie wiadomości od tego użytkownika? @@ -969,7 +969,7 @@ Pamiętaj ta akcja może zresetować aplikacje i potrwać jakiś czas. 1 zaznaczone %d zaznaczone %d zaznaczonych - + Wersja %s Podgląd mediów przed wysłaniem @@ -1040,7 +1040,7 @@ Pamiętaj ta akcja może zresetować aplikacje i potrwać jakiś czas. Czy chcesz wyrzucić tego użytkownika z rozmowy\? Czy chcesz wyrzucić tych użytkowników z rozmowy\? - + Formatowanie Markdown Pokaż zdarzenia dołączenia i wyjścia @@ -1167,7 +1167,7 @@ Spróbuj uruchomić ponownie aplikację. Przywrócono kopię zapasową z %d kluczem. Przywrócono kopię zapasową z %d kluczami. - + Użyj kopii zapasowej klucza Uruchamianie… (%1$d z %2$d) @@ -1486,12 +1486,12 @@ Spróbuj uruchomić ponownie aplikację. %1$s: 1 wiadomość %1$s: %2$d wiadomości - + %d powiadomienie %d powiadomień - + Nowe wydarzenie @@ -1621,7 +1621,7 @@ Spróbuj uruchomić ponownie aplikację. Kopiowanie %d klucza… Kopiowanie %d kluczy… - + Nieprawidłowa odpowiedź funkcji autoodkrywania serwera domowego @@ -1779,7 +1779,7 @@ Spróbuj uruchomić ponownie aplikację. 1 użytkownik odczytał %d użytkowników odczytało - + Wystąpił błąd poczas otrzymywania załącznika. @@ -1924,7 +1924,7 @@ Spróbuj uruchomić ponownie aplikację. 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… - + Wylogowałeś(-łaś) się @@ -2042,7 +2042,7 @@ Spróbuj uruchomić ponownie aplikację. Jedna osoba %1$d osób - + Opuszczanie pokoju… @@ -2117,7 +2117,7 @@ Spróbuj uruchomić ponownie aplikację. %d aktywna sesja %d aktywnych sesji - + Zweryfikuj tą sesję @@ -2154,12 +2154,12 @@ Spróbuj uruchomić ponownie aplikację. %d głos %d głosów - + %d głos - wyniki końcowe %d głosów - wyniki końcowe - + Wybrana Opcja Tworzy prostą ankietę @@ -2178,7 +2178,7 @@ Spróbuj uruchomić ponownie aplikację. Wyślij obraz w oryginalnym rozmiarze Wyślij obrazy w oryginalnym rozmiarze - + Potwierdź Usunięcie @@ -2239,7 +2239,7 @@ Spróbuj uruchomić ponownie aplikację. Tryb programisty aktywuje ukryte funkcje i może również spowodować, że aplikacja będzie mniej stabilna. Tylko dla programistów! Wiadomości w tym pokoju nie są szyfrowane end-to-end. Przesłane pliki -Prośby o klucze + Prośby o klucze Odblokuj historię zaszyfrowanych wiadomości @@ -2249,4 +2249,4 @@ Spróbuj uruchomić ponownie aplikację. Użyj tej sesji do weryfikacji nowej, nadając jej dostęp do zaszyfrowanych wiadomości. To nie ja - + diff --git a/vector/src/main/res/values-ru/strings.xml b/vector/src/main/res/values-ru/strings.xml index 654b12c712..5837fa39ad 100644 --- a/vector/src/main/res/values-ru/strings.xml +++ b/vector/src/main/res/values-ru/strings.xml @@ -96,7 +96,7 @@ %d пользователь %d пользователя %d пользователей - + Отправить логи @@ -838,13 +838,13 @@ %d комната %d комнаты %d комнат - + %d комната %d комнаты %d комнат - + %1$s в %2$s @@ -852,7 +852,7 @@ %d активный виджет %d активных виджета %d активных виджетов - + @@ -862,45 +862,45 @@ %d активный участник %d активных участника %d активных участников - + %d участник %d участника %d участников - + %d новое сообщение %d новых сообщения %d новых сообщений - + %1$s комната найдена для %2$s %1$s комнаты найдено для %2$s %1$s комнат найдено для %2$s - + %d изменение членства %d изменения членства %d изменений членства - + %d непрочитанное уведомление %d непрочитанных уведомления %d непрочитанных уведомлений - + %d непрочитанное уведомление %d непрочитанных уведомления %d непрочитанных уведомлений - + Получить аватар Заметка аватара @@ -1038,20 +1038,20 @@ %d выбран %d выбрано %d выбраны - + %d участник %d участника %d участников - + %d комната %d комнаты %d комнат - + Системные оповещения @@ -1339,7 +1339,7 @@ %d новый ключ был добавлен к этому устройству. %d новых ключа были добавлены к этому устройству. %d новых ключей были добавлены к этому устройству. - + @@ -1391,7 +1391,7 @@ Резервное копирование %d ключа… Резервное копирование %d ключей… Резервное копирование %d ключей… - + Все ключи сохранены @@ -1847,7 +1847,7 @@ Подробные логи помогут разработчикам, предоставив больше информации, когда вы отправляете RageShake. Даже когда они разрешены, приложение не логирует ваши сообщения и другие приватные данные. -Закройте меню создания комнаты… + Закройте меню создания комнаты… Вниз Контакт @@ -1969,10 +1969,10 @@ Сей домашний сервер использует слишком старую версию для подключения. Попросите вашего администратора обновить версию на домашнем сервере. - Слишком много запросов было отправлено. Вы сможете повторить попытку через %1$d секунду… - Слишком много запросов было отправлено. Вы сможете повторить попытку через %1$d секунды… - Слишком много запросов было отправлено. Вы сможете повторить попытку через %1$d секунд… - + Слишком много запросов было отправлено. Вы сможете повторить попытку через %1$d секунду… + Слишком много запросов было отправлено. Вы сможете повторить попытку через %1$d секунды… + Слишком много запросов было отправлено. Вы сможете повторить попытку через %1$d секунд… + Вы вышли из системы Сие может быть обусловлено различными причинами: @@ -2021,4 +2021,4 @@ Интерактивная проверка по отсебятинам Пожалуйста, выберите имя пользователя. Пожалуйста, выберите пароль. - + diff --git a/vector/src/main/res/values-sq/strings.xml b/vector/src/main/res/values-sq/strings.xml index 7f771a81ea..1696a02aef 100644 --- a/vector/src/main/res/values-sq/strings.xml +++ b/vector/src/main/res/values-sq/strings.xml @@ -2278,7 +2278,7 @@ Që të garantoni se s’ju shpëton gjë, thjesht mbajeni të aktivizuar mekani Emër përdoruesi dhe/ose fjalëkalim i pasaktë. Fjalëkalimi i dhënë fillon ose mbaron me hapësirë, ju lutemi, kontrollojeni. - + Po publikohen kyçe të krijuar identiteti Mesazh… diff --git a/vector/src/main/res/values-sv/strings.xml b/vector/src/main/res/values-sv/strings.xml index abbd157553..40e2df9870 100644 --- a/vector/src/main/res/values-sv/strings.xml +++ b/vector/src/main/res/values-sv/strings.xml @@ -1,5 +1,6 @@ -sv + + sv SE Latn @@ -141,9 +142,9 @@ Inga rum Inga publika rum tillgängliga - 1 användare - %d användare - + 1 användare + %d användare + Bjud in Gemenskaper @@ -278,4 +279,4 @@ Felformaterad JSON Innehöll inte giltig JSON För många förfrågningar har skickats - + From ea1c75c16aabe0df3bec96b943aafb7c3b5d2f35 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 15 May 2020 12:58:14 +0200 Subject: [PATCH 154/156] Fix lint issues in Strings --- vector/src/main/res/values-de/strings.xml | 2 +- vector/src/main/res/values-eo/strings.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index c0c967fd63..1071b975d3 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -1706,7 +1706,7 @@ Verwahre deinen Wiederherstellungsschlüssel an einem sehr sicheren Ort wie eine Konnte keine Verbindung zum Heimserver herstellen Latn - Bitte fragen Sie den Administrator Ihres Home-Servers nach der Einrichtung eines TURN-Servers, damit Anrufe zuverlässig funktionieren. + Bitte fragen Sie den Administrator Ihres Home-Servers (%1$s) nach der Einrichtung eines TURN-Servers, damit Anrufe zuverlässig funktionieren. \n \nAlternativ können Sie einen öffentlichen Server auf %2$s nutzen. Dies wird jedoch weniger zuverlässig sein und Ihre IP-Adresse gegenüber diesem Server preisgeben. Sie können dies auch in den Einstellungen anpassen. Dies ist keine Adresse eines Matrixservers diff --git a/vector/src/main/res/values-eo/strings.xml b/vector/src/main/res/values-eo/strings.xml index f3e7c65d67..55bcd09d3a 100644 --- a/vector/src/main/res/values-eo/strings.xml +++ b/vector/src/main/res/values-eo/strings.xml @@ -197,8 +197,8 @@ Sendi voĉon Ĉu vi certe volas komenci novan babilon kun %s\? - Ĉu vi certe volas komenci novan voĉvokon kun %s\? - Ĉu vi certe volas komenci novan vidvokon kun %s\? + Ĉu vi certe volas komenci novan voĉvokon\? + Ĉu vi certe volas komenci novan vidvokon\? Voko malsukcesis pro misagordita servilo Bonvolu peti de la administranto de via hejmservilo (%1$s) agordon de TURN-servilo, por dependebla funkciigo de vokoj. \n From 8eebcef4e91de9ad10f48557bc39068b3f5b04cb Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 15 May 2020 15:36:52 +0200 Subject: [PATCH 155/156] Fix #1373 --- .../vector/matrix/android/api/session/user/model/User.kt | 3 +++ .../riotx/features/invite/InviteUsersToRoomViewModel.kt | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/session/user/model/User.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/session/user/model/User.kt index 753c9b609c..9f4f997b3b 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/session/user/model/User.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/session/user/model/User.kt @@ -22,6 +22,9 @@ package im.vector.matrix.android.api.session.user.model */ data class User( val userId: String, + /** + * For usage in UI, consider using [getBestName] + */ val displayName: String? = null, val avatarUrl: String? = null ) { diff --git a/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomViewModel.kt b/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomViewModel.kt index 07c0cdbc7d..fc2f34b7a0 100644 --- a/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomViewModel.kt +++ b/vector/src/main/java/im/vector/riotx/features/invite/InviteUsersToRoomViewModel.kt @@ -66,13 +66,13 @@ class InviteUsersToRoomViewModel @AssistedInject constructor(@Assisted { val successMessage = when (selectedUsers.size) { 1 -> stringProvider.getString(R.string.invitation_sent_to_one_user, - selectedUsers.first().displayName) + selectedUsers.first().getBestName()) 2 -> stringProvider.getString(R.string.invitations_sent_to_two_users, - selectedUsers.first().displayName, - selectedUsers.last().displayName) + selectedUsers.first().getBestName(), + selectedUsers.last().getBestName()) else -> stringProvider.getQuantityString(R.plurals.invitations_sent_to_one_and_more_users, selectedUsers.size - 1, - selectedUsers.first().displayName, + selectedUsers.first().getBestName(), selectedUsers.size - 1) } _viewEvents.post(InviteUsersToRoomViewEvents.Success(successMessage)) From 03fa0e6ad6d786818e88e8f3e27826cd9ed924d2 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 15 May 2020 15:44:36 +0200 Subject: [PATCH 156/156] Prepare release 0.20.0 --- CHANGES.md | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 836ecdfaf9..869b034f45 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,4 @@ -Changes in RiotX 0.20.0 (2020-XX-XX) +Changes in RiotX 0.20.0 (2020-05-15) =================================================== Features ✨: @@ -15,17 +15,8 @@ Bugfix 🐛: - Random Crashes while doing sth with cross signing keys (#1364) - Crash | crash while restoring key backup (#1366) -Translations 🗣: - - - SDK API changes ⚠️: - - excludedUserIds parameter add to to UserService.getPagedUsersLive() function - -Build 🧱: - - - -Other changes: - - + - excludedUserIds parameter added to the UserService.getPagedUsersLive() function Changes in RiotX 0.19.0 (2020-05-04) ===================================================