diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2021-12-18 12:53:05 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2021-12-18 17:31:04 +0100 |
commit | 0682a97f9c0f5961dd1a22ba2ff8e545cef76400 (patch) | |
tree | 12f4f93d9dcda6547708c98f9ec359f7ccc5fcc7 /gui/src/timeline_post.rs | |
parent | d8f49b7cddf3c5b869cc107b00d1bf249aefeff3 (diff) |
Implement Timeline
for that, we remove the distrox_lib::config::Config type which was
unused anyways, because it makes the whole implementation a bit less
complex.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'gui/src/timeline_post.rs')
-rw-r--r-- | gui/src/timeline_post.rs | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/gui/src/timeline_post.rs b/gui/src/timeline_post.rs deleted file mode 100644 index 8b53898..0000000 --- a/gui/src/timeline_post.rs +++ /dev/null @@ -1,29 +0,0 @@ -#[derive(Debug)] -pub struct TimelinePost { - mime: mime::Mime, - content: PostContent, -} - -#[derive(Debug)] -pub enum PostContent { - Text(String) -} - -impl TimelinePost { - pub fn update(&mut self) { - () - } - - pub fn view(&self) -> iced::Row<crate::app::Message> { - iced::Row::new() - .push({ - iced::Text::new(self.mime.as_ref().to_string()) - }) - .push({ - match self.content { - PostContent::Text(ref txt) => iced::Text::new(txt.clone()), - } - }) - .into() - } -} |