Removed push notification setting in Network, use only the one in Account
This commit is contained in:
parent
1a998f4bde
commit
7791050039
2 changed files with 0 additions and 17 deletions
|
@ -38,14 +38,6 @@ class NetworkSettingsViewModel : GenericSettingsViewModel() {
|
|||
}
|
||||
val allowIpv6 = MutableLiveData<Boolean>()
|
||||
|
||||
val pushNotificationsListener = object : SettingListenerStub() {
|
||||
override fun onBoolValueChanged(newValue: Boolean) {
|
||||
core.isPushNotificationEnabled = newValue
|
||||
}
|
||||
}
|
||||
val pushNotifications = MutableLiveData<Boolean>()
|
||||
val pushNotificationsAvailable = MutableLiveData<Boolean>()
|
||||
|
||||
val randomPortsListener = object : SettingListenerStub() {
|
||||
override fun onBoolValueChanged(newValue: Boolean) {
|
||||
val port = if (newValue) -1 else 5060
|
||||
|
@ -69,8 +61,6 @@ class NetworkSettingsViewModel : GenericSettingsViewModel() {
|
|||
init {
|
||||
wifiOnly.value = core.wifiOnlyEnabled()
|
||||
allowIpv6.value = core.ipv6Enabled()
|
||||
pushNotifications.value = core.isPushNotificationEnabled
|
||||
pushNotificationsAvailable.value = core.isPushNotificationAvailable
|
||||
randomPorts.value = getTransportPort() == -1
|
||||
sipPort.value = getTransportPort()
|
||||
}
|
||||
|
|
|
@ -81,13 +81,6 @@
|
|||
linphone:listener="@{viewModel.allowIpv6Listener}"
|
||||
linphone:checked="@={viewModel.allowIpv6}"/>
|
||||
|
||||
<include
|
||||
layout="@layout/settings_widget_switch"
|
||||
linphone:title="@{@string/network_settings_push_notifications_title}"
|
||||
linphone:listener="@{viewModel.pushNotificationsListener}"
|
||||
linphone:checked="@={viewModel.pushNotifications}"
|
||||
linphone:enabled="@{viewModel.pushNotificationsAvailable}"/>
|
||||
|
||||
<include
|
||||
layout="@layout/settings_widget_switch"
|
||||
linphone:title="@{@string/network_settings_random_ports_title}"
|
||||
|
|
Loading…
Reference in a new issue