diff --git a/src/components/chat/bubbles.ts b/src/components/chat/bubbles.ts index a75a5c6c..3c3e4ee6 100644 --- a/src/components/chat/bubbles.ts +++ b/src/components/chat/bubbles.ts @@ -43,12 +43,12 @@ import LazyLoadQueue from "../lazyLoadQueue"; import ListenerSetter from "../../helpers/listenerSetter"; import PollElement from "../poll"; import AudioElement from "../audio"; -import { KeyboardButton, Message, MessageEntity, MessageReplyHeader, ReplyMarkup, Update } from "../../layer"; +import { Message, MessageEntity, MessageReplyHeader, ReplyMarkup, Update } from "../../layer"; import { REPLIES_PEER_ID } from "../../lib/mtproto/mtproto_config"; import { FocusDirection } from "../../helpers/fastSmoothScroll"; import useHeavyAnimationCheck, { getHeavyAnimationPromise, dispatchHeavyAnimationEvent, interruptHeavyAnimation } from "../../hooks/useHeavyAnimationCheck"; import { fastRaf, fastRafPromise } from "../../helpers/schedulers"; -import { CancellablePromise, deferredPromise } from "../../helpers/cancellablePromise"; +import { deferredPromise } from "../../helpers/cancellablePromise"; import RepliesElement from "./replies"; import DEBUG from "../../config/debug"; import { SliceEnd } from "../../helpers/slicedArray"; @@ -71,7 +71,6 @@ import whichChild from "../../helpers/dom/whichChild"; import { cancelAnimationByKey } from "../../helpers/animation"; import assumeType from "../../helpers/assumeType"; import { EmoticonsDropdown } from "../emoticonsDropdown"; -import PopupPickUser from "../popups/pickUser"; const USE_MEDIA_TAILS = false; const IGNORE_ACTIONS: Set = new Set([ @@ -860,6 +859,7 @@ export default class ChatBubbles { if(nameDiv.classList.contains('is-via')) { const message = '@' + this.appUsersManager.getUser(peerId).username + ' '; this.appDraftsManager.setDraft(this.peerId, this.chat.threadId, message); + cancelEvent(e); } else if(savedFrom) { const splitted = savedFrom.split('_'); const peerId = +splitted[0]; @@ -985,7 +985,8 @@ export default class ChatBubbles { return; } else if(target.classList.contains('forward')) { const mid = +bubble.dataset.mid; - new PopupForward(this.peerId, [mid]); + const message = this.appMessagesManager.getMessageByPeer(this.peerId, mid); + new PopupForward(this.peerId, this.appMessagesManager.getMidsByMessage(message)); //appSidebarRight.forwardTab.open([mid]); return; } diff --git a/src/components/chat/input.ts b/src/components/chat/input.ts index 76326af6..72c79927 100644 --- a/src/components/chat/input.ts +++ b/src/components/chat/input.ts @@ -813,6 +813,7 @@ export default class ChatInput { this.messageInputField.input.classList.replace('input-field-input', 'input-message-input'); this.messageInputField.inputFake.classList.replace('input-field-input', 'input-message-input'); this.messageInput = this.messageInputField.input; + this.messageInput.classList.add('no-scrollbar'); this.attachMessageInputListeners(); if(oldInputField) { @@ -1327,7 +1328,7 @@ export default class ChatInput { } this.inlineHelper.checkQuery(this.chat.peerId, username, query).then(({user, renderPromise}) => { - if(needPlaceholder) { + if(needPlaceholder && user.bot_inline_placeholder) { this.messageInput.dataset.inlinePlaceholder = user.bot_inline_placeholder; } diff --git a/src/components/inputField.ts b/src/components/inputField.ts index e955dbdd..1a4e97ca 100644 --- a/src/components/inputField.ts +++ b/src/components/inputField.ts @@ -88,7 +88,7 @@ class InputField { //public onLengthChange: (length: number, isOverflow: boolean) => void; protected wasInputFakeClientHeight: number; - protected showScrollDebounced: () => void; + // protected showScrollDebounced: () => void; constructor(public options: InputFieldOptions = {}) { this.container = document.createElement('div'); @@ -139,7 +139,7 @@ class InputField { if(options.animate) { input.classList.add('scrollable', 'scrollable-y'); this.wasInputFakeClientHeight = 0; - this.showScrollDebounced = debounce(() => this.input.classList.remove('no-scrollbar'), 150, false, true); + // this.showScrollDebounced = debounce(() => this.input.classList.remove('no-scrollbar'), 150, false, true); this.inputFake = document.createElement('div'); this.inputFake.setAttribute('contenteditable', 'true'); this.inputFake.className = input.className + ' input-field-input-fake'; @@ -223,10 +223,10 @@ class InputField { public onFakeInput() { const {scrollHeight, clientHeight} = this.inputFake; - if(this.wasInputFakeClientHeight && this.wasInputFakeClientHeight !== clientHeight) { + /* if(this.wasInputFakeClientHeight && this.wasInputFakeClientHeight !== clientHeight) { this.input.classList.add('no-scrollbar'); // ! в сафари может вообще не появиться скролл после анимации, так как ему нужен полный reflow блока с overflow. this.showScrollDebounced(); - } + } */ this.wasInputFakeClientHeight = clientHeight; this.input.style.height = scrollHeight ? scrollHeight + 'px' : ''; diff --git a/src/components/popups/peer.ts b/src/components/popups/peer.ts index c0a42d9e..ccb3cebd 100644 --- a/src/components/popups/peer.ts +++ b/src/components/popups/peer.ts @@ -51,7 +51,7 @@ export default class PopupPeer extends PopupElement { this.container.classList.add('have-checkbox'); options.checkboxes.forEach(o => { - o.withRipple = true; + o.withRipple = false; const checkboxField = new CheckboxField(o); o.checkboxField = checkboxField; fragment.append(checkboxField.label); diff --git a/src/scss/partials/_chatBubble.scss b/src/scss/partials/_chatBubble.scss index 2b25fad2..073304d1 100644 --- a/src/scss/partials/_chatBubble.scss +++ b/src/scss/partials/_chatBubble.scss @@ -2276,6 +2276,10 @@ $bubble-margin: .25rem; //line-height: var(--line-height); background: var(--message-highlightning-color); + &.anchor-url { + text-decoration: none !important; + } + &:after { content: " "; display: block; diff --git a/src/scss/partials/_chatInlineHelper.scss b/src/scss/partials/_chatInlineHelper.scss index 0dc6e830..9700664a 100644 --- a/src/scss/partials/_chatInlineHelper.scss +++ b/src/scss/partials/_chatInlineHelper.scss @@ -57,10 +57,15 @@ } } + .media-container { + border-radius: inherit; + } + .media-photo, .media-video, .media-poster { object-fit: cover; width: 100%; height: 100%; + border-radius: inherit; } .gif {