[FIX] App can't reopening a room in some cases (#2429)

This commit is contained in:
Djorkaeff Alexandre 2020-08-25 14:44:16 -03:00 committed by GitHub
parent 67ecab7169
commit 77ecd12d71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -46,6 +46,7 @@ export default class RoomSubscription {
unsubscribe = async() => { unsubscribe = async() => {
console.log(`[RCRN] Unsubscribing from room ${ this.rid }`); console.log(`[RCRN] Unsubscribing from room ${ this.rid }`);
this.isAlive = false; this.isAlive = false;
reduxStore.dispatch(unsubscribeRoom(this.rid));
if (this.promises) { if (this.promises) {
try { try {
const subscriptions = await this.promises || []; const subscriptions = await this.promises || [];
@ -62,8 +63,6 @@ export default class RoomSubscription {
if (this.timer) { if (this.timer) {
clearTimeout(this.timer); clearTimeout(this.timer);
} }
reduxStore.dispatch(unsubscribeRoom(this.rid));
} }
removeListener = async(promise) => { removeListener = async(promise) => {