From 5ca6876e92c78d144988d09c6edcdb5b554b17b9 Mon Sep 17 00:00:00 2001 From: Gaelle Braud Date: Tue, 22 Jul 2025 09:13:34 +0200 Subject: [PATCH] display year in meeting list if not this year --- Linphone/core/conference/ConferenceInfoList.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Linphone/core/conference/ConferenceInfoList.cpp b/Linphone/core/conference/ConferenceInfoList.cpp index e4c3cdf70..05f172848 100644 --- a/Linphone/core/conference/ConferenceInfoList.cpp +++ b/Linphone/core/conference/ConferenceInfoList.cpp @@ -236,7 +236,9 @@ QVariant ConferenceInfoList::data(const QModelIndex &index, int role) const { if (role == Qt::DisplayRole) { return QVariant::fromValue(new ConferenceInfoGui(mList[row].objectCast())); } else if (role == Qt::DisplayRole + 1) { - return Utils::toDateMonthString(mList[row].objectCast()->getDateTimeUtc()); + auto date = mList[row].objectCast()->getDateTimeUtc(); + if (date.date().year() != QDate::currentDate().year()) return Utils::toDateMonthAndYearString(date); + else return Utils::toDateMonthString(date); } } else { // Dummy date if (role == Qt::DisplayRole) {