mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-24 10:25:51 +03:00
Merge remote-tracking branch 'upstream/develop' into sc
Change-Id: Ie246642fb6346f4a8838878a18135add6786a9b5
This commit is contained in:
commit
5182c2760e
3 changed files with 16 additions and 8 deletions
1
changelog.d/4313.bugfix
Normal file
1
changelog.d/4313.bugfix
Normal file
|
@ -0,0 +1 @@
|
|||
Fix unread marker not showing
|
|
@ -541,9 +541,9 @@ class RoomDetailViewModel @AssistedInject constructor(
|
|||
val isAllowed = action.userJustAccepted || if (widget.type == WidgetType.Jitsi) {
|
||||
widget.senderInfo?.userId == session.myUserId ||
|
||||
session.integrationManagerService().isNativeWidgetDomainAllowed(
|
||||
action.widget.type.preferred,
|
||||
domain
|
||||
)
|
||||
action.widget.type.preferred,
|
||||
domain
|
||||
)
|
||||
} else false
|
||||
|
||||
if (isAllowed) {
|
||||
|
@ -1110,8 +1110,10 @@ class RoomDetailViewModel @AssistedInject constructor(
|
|||
}
|
||||
|
||||
override fun onTimelineUpdated(snapshot: List<TimelineEvent>) {
|
||||
timelineEvents.tryEmit(snapshot)
|
||||
|
||||
viewModelScope.launch {
|
||||
// tryEmit doesn't work with SharedFlow without cache
|
||||
timelineEvents.emit(snapshot)
|
||||
}
|
||||
// PreviewUrl
|
||||
if (vectorPreferences.showUrlPreviews()) {
|
||||
withState { state ->
|
||||
|
|
|
@ -34,6 +34,7 @@ import kotlinx.coroutines.flow.MutableSharedFlow
|
|||
import kotlinx.coroutines.flow.combine
|
||||
import kotlinx.coroutines.flow.distinctUntilChanged
|
||||
import kotlinx.coroutines.flow.sample
|
||||
import kotlinx.coroutines.launch
|
||||
import org.matrix.android.sdk.api.extensions.orFalse
|
||||
import org.matrix.android.sdk.api.session.Session
|
||||
import org.matrix.android.sdk.api.session.crypto.crosssigning.MASTER_KEY_SSSS_NAME
|
||||
|
@ -110,7 +111,7 @@ class ServerBackupStatusViewModel @AssistedInject constructor(@Assisted initialS
|
|||
if (
|
||||
crossSigningInfo.getOrNull() == null ||
|
||||
(crossSigningInfo.getOrNull()?.isTrusted() == true &&
|
||||
pInfo.getOrNull()?.allKnown().orFalse())
|
||||
pInfo.getOrNull()?.allKnown().orFalse())
|
||||
) {
|
||||
// So 4S is not setup and we have local secrets,
|
||||
return@combine BannerState.Setup(numberOfKeys = getNumberOfKeysToBackup())
|
||||
|
@ -125,7 +126,9 @@ class ServerBackupStatusViewModel @AssistedInject constructor(@Assisted initialS
|
|||
)
|
||||
}
|
||||
|
||||
keyBackupFlow.tryEmit(session.cryptoService().keysBackupService().state)
|
||||
viewModelScope.launch {
|
||||
keyBackupFlow.tryEmit(session.cryptoService().keysBackupService().state)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -155,7 +158,9 @@ class ServerBackupStatusViewModel @AssistedInject constructor(@Assisted initialS
|
|||
}
|
||||
|
||||
override fun onStateChange(newState: KeysBackupState) {
|
||||
keyBackupFlow.tryEmit(session.cryptoService().keysBackupService().state)
|
||||
viewModelScope.launch {
|
||||
keyBackupFlow.tryEmit(session.cryptoService().keysBackupService().state)
|
||||
}
|
||||
keysBackupState.value = newState
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue