Fixed debug logs settings not updated until app restart
This commit is contained in:
parent
5321918b2d
commit
0f0bc1c6e5
1 changed files with 4 additions and 0 deletions
|
@ -23,13 +23,17 @@ import androidx.lifecycle.MutableLiveData
|
||||||
import org.linphone.LinphoneApplication.Companion.coreContext
|
import org.linphone.LinphoneApplication.Companion.coreContext
|
||||||
import org.linphone.R
|
import org.linphone.R
|
||||||
import org.linphone.activities.main.settings.SettingListenerStub
|
import org.linphone.activities.main.settings.SettingListenerStub
|
||||||
|
import org.linphone.core.Factory
|
||||||
import org.linphone.mediastream.Version
|
import org.linphone.mediastream.Version
|
||||||
|
import org.linphone.utils.AppUtils
|
||||||
import org.linphone.utils.Event
|
import org.linphone.utils.Event
|
||||||
|
|
||||||
class AdvancedSettingsViewModel : GenericSettingsViewModel() {
|
class AdvancedSettingsViewModel : GenericSettingsViewModel() {
|
||||||
val debugModeListener = object : SettingListenerStub() {
|
val debugModeListener = object : SettingListenerStub() {
|
||||||
override fun onBoolValueChanged(newValue: Boolean) {
|
override fun onBoolValueChanged(newValue: Boolean) {
|
||||||
prefs.debugLogs = newValue
|
prefs.debugLogs = newValue
|
||||||
|
val appName = AppUtils.getString(R.string.app_name)
|
||||||
|
Factory.instance().setDebugMode(prefs.debugLogs, appName)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
val debugMode = MutableLiveData<Boolean>()
|
val debugMode = MutableLiveData<Boolean>()
|
||||||
|
|
Loading…
Reference in a new issue