forked from GitHub-Mirror/riotX-android
Fix issues on Notification Event resolver
This commit is contained in:
@ -47,6 +47,8 @@ interface Room :
|
||||
* A live [RoomSummary] associated with the room
|
||||
* You can observe this summary to get dynamic data from this room.
|
||||
*/
|
||||
val roomSummary: LiveData<RoomSummary>
|
||||
val liveRoomSummary: LiveData<RoomSummary>
|
||||
|
||||
val roomSummary: RoomSummary?
|
||||
|
||||
}
|
@ -39,4 +39,6 @@ data class CallInviteContent(
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun isVideo(): Boolean = offer.sdp.contains(Offer.SDP_VIDEO)
|
||||
}
|
@ -52,7 +52,7 @@ internal class DefaultRoom(
|
||||
RelationService by relationService,
|
||||
MembershipService by roomMembersService {
|
||||
|
||||
override val roomSummary: LiveData<RoomSummary> by lazy {
|
||||
override val liveRoomSummary: LiveData<RoomSummary> by lazy {
|
||||
val liveRealmData = RealmLiveData<RoomSummaryEntity>(monarchy.realmConfiguration) { realm ->
|
||||
RoomSummaryEntity.where(realm, roomId).isNotEmpty(RoomSummaryEntityFields.DISPLAY_NAME)
|
||||
}
|
||||
@ -68,6 +68,15 @@ internal class DefaultRoom(
|
||||
}
|
||||
}
|
||||
|
||||
override val roomSummary: RoomSummary?
|
||||
get() {
|
||||
var sum: RoomSummaryEntity? = null
|
||||
monarchy.runTransactionSync {
|
||||
sum = RoomSummaryEntity.where(it, roomId).isNotEmpty(RoomSummaryEntityFields.DISPLAY_NAME).findFirst()
|
||||
}
|
||||
return sum?.asDomain()
|
||||
}
|
||||
|
||||
override fun isEncrypted(): Boolean {
|
||||
return cryptoService.isRoomEncrypted(roomId)
|
||||
}
|
||||
|
@ -175,7 +175,10 @@ class PushrulesConditionTest {
|
||||
return _numberOfJoinedMembers
|
||||
}
|
||||
|
||||
override val roomSummary: LiveData<RoomSummary>
|
||||
override val liveRoomSummary: LiveData<RoomSummary>
|
||||
get() = TODO("not implemented") //To change initializer of created properties use File | Settings | File Templates.
|
||||
|
||||
override val roomSummary: RoomSummary?
|
||||
get() = TODO("not implemented") //To change initializer of created properties use File | Settings | File Templates.
|
||||
|
||||
override fun createTimeline(eventId: String?, allowedTypes: List<String>?): Timeline {
|
||||
|
Reference in New Issue
Block a user