Updates #2087. Only initialize minimized chats once

(i.e. not on reconnection)
This commit is contained in:
JC Brand 2020-07-09 22:11:04 +02:00
parent 99195ffd07
commit 8de55ce684

View File

@ -538,7 +538,7 @@ converse.plugins.add('converse-minimize', {
/************************ BEGIN Event Handlers ************************/ /************************ BEGIN Event Handlers ************************/
api.listen.on('chatBoxInsertedIntoDOM', view => _converse.chatboxviews.trimChats(view)); api.listen.on('chatBoxInsertedIntoDOM', view => _converse.chatboxviews.trimChats(view));
api.listen.on('statusInitialized', () => initMinimizedChats()); api.listen.on('connected', () => initMinimizedChats());
api.listen.on('controlBoxOpened', view => _converse.chatboxviews.trimChats(view)); api.listen.on('controlBoxOpened', view => _converse.chatboxviews.trimChats(view));
api.listen.on('chatBoxViewInitialized', v => v.listenTo(v.model, 'change:minimized', v.onMinimizedChanged)); api.listen.on('chatBoxViewInitialized', v => v.listenTo(v.model, 'change:minimized', v.onMinimizedChanged));