privacy: Show notification again so that users see the new setting

Tests:

- Without the patch, start the service and dismiss the privacy notification.
With the patch, the restart the service. Privacy app is updated and privacy
notification is shown again. Incrementing the version number of the privacy app
does not result in showing of the notification again.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
Sunil Mohan Adapa 2024-08-28 17:25:04 -07:00 committed by Veiko Aasa
parent d7e0752d12
commit 854f82a211
No known key found for this signature in database
GPG Key ID: 478539CAE680674E

View File

@ -20,7 +20,7 @@ class PrivacyApp(app_module.App):
app_id = 'privacy'
_version = 2
_version = 3
can_be_disabled = False
@ -58,6 +58,8 @@ class PrivacyApp(app_module.App):
privileged.setup()
if old_version == 0:
privileged.set_configuration(enable_popcon=True)
if old_version < 3:
_show_privacy_notification()
@ -82,4 +84,4 @@ def _show_privacy_notification():
Notification.update_or_create(id='privacy-review', app_id='privacy',
severity='info', title=title,
message=message, actions=actions_, data=data,
group='admin')
group='admin', dismissed=False)