Fixed video setting hidden when disabled

This commit is contained in:
Sylvain Berfini 2024-04-10 10:16:06 +02:00
parent 5a37f15bc7
commit afc2017e1e
2 changed files with 0 additions and 5 deletions

View file

@ -51,8 +51,6 @@ class SettingsViewModel @UiThread constructor() : ViewModel() {
val isVfsEnabled = MutableLiveData<Boolean>()
// Calls settings
val hideVideoCallSetting = MutableLiveData<Boolean>()
val echoCancellerEnabled = MutableLiveData<Boolean>()
val routeAudioToBluetooth = MutableLiveData<Boolean>()
val videoEnabled = MutableLiveData<Boolean>()
@ -119,7 +117,6 @@ class SettingsViewModel @UiThread constructor() : ViewModel() {
init {
coreContext.postOnCoreThread { core ->
hideVideoCallSetting.postValue(!core.isVideoEnabled)
showConversationsSettings.postValue(!corePreferences.disableChat)
showMeetingsSettings.postValue(!corePreferences.disableMeetings)
ldapAvailable.postValue(core.ldapAvailable())

View file

@ -90,7 +90,6 @@
style="@style/settings_title_style"
android:onClick="@{() -> viewModel.toggleEnableVideo()}"
android:id="@+id/enable_video_title"
android:visibility="@{!viewModel.hideVideoCallSetting ? View.VISIBLE : View.GONE}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
@ -107,7 +106,6 @@
style="@style/material_switch_style"
android:id="@+id/enable_video_switch"
android:onClick="@{() -> viewModel.toggleEnableVideo()}"
android:visibility="@{!viewModel.hideVideoCallSetting ? View.VISIBLE : View.GONE}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"