remove extras

This commit is contained in:
yggverse 2026-03-09 16:53:42 +02:00
parent 1706f14e96
commit d674edc7d0
3 changed files with 12 additions and 69 deletions

View file

@ -157,30 +157,9 @@ impl Content {
/// `text/markdown`
pub fn to_text_markdown(&self, base: &Uri, data: &str) -> Text {
self.clean();
match Text::markdown((&self.window_action, &self.item_action), base, data) {
Ok(text) => {
self.g_box.append(&text.scrolled_window);
text
}
Err((message, text)) => {
self.g_box.append(&{
let banner = adw::Banner::builder()
.title(message)
.revealed(true)
.button_label("Ok")
.build();
banner.connect_button_clicked(|this| this.set_revealed(false));
banner
});
match text {
Some(text) => {
self.g_box.append(&text.scrolled_window);
text
}
None => todo!(),
}
}
}
let m = Text::markdown((&self.window_action, &self.item_action), base, data);
self.g_box.append(&m.scrolled_window);
m
}
/// `text/plain`