diff --git a/Telegram/SourceFiles/ayu/ui/message_history/history_inner.cpp b/Telegram/SourceFiles/ayu/ui/message_history/history_inner.cpp index 4509fbdee..63ed97d37 100644 --- a/Telegram/SourceFiles/ayu/ui/message_history/history_inner.cpp +++ b/Telegram/SourceFiles/ayu/ui/message_history/history_inner.cpp @@ -522,8 +522,8 @@ bool InnerWidget::elementUnderCursor( return (Element::Hovered() == view); } -bool InnerWidget::elementInSelectionMode() { - return false; +HistoryView::SelectionModeResult InnerWidget::elementInSelectionMode() { + return {}; } bool InnerWidget::elementIntersectsRange( diff --git a/Telegram/SourceFiles/ayu/ui/message_history/history_inner.h b/Telegram/SourceFiles/ayu/ui/message_history/history_inner.h index 8cd6bb4b8..8c8c6e481 100644 --- a/Telegram/SourceFiles/ayu/ui/message_history/history_inner.h +++ b/Telegram/SourceFiles/ayu/ui/message_history/history_inner.h @@ -87,7 +87,7 @@ public: HistoryView::Context elementContext() override; bool elementUnderCursor( not_null view) override; - bool elementInSelectionMode() override; + HistoryView::SelectionModeResult elementInSelectionMode() override; bool elementIntersectsRange( not_null view, int from, diff --git a/Telegram/SourceFiles/history/history_inner_widget.cpp b/Telegram/SourceFiles/history/history_inner_widget.cpp index a0e7b1ae8..61d5b1cd8 100644 --- a/Telegram/SourceFiles/history/history_inner_widget.cpp +++ b/Telegram/SourceFiles/history/history_inner_widget.cpp @@ -515,7 +515,7 @@ HistoryInner::HistoryInner( auto mousePos = mapFromGlobal(globalPosition); auto point = _widget->clampMousePosition(mousePos); - if (!inSelectionMode() && !_emptyPainter && rect().contains(mousePos)) { + if (!inSelectionMode().inSelectionMode && !_emptyPainter && rect().contains(mousePos)) { if (const auto view = Element::Moused()) { mouseActionCancel(); diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index 82f97393f..0a8b5420e 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -1838,6 +1838,13 @@ void HistoryWidget::fileChosen(ChatHelpers::FileChosen &&data) { Data::InsertCustomEmoji(_field.data(), data.document); } } else { + const auto settings = &AyuSettings::getInstance(); + if (!settings->sendReadMessages && settings->markReadAfterAction) { + if (const auto lastMessage = history()->lastMessage()) { + readHistory(lastMessage); + } + } + controller()->sendingAnimation().appendSending( data.messageSendingFrom); const auto localId = data.messageSendingFrom.localId; diff --git a/Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.cpp b/Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.cpp index 17b4e8b3c..fdf7bcd11 100644 --- a/Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.cpp +++ b/Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.cpp @@ -383,7 +383,7 @@ Panel::Panel( _widget->setWindowFlag(Qt::WindowStaysOnTopHint, false); const auto settings = &AyuSettings::getInstance(); - auto size = QSize(st::botWebViewPanelSize, true); + auto size = QSize(st::botWebViewPanelSize); if (settings->increaseWebviewHeight) { size.setHeight(st::botWebViewPanelHeightIncreased); } diff --git a/Telegram/lib_ui b/Telegram/lib_ui index 0b2ad5944..cc4d93a20 160000 --- a/Telegram/lib_ui +++ b/Telegram/lib_ui @@ -1 +1 @@ -Subproject commit 0b2ad5944f2127fa78924fa4d859bd45e2773bb7 +Subproject commit cc4d93a209031dcc8cb43486e985461945f8bb87