mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 03:18:07 +00:00
display year in meeting list if not this year
This commit is contained in:
parent
7490cf0ca5
commit
5ca6876e92
1 changed files with 3 additions and 1 deletions
|
|
@ -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<ConferenceInfoCore>()));
|
||||
} else if (role == Qt::DisplayRole + 1) {
|
||||
return Utils::toDateMonthString(mList[row].objectCast<ConferenceInfoCore>()->getDateTimeUtc());
|
||||
auto date = mList[row].objectCast<ConferenceInfoCore>()->getDateTimeUtc();
|
||||
if (date.date().year() != QDate::currentDate().year()) return Utils::toDateMonthAndYearString(date);
|
||||
else return Utils::toDateMonthString(date);
|
||||
}
|
||||
} else { // Dummy date
|
||||
if (role == Qt::DisplayRole) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue