Improved code readablity
This commit is contained in:
parent
58418bcf46
commit
0f4b6d7d9f
1 changed files with 4 additions and 0 deletions
|
@ -47,6 +47,7 @@ class NotificationsSettingsFragment : BasePreferenceFragment(), OnSharedPreferen
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
|
|
||||||
val enabled = NotificationHelper.areNotificationsEnabledOnDevice(requireContext())
|
val enabled = NotificationHelper.areNotificationsEnabledOnDevice(requireContext())
|
||||||
preferenceScreen.isEnabled = enabled
|
preferenceScreen.isEnabled = enabled
|
||||||
if (!enabled) {
|
if (!enabled) {
|
||||||
|
@ -73,6 +74,8 @@ class NotificationsSettingsFragment : BasePreferenceFragment(), OnSharedPreferen
|
||||||
notificationWarningSnackbar?.dismiss()
|
notificationWarningSnackbar?.dismiss()
|
||||||
notificationWarningSnackbar = null
|
notificationWarningSnackbar = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// (Re-)Create loader
|
||||||
loader?.dispose()
|
loader?.dispose()
|
||||||
loader = SubscriptionManager(requireContext())
|
loader = SubscriptionManager(requireContext())
|
||||||
.subscriptions()
|
.subscriptions()
|
||||||
|
@ -83,6 +86,7 @@ class NotificationsSettingsFragment : BasePreferenceFragment(), OnSharedPreferen
|
||||||
override fun onPause() {
|
override fun onPause() {
|
||||||
loader?.dispose()
|
loader?.dispose()
|
||||||
loader = null
|
loader = null
|
||||||
|
|
||||||
super.onPause()
|
super.onPause()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue