diff --git a/src/lib/appManagers/appDialogsManager.ts b/src/lib/appManagers/appDialogsManager.ts index c3101af4..d9b93088 100644 --- a/src/lib/appManagers/appDialogsManager.ts +++ b/src/lib/appManagers/appDialogsManager.ts @@ -312,7 +312,11 @@ export class AppDialogsManager { return this.doms[peerID] as DialogDom; } - public addDialog(dialog: any, container?: HTMLUListElement, drawStatus = true) { + public addDialog(dialog: { + peerID: number, + pFlags: any, + peer: any + }, container?: HTMLUListElement, drawStatus = true) { let peerID: number = dialog.peerID; if((peerID in this.doms) && !container) return; diff --git a/src/lib/appManagers/appImManager.ts b/src/lib/appManagers/appImManager.ts index edb416e9..57d816ee 100644 --- a/src/lib/appManagers/appImManager.ts +++ b/src/lib/appManagers/appImManager.ts @@ -744,7 +744,7 @@ export class AppImManager { let status = message.pFlags.unread ? 'sent' : 'read'; bubble.classList.add(status); } else { - this.log('not our message', message, message.pFlags.unread); + //this.log('not our message', message, message.pFlags.unread); if(message.pFlags.unread) this.unreaded.push(message.mid); } diff --git a/src/lib/appManagers/appMessagesManager.ts b/src/lib/appManagers/appMessagesManager.ts index c19ad673..7776887a 100644 --- a/src/lib/appManagers/appMessagesManager.ts +++ b/src/lib/appManagers/appMessagesManager.ts @@ -1845,7 +1845,7 @@ export class AppMessagesManager { if(error.code == 400) { error.handled = true; } - + return Promise.reject(error); }); } diff --git a/src/lib/appManagers/appSidebarLeft.ts b/src/lib/appManagers/appSidebarLeft.ts index e4270087..44e8aec3 100644 --- a/src/lib/appManagers/appSidebarLeft.ts +++ b/src/lib/appManagers/appSidebarLeft.ts @@ -90,6 +90,7 @@ class AppSidebarLeft { this.toolsBtn.classList.add('tgico-menu'); this.toolsBtn.classList.remove('tgico-back'); this.searchContainer.classList.remove('active'); + this.peerID = 0; } }); @@ -133,7 +134,7 @@ class AppSidebarLeft { return Promise.resolve(); } - let maxID = 0;//appMessagesIDsManager.getMessageIDInfo(this.minMsgID)[0] - 1; + let maxID = appMessagesIDsManager.getMessageIDInfo(this.minMsgID)[0]; return this.searchPromise = appMessagesManager.getSearch(this.peerID, query, null, maxID, 20, this.offsetRate).then(res => { this.searchPromise = null; @@ -155,8 +156,13 @@ class AppSidebarLeft { let originalDialog = appMessagesManager.getDialogByPeerID(message.peerID)[0]; if(!originalDialog) { - this.log.warn('no original dialog by message:', msgID); - return; + this.log('no original dialog by message:', message); + + originalDialog = { + peerID: message.peerID, + pFlags: {}, + peer: message.to_id + }; } let {dialog, dom} = appDialogsManager.addDialog(originalDialog, this.searchMessagesList, false); diff --git a/src/scss/style.scss b/src/scss/style.scss index b7b83546..ffd129d7 100644 --- a/src/scss/style.scss +++ b/src/scss/style.scss @@ -1070,7 +1070,7 @@ $width: 100px; height: 100%; position: fixed!important; background-color: rgba(0, 0, 0, .2); - z-index: 3; + z-index: 4; display: none; &.active {