chore(notifications): remove exact alarm handling from push permission success flow
Drop Android exact-alarm check and conditional success message text, and remove the permission-check warning for ungranted exact alarms.
This commit is contained in:
@@ -791,16 +791,6 @@ export default class PushNotificationPermission extends Vue {
|
||||
"Notification may not fire. Details:",
|
||||
finalPermissionCheck.details,
|
||||
);
|
||||
// On Android 12+, exact alarms might need to be enabled in system settings
|
||||
if (
|
||||
!finalPermissionCheck.details.exactAlarm &&
|
||||
Capacitor.getPlatform() === "android"
|
||||
) {
|
||||
logger.warn(
|
||||
"[PushNotificationPermission] Exact alarm permission not granted. " +
|
||||
"User may need to enable 'Exact alarms' in Android system settings.",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const success = await service.scheduleDailyNotification({
|
||||
@@ -857,22 +847,12 @@ export default class PushNotificationPermission extends Vue {
|
||||
settingsToSave,
|
||||
);
|
||||
|
||||
// Check if exact alarm permission is needed (Android 12+)
|
||||
const needsExactAlarmWarning =
|
||||
Capacitor.getPlatform() === "android" &&
|
||||
!finalPermissionCheck.details.exactAlarm;
|
||||
|
||||
// Show success message with optional warning
|
||||
const successMessage = needsExactAlarmWarning
|
||||
? `${NOTIFY_PUSH_SUCCESS.message} Note: If notifications don't appear, enable "Exact alarms" in Android Settings → Apps → TimeSafari → App settings.`
|
||||
: NOTIFY_PUSH_SUCCESS.message;
|
||||
|
||||
this.$notify(
|
||||
{
|
||||
group: "alert",
|
||||
type: "success",
|
||||
title: NOTIFY_PUSH_SUCCESS.title,
|
||||
text: successMessage,
|
||||
text: NOTIFY_PUSH_SUCCESS.message,
|
||||
},
|
||||
PUSH_NOTIFICATION_TIMEOUT_LONG,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user