mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 05:31:21 +03:00
Temp fix Realm crash
This commit is contained in:
parent
e4282e5f29
commit
39bd437f75
1 changed files with 6 additions and 1 deletions
|
@ -66,7 +66,12 @@ internal class RealmSendingEventsDataSource(
|
|||
|
||||
private fun updateFrozenResults(sendingEvents: RealmList<TimelineEventEntity>?) {
|
||||
// Makes sure to close the previous frozen realm
|
||||
frozenSendingTimelineEvents?.realm?.close()
|
||||
// TODO find a better way to avoid thread timeline crash:
|
||||
// - Make RealmSendingEventsDataSource Singleton
|
||||
// - Do not initialize RealmSendingEventsDataSource when we are in a thread timeline while
|
||||
// we already have an instance from the main timeline
|
||||
// - Close Main timeline before Opening a thread timeline
|
||||
// frozenSendingTimelineEvents?.realm?.close()
|
||||
frozenSendingTimelineEvents = sendingEvents?.freeze()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue