-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate crash on updatePrefReminderTime #1052
Comments
In my original PR for Rewrite notifScheduler, I changed the updatePrefReminderTime function here: https://github.com/e-mission/e-mission-phone/pull/1092/files#diff-2aa4eaf8de8847ccdbee42704ea12b0b1dbda29ac50285ae7718b49d2610402a async function updatePrefReminderTime(storeNewVal = true, newTime) {
async function updatePrefReminderTime(storeNewVal = true, newTime) {
console.log(newTime);
console.log(newTime);
if (storeNewVal) {
if (storeNewVal) {
- const m = moment(newTime);
+ const m = DateTime.fromISO(newTime);
// store in HH:mm
// store in HH:mm
NotificationScheduler.setReminderPrefs({ reminder_time_of_day: m.format('HH:mm') }).then(
setReminderPrefs(
() => {
{ reminder_time_of_day: m.toFormat('HH:mm') },
refreshNotificationSettings();
uiConfig.reminderSchemes,
},
isScheduling,
);
setIsScheduling,
scheduledPromise,
).then(() => {
refreshNotificationSettings();
});
}
}
} I used the function This missed automated unit testing because it is in a separate file, since I wasn't rewriting all of As for why I missed functionality testing, I don't recall seeing the "change pref reminder time" button that you were using @JGreenlee |
@sebastianbarry "denver-casr" has |
This makes sense. For now, maybe you could add more tests for the Like for example, a test to verify that the popup I added (in |
@JGreenlee found a critical error in e-mission/e-mission-phone#1130, where anytime a user would update their reminder time preference for their profile from the Profile tab, the app would crash.
Investigation:
The text was updated successfully, but these errors were encountered: