Moved implicit channel and user context clears to the populate packet handlers.
This commit is contained in:
parent
bc859a042d
commit
f50785a209
1 changed files with 2 additions and 4 deletions
|
@ -102,10 +102,6 @@ Umi.Protocol.SockChat.Protocol = function() {
|
|||
|
||||
isRestarting = false;
|
||||
|
||||
// see if these are neccesary
|
||||
eventTarget.dispatch('user:clear');
|
||||
eventTarget.dispatch('chan:clear');
|
||||
|
||||
eventTarget.dispatch('conn:ready', { wasConnected: wasConnected });
|
||||
};
|
||||
|
||||
|
@ -417,6 +413,7 @@ Umi.Protocol.SockChat.Protocol = function() {
|
|||
// existing users
|
||||
handlers['7']['0'] = (count, ...args) => {
|
||||
count = parseInt(count);
|
||||
eventTarget.dispatch('user:clear');
|
||||
|
||||
for(let i = 0; i < count; ++i) {
|
||||
const offset = 5 * i;
|
||||
|
@ -477,6 +474,7 @@ Umi.Protocol.SockChat.Protocol = function() {
|
|||
// existing channels
|
||||
handlers['7']['2'] = (count, ...args) => {
|
||||
count = parseInt(count);
|
||||
eventTarget.dispatch('chan:clear');
|
||||
|
||||
for(let i = 0; i < count; ++i) {
|
||||
const offset = 3 * i;
|
||||
|
|
Loading…
Reference in a new issue