mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-23 18:05:59 +03:00
Fix / fetch from realm without copy (proxy error)
This commit is contained in:
parent
c01af6ac78
commit
7821ca12fd
2 changed files with 4 additions and 5 deletions
|
@ -30,6 +30,7 @@ import im.vector.matrix.android.internal.database.query.where
|
|||
import im.vector.matrix.android.internal.session.pushers.GetPushRulesTask
|
||||
import im.vector.matrix.android.internal.task.TaskExecutor
|
||||
import im.vector.matrix.android.internal.task.configureWith
|
||||
import timber.log.Timber
|
||||
|
||||
|
||||
internal class DefaultPushRuleService(
|
||||
|
@ -170,7 +171,7 @@ internal class DefaultPushRuleService(
|
|||
it.onMatchRule(event, Action.mapFrom(rule) ?: emptyList())
|
||||
}
|
||||
} catch (e: Throwable) {
|
||||
|
||||
Timber.e(e, "Error while dispatching bing")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ import im.vector.matrix.android.internal.database.mapper.asDomain
|
|||
import im.vector.matrix.android.internal.database.model.RoomSummaryEntity
|
||||
import im.vector.matrix.android.internal.database.model.RoomSummaryEntityFields
|
||||
import im.vector.matrix.android.internal.database.query.where
|
||||
import im.vector.matrix.android.internal.util.fetchCopied
|
||||
|
||||
internal class DefaultRoom(
|
||||
override val roomId: String,
|
||||
|
@ -70,10 +71,7 @@ internal class DefaultRoom(
|
|||
|
||||
override val roomSummary: RoomSummary?
|
||||
get() {
|
||||
var sum: RoomSummaryEntity? = null
|
||||
monarchy.runTransactionSync {
|
||||
sum = RoomSummaryEntity.where(it, roomId).isNotEmpty(RoomSummaryEntityFields.DISPLAY_NAME).findFirst()
|
||||
}
|
||||
var sum: RoomSummaryEntity? = monarchy.fetchCopied { RoomSummaryEntity.where(it, roomId).isNotEmpty(RoomSummaryEntityFields.DISPLAY_NAME).findFirst() }
|
||||
return sum?.asDomain()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue