Disable notification badge preference if permission is missing

This commit is contained in:
MM20
2022-01-30 14:24:43 +01:00
parent 0e7be56c94
commit 8f8f345b21
@@ -38,7 +38,8 @@ fun BadgeSettingsScreen() {
SwitchPreference(
title = stringResource(R.string.preference_notification_badges),
summary = stringResource(R.string.preference_notification_badges_summary),
value = notifications == true && hasNotificationsPermission == false,
enabled = hasNotificationsPermission != false,
value = notifications == true && hasNotificationsPermission == true,
onValueChanged = {
viewModel.setNotifications(it)
}