Disable notification badge preference if permission is missing
This commit is contained in:
parent
0e7be56c94
commit
8f8f345b21
@ -38,7 +38,8 @@ fun BadgeSettingsScreen() {
|
|||||||
SwitchPreference(
|
SwitchPreference(
|
||||||
title = stringResource(R.string.preference_notification_badges),
|
title = stringResource(R.string.preference_notification_badges),
|
||||||
summary = stringResource(R.string.preference_notification_badges_summary),
|
summary = stringResource(R.string.preference_notification_badges_summary),
|
||||||
value = notifications == true && hasNotificationsPermission == false,
|
enabled = hasNotificationsPermission != false,
|
||||||
|
value = notifications == true && hasNotificationsPermission == true,
|
||||||
onValueChanged = {
|
onValueChanged = {
|
||||||
viewModel.setNotifications(it)
|
viewModel.setNotifications(it)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user