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
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389

View File

@ -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)
}