Selaa lähdekoodia

Emit new event `roomsPanelRendered`

JC Brand 8 vuotta sitten
vanhempi
commit
47ca3e64b2
2 muutettua tiedostoa jossa 10 lisäystä ja 0 poistoa
  1. 9 0
      docs/source/events.rst
  2. 1 0
      src/converse-muc.js

+ 9 - 0
docs/source/events.rst

@@ -212,6 +212,15 @@ After the user has sent out a direct invitation, to a roster contact, asking the
 
 ``_converse.on('roomInvite', function (data) { ... });``
 
+roomsPanelRendered
+~~~~~~~~~~~~~~~~~~
+
+Emitted once the "Rooms" panel in the control box has been rendered.
+Used by `converse-bookmarks` and `converse-roomslist` to know when they can
+render themselves in that panel.
+
+``_converse.on('roomsPanelRendered', function (data) { ... });``
+
 roster
 ~~~~~~
 

+ 1 - 0
src/converse-muc.js

@@ -161,6 +161,7 @@
                                 nick: Strophe.getNodeFromJid(_converse.bare_jid)
                             });
                         }
+                        _converse.emit('roomsPanelRendered');
                     }
                 },