diff --git a/app/src/main/java/com/geeksville/mesh/ui/AdvancedSettingsFragment.kt b/app/src/main/java/com/geeksville/mesh/ui/AdvancedSettingsFragment.kt index 4c970bf9..75175a14 100644 --- a/app/src/main/java/com/geeksville/mesh/ui/AdvancedSettingsFragment.kt +++ b/app/src/main/java/com/geeksville/mesh/ui/AdvancedSettingsFragment.kt @@ -14,6 +14,7 @@ import com.geeksville.mesh.databinding.AdvancedSettingsBinding import com.geeksville.mesh.model.ChannelOption import com.geeksville.mesh.model.UIViewModel import com.geeksville.mesh.service.MeshService +import com.geeksville.util.exceptionToSnackbar import com.google.android.material.snackbar.Snackbar class AdvancedSettingsFragment : ScreenFragment("Advanced Settings"), Logging { @@ -54,7 +55,9 @@ class AdvancedSettingsFragment : ScreenFragment("Advanced Settings"), Logging { ?: ChannelOption.defaultMinBroadcastPeriod if (n != null && n < MAX_INT_DEVICE && (n == 0 || n >= minBroadcastPeriodSecs)) { - model.positionBroadcastSecs = n + exceptionToSnackbar(requireView()) { + model.positionBroadcastSecs = n + } } else { // restore the value in the edit field textEdit.setText(model.positionBroadcastSecs.toString()) @@ -73,7 +76,9 @@ class AdvancedSettingsFragment : ScreenFragment("Advanced Settings"), Logging { val str = binding.lsSleepEditText.text.toString() val n = str.toIntOrNull() if (n != null && n < MAX_INT_DEVICE && n >= 0) { - model.lsSleepSecs = n + exceptionToSnackbar(requireView()) { + model.lsSleepSecs = n + } } else { Snackbar.make(requireView(), "Bad value: $str", Snackbar.LENGTH_LONG).show() } diff --git a/geeksville-androidlib b/geeksville-androidlib index ee661183..fb14fb65 160000 --- a/geeksville-androidlib +++ b/geeksville-androidlib @@ -1 +1 @@ -Subproject commit ee6611838637d096b39e11365930eb90a5f0fd2e +Subproject commit fb14fb659d0b235d325a0d9195cb5f47424dff51