Merge tag 'v1.5.18' into sc

Change-Id: I4730268dc4327fb16756e73d4dcb428a8c262ec3
This commit is contained in:
SpiritCroc 2023-01-02 17:57:49 +01:00
commit dadeadcad4
7 changed files with 34 additions and 17 deletions

View File

@ -1,4 +1,16 @@
Changes in Element v.5.16 (2022-12-29) Changes in Element v1.5.18 (2023-01-02)
=======================================
This release fixes a bunch of recent regressions. Most of them were not pushed to production hopefully. Current production version is 1.5.11.
Threads are now enabled by default, and this may let the application perform an initial sync.
Testers on the PlayStore may have experimented some issues like empty room list, or incomplete room state (room name missing, etc.), or even crashing due to initial sync not using lazy loading of room members. All those issues have been fixed, but to fix your current state, please clear cache once you get the release 1.5.18.
Bugfixes 🐛
----------
- Start DM will create a deadlock if user profile was never loaded ([#7870](https://github.com/vector-im/element-android/issues/7870))
Changes in Element v1.5.16 (2022-12-29)
====================================== ======================================
Features ✨ Features ✨

View File

@ -0,0 +1,2 @@
Main changes in this version: Thread are now enabled by default.
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. // that the app's state is completely cleared between tests.
testInstrumentationRunnerArguments clearPackageData: 'true' testInstrumentationRunnerArguments clearPackageData: 'true'
buildConfigField "String", "SDK_VERSION", "\"1.5.16\"" buildConfigField "String", "SDK_VERSION", "\"1.5.18\""
buildConfigField "String", "GIT_SDK_REVISION", "\"${gitRevision()}\"" buildConfigField "String", "GIT_SDK_REVISION", "\"${gitRevision()}\""
buildConfigField "String", "GIT_SDK_REVISION_UNIX_DATE", "\"${gitRevisionUnixDate()}\"" buildConfigField "String", "GIT_SDK_REVISION_UNIX_DATE", "\"${gitRevisionUnixDate()}\""

View File

@ -21,7 +21,7 @@ import io.realm.Realm
import io.realm.RealmConfiguration import io.realm.RealmConfiguration
import io.realm.kotlin.createObject import io.realm.kotlin.createObject
import kotlinx.coroutines.TimeoutCancellationException import kotlinx.coroutines.TimeoutCancellationException
import kotlinx.coroutines.runBlocking import org.matrix.android.sdk.api.session.events.model.Event
import org.matrix.android.sdk.api.session.events.model.EventType import org.matrix.android.sdk.api.session.events.model.EventType
import org.matrix.android.sdk.api.session.room.failure.CreateRoomFailure import org.matrix.android.sdk.api.session.room.failure.CreateRoomFailure
import org.matrix.android.sdk.api.session.room.model.Membership import org.matrix.android.sdk.api.session.room.model.Membership
@ -73,8 +73,9 @@ internal class DefaultCreateLocalRoomTask @Inject constructor(
override suspend fun execute(params: CreateRoomParams): String { override suspend fun execute(params: CreateRoomParams): String {
val createRoomBody = createRoomBodyBuilder.build(params) val createRoomBody = createRoomBodyBuilder.build(params)
val roomId = RoomLocalEcho.createLocalEchoId() val roomId = RoomLocalEcho.createLocalEchoId()
val eventList = createLocalRoomStateEventsTask.execute(CreateLocalRoomStateEventsTask.Params(createRoomBody))
monarchy.awaitTransaction { realm -> monarchy.awaitTransaction { realm ->
createLocalRoomEntity(realm, roomId, createRoomBody) createLocalRoomEntity(realm, roomId, eventList)
createLocalRoomSummaryEntity(realm, roomId, params, createRoomBody) createLocalRoomSummaryEntity(realm, roomId, params, createRoomBody)
} }
@ -96,10 +97,10 @@ internal class DefaultCreateLocalRoomTask @Inject constructor(
* Create a local room entity from the given room creation params. * Create a local room entity from the given room creation params.
* This will also generate and store in database the chunk and the events related to the room params in order to retrieve and display the local room. * This will also generate and store in database the chunk and the events related to the room params in order to retrieve and display the local room.
*/ */
private fun createLocalRoomEntity(realm: Realm, roomId: String, createRoomBody: CreateRoomBody) { private fun createLocalRoomEntity(realm: Realm, roomId: String, localStateEventList: List<Event>) {
RoomEntity.getOrCreate(realm, roomId).apply { RoomEntity.getOrCreate(realm, roomId).apply {
membership = Membership.JOIN membership = Membership.JOIN
chunks.add(createLocalRoomChunk(realm, roomId, createRoomBody)) chunks.add(createLocalRoomChunk(realm, roomId, localStateEventList))
membersLoadStatus = RoomMembersLoadStatusType.LOADED membersLoadStatus = RoomMembersLoadStatusType.LOADED
} }
} }
@ -145,23 +146,19 @@ internal class DefaultCreateLocalRoomTask @Inject constructor(
* *
* @param realm the current instance of realm * @param realm the current instance of realm
* @param roomId the id of the local room * @param roomId the id of the local room
* @param createRoomBody the room creation params * @param localStateEventList list of local state events for that room
* *
* @return a chunk entity * @return a chunk entity
*/ */
private fun createLocalRoomChunk(realm: Realm, roomId: String, createRoomBody: CreateRoomBody): ChunkEntity { private fun createLocalRoomChunk(realm: Realm, roomId: String, localStateEventList: List<Event>): ChunkEntity {
val chunkEntity = realm.createObject<ChunkEntity>().apply { val chunkEntity = realm.createObject<ChunkEntity>().apply {
isLastBackward = true isLastBackward = true
isLastForward = true isLastForward = true
} }
// Can't suspend when using realm as it could jump thread
val eventList = runBlocking {
createLocalRoomStateEventsTask.execute(CreateLocalRoomStateEventsTask.Params(createRoomBody))
}
val roomMemberContentsByUser = HashMap<String, RoomMemberContent?>() val roomMemberContentsByUser = HashMap<String, RoomMemberContent?>()
for (event in eventList) { for (event in localStateEventList) {
if (event.eventId == null || event.senderId == null || event.type == null) { if (event.eventId == null || event.senderId == null || event.type == null) {
continue continue
} }

View File

@ -14362,7 +14362,11 @@
"plant", "plant",
"nature", "nature",
"branch", "branch",
"summer" "summer",
"bamboo",
"wish",
"star_festival",
"tanzaku"
] ]
}, },
"pine-decoration": { "pine-decoration": {
@ -14373,10 +14377,12 @@
"celebration", "celebration",
"Japanese", "Japanese",
"pine", "pine",
"japanese",
"plant", "plant",
"nature", "nature",
"vegetable", "vegetable",
"panda" "panda",
"new_years"
] ]
}, },
"japanese-dolls": { "japanese-dolls": {

View File

@ -37,7 +37,7 @@ ext.versionMinor = 5
// Note: even values are reserved for regular release, odd values for hotfix release. // 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 // When creating a hotfix, you should decrease the value, since the current value
// is the value for the next regular release. // is the value for the next regular release.
ext.versionPatch = 16 ext.versionPatch = 18
ext.scVersion = 62 ext.scVersion = 62

File diff suppressed because one or more lines are too long