]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix plugin modal/notifier
authorChocobozzz <me@florianbigard.com>
Mon, 14 Jun 2021 11:44:17 +0000 (13:44 +0200)
committerChocobozzz <me@florianbigard.com>
Mon, 14 Jun 2021 11:44:17 +0000 (13:44 +0200)
client/src/app/core/plugins/plugin.service.ts

index bfd5ba4ccd6629f4c8462e9149a3d4bca84979a7..16108e17a866664926bc53c94fc535dc2df2584f 100644 (file)
@@ -190,9 +190,9 @@ export class PluginService implements ClientHook {
       },
 
       notifier: {
-        info: (text: string, title?: string, timeout?: number) => this.notifier.info(text, title, timeout),
-        error: (text: string, title?: string, timeout?: number) => this.notifier.error(text, title, timeout),
-        success: (text: string, title?: string, timeout?: number) => this.notifier.success(text, title, timeout)
+        info: (text: string, title?: string, timeout?: number) => this.zone.run(() => this.notifier.info(text, title, timeout)),
+        error: (text: string, title?: string, timeout?: number) => this.zone.run(() => this.notifier.error(text, title, timeout)),
+        success: (text: string, title?: string, timeout?: number) => this.zone.run(() => this.notifier.success(text, title, timeout))
       },
 
       showModal: (input: {
@@ -202,7 +202,7 @@ export class PluginService implements ClientHook {
         cancel?: { value: string, action?: () => void },
         confirm?: { value: string, action?: () => void }
       }) => {
-        this.customModal.show(input)
+        this.zone.run(() => this.customModal.show(input))
       },
 
       markdownRenderer: {