mirror of
https://github.com/TeamNewPipe/NewPipe.git
synced 2024-11-25 20:42:34 +01:00
Improved code readablity
This commit is contained in:
parent
58418bcf46
commit
0f4b6d7d9f
@ -47,6 +47,7 @@ class NotificationsSettingsFragment : BasePreferenceFragment(), OnSharedPreferen
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
|
||||
val enabled = NotificationHelper.areNotificationsEnabledOnDevice(requireContext())
|
||||
preferenceScreen.isEnabled = enabled
|
||||
if (!enabled) {
|
||||
@ -73,6 +74,8 @@ class NotificationsSettingsFragment : BasePreferenceFragment(), OnSharedPreferen
|
||||
notificationWarningSnackbar?.dismiss()
|
||||
notificationWarningSnackbar = null
|
||||
}
|
||||
|
||||
// (Re-)Create loader
|
||||
loader?.dispose()
|
||||
loader = SubscriptionManager(requireContext())
|
||||
.subscriptions()
|
||||
@ -83,6 +86,7 @@ class NotificationsSettingsFragment : BasePreferenceFragment(), OnSharedPreferen
|
||||
override fun onPause() {
|
||||
loader?.dispose()
|
||||
loader = null
|
||||
|
||||
super.onPause()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user