Commit 55a6d79f authored by Michael Gratton's avatar Michael Gratton 🤞 Committed by Michael Gratton

Fix conversation message placholders being duplicated/not hidden

parent 2e377791
Pipeline #57072 passed with stages
in 12 minutes and 49 seconds
......@@ -523,10 +523,7 @@ public class ConversationMessage : Gtk.Grid, Geary.BaseInterface {
//pane.subtitle = _(
// "This email cannot currently be displayed"
//);
this.body_placeholder = pane;
this.web_view.hide();
this.body_container.add(pane);
show_message_body(true);
show_placeholder_pane(pane);
start_progress_pulse();
}
......@@ -549,10 +546,7 @@ public class ConversationMessage : Gtk.Grid, Geary.BaseInterface {
//pane.subtitle = _(
// "This email cannot currently be displayed"
//);
this.body_placeholder = pane;
this.web_view.hide();
this.body_container.add(pane);
show_message_body(true);
show_placeholder_pane(pane);
stop_progress_pulse();
}
......@@ -576,10 +570,7 @@ public class ConversationMessage : Gtk.Grid, Geary.BaseInterface {
// pane.subtitle = _(
// "This email will be downloaded when reconnected to the Internet"
// );
this.body_placeholder = pane;
this.web_view.hide();
this.body_container.add(pane);
show_message_body(true);
show_placeholder_pane(pane);
stop_progress_pulse();
}
......@@ -654,10 +645,7 @@ public class ConversationMessage : Gtk.Grid, Geary.BaseInterface {
throw new GLib.IOError.CANCELLED("Conversation load cancelled");
}
this.web_view.show();
if (this.body_placeholder != null) {
this.body_placeholder.hide();
}
show_placeholder_pane(null);
string? body_text = null;
try {
......@@ -900,6 +888,23 @@ public class ConversationMessage : Gtk.Grid, Geary.BaseInterface {
}
}
private void show_placeholder_pane(Gtk.Widget? placeholder) {
if (this.body_placeholder != null) {
this.body_placeholder.hide();
this.body_container.remove(this.body_placeholder);
this.body_placeholder = null;
}
if (placeholder != null) {
this.body_placeholder = placeholder;
this.web_view.hide();
this.body_container.add(placeholder);
show_message_body(true);
} else {
this.web_view.show();
}
}
private inline void set_revealer(Gtk.Revealer revealer,
bool expand,
bool use_transition) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment