mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-01-31 03:17:13 +01:00
Add some log for further investigation
This commit is contained in:
parent
13f7a9fc10
commit
9a0ea7bc2e
@ -207,6 +207,7 @@ internal class UpdateTrustWorker(context: Context, params: WorkerParameters, ses
|
||||
private suspend fun updateTrustStep2(userList: List<String>, myCrossSigningInfo: MXCrossSigningInfo?) {
|
||||
Timber.d("## CrossSigning - Updating shields for impacted rooms...")
|
||||
awaitTransaction(sessionRealmConfiguration) { sessionRealm ->
|
||||
Timber.d("## CrossSigning - Updating shields for impacted rooms - in transaction")
|
||||
Realm.getInstance(cryptoRealmConfiguration).use { cryptoRealm ->
|
||||
sessionRealm.where(RoomMemberSummaryEntity::class.java)
|
||||
.`in`(RoomMemberSummaryEntityFields.USER_ID, userList.toTypedArray())
|
||||
@ -239,6 +240,7 @@ internal class UpdateTrustWorker(context: Context, params: WorkerParameters, ses
|
||||
}
|
||||
}
|
||||
}
|
||||
Timber.d("## CrossSigning - Updating shields for impacted rooms - END")
|
||||
}
|
||||
|
||||
private fun getCrossSigningInfo(cryptoRealm: Realm, userId: String): MXCrossSigningInfo? {
|
||||
|
@ -126,21 +126,33 @@ internal class SyncResponseHandler @Inject constructor(
|
||||
}
|
||||
|
||||
// Everything else we need to do outside the transaction
|
||||
aggregatorHandler.handle(aggregator)
|
||||
|
||||
syncResponse.rooms?.let {
|
||||
checkPushRules(it, isInitialSync)
|
||||
userAccountDataSyncHandler.synchronizeWithServerIfNeeded(it.invite)
|
||||
dispatchInvitedRoom(it)
|
||||
measureTimeMillis {
|
||||
aggregatorHandler.handle(aggregator)
|
||||
}.also {
|
||||
Timber.v("Aggregator management took $it ms")
|
||||
}
|
||||
|
||||
Timber.v("On sync completed")
|
||||
cryptoSyncHandler.onSyncCompleted(syncResponse)
|
||||
measureTimeMillis {
|
||||
syncResponse.rooms?.let {
|
||||
checkPushRules(it, isInitialSync)
|
||||
userAccountDataSyncHandler.synchronizeWithServerIfNeeded(it.invite)
|
||||
dispatchInvitedRoom(it)
|
||||
}.also {
|
||||
Timber.v("SyncResponse.rooms post treatment took $it ms")
|
||||
}
|
||||
}
|
||||
|
||||
measureTimeMillis {
|
||||
cryptoSyncHandler.onSyncCompleted(syncResponse)
|
||||
}.also {
|
||||
Timber.v("cryptoSyncHandler.onSyncCompleted took $it ms")
|
||||
}
|
||||
|
||||
// post sync stuffs
|
||||
monarchy.writeAsync {
|
||||
roomSyncHandler.postSyncSpaceHierarchyHandle(it)
|
||||
}
|
||||
Timber.v("On sync completed")
|
||||
}
|
||||
|
||||
private fun dispatchInvitedRoom(roomsSyncResponse: RoomsSyncResponse) {
|
||||
|
@ -30,6 +30,7 @@ import org.matrix.android.sdk.internal.session.user.UserEntityFactory
|
||||
import org.matrix.android.sdk.internal.session.user.accountdata.DirectChatsHelper
|
||||
import org.matrix.android.sdk.internal.session.user.accountdata.UpdateUserAccountDataTask
|
||||
import org.matrix.android.sdk.internal.util.awaitTransaction
|
||||
import timber.log.Timber
|
||||
import javax.inject.Inject
|
||||
|
||||
internal class SyncResponsePostTreatmentAggregatorHandler @Inject constructor(
|
||||
@ -101,8 +102,11 @@ internal class SyncResponsePostTreatmentAggregatorHandler @Inject constructor(
|
||||
|
||||
private suspend fun List<User>.saveLocally() {
|
||||
val userEntities = map { user -> UserEntityFactory.create(user) }
|
||||
Timber.d("## saveLocally()")
|
||||
monarchy.awaitTransaction {
|
||||
Timber.d("## saveLocally() - in transaction")
|
||||
it.insertOrUpdate(userEntities)
|
||||
}
|
||||
Timber.d("## saveLocally() - END")
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user