forked from GitHub-Mirror/riotX-android
Fix regression on invitation full screen display
This commit is contained in:
parent
5322251bc0
commit
063c35380a
@ -44,6 +44,8 @@ import im.vector.riotx.core.utils.LiveEvent
|
|||||||
import im.vector.riotx.features.command.CommandParser
|
import im.vector.riotx.features.command.CommandParser
|
||||||
import im.vector.riotx.features.command.ParsedCommand
|
import im.vector.riotx.features.command.ParsedCommand
|
||||||
import im.vector.riotx.features.home.room.detail.timeline.helper.TimelineDisplayableEvents
|
import im.vector.riotx.features.home.room.detail.timeline.helper.TimelineDisplayableEvents
|
||||||
|
import io.reactivex.Observable
|
||||||
|
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||||
import io.reactivex.rxkotlin.subscribeBy
|
import io.reactivex.rxkotlin.subscribeBy
|
||||||
import org.commonmark.parser.Parser
|
import org.commonmark.parser.Parser
|
||||||
import org.commonmark.renderer.html.HtmlRenderer
|
import org.commonmark.renderer.html.HtmlRenderer
|
||||||
@ -499,6 +501,16 @@ class RoomDetailViewModel @AssistedInject constructor(@Assisted initialState: Ro
|
|||||||
|
|
||||||
private fun observeRoomSummary() {
|
private fun observeRoomSummary() {
|
||||||
room.rx().liveRoomSummary(false)
|
room.rx().liveRoomSummary(false)
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.flatMap {
|
||||||
|
if (it.membership != Membership.INVITE || it.latestEvent != null) {
|
||||||
|
// Not an invitation, or already fetching last event
|
||||||
|
Observable.just(it)
|
||||||
|
} else {
|
||||||
|
// We need the last event
|
||||||
|
room.rx().liveRoomSummary(true)
|
||||||
|
}
|
||||||
|
}
|
||||||
.execute { async ->
|
.execute { async ->
|
||||||
copy(
|
copy(
|
||||||
asyncRoomSummary = async,
|
asyncRoomSummary = async,
|
||||||
|
Loading…
Reference in New Issue
Block a user