[geary/mjog/1170-webview-remote-resource-loading: 1/3] client: Fix remote images not being loaded for remembered senders/email




commit c5b9d87c67ebe133cfe6fa975f25c9b0eae24566
Author: Michael Gratton <mike vee net>
Date:   Sun Apr 4 20:51:25 2021 +1000

    client: Fix remote images not being loaded for remembered senders/email
    
    Since commit 6a0ad721 landed the client can no longer reply on
    pre-filling page state, hence it's not possible to can't load a page
    pre-authorised to be able to load remote resources.
    
    Instead, simply wait for the first notice of a resource being blocked,
    then notify the web process to start loading them.
    
    Fixes #1170

 src/client/components/components-web-view.vala | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/client/components/components-web-view.vala b/src/client/components/components-web-view.vala
index ff6b379f6..13687e06e 100644
--- a/src/client/components/components-web-view.vala
+++ b/src/client/components/components-web-view.vala
@@ -805,7 +805,11 @@ public abstract class Components.WebView : WebKit.WebView, Geary.BaseInterface {
     }
 
     private void on_remote_resource_load_blocked(GLib.Variant? parameters) {
-        remote_resource_load_blocked();
+        if (this.enable_loading_remote_resources) {
+            load_remote_resources();
+        } else {
+            remote_resource_load_blocked();
+        }
     }
 
     private void on_content_loaded(GLib.Variant? parameters) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]