summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-03-18 22:05:47 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-03-18 22:05:47 +0300
commit6e04912b716a5fd8d17575cd098a4f1117442ca0 (patch)
tree9cf5a608510467d04eb084e2ff5abd6a65efc9b9
parentb12bb72bef4df73ea9fac2b77e11a8c69cab9837 (diff)
fixes #2780 (Notes and Reminders: неправильно работает продление сработавшего напоминания)
-rw-r--r--plugins/NotesAndReminders/src/reminders.cpp57
1 files changed, 28 insertions, 29 deletions
diff --git a/plugins/NotesAndReminders/src/reminders.cpp b/plugins/NotesAndReminders/src/reminders.cpp
index 5ccefc77b3..a139f25aa0 100644
--- a/plugins/NotesAndReminders/src/reminders.cpp
+++ b/plugins/NotesAndReminders/src/reminders.cpp
@@ -1068,14 +1068,9 @@ public:
PopulateTimeOffsetCombo();
- cmbRemindAgainIn.Show();
- dateAgain.Hide();
- cmbTimeAgain.Hide();
- ShowWindow(GetDlgItem(m_hwnd, IDC_STATIC_DATE), SW_HIDE);
- ShowWindow(GetDlgItem(m_hwnd, IDC_STATIC_TIME), SW_HIDE);
+ cmbRemindAgainIn.SetCurSel(0);
chkAfter.SetState(true);
chkOnDate.SetState(false);
- cmbRemindAgainIn.SetCurSel(0);
if (m_pReminder->bRepeat) {
chkOnDate.Hide();
@@ -1124,6 +1119,9 @@ public:
void onChange_OnDate(CCtrlCheck*)
{
+ if (!m_bInitialized)
+ return;
+
dateAgain.Show();
cmbTimeAgain.Show();
ShowWindow(GetDlgItem(m_hwnd, IDC_STATIC_DATE), SW_SHOW);
@@ -1808,31 +1806,32 @@ bool CheckRemindersAndStart(void)
if (!bHasQueuedReminders && pReminder->When > curT)
break;
- if (!pReminder->bVisible) {
- if (pReminder->bSystemEventQueued) {
- UpdateReminderEvent(pReminder, REMINDER_UPDATE_INTERVAL_SHORT / 1000, &bHasPlayedSound);
+ if (pReminder->bVisible)
+ continue;
- QueuedReminderCount++;
- bResult = true;
- }
- else if (pReminder->When <= curT) {
- if (!g_RemindSMS) {
- FireReminder(pReminder, &bHasPlayedSound);
+ if (pReminder->bSystemEventQueued) {
+ UpdateReminderEvent(pReminder, REMINDER_UPDATE_INTERVAL_SHORT / 1000, &bHasPlayedSound);
- if (pReminder->bSystemEventQueued)
- bResult = true;
- }
- else {
- char *p = strchr(g_RemindSMS, '@');
- if (p) {
- Send(g_RemindSMS, p + 1, _T2A(pReminder->wszText), NULL);
- *p = '@';
-
- DeleteReminder(pReminder);
- JustSaveReminders();
- if (pListDialog)
- pListDialog->Reload();
- }
+ QueuedReminderCount++;
+ bResult = true;
+ }
+ else if (pReminder->When <= curT) {
+ if (!mir_strlen(g_RemindSMS)) {
+ FireReminder(pReminder, &bHasPlayedSound);
+
+ if (pReminder->bSystemEventQueued)
+ bResult = true;
+ }
+ else {
+ char *p = strchr(g_RemindSMS, '@');
+ if (p) {
+ Send(g_RemindSMS, p + 1, _T2A(pReminder->wszText), NULL);
+ *p = '@';
+
+ DeleteReminder(pReminder);
+ JustSaveReminders();
+ if (pListDialog)
+ pListDialog->Reload();
}
}
}