mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-09-10 12:03:18 +02:00
donation: update end date for donation campaign
Change-Id: Ib694bfb4bc194e7d6b24bf23f52949715e2efa11
This commit is contained in:
parent
92522d5cce
commit
79b906f12f
3 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue