Fix hidden floating topbar
Fix reaction animation again Warn: do not reflow bubbles after animation
This commit is contained in:
parent
00f5a634a4
commit
1113ef0642
@ -4102,9 +4102,9 @@ export default class ChatBubbles {
|
|||||||
|
|
||||||
// ! в хроме, каким-то образом из-за zoom-fade класса начинает прыгать скролл при подгрузке сообщений вверх,
|
// ! в хроме, каким-то образом из-за zoom-fade класса начинает прыгать скролл при подгрузке сообщений вверх,
|
||||||
// ! т.е. скролл не ставится, так же, как в сафари при translateZ на блок выше scrollable
|
// ! т.е. скролл не ставится, так же, как в сафари при translateZ на блок выше scrollable
|
||||||
if(!IS_SAFARI) {
|
// if(!IS_SAFARI) {
|
||||||
this.needReflowScroll = true;
|
// this.needReflowScroll = true;
|
||||||
}
|
// }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,6 +112,14 @@ export default class PinnedContainer {
|
|||||||
this.topbar.setUtilsWidth();
|
this.topbar.setUtilsWidth();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public isVisible() {
|
||||||
|
return !this.divAndCaption.container.classList.contains('hide');
|
||||||
|
}
|
||||||
|
|
||||||
|
public isFloating() {
|
||||||
|
return this.divAndCaption.container.classList.contains('is-floating');
|
||||||
|
}
|
||||||
|
|
||||||
public fill(title: string | HTMLElement | DocumentFragment, subtitle: string | HTMLElement | DocumentFragment, message: Message.message) {
|
public fill(title: string | HTMLElement | DocumentFragment, subtitle: string | HTMLElement | DocumentFragment, message: Message.message) {
|
||||||
this.divAndCaption.container.dataset.peerId = '' + message.peerId;
|
this.divAndCaption.container.dataset.peerId = '' + message.peerId;
|
||||||
this.divAndCaption.container.dataset.mid = '' + message.mid;
|
this.divAndCaption.container.dataset.mid = '' + message.mid;
|
||||||
|
@ -868,7 +868,11 @@ export default class ChatTopbar {
|
|||||||
public setFloating = () => {
|
public setFloating = () => {
|
||||||
const containers = [this.chatAudio, this.pinnedMessage && this.pinnedMessage.pinnedMessageContainer].filter(Boolean);
|
const containers = [this.chatAudio, this.pinnedMessage && this.pinnedMessage.pinnedMessageContainer].filter(Boolean);
|
||||||
const count = containers.reduce((acc, container) => {
|
const count = containers.reduce((acc, container) => {
|
||||||
const isFloating = container.divAndCaption.container.classList.contains('is-floating');
|
if(!container.isVisible()) {
|
||||||
|
return acc;
|
||||||
|
}
|
||||||
|
|
||||||
|
const isFloating = container.isFloating();
|
||||||
this.container.classList.toggle(`is-pinned-${container.className}-floating`, isFloating);
|
this.container.classList.toggle(`is-pinned-${container.className}-floating`, isFloating);
|
||||||
return acc + +isFloating;
|
return acc + +isFloating;
|
||||||
}, 0);
|
}, 0);
|
||||||
|
@ -4732,7 +4732,7 @@ export class AppMessagesManager {
|
|||||||
|
|
||||||
const key = message.peerId + '_' + message.mid;
|
const key = message.peerId + '_' + message.mid;
|
||||||
this.pushBatchUpdate('messages_reactions', this.batchUpdateReactions, key, () => copy(message.reactions));
|
this.pushBatchUpdate('messages_reactions', this.batchUpdateReactions, key, () => copy(message.reactions));
|
||||||
|
|
||||||
message.reactions = reactions;
|
message.reactions = reactions;
|
||||||
|
|
||||||
if(!update.local) {
|
if(!update.local) {
|
||||||
@ -6354,9 +6354,9 @@ export class AppMessagesManager {
|
|||||||
const toDispatch: {message: Message.message, changedResults: ReactionCount.reactionCount[]}[] = [];
|
const toDispatch: {message: Message.message, changedResults: ReactionCount.reactionCount[]}[] = [];
|
||||||
|
|
||||||
const map = this.getMessagesFromMap(batch);
|
const map = this.getMessagesFromMap(batch);
|
||||||
for(const [message, reactions] of map) {
|
for(const [message, previousReactions] of map) {
|
||||||
const results = reactions?.results ?? [];
|
const results = message.reactions?.results ?? [];
|
||||||
const previousResults = message.reactions?.results ?? [];
|
const previousResults = previousReactions?.results ?? [];
|
||||||
const changedResults = results.filter(reactionCount => {
|
const changedResults = results.filter(reactionCount => {
|
||||||
const previousReactionCount = previousResults.find(_reactionCount => _reactionCount.reaction === reactionCount.reaction);
|
const previousReactionCount = previousResults.find(_reactionCount => _reactionCount.reaction === reactionCount.reaction);
|
||||||
return (
|
return (
|
||||||
|
@ -37,7 +37,7 @@ const opts = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const domain = 'yourdomain.com';
|
const domain = 'yourdomain.com';
|
||||||
const localIp = '10.17.0.210';
|
const localIp = '192.168.100.51';
|
||||||
|
|
||||||
const middleware = (req, res, next) => {
|
const middleware = (req, res, next) => {
|
||||||
let IP = '';
|
let IP = '';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user