mirror of
https://github.com/element-hq/element-android
synced 2024-11-23 01:45:36 +03:00
Using copy() on realm object when getting current poll history status
This commit is contained in:
parent
cd1f41594d
commit
63026a3da5
1 changed files with 3 additions and 1 deletions
|
@ -38,7 +38,9 @@ internal class DefaultGetLoadedPollsStatusTask @Inject constructor(
|
|||
|
||||
override suspend fun execute(params: GetLoadedPollsStatusTask.Params): LoadedPollsStatus {
|
||||
return monarchy.awaitTransaction { realm ->
|
||||
val status = PollHistoryStatusEntity.getOrCreate(realm, params.roomId)
|
||||
val status = PollHistoryStatusEntity
|
||||
.getOrCreate(realm, params.roomId)
|
||||
.copy()
|
||||
LoadedPollsStatus(
|
||||
canLoadMore = status.isEndOfPollsBackward.not(),
|
||||
nbSyncedDays = status.getNbSyncedDays(params.currentTimestampMs),
|
||||
|
|
Loading…
Reference in a new issue