mirror of
https://github.com/element-hq/element-android
synced 2024-11-24 02:15:35 +03:00
Code review fixes.
This commit is contained in:
parent
a623395585
commit
8b39eabc0f
4 changed files with 11 additions and 11 deletions
|
@ -1298,14 +1298,14 @@ internal class DefaultCryptoService @Inject constructor(
|
|||
}
|
||||
|
||||
override fun ensureOutboundSession(roomId: String) {
|
||||
// Ensure to load all room members
|
||||
loadRoomMembersTask
|
||||
.configureWith(LoadRoomMembersTask.Params(roomId)) {
|
||||
this.callback = NoOpMatrixCallback()
|
||||
}
|
||||
.executeBy(taskExecutor)
|
||||
|
||||
cryptoCoroutineScope.launch(coroutineDispatchers.crypto) {
|
||||
// Ensure to load all room members
|
||||
loadRoomMembersTask
|
||||
.configureWith(LoadRoomMembersTask.Params(roomId)) {
|
||||
this.callback = NoOpMatrixCallback()
|
||||
}
|
||||
.executeBy(taskExecutor)
|
||||
|
||||
val userIds = getRoomUserIds(roomId)
|
||||
val alg = roomEncryptorsStore.get(roomId)
|
||||
?: getEncryptionAlgorithm(roomId)
|
||||
|
|
|
@ -136,7 +136,7 @@ android {
|
|||
buildConfigField "String", "BUILD_NUMBER", "\"${buildNumber}\""
|
||||
resValue "string", "build_number", "\"${buildNumber}\""
|
||||
|
||||
buildConfigField "org.matrix.android.sdk.api.crypto.OutboundSessionKeySharingStrategy", "outboundSessionKeySharingStrategy", "org.matrix.android.sdk.api.crypto.OutboundSessionKeySharingStrategy.WhenTyping"
|
||||
buildConfigField "im.vector.app.features.crypto.keysrequest.OutboundSessionKeySharingStrategy", "outboundSessionKeySharingStrategy", "im.vector.app.features.crypto.keysrequest.OutboundSessionKeySharingStrategy.WhenTyping"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.matrix.android.sdk.api.crypto
|
||||
package im.vector.app.features.crypto.keysrequest
|
||||
|
||||
enum class OutboundSessionKeySharingStrategy {
|
||||
/**
|
|
@ -61,7 +61,7 @@ import org.commonmark.renderer.html.HtmlRenderer
|
|||
import org.matrix.android.sdk.api.MatrixCallback
|
||||
import org.matrix.android.sdk.api.MatrixPatterns
|
||||
import org.matrix.android.sdk.api.NoOpMatrixCallback
|
||||
import org.matrix.android.sdk.api.crypto.OutboundSessionKeySharingStrategy
|
||||
import im.vector.app.features.crypto.keysrequest.OutboundSessionKeySharingStrategy
|
||||
import org.matrix.android.sdk.api.extensions.tryOrNull
|
||||
import org.matrix.android.sdk.api.query.QueryStringValue
|
||||
import org.matrix.android.sdk.api.raw.RawService
|
||||
|
@ -599,7 +599,7 @@ class RoomDetailViewModel @AssistedInject constructor(
|
|||
}
|
||||
}
|
||||
// Ensure outbound session keys
|
||||
if (room.isEncrypted() && BuildConfig.outboundSessionKeySharingStrategy == OutboundSessionKeySharingStrategy.WhenTyping) {
|
||||
if (action.isTyping && room.isEncrypted() && BuildConfig.outboundSessionKeySharingStrategy == OutboundSessionKeySharingStrategy.WhenTyping) {
|
||||
room.ensureOutboundSession()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue