Fix updating sent status
Fix migration message
This commit is contained in:
parent
a8ef0206d9
commit
c44b9a7734
@ -192,9 +192,11 @@ export default class ChatBubbles {
|
|||||||
|
|
||||||
if(message.replies) {
|
if(message.replies) {
|
||||||
const repliesElement = bubble.querySelector('replies-element') as RepliesElement;
|
const repliesElement = bubble.querySelector('replies-element') as RepliesElement;
|
||||||
|
if(repliesElement) {
|
||||||
repliesElement.message = message;
|
repliesElement.message = message;
|
||||||
repliesElement.init();
|
repliesElement.init();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(message.media?.document && !message.media.document.type) {
|
if(message.media?.document && !message.media.document.type) {
|
||||||
const div = bubble.querySelector(`.document-container[data-mid="${tempId}"] .document`);
|
const div = bubble.querySelector(`.document-container[data-mid="${tempId}"] .document`);
|
||||||
@ -206,13 +208,15 @@ export default class ChatBubbles {
|
|||||||
// set new mids to album items for mediaViewer
|
// set new mids to album items for mediaViewer
|
||||||
if(message.grouped_id) {
|
if(message.grouped_id) {
|
||||||
const item = (bubble.querySelector(`.grouped-item[data-mid="${tempId}"]`) as HTMLElement) || bubble; // * it can be .document-container
|
const item = (bubble.querySelector(`.grouped-item[data-mid="${tempId}"]`) as HTMLElement) || bubble; // * it can be .document-container
|
||||||
|
if(item) {
|
||||||
item.dataset.mid = '' + mid;
|
item.dataset.mid = '' + mid;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(message.media?.poll) {
|
if(message.media?.poll) {
|
||||||
const newPoll = message.media.poll;
|
|
||||||
const pollElement = bubble.querySelector('poll-element') as PollElement;
|
const pollElement = bubble.querySelector('poll-element') as PollElement;
|
||||||
if(pollElement) {
|
if(pollElement) {
|
||||||
|
const newPoll = message.media.poll;
|
||||||
pollElement.message = message;
|
pollElement.message = message;
|
||||||
pollElement.setAttribute('poll-id', newPoll.id);
|
pollElement.setAttribute('poll-id', newPoll.id);
|
||||||
pollElement.setAttribute('message-id', '' + mid);
|
pollElement.setAttribute('message-id', '' + mid);
|
||||||
@ -370,7 +374,7 @@ export default class ChatBubbles {
|
|||||||
if(bubble) {
|
if(bubble) {
|
||||||
const mid = +bubble.dataset.mid
|
const mid = +bubble.dataset.mid
|
||||||
this.log('debug message:', this.chat.getMessage(mid));
|
this.log('debug message:', this.chat.getMessage(mid));
|
||||||
this.chat.bubbles.highlightBubble(bubble);
|
this.highlightBubble(bubble);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -1399,7 +1403,7 @@ export default class ChatBubbles {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const isJump = lastMsgId !== topMessage;
|
const isJump = lastMsgId !== topMessage && topMessage !== 0 && lastMsgId !== 0;
|
||||||
|
|
||||||
if(samePeer) {
|
if(samePeer) {
|
||||||
const mounted = this.getMountedBubble(lastMsgId);
|
const mounted = this.getMountedBubble(lastMsgId);
|
||||||
|
@ -59,6 +59,7 @@ export default class AppTwoStepVerificationHintTab extends SliderSuperTab {
|
|||||||
|
|
||||||
inputField.input.addEventListener('keypress', (e) => {
|
inputField.input.addEventListener('keypress', (e) => {
|
||||||
if(e.key === 'Enter') {
|
if(e.key === 'Enter') {
|
||||||
|
cancelEvent(e);
|
||||||
return (inputField.value ? btnContinue : btnSkip).click();
|
return (inputField.value ? btnContinue : btnSkip).click();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -398,7 +398,8 @@ export class AppChatsManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const isChannel = this.isBroadcast(id);
|
const isChannel = this.isBroadcast(id);
|
||||||
return numberThousandSplitter(count || 1, ' ') + ' ' + (isChannel ? 'subscribers' : 'members');
|
count = count || 1;
|
||||||
|
return numberThousandSplitter(count, ' ') + ' ' + (isChannel ? (count > 1 ? 'subscribers' : 'subscriber') : (count > 1 ? 'members' : 'member'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public wrapForFull(id: number, fullChat: any) {
|
public wrapForFull(id: number, fullChat: any) {
|
||||||
|
@ -979,7 +979,7 @@ export class AppDialogsManager {
|
|||||||
lastMessage = appMessagesManager.getMessageByPeer(dialog.peerId, dialog.top_message);
|
lastMessage = appMessagesManager.getMessageByPeer(dialog.peerId, dialog.top_message);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(lastMessage._ === 'messageEmpty' || (lastMessage._ === 'messageService' && !lastMessage.rReply)) {
|
if(lastMessage._ === 'messageEmpty'/* || (lastMessage._ === 'messageService' && !lastMessage.rReply) */) {
|
||||||
dom.lastMessageSpan.innerHTML = '';
|
dom.lastMessageSpan.innerHTML = '';
|
||||||
dom.lastTimeSpan.innerHTML = '';
|
dom.lastTimeSpan.innerHTML = '';
|
||||||
delete dom.listEl.dataset.mid;
|
delete dom.listEl.dataset.mid;
|
||||||
@ -1089,7 +1089,7 @@ export class AppDialogsManager {
|
|||||||
dialog.draft :
|
dialog.draft :
|
||||||
appMessagesManager.getMessageByPeer(dialog.peerId, dialog.top_message);
|
appMessagesManager.getMessageByPeer(dialog.peerId, dialog.top_message);
|
||||||
if(lastMessage._ !== 'messageEmpty' && !lastMessage.deleted &&
|
if(lastMessage._ !== 'messageEmpty' && !lastMessage.deleted &&
|
||||||
lastMessage.fromId === rootScope.myId && lastMessage.peerId !== rootScope.myId/* &&
|
lastMessage.pFlags.out && lastMessage.peerId !== rootScope.myId/* &&
|
||||||
dialog.read_outbox_max_id */) { // maybe comment, 06.20.2020
|
dialog.read_outbox_max_id */) { // maybe comment, 06.20.2020
|
||||||
const outgoing = (lastMessage.pFlags && lastMessage.pFlags.unread)
|
const outgoing = (lastMessage.pFlags && lastMessage.pFlags.unread)
|
||||||
/* && dialog.read_outbox_max_id !== 0 */; // maybe uncomment, 31.01.2020
|
/* && dialog.read_outbox_max_id !== 0 */; // maybe uncomment, 31.01.2020
|
||||||
|
@ -2588,12 +2588,12 @@ export class AppMessagesManager {
|
|||||||
|
|
||||||
if(!l) {
|
if(!l) {
|
||||||
l = langPack[_];
|
l = langPack[_];
|
||||||
if(!l) {
|
if(l === undefined) {
|
||||||
l = '[' + _ + ']';
|
l = '[' + _ + ']';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
str = l[0].toUpperCase() === l[0] ? l : getNameDivHTML(message.fromId) + l + (suffix ? ' ' : '');
|
str = !l || l[0].toUpperCase() === l[0] ? l : getNameDivHTML(message.fromId) + l + (suffix ? ' ' : '');
|
||||||
}
|
}
|
||||||
|
|
||||||
//this.log('message action:', action);
|
//this.log('message action:', action);
|
||||||
@ -3151,6 +3151,8 @@ export class AppMessagesManager {
|
|||||||
for(let i = 0, length = history.length; i < length; i++) {
|
for(let i = 0, length = history.length; i < length; i++) {
|
||||||
const message = storage[history[i]];
|
const message = storage[history[i]];
|
||||||
|
|
||||||
|
if(!message) continue;
|
||||||
|
|
||||||
//|| (neededContents['mentioned'] && message.totalEntities.find((e: any) => e._ === 'messageEntityMention'));
|
//|| (neededContents['mentioned'] && message.totalEntities.find((e: any) => e._ === 'messageEntityMention'));
|
||||||
|
|
||||||
let found = false;
|
let found = false;
|
||||||
|
@ -49,8 +49,8 @@ $bubble-margin: .25rem;
|
|||||||
//flex-direction: column; // fix 'Unread messages', still need to refactor it
|
//flex-direction: column; // fix 'Unread messages', still need to refactor it
|
||||||
|
|
||||||
--background-color: #fff;
|
--background-color: #fff;
|
||||||
--accent-color: $color-blue;
|
--accent-color: #{$color-blue};
|
||||||
--secondary-color: $color-gray;
|
--secondary-color: #{$color-gray};
|
||||||
|
|
||||||
&.is-highlighted, &.is-selected, /* .bubbles.is-selecting */ & {
|
&.is-highlighted, &.is-selected, /* .bubbles.is-selecting */ & {
|
||||||
&:after {
|
&:after {
|
||||||
|
@ -22,7 +22,7 @@ test('2FA whole (with negative)', async() => {
|
|||||||
|
|
||||||
new_algo: null,
|
new_algo: null,
|
||||||
new_secure_algo: null
|
new_secure_algo: null
|
||||||
}, false).then(res => {
|
}, false).then((res: any) => {
|
||||||
expect(res.srp_id).toEqual(srp_id);
|
expect(res.srp_id).toEqual(srp_id);
|
||||||
expect(res.A).toEqual(A);
|
expect(res.A).toEqual(A);
|
||||||
expect(res.M1).toEqual(M1);
|
expect(res.M1).toEqual(M1);
|
||||||
|
Loading…
Reference in New Issue
Block a user