mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-28 05:59:05 +03:00
Fix potential ignoring of account data (return@foreach)
This commit is contained in:
parent
f5c0dcb5ea
commit
114101699d
2 changed files with 4 additions and 5 deletions
|
@ -26,10 +26,7 @@ import im.vector.matrix.android.internal.database.query.where
|
||||||
import im.vector.matrix.android.internal.di.UserId
|
import im.vector.matrix.android.internal.di.UserId
|
||||||
import im.vector.matrix.android.internal.session.pushers.SavePushRulesTask
|
import im.vector.matrix.android.internal.session.pushers.SavePushRulesTask
|
||||||
import im.vector.matrix.android.internal.session.room.membership.RoomMembers
|
import im.vector.matrix.android.internal.session.room.membership.RoomMembers
|
||||||
import im.vector.matrix.android.internal.session.sync.model.InvitedRoomSync
|
import im.vector.matrix.android.internal.session.sync.model.*
|
||||||
import im.vector.matrix.android.internal.session.sync.model.UserAccountDataDirectMessages
|
|
||||||
import im.vector.matrix.android.internal.session.sync.model.UserAccountDataPushRules
|
|
||||||
import im.vector.matrix.android.internal.session.sync.model.UserAccountDataSync
|
|
||||||
import im.vector.matrix.android.internal.session.user.accountdata.DirectChatsHelper
|
import im.vector.matrix.android.internal.session.user.accountdata.DirectChatsHelper
|
||||||
import im.vector.matrix.android.internal.session.user.accountdata.UpdateUserAccountDataTask
|
import im.vector.matrix.android.internal.session.user.accountdata.UpdateUserAccountDataTask
|
||||||
import im.vector.matrix.android.internal.task.TaskExecutor
|
import im.vector.matrix.android.internal.task.TaskExecutor
|
||||||
|
@ -51,7 +48,8 @@ internal class UserAccountDataSyncHandler @Inject constructor(private val monarc
|
||||||
when (it) {
|
when (it) {
|
||||||
is UserAccountDataDirectMessages -> handleDirectChatRooms(it)
|
is UserAccountDataDirectMessages -> handleDirectChatRooms(it)
|
||||||
is UserAccountDataPushRules -> handlePushRules(it)
|
is UserAccountDataPushRules -> handlePushRules(it)
|
||||||
else -> return@forEach
|
is UserAccountDataFallback -> Timber.d("Receive account data of unhandled type ${it.type}")
|
||||||
|
else -> error("Missing code here!")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
monarchy.doWithRealm { realm ->
|
monarchy.doWithRealm { realm ->
|
||||||
|
|
|
@ -21,5 +21,6 @@ import com.squareup.moshi.JsonClass
|
||||||
|
|
||||||
@JsonClass(generateAdapter = true)
|
@JsonClass(generateAdapter = true)
|
||||||
internal data class UserAccountDataFallback(
|
internal data class UserAccountDataFallback(
|
||||||
|
@Json(name = "type") val type: String,
|
||||||
@Json(name = "content") val content: Map<String, Any>
|
@Json(name = "content") val content: Map<String, Any>
|
||||||
) : UserAccountData
|
) : UserAccountData
|
||||||
|
|
Loading…
Reference in a new issue