We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c73fa32 commit dc462ebCopy full SHA for dc462eb
1 file changed
src/init.ts
@@ -12,3 +12,10 @@ registerViewerAction()
12
window.OCA = window.OCA ?? {}
13
window.OCA.Viewer = new ViewerService()
14
window.OCA.Viewer.version = appVersion
15
+
16
+// Eagerly register any handlers queued before the viewer was initialized.
17
+// This must happen synchronously so that OCA.Viewer.mimetypes is complete
18
+// before the file action's enabled() callback is evaluated by the files app.
19
+if (window._oca_viewer_handlers) {
20
+ window._oca_viewer_handlers.forEach(handler => window.OCA.Viewer.registerHandler(handler))
21
+}
0 commit comments