Merge branch 'hotfix/1.5.11' into main

This commit is contained in:
Benoit Marty 2022-12-07 14:03:49 +01:00
commit 40bfffae9d
6 changed files with 24 additions and 10 deletions

View File

@ -1,3 +1,11 @@
Changes in Element 1.5.11 (2022-12-07)
======================================
Bugfixes 🐛
----------
- Fix crash when the network is not available. ([#7725](https://github.com/vector-im/element-android/issues/7725))
Changes in Element v1.5.10 (2022-11-30)
=======================================

View File

@ -0,0 +1,2 @@
Main changes in this version: New implementation of the full screen mode for the Rich Text Editor and bugfixes.
Full changelog: https://github.com/vector-im/element-android/releases

View File

@ -62,7 +62,7 @@ android {
// that the app's state is completely cleared between tests.
testInstrumentationRunnerArguments clearPackageData: 'true'
buildConfigField "String", "SDK_VERSION", "\"1.5.10\""
buildConfigField "String", "SDK_VERSION", "\"1.5.11\""
buildConfigField "String", "GIT_SDK_REVISION", "\"${gitRevision()}\""
buildConfigField "String", "GIT_SDK_REVISION_UNIX_DATE", "\"${gitRevisionUnixDate()}\""

View File

@ -42,7 +42,7 @@ internal class DefaultGetCurrentFilterTask @Inject constructor(
return when (storedFilterBody) {
currentFilterBody -> storedFilterId ?: storedFilterBody
else -> saveFilter(currentFilter)
else -> saveFilter(currentFilter) ?: currentFilterBody
}
}

View File

@ -16,6 +16,7 @@
package org.matrix.android.sdk.internal.session.filter
import org.matrix.android.sdk.api.extensions.tryOrNull
import org.matrix.android.sdk.internal.di.UserId
import org.matrix.android.sdk.internal.network.GlobalErrorReceiver
import org.matrix.android.sdk.internal.network.executeRequest
@ -24,8 +25,9 @@ import javax.inject.Inject
/**
* Save a filter, in db and if any changes, upload to the server.
* Return the filterId if uploading to the server is successful, else return null.
*/
internal interface SaveFilterTask : Task<SaveFilterTask.Params, String> {
internal interface SaveFilterTask : Task<SaveFilterTask.Params, String?> {
data class Params(
val filter: Filter
@ -39,18 +41,20 @@ internal class DefaultSaveFilterTask @Inject constructor(
private val globalErrorReceiver: GlobalErrorReceiver,
) : SaveFilterTask {
override suspend fun execute(params: SaveFilterTask.Params): String {
override suspend fun execute(params: SaveFilterTask.Params): String? {
val filter = params.filter
val filterResponse = executeRequest(globalErrorReceiver) {
// TODO auto retry
filterAPI.uploadFilter(userId, filter)
val filterResponse = tryOrNull {
executeRequest(globalErrorReceiver) {
filterAPI.uploadFilter(userId, filter)
}
}
val filterId = filterResponse?.filterId
filterRepository.storeSyncFilter(
filter = filter,
filterId = filterResponse.filterId,
filterId = filterId.orEmpty(),
roomEventFilter = FilterFactory.createDefaultRoomFilter()
)
return filterResponse.filterId
return filterId
}
}

View File

@ -37,7 +37,7 @@ ext.versionMinor = 5
// Note: even values are reserved for regular release, odd values for hotfix release.
// When creating a hotfix, you should decrease the value, since the current value
// is the value for the next regular release.
ext.versionPatch = 10
ext.versionPatch = 11
static def getGitTimestamp() {
def cmd = 'git show -s --format=%ct'