Minor perf improvement when conversation load was cancelled.
Lazily initialise the ConversationMessage's web onlt after checking to see if the conversation load as been cancelled or not.
This commit is contained in:
parent
ec155ed707
commit
1a391758fa
1 changed files with 4 additions and 3 deletions
|
|
@ -819,13 +819,14 @@ public class ConversationMessage : Gtk.Grid, Geary.BaseInterface {
|
|||
public async void load_message_body(Geary.RFC822.Message message,
|
||||
GLib.Cancellable load_cancelled)
|
||||
throws GLib.Error {
|
||||
if (this.web_view == null)
|
||||
initialize_web_view();
|
||||
|
||||
if (load_cancelled.is_cancelled()) {
|
||||
throw new GLib.IOError.CANCELLED("Conversation load cancelled");
|
||||
}
|
||||
|
||||
if (this.web_view == null) {
|
||||
initialize_web_view();
|
||||
}
|
||||
|
||||
bool contact_load_images = (
|
||||
this.primary_contact != null &&
|
||||
this.primary_contact.load_remote_resources
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue