Fix / fetch from realm without copy (proxy error)
This commit is contained in:
parent
c01af6ac78
commit
7821ca12fd
|
@ -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.session.pushers.GetPushRulesTask
|
||||||
import im.vector.matrix.android.internal.task.TaskExecutor
|
import im.vector.matrix.android.internal.task.TaskExecutor
|
||||||
import im.vector.matrix.android.internal.task.configureWith
|
import im.vector.matrix.android.internal.task.configureWith
|
||||||
|
import timber.log.Timber
|
||||||
|
|
||||||
|
|
||||||
internal class DefaultPushRuleService(
|
internal class DefaultPushRuleService(
|
||||||
|
@ -170,7 +171,7 @@ internal class DefaultPushRuleService(
|
||||||
it.onMatchRule(event, Action.mapFrom(rule) ?: emptyList())
|
it.onMatchRule(event, Action.mapFrom(rule) ?: emptyList())
|
||||||
}
|
}
|
||||||
} catch (e: Throwable) {
|
} 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.RoomSummaryEntity
|
||||||
import im.vector.matrix.android.internal.database.model.RoomSummaryEntityFields
|
import im.vector.matrix.android.internal.database.model.RoomSummaryEntityFields
|
||||||
import im.vector.matrix.android.internal.database.query.where
|
import im.vector.matrix.android.internal.database.query.where
|
||||||
|
import im.vector.matrix.android.internal.util.fetchCopied
|
||||||
|
|
||||||
internal class DefaultRoom(
|
internal class DefaultRoom(
|
||||||
override val roomId: String,
|
override val roomId: String,
|
||||||
|
@ -70,10 +71,7 @@ internal class DefaultRoom(
|
||||||
|
|
||||||
override val roomSummary: RoomSummary?
|
override val roomSummary: RoomSummary?
|
||||||
get() {
|
get() {
|
||||||
var sum: RoomSummaryEntity? = null
|
var sum: RoomSummaryEntity? = monarchy.fetchCopied { RoomSummaryEntity.where(it, roomId).isNotEmpty(RoomSummaryEntityFields.DISPLAY_NAME).findFirst() }
|
||||||
monarchy.runTransactionSync {
|
|
||||||
sum = RoomSummaryEntity.where(it, roomId).isNotEmpty(RoomSummaryEntityFields.DISPLAY_NAME).findFirst()
|
|
||||||
}
|
|
||||||
return sum?.asDomain()
|
return sum?.asDomain()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue