Skip to content
Snippets Groups Projects
Commit 167550ab authored by Kateryna Kostiuk's avatar Kateryna Kostiuk Committed by Sébastien Blin
Browse files

misc: get donation date from settings manager

Change-Id: I4c39625b95efa1ad272ffa503e1f29228928adeb
parent 7736b5c3
Branches
Tags
No related merge requests found
......@@ -84,7 +84,7 @@ SettingsPageBase {
ToggleSwitch {
id: enableDonation
width: parent.width
visible: new Date() >= new Date(Date.parse("2023-11-01"))
visible: new Date() >= new Date(Date.parse(UtilsAdapter.getAppValue(Settings.Key.Donation2023VisibleDate)));
checked: UtilsAdapter.getAppValue(Settings.Key.IsDonationVisible)
labelText: JamiStrings.enableDonation
......
......@@ -76,7 +76,9 @@ TipsModel::reset()
tips_.clear();
QDate date = QDate::currentDate();
if (date >= QDate::fromString("2023-11-27", "yyyy-MM-dd")) {
QDate donationStartDate = QDate::fromString(
settingsManager_->getValue("Donation2023VisibleDate").toString());
if (date >= donationStartDate) {
tips_.append({{"id", "14"}, {"title", tr("Donate")}, {"desc", ""}, {"type", "donation"}});
}
tips_.append({{"id", "0"}, {"title", tr("Customize")}, {"desc", ""}, {"type", "customize"}});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment