remove unused function & duplicate comment
This commit is contained in:
@@ -62,10 +62,6 @@ export class NativeNotificationService implements NotificationServiceInterface {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Request notification permissions from the OS
|
|
||||||
* Shows native permission dialog on first call
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* Request notification permissions from the OS
|
* Request notification permissions from the OS
|
||||||
* Shows native permission dialog on first call
|
* Shows native permission dialog on first call
|
||||||
|
|||||||
@@ -1402,54 +1402,6 @@ export default class AccountViewView extends Vue {
|
|||||||
}, 150);
|
}, 150);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Toggle dev-only 10-minute rollover for daily reminder. Saves the setting and,
|
|
||||||
* if reminder is already on, reschedules so the plugin uses the new interval.
|
|
||||||
*/
|
|
||||||
async toggleReminderFastRollover(): Promise<void> {
|
|
||||||
const next = !this.reminderFastRolloverForTesting;
|
|
||||||
await this.$saveSettings({
|
|
||||||
reminderFastRolloverForTesting: next,
|
|
||||||
});
|
|
||||||
this.reminderFastRolloverForTesting = next;
|
|
||||||
|
|
||||||
if (this.notifyingReminder) {
|
|
||||||
try {
|
|
||||||
const service = NotificationService.getInstance();
|
|
||||||
if (Capacitor.getPlatform() !== "android") {
|
|
||||||
await service.cancelDailyNotification();
|
|
||||||
}
|
|
||||||
const time24h = this.parseTimeTo24Hour(this.notifyingReminderTime);
|
|
||||||
const title = "Daily Reminder";
|
|
||||||
const body =
|
|
||||||
this.notifyingReminderMessage ||
|
|
||||||
"Click to share some gratitude with the world -- even if they're unnamed.";
|
|
||||||
await service.scheduleDailyNotification({
|
|
||||||
time: time24h,
|
|
||||||
title,
|
|
||||||
body,
|
|
||||||
priority: "normal",
|
|
||||||
...(next ? { rolloverIntervalMinutes: 10 } : {}),
|
|
||||||
});
|
|
||||||
this.notify.success(
|
|
||||||
next
|
|
||||||
? "Reminder will repeat every 10 minutes (testing)."
|
|
||||||
: "Reminder will repeat daily (24h).",
|
|
||||||
TIMEOUTS.STANDARD,
|
|
||||||
);
|
|
||||||
} catch (err) {
|
|
||||||
logger.error(
|
|
||||||
"[AccountViewView] Reschedule after fast-rollover toggle failed:",
|
|
||||||
err,
|
|
||||||
);
|
|
||||||
this.notify.error(
|
|
||||||
"Failed to update reminder interval. Please try again.",
|
|
||||||
TIMEOUTS.STANDARD,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse time string (e.g., "5:22 PM") to 24-hour format (e.g., "17:22")
|
* Parse time string (e.g., "5:22 PM") to 24-hour format (e.g., "17:22")
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user