From f2118b484b253123727b53469f9b3dd5b491f990 Mon Sep 17 00:00:00 2001 From: morethanwords Date: Tue, 19 Jan 2021 16:12:18 +0400 Subject: [PATCH] Fix folders badge center align due to .47px width Fix jumping by last message after sending --- src/components/chat/bubbles.ts | 6 +++--- src/index.hbs | 2 +- src/lib/appManagers/appDialogsManager.ts | 1 + src/scss/components/_global.scss | 5 +++++ 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/components/chat/bubbles.ts b/src/components/chat/bubbles.ts index b2a24448..2ce35f43 100644 --- a/src/components/chat/bubbles.ts +++ b/src/components/chat/bubbles.ts @@ -400,7 +400,7 @@ export default class ChatBubbles { let details = e; if(!this.scrolledAllDown) { - this.chat.setMessageId(0); + this.chat.setMessageId(); } else { this.renderNewMessagesByIds([details.messageId], true); } @@ -2654,7 +2654,7 @@ export default class ChatBubbles { const topIds = sortedMids.slice(sortedMids.findIndex(mid => targetMid > mid)); const middleIds = isAdditionRender ? [] : [targetMid]; - const bottomIds = sortedMids.slice(0, sortedMids.findIndex(mid => targetMid >= mid)).reverse(); + const bottomIds = isAdditionRender ? [] : sortedMids.slice(0, sortedMids.findIndex(mid => targetMid >= mid)).reverse(); this.log('getHistory: targeting mid:', targetMid, maxId, additionMsgId, topIds.map(m => this.appMessagesManager.getLocalMessageId(m)), @@ -2725,7 +2725,7 @@ export default class ChatBubbles { return null; } - /* false && */!isFirstMessageRender && false && promise.then(() => { + false && !isFirstMessageRender && promise.then(() => { if(reverse) { this.loadedTopTimes++; this.loadedBottomTimes = Math.max(0, --this.loadedBottomTimes); diff --git a/src/index.hbs b/src/index.hbs index c1bdb940..dc2f0b51 100644 --- a/src/index.hbs +++ b/src/index.hbs @@ -145,7 +145,7 @@
diff --git a/src/lib/appManagers/appDialogsManager.ts b/src/lib/appManagers/appDialogsManager.ts index 629ee1e0..337c4c54 100644 --- a/src/lib/appManagers/appDialogsManager.ts +++ b/src/lib/appManagers/appDialogsManager.ts @@ -586,6 +586,7 @@ export class AppDialogsManager { menuTab.classList.add('menu-horizontal-div-item'); const span = document.createElement('span'); const titleSpan = document.createElement('span'); + titleSpan.classList.add('text-super'); titleSpan.innerHTML = RichTextProcessor.wrapEmojiText(filter.title); const unreadSpan = document.createElement('div'); unreadSpan.classList.add('badge', 'badge-20', 'badge-blue'); diff --git a/src/scss/components/_global.scss b/src/scss/components/_global.scss index d8bd0762..794fa5ee 100644 --- a/src/scss/components/_global.scss +++ b/src/scss/components/_global.scss @@ -130,6 +130,11 @@ Utility Classes font-weight: 500 !important; } +// * fix text fractional width +.text-super { + display: inline-table; +} + /* .flex-grow { flex-grow: 1; }