Skip to content
Snippets Groups Projects
Commit 79b906f1 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

donation: update end date for donation campaign

Change-Id: Ib694bfb4bc194e7d6b24bf23f52949715e2efa11
parent 92522d5c
No related branches found
No related tags found
No related merge requests found
......@@ -75,7 +75,7 @@ extern const QString defaultDownloadPath;
#define KEYS COMMON_KEYS \
X(Donation2023VisibleDate, "2023-11-27 05:00") \
X(IsDonationVisible, true) \
X(Donation2023EndDate, "2024-01-31 00:00")
X(Donation2023EndDate2, "2024-04-01 00:00")
#endif
/*
......
......@@ -89,7 +89,7 @@ Item {
// The banner is visible if the current date is after the date set in the settings and before the end date
// And if the donation toggle is checked
const isVisible = UtilsAdapter.getAppValue(Settings.Key.IsDonationVisible);
const endDate = Date.parse(UtilsAdapter.getAppValue(Settings.Key.Donation2023EndDate));
const endDate = Date.parse(UtilsAdapter.getAppValue(Settings.Key.Donation2023EndDate2));
const startDate = Date.parse(UtilsAdapter.getAppValue(Settings.Key.Donation2023VisibleDate));
const now = new Date();
return isVisible && now < endDate && now >= startDate;
......
......@@ -98,7 +98,7 @@ UtilsAdapter::setAppValue(const Settings::Key key, const QVariant& value)
// Any donation campaign-related keys can trigger a donation campaign check
else if (key == Settings::Key::IsDonationVisible
|| key == Settings::Key::Donation2023VisibleDate
|| key == Settings::Key::Donation2023EndDate)
|| key == Settings::Key::Donation2023EndDate2)
Q_EMIT donationCampaignSettingsChanged();
#endif
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment