From a8527be4a66845c2b4de30f0a9f68cec1a7d71b0 Mon Sep 17 00:00:00 2001 From: Jared Kipe Date: Wed, 8 Mar 2023 22:27:20 +0000 Subject: [PATCH] [FIX] hibou_professional: re-attempt render --- hibou_professional/static/src/js/core.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hibou_professional/static/src/js/core.js b/hibou_professional/static/src/js/core.js index 357e9def..3eac5fa6 100644 --- a/hibou_professional/static/src/js/core.js +++ b/hibou_professional/static/src/js/core.js @@ -21,7 +21,6 @@ var HibouProfessionalSystrayWidget = Widget.extend({ self.is_admin = false; self.allow_admin_message = false; self.allow_message = false; - self._has_rendered = false; this._rpc({ model: 'publisher_warranty.contract', method: 'hibou_professional_status', @@ -264,8 +263,14 @@ var HibouProfessionalSystrayWidget = Widget.extend({ this.is_admin = status.is_admin; this.allow_admin_message = status.allow_admin_message; this.allow_message = status.allow_message; + this.tryRenderElement(); + }, + + tryRenderElement: function() { if (this._has_rendered) { - this.renderElement(); + setTimeout(this.renderElement.bind(this), 10); + } else { + setTimeout(this.tryRenderElement.bind(this), 100); } },