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 {
|
} else {
|
||||||
const save = ['is-highlighted'];
|
const save = ['is-highlighted', 'is-group-first', 'is-group-last'];
|
||||||
const wasClassNames = bubble.className.split(' ');
|
const wasClassNames = bubble.className.split(' ');
|
||||||
const classNames = ['bubble'].concat(save.filter(c => wasClassNames.includes(c)));
|
const classNames = ['bubble'].concat(save.filter(c => wasClassNames.includes(c)));
|
||||||
bubble.className = classNames.join(' ');
|
bubble.className = classNames.join(' ');
|
||||||
|
@ -94,10 +94,12 @@ export default class AppBlockedUsersTab extends SliderSuperTab {
|
|||||||
|
|
||||||
this.listenerSetter.add(rootScope, 'peer_block', (update) => {
|
this.listenerSetter.add(rootScope, 'peer_block', (update) => {
|
||||||
const {peerId, blocked} = update;
|
const {peerId, blocked} = update;
|
||||||
|
const li = list.querySelector(`[data-peer-id="${peerId}"]`);
|
||||||
if(blocked) {
|
if(blocked) {
|
||||||
add(peerId, false);
|
if(!li) {
|
||||||
|
add(peerId, false);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
const li = list.querySelector(`[data-peer-id="${peerId}"]`);
|
|
||||||
if(li) {
|
if(li) {
|
||||||
li.remove();
|
li.remove();
|
||||||
}
|
}
|
||||||
|
@ -93,22 +93,27 @@ export default class AppPrivacyAndSecurityTab extends SliderSuperTab {
|
|||||||
let blockedCount: number;
|
let blockedCount: number;
|
||||||
const setBlockedCount = (count: number) => {
|
const setBlockedCount = (count: number) => {
|
||||||
blockedCount = count;
|
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) => {
|
this.listenerSetter.add(rootScope, 'peer_block', () => {
|
||||||
const {blocked, peerId} = update;
|
/* const {blocked, peerId} = update;
|
||||||
if(!blocked) blockedPeerIds.findAndSplice(p => p === peerId);
|
if(!blocked) blockedPeerIds.findAndSplice(p => p === peerId);
|
||||||
else blockedPeerIds.unshift(peerId);
|
else blockedPeerIds.unshift(peerId);
|
||||||
blockedCount += blocked ? 1 : -1;
|
blockedCount += blocked ? 1 : -1;
|
||||||
setBlockedCount(blockedCount);
|
setBlockedCount(blockedCount); */
|
||||||
|
updateBlocked();
|
||||||
});
|
});
|
||||||
|
|
||||||
appUsersManager.getBlocked().then(res => {
|
const updateBlocked = () => {
|
||||||
blockedUsersRow.freezed = false;
|
appUsersManager.getBlocked().then(res => {
|
||||||
setBlockedCount(res.count);
|
blockedUsersRow.freezed = false;
|
||||||
blockedPeerIds = res.peerIds;
|
setBlockedCount(res.count);
|
||||||
});
|
blockedPeerIds = res.peerIds;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
updateBlocked();
|
||||||
|
|
||||||
passwordManager.getState().then(state => {
|
passwordManager.getState().then(state => {
|
||||||
passwordState = state;
|
passwordState = state;
|
||||||
|
@ -1012,6 +1012,10 @@
|
|||||||
align-items: flex-end;
|
align-items: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&-title:first-child {
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
&-title-right {
|
&-title-right {
|
||||||
font-size: .75rem;
|
font-size: .75rem;
|
||||||
color: var(--color-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
|
Loading…
Reference in New Issue
Block a user