Updater: Add text for past time
@@ -68,6 +68,8 @@ INT_PTR CALLBACK OptionsDlgProc(
timeString = PhaFormatDateTime(&timeFields);
time.QuadPart = time.QuadPart - currentTime.QuadPart;
+ if (time.QuadPart > 0)
+ {
timeRelativeString = PH_AUTO(PhFormatTimeSpanRelative(time.QuadPart));
PhSetDialogItemText(hwndDlg, IDC_TEXT2, PhaFormatString(
L"Next update check: %s (%s)",
@@ -75,6 +77,14 @@ INT_PTR CALLBACK OptionsDlgProc(
PhGetStringOrEmpty(timeRelativeString)
)->Buffer);
}
+ else
+ {
+ PhSetDialogItemText(hwndDlg, IDC_TEXT2, PhaFormatString(
+ L"Next update check: %s",
+ PhGetStringOrEmpty(timeString)
+ )->Buffer);
+ }
+ }
PhDereferenceObject(lastUpdateTimeString);
}
