mirror of
https://github.com/element-hq/element-android
synced 2024-11-24 10:25:35 +03:00
Clean after benoit's review
This commit is contained in:
parent
77de059dc9
commit
8e39fd2a70
2 changed files with 4 additions and 4 deletions
|
@ -43,7 +43,7 @@ fun <T> doWithRealm(realmConfiguration: RealmConfiguration, action: (Realm) -> T
|
|||
fun <T : RealmObject> doRealmQueryAndCopy(realmConfiguration: RealmConfiguration, action: (Realm) -> T?): T? {
|
||||
return Realm.getInstance(realmConfiguration).use { realm ->
|
||||
val result = action.invoke(realm)
|
||||
result?.let { realm.copyFromRealm(result) }
|
||||
result?.let { realm.copyFromRealm(it) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ fun <T : RealmObject> doRealmQueryAndCopy(realmConfiguration: RealmConfiguration
|
|||
fun <T : RealmObject> doRealmQueryAndCopyList(realmConfiguration: RealmConfiguration, action: (Realm) -> Iterable<T>): Iterable<T> {
|
||||
return Realm.getInstance(realmConfiguration).use { realm ->
|
||||
val result = action.invoke(realm)
|
||||
return realm.copyFromRealm(result)
|
||||
realm.copyFromRealm(result)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ class DefaultItemFactory @Inject constructor(private val avatarSizeProvider: Ava
|
|||
fun create(text: String,
|
||||
informationData: MessageInformationData,
|
||||
highlight: Boolean,
|
||||
callback: TimelineEventController.Callback?): DefaultItem? {
|
||||
callback: TimelineEventController.Callback?): DefaultItem {
|
||||
|
||||
return DefaultItem_()
|
||||
.leftGuideline(avatarSizeProvider.leftGuideline)
|
||||
|
@ -49,7 +49,7 @@ class DefaultItemFactory @Inject constructor(private val avatarSizeProvider: Ava
|
|||
highlight: Boolean,
|
||||
readMarkerVisible: Boolean,
|
||||
callback: TimelineEventController.Callback?,
|
||||
exception: Exception? = null): DefaultItem? {
|
||||
exception: Exception? = null): DefaultItem {
|
||||
val text = if (exception == null) {
|
||||
"${event.root.getClearType()} events are not yet handled"
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue