Browse Source

Fix topbar avatar

Fix chatlist unread badge empty size
master
Eduard Kuzmenko 4 years ago
parent
commit
904cecd370
  1. 2
      src/components/chat/topbar.ts
  2. 4
      src/lib/appManagers/appDialogsManager.ts
  3. 4
      src/scss/partials/_chatTopbar.scss

2
src/components/chat/topbar.ts

@ -144,7 +144,7 @@ export default class ChatTopbar {
this.avatarElement = new AvatarElement(); this.avatarElement = new AvatarElement();
this.avatarElement.setAttribute('dialog', '1'); this.avatarElement.setAttribute('dialog', '1');
this.avatarElement.setAttribute('clickable', ''); this.avatarElement.setAttribute('clickable', '');
this.avatarElement.classList.add('avatar-40'); this.avatarElement.classList.add('avatar-40', 'person-avatar');
this.subtitle = document.createElement('div'); this.subtitle = document.createElement('div');
this.subtitle.classList.add('info'); this.subtitle.classList.add('info');

4
src/lib/appManagers/appDialogsManager.ts

@ -1081,11 +1081,13 @@ export class AppDialogsManager {
//dom.unreadMessagesSpan.innerText = '' + (dialog.unread_count ? formatNumber(dialog.unread_count, 1) : ' '); //dom.unreadMessagesSpan.innerText = '' + (dialog.unread_count ? formatNumber(dialog.unread_count, 1) : ' ');
dom.unreadMessagesSpan.innerText = '' + (dialog.unread_count || ' '); dom.unreadMessagesSpan.innerText = '' + (dialog.unread_count || ' ');
dom.unreadMessagesSpan.classList.add('unread'); dom.unreadMessagesSpan.classList.add('unread');
} else if(isPinned) { } else {
dom.unreadMessagesSpan.classList.remove('unread'); dom.unreadMessagesSpan.classList.remove('unread');
if(isPinned) {
dom.unreadMessagesSpan.classList.add('tgico-pinnedchat'); dom.unreadMessagesSpan.classList.add('tgico-pinnedchat');
} }
} }
}
private accumulateArchivedUnread() { private accumulateArchivedUnread() {
if(this.accumulateArchivedTimeout) return; if(this.accumulateArchivedTimeout) return;

4
src/scss/partials/_chatTopbar.scss

@ -191,6 +191,10 @@
align-items: center; align-items: center;
cursor: pointer; cursor: pointer;
&-avatar {
flex: 0 0 auto;
}
.bottom { .bottom {
font-size: 14px; font-size: 14px;
//line-height: 18px; //line-height: 18px;

Loading…
Cancel
Save