mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-09-10 12:03:18 +02:00
misc: get donation date from settings manager
Change-Id: I4c39625b95efa1ad272ffa503e1f29228928adeb
This commit is contained in:
parent
7736b5c34c
commit
167550abc3
2 changed files with 4 additions and 2 deletions
|
@ -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"}});
|
||||
|
|
Loading…
Add table
Reference in a new issue