Fix blocking same peer
Fix handling edited messages Bold font for active sessions
This commit is contained in:
parent
b8f98e76c2
commit
fa91e7aa37
@ -1771,7 +1771,7 @@ export default class ChatBubbles {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
const save = ['is-highlighted'];
|
||||
const save = ['is-highlighted', 'is-group-first', 'is-group-last'];
|
||||
const wasClassNames = bubble.className.split(' ');
|
||||
const classNames = ['bubble'].concat(save.filter(c => wasClassNames.includes(c)));
|
||||
bubble.className = classNames.join(' ');
|
||||
|
@ -94,10 +94,12 @@ export default class AppBlockedUsersTab extends SliderSuperTab {
|
||||
|
||||
this.listenerSetter.add(rootScope, 'peer_block', (update) => {
|
||||
const {peerId, blocked} = update;
|
||||
const li = list.querySelector(`[data-peer-id="${peerId}"]`);
|
||||
if(blocked) {
|
||||
add(peerId, false);
|
||||
if(!li) {
|
||||
add(peerId, false);
|
||||
}
|
||||
} else {
|
||||
const li = list.querySelector(`[data-peer-id="${peerId}"]`);
|
||||
if(li) {
|
||||
li.remove();
|
||||
}
|
||||
|
@ -93,22 +93,27 @@ export default class AppPrivacyAndSecurityTab extends SliderSuperTab {
|
||||
let blockedCount: number;
|
||||
const setBlockedCount = (count: number) => {
|
||||
blockedCount = count;
|
||||
blockedUsersRow.subtitle.innerText = count + ' ' + (count !== 1 ? 'users' : 'user');
|
||||
blockedUsersRow.subtitle.innerText = count ? (count + ' ' + (count > 1 ? 'users' : 'user')) : 'None';
|
||||
};
|
||||
|
||||
this.listenerSetter.add(rootScope, 'peer_block', (update) => {
|
||||
const {blocked, peerId} = update;
|
||||
this.listenerSetter.add(rootScope, 'peer_block', () => {
|
||||
/* const {blocked, peerId} = update;
|
||||
if(!blocked) blockedPeerIds.findAndSplice(p => p === peerId);
|
||||
else blockedPeerIds.unshift(peerId);
|
||||
blockedCount += blocked ? 1 : -1;
|
||||
setBlockedCount(blockedCount);
|
||||
setBlockedCount(blockedCount); */
|
||||
updateBlocked();
|
||||
});
|
||||
|
||||
appUsersManager.getBlocked().then(res => {
|
||||
blockedUsersRow.freezed = false;
|
||||
setBlockedCount(res.count);
|
||||
blockedPeerIds = res.peerIds;
|
||||
});
|
||||
const updateBlocked = () => {
|
||||
appUsersManager.getBlocked().then(res => {
|
||||
blockedUsersRow.freezed = false;
|
||||
setBlockedCount(res.count);
|
||||
blockedPeerIds = res.peerIds;
|
||||
});
|
||||
};
|
||||
|
||||
updateBlocked();
|
||||
|
||||
passwordManager.getState().then(state => {
|
||||
passwordState = state;
|
||||
@ -183,7 +188,7 @@ export default class AppPrivacyAndSecurityTab extends SliderSuperTab {
|
||||
if(!row) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
appPrivacyManager.getPrivacy(key).then(rules => {
|
||||
const details = appPrivacyManager.getPrivacyRulesDetails(rules);
|
||||
const type = details.type === PrivacyType.Everybody ? 'Everybody' : (details.type === PrivacyType.Contacts ? 'My Contacts' : 'Nobody');
|
||||
|
@ -1012,6 +1012,10 @@
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
&-title:first-child {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
&-title-right {
|
||||
font-size: .75rem;
|
||||
color: var(--color-text-secondary);
|
||||
|
Loading…
Reference in New Issue
Block a user