Browse Source

Fix folders badge center align due to .47px width

Fix jumping by last message after sending
master
morethanwords 4 years ago
parent
commit
f2118b484b
  1. 6
      src/components/chat/bubbles.ts
  2. 2
      src/index.hbs
  3. 1
      src/lib/appManagers/appDialogsManager.ts
  4. 5
      src/scss/components/_global.scss

6
src/components/chat/bubbles.ts

@ -400,7 +400,7 @@ export default class ChatBubbles { @@ -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 { @@ -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 { @@ -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);

2
src/index.hbs

@ -145,7 +145,7 @@ @@ -145,7 +145,7 @@
<div class="transition-item active" id="chatlist-container">
<div class="folders-tabs-scrollable menu-horizontal-scrollable hide">
<nav class="menu-horizontal-div" id="folders-tabs">
<div class="menu-horizontal-div-item rp"><span>All<div class="badge badge-20 badge-blue"></div><i></i></span></div>
<div class="menu-horizontal-div-item rp"><span><span class="text-super">All</span><div class="badge badge-20 badge-blue"></div><i></i></span></div>
</nav>
</div>
<div class="tabs-container" id="folders-container">

1
src/lib/appManagers/appDialogsManager.ts

@ -586,6 +586,7 @@ export class AppDialogsManager { @@ -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');

5
src/scss/components/_global.scss

@ -130,6 +130,11 @@ Utility Classes @@ -130,6 +130,11 @@ Utility Classes
font-weight: 500 !important;
}
// * fix text fractional width
.text-super {
display: inline-table;
}
/* .flex-grow {
flex-grow: 1;
}

Loading…
Cancel
Save