Better local dialog draft dropping
Fix emoji margin
This commit is contained in:
parent
544a597392
commit
4ed47d722d
@ -301,15 +301,16 @@ export class AppDialogsManager {
|
|||||||
this.setUnreadMessages(dialog); // возможно это не нужно, но нужно менять is-muted
|
this.setUnreadMessages(dialog); // возможно это не нужно, но нужно менять is-muted
|
||||||
});
|
});
|
||||||
|
|
||||||
rootScope.addEventListener('dialog_draft', ({peerId}) => {
|
rootScope.addEventListener('dialog_draft', ({dialog, drop, peerId}) => {
|
||||||
const dialog = appMessagesManager.getDialogOnly(peerId);
|
if(drop) {
|
||||||
if(dialog) {
|
this.sortedList.delete(peerId);
|
||||||
|
} else {
|
||||||
this.updateDialog(dialog);
|
this.updateDialog(dialog);
|
||||||
|
}
|
||||||
|
|
||||||
if(this.processContact) {
|
if(this.processContact) {
|
||||||
this.processContact(peerId);
|
this.processContact(peerId);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
rootScope.addEventListener('peer_changed', (peerId) => {
|
rootScope.addEventListener('peer_changed', (peerId) => {
|
||||||
|
@ -299,16 +299,19 @@ export class AppMessagesManager {
|
|||||||
if(!threadId) {
|
if(!threadId) {
|
||||||
dialog.draft = draft;
|
dialog.draft = draft;
|
||||||
|
|
||||||
|
let drop = false;
|
||||||
if(!draft && !appMessagesIdsManager.getServerMessageId(dialog.top_message)) {
|
if(!draft && !appMessagesIdsManager.getServerMessageId(dialog.top_message)) {
|
||||||
this.dialogsStorage.dropDialogWithEvent(peerId);
|
this.dialogsStorage.dropDialog(peerId);
|
||||||
return;
|
drop = true;
|
||||||
}
|
} else {
|
||||||
|
|
||||||
this.dialogsStorage.generateIndexForDialog(dialog);
|
this.dialogsStorage.generateIndexForDialog(dialog);
|
||||||
this.dialogsStorage.pushDialog(dialog);
|
this.dialogsStorage.pushDialog(dialog);
|
||||||
|
}
|
||||||
|
|
||||||
rootScope.dispatchEvent('dialog_draft', {
|
rootScope.dispatchEvent('dialog_draft', {
|
||||||
peerId,
|
peerId,
|
||||||
|
dialog,
|
||||||
|
drop,
|
||||||
draft,
|
draft,
|
||||||
index: dialog.index
|
index: dialog.index
|
||||||
});
|
});
|
||||||
|
@ -36,7 +36,7 @@ export type BroadcastEvents = {
|
|||||||
'filter_update': MyDialogFilter,
|
'filter_update': MyDialogFilter,
|
||||||
'filter_order': number[],
|
'filter_order': number[],
|
||||||
|
|
||||||
'dialog_draft': {peerId: number, draft: MyDraftMessage | undefined, index: number},
|
'dialog_draft': {peerId: number, dialog: Dialog, drop: boolean, draft: MyDraftMessage | undefined, index: number},
|
||||||
'dialog_unread': {peerId: number},
|
'dialog_unread': {peerId: number},
|
||||||
'dialog_flush': {peerId: number},
|
'dialog_flush': {peerId: number},
|
||||||
'dialog_drop': {peerId: number, dialog?: Dialog},
|
'dialog_drop': {peerId: number, dialog?: Dialog},
|
||||||
|
@ -860,9 +860,15 @@ not screen and ( -o-min-device-pixel-ratio: 2/1),
|
|||||||
not screen and ( min-device-pixel-ratio: 2),
|
not screen and ( min-device-pixel-ratio: 2),
|
||||||
not screen and ( min-resolution: 192dpi),
|
not screen and ( min-resolution: 192dpi),
|
||||||
not screen and ( min-resolution: 2dppx) {
|
not screen and ( min-resolution: 2dppx) {
|
||||||
|
html:not(.is-safari) {
|
||||||
span.emoji {
|
span.emoji {
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
avatar-element span.emoji {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
img.emoji {
|
img.emoji {
|
||||||
|
Loading…
Reference in New Issue
Block a user