Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protect call to client.enableAllSendQueues #3886

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import io.element.android.libraries.androidutils.file.safeDelete
import io.element.android.libraries.core.bool.orFalse
import io.element.android.libraries.core.coroutine.CoroutineDispatchers
import io.element.android.libraries.core.coroutine.childScope
import io.element.android.libraries.core.data.tryOrNull
import io.element.android.libraries.featureflag.api.FeatureFlagService
import io.element.android.libraries.matrix.api.MatrixClient
import io.element.android.libraries.matrix.api.core.DeviceId
Expand Down Expand Up @@ -616,9 +617,13 @@ class RustMatrixClient(
.distinctUntilChanged()
}

override suspend fun setAllSendQueuesEnabled(enabled: Boolean) = withContext(sessionDispatcher) {
Timber.i("setAllSendQueuesEnabled($enabled)")
client.enableAllSendQueues(enabled)
override suspend fun setAllSendQueuesEnabled(enabled: Boolean) {
withContext(sessionDispatcher) {
Timber.i("setAllSendQueuesEnabled($enabled)")
tryOrNull {
client.enableAllSendQueues(enabled)
}
}
}

override fun sendQueueDisabledFlow(): Flow<RoomId> = mxCallbackFlow {
Expand Down
Loading