mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-23 12:38:33 +00:00
Fix bottom bar state handling and active state when menu is open.
This commit is contained in:
committed by
Greyson Parrelli
parent
ca21ab667a
commit
c26cc56f20
@@ -19,8 +19,10 @@ class CallLogContextMenu(
|
|||||||
private val callbacks: Callbacks
|
private val callbacks: Callbacks
|
||||||
) {
|
) {
|
||||||
fun show(anchor: View, call: CallLogRow.Call) {
|
fun show(anchor: View, call: CallLogRow.Call) {
|
||||||
|
anchor.isSelected = true
|
||||||
SignalContextMenu.Builder(anchor, anchor.parent as ViewGroup)
|
SignalContextMenu.Builder(anchor, anchor.parent as ViewGroup)
|
||||||
.preferredVerticalPosition(SignalContextMenu.VerticalPosition.BELOW)
|
.preferredVerticalPosition(SignalContextMenu.VerticalPosition.BELOW)
|
||||||
|
.onDismiss { anchor.isSelected = false }
|
||||||
.show(
|
.show(
|
||||||
listOfNotNull(
|
listOfNotNull(
|
||||||
getVideoCallActionItem(call),
|
getVideoCallActionItem(call),
|
||||||
|
|||||||
@@ -15,7 +15,9 @@ import org.thoughtcrime.securesms.util.livedata.Store
|
|||||||
class ConversationListTabsViewModel(repository: ConversationListTabRepository) : ViewModel() {
|
class ConversationListTabsViewModel(repository: ConversationListTabRepository) : ViewModel() {
|
||||||
private val store = Store(ConversationListTabsState())
|
private val store = Store(ConversationListTabsState())
|
||||||
|
|
||||||
val stateSnapshot: ConversationListTabsState = store.state
|
val stateSnapshot: ConversationListTabsState
|
||||||
|
get() = store.state
|
||||||
|
|
||||||
val state: LiveData<ConversationListTabsState> = Transformations.distinctUntilChanged(store.stateLiveData)
|
val state: LiveData<ConversationListTabsState> = Transformations.distinctUntilChanged(store.stateLiveData)
|
||||||
val disposables = CompositeDisposable()
|
val disposables = CompositeDisposable()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user