Display the publish date for posts, comments and replies
This commit is contained in:
parent
e289867cb8
commit
dbe9b6e74d
|
@ -10,6 +10,7 @@ use crate::dialogs::editor::EditorDialog;
|
|||
use crate::dialogs::editor::EditorOutput;
|
||||
use crate::dialogs::editor::EditorType;
|
||||
use crate::settings;
|
||||
use crate::util;
|
||||
use crate::util::get_web_image_url;
|
||||
use crate::util::markdown_to_pango_markup;
|
||||
|
||||
|
@ -70,6 +71,11 @@ impl FactoryComponent for CommentRow {
|
|||
set_label: &self.comment.creator.name,
|
||||
connect_clicked => CommentRowMsg::OpenPerson,
|
||||
},
|
||||
|
||||
gtk::Label {
|
||||
set_margin_start: 10,
|
||||
set_label: &util::format_elapsed_time(self.comment.comment.published),
|
||||
}
|
||||
},
|
||||
|
||||
gtk::Label {
|
||||
|
|
|
@ -3,6 +3,7 @@ use lemmy_api_common::lemmy_db_views_actor::structs::CommentReplyView;
|
|||
use relm4::prelude::*;
|
||||
use relm4_components::web_image::WebImage;
|
||||
|
||||
use crate::util;
|
||||
use crate::util::get_web_image_url;
|
||||
use crate::util::markdown_to_pango_markup;
|
||||
|
||||
|
@ -97,6 +98,11 @@ impl FactoryComponent for MentionRow {
|
|||
set_label: &self.comment.creator.name,
|
||||
connect_clicked => MentionRowMsg::OpenPerson,
|
||||
},
|
||||
|
||||
gtk::Label {
|
||||
set_margin_start: 10,
|
||||
set_label: &util::format_elapsed_time(self.comment.comment.published),
|
||||
}
|
||||
},
|
||||
|
||||
gtk::Label {
|
||||
|
|
|
@ -10,7 +10,7 @@ use crate::{
|
|||
api,
|
||||
dialogs::editor::{DialogMsg, EditorData, EditorDialog, EditorOutput, EditorType},
|
||||
settings,
|
||||
util::{get_web_image_msg, get_web_image_url, markdown_to_pango_markup},
|
||||
util::{self, get_web_image_msg, get_web_image_url, markdown_to_pango_markup},
|
||||
};
|
||||
|
||||
use super::{
|
||||
|
@ -125,6 +125,11 @@ impl SimpleComponent for PostPage {
|
|||
connect_clicked => PostInput::OpenCommunity,
|
||||
},
|
||||
|
||||
gtk::Label {
|
||||
set_margin_start: 10,
|
||||
set_label: &util::format_elapsed_time(model.info.post_view.post.published),
|
||||
},
|
||||
|
||||
gtk::Box {
|
||||
set_hexpand: true,
|
||||
},
|
||||
|
|
|
@ -3,8 +3,8 @@ use lemmy_api_common::lemmy_db_views::structs::PostView;
|
|||
use relm4::prelude::*;
|
||||
use relm4_components::web_image::WebImage;
|
||||
|
||||
use crate::settings;
|
||||
use crate::{api, util::get_web_image_url};
|
||||
use crate::{settings, util};
|
||||
|
||||
use super::voting_row::{VotingRowModel, VotingStats};
|
||||
|
||||
|
@ -79,8 +79,9 @@ impl FactoryComponent for PostRow {
|
|||
connect_clicked => PostRowMsg::OpenPerson,
|
||||
},
|
||||
|
||||
gtk::Box {
|
||||
set_hexpand: true,
|
||||
gtk::Label {
|
||||
set_margin_start: 10,
|
||||
set_label: &util::format_elapsed_time(self.post.post.published),
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue