client: Remove map handler on first map

40a2c1aec4 introduced a regression on composer detach.

On detach, widget is mapped again and composer content is cleared. Be sure
to remove handler on first map.
This commit is contained in:
Cédric Bellegarde 2024-02-17 16:48:38 +01:00 committed by Niels De Graef
parent dac117c6e2
commit 22d60d777b

View file

@ -404,8 +404,12 @@ public abstract class Components.WebView : WebKit.WebView, Geary.BaseInterface {
if (this.get_mapped()) {
base.load_html(body, base_uri ?? INTERNAL_URL_BODY);
} else {
this.map.connect(() => {
ulong handler_id = 0;
handler_id = this.map.connect(() => {
base.load_html(body, base_uri ?? INTERNAL_URL_BODY);
if (handler_id > 0) {
this.disconnect(handler_id);
}
});
}
}