mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 22:48:11 +00:00
Mail: Fetch and display date in e-mail list
Added a third column to show date of e-mail, as sent from the IMAP server.
This commit is contained in:
parent
f74380eecf
commit
fc54bd03f9
3 changed files with 33 additions and 3 deletions
|
@ -24,6 +24,8 @@ ErrorOr<String> InboxModel::column_name(int column_index) const
|
|||
return "From"_string;
|
||||
case Subject:
|
||||
return "Subject"_string;
|
||||
case Date:
|
||||
return "Date"_string;
|
||||
default:
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
@ -37,6 +39,12 @@ GUI::Variant InboxModel::data(GUI::ModelIndex const& index, GUI::ModelRole role)
|
|||
return value.from;
|
||||
if (index.column() == Column::Subject)
|
||||
return value.subject;
|
||||
if (index.column() == Column::Date)
|
||||
return value.date;
|
||||
}
|
||||
if (role == GUI::ModelRole::TextAlignment) {
|
||||
if (index.column() == Column::Date)
|
||||
return Gfx::TextAlignment::CenterRight;
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue