Fix conversation Banner display conditions.
This commit is contained in:
parent
69e8c9351d
commit
c39a1ebdb6
2 changed files with 2 additions and 2 deletions
|
@ -17,7 +17,7 @@ import org.thoughtcrime.securesms.keyvalue.SignalStore
|
|||
class GroupsV1MigrationSuggestionsBanner(private val suggestionsSize: Int, private val onAddMembers: () -> Unit, private val onNoThanks: () -> Unit) : Banner() {
|
||||
private val timeUntilUnblock = SignalStore.misc.cdsBlockedUtil - System.currentTimeMillis()
|
||||
|
||||
override val enabled: Boolean = SignalStore.misc.isCdsBlocked && timeUntilUnblock < CdsPermanentErrorBanner.PERMANENT_TIME_CUTOFF
|
||||
override val enabled: Boolean = suggestionsSize > 0
|
||||
|
||||
@Composable
|
||||
override fun DisplayBanner() {
|
||||
|
|
|
@ -36,7 +36,7 @@ class PendingGroupJoinRequestsBanner(override val enabled: Boolean, private val
|
|||
private val dismissListener: () -> Unit = {
|
||||
mutableStateFlow.tryEmit(PendingGroupJoinRequestsBanner(false, suggestionsSize, onViewClicked, null))
|
||||
}
|
||||
private val mutableStateFlow: MutableStateFlow<PendingGroupJoinRequestsBanner> = MutableStateFlow(PendingGroupJoinRequestsBanner(true, suggestionsSize, onViewClicked, dismissListener))
|
||||
private val mutableStateFlow: MutableStateFlow<PendingGroupJoinRequestsBanner> = MutableStateFlow(PendingGroupJoinRequestsBanner(suggestionsSize > 0, suggestionsSize, onViewClicked, dismissListener))
|
||||
val flow: Flow<PendingGroupJoinRequestsBanner> = mutableStateFlow
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue