mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Added search messages to HistoryWidget.
This commit is contained in:
parent
a141a9404f
commit
df38dde296
6 changed files with 136 additions and 24 deletions
|
@ -76,6 +76,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "history/history_inner_widget.h"
|
#include "history/history_inner_widget.h"
|
||||||
#include "history/history_item_components.h"
|
#include "history/history_item_components.h"
|
||||||
#include "history/history_unread_things.h"
|
#include "history/history_unread_things.h"
|
||||||
|
#include "history/view/controls/history_view_compose_search.h"
|
||||||
#include "history/view/controls/history_view_voice_record_bar.h"
|
#include "history/view/controls/history_view_voice_record_bar.h"
|
||||||
#include "history/view/controls/history_view_ttl_button.h"
|
#include "history/view/controls/history_view_ttl_button.h"
|
||||||
#include "history/view/history_view_cursor_state.h"
|
#include "history/view/history_view_cursor_state.h"
|
||||||
|
@ -246,10 +247,10 @@ HistoryWidget::HistoryWidget(
|
||||||
, _botKeyboardHide(this, st::historyBotKeyboardHide)
|
, _botKeyboardHide(this, st::historyBotKeyboardHide)
|
||||||
, _botCommandStart(this, st::historyBotCommandStart)
|
, _botCommandStart(this, st::historyBotCommandStart)
|
||||||
, _voiceRecordBar(std::make_unique<HistoryWidget::VoiceRecordBar>(
|
, _voiceRecordBar(std::make_unique<HistoryWidget::VoiceRecordBar>(
|
||||||
this,
|
this,
|
||||||
controller,
|
controller,
|
||||||
_send,
|
_send,
|
||||||
st::historySendSize.height()))
|
st::historySendSize.height()))
|
||||||
, _field(
|
, _field(
|
||||||
this,
|
this,
|
||||||
st::historyComposeField,
|
st::historyComposeField,
|
||||||
|
@ -801,6 +802,10 @@ HistoryWidget::HistoryWidget(
|
||||||
) | rpl::start_with_next([=] {
|
) | rpl::start_with_next([=] {
|
||||||
setChooseReportMessagesDetails({}, nullptr);
|
setChooseReportMessagesDetails({}, nullptr);
|
||||||
}, _topBar->lifetime());
|
}, _topBar->lifetime());
|
||||||
|
_topBar->searchRequest(
|
||||||
|
) | rpl::start_with_next([=] {
|
||||||
|
searchInChat();
|
||||||
|
}, _topBar->lifetime());
|
||||||
|
|
||||||
session().api().sendActions(
|
session().api().sendActions(
|
||||||
) | rpl::filter([=](const Api::SendAction &action) {
|
) | rpl::filter([=](const Api::SendAction &action) {
|
||||||
|
@ -1795,7 +1800,7 @@ void HistoryWidget::setupShortcuts() {
|
||||||
using Command = Shortcuts::Command;
|
using Command = Shortcuts::Command;
|
||||||
if (_history) {
|
if (_history) {
|
||||||
request->check(Command::Search, 1) && request->handle([=] {
|
request->check(Command::Search, 1) && request->handle([=] {
|
||||||
controller()->content()->searchInChat(_history);
|
searchInChat();
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
if (session().supportMode()) {
|
if (session().supportMode()) {
|
||||||
|
@ -2072,6 +2077,7 @@ void HistoryWidget::showHistory(
|
||||||
} else {
|
} else {
|
||||||
session().data().sponsoredMessages().clearItems(_history);
|
session().data().sponsoredMessages().clearItems(_history);
|
||||||
session().data().hideShownSpoilers();
|
session().data().hideShownSpoilers();
|
||||||
|
_composeSearch = nullptr;
|
||||||
}
|
}
|
||||||
session().sendProgressManager().update(
|
session().sendProgressManager().update(
|
||||||
_history,
|
_history,
|
||||||
|
@ -2525,8 +2531,15 @@ bool HistoryWidget::contentOverlapped(const QRect &globalRect) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool HistoryWidget::canWriteMessage() const {
|
bool HistoryWidget::canWriteMessage() const {
|
||||||
if (!_history || !_canSendMessages) return false;
|
if (!_history || !_canSendMessages) {
|
||||||
if (isBlocked() || isJoinChannel() || isMuteUnmute() || isBotStart()) return false;
|
return false;
|
||||||
|
}
|
||||||
|
if (isBlocked() || isJoinChannel() || isMuteUnmute() || isBotStart()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (isSearching()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2567,7 +2580,8 @@ void HistoryWidget::updateControlsVisibility() {
|
||||||
}
|
}
|
||||||
if (isChoosingTheme()
|
if (isChoosingTheme()
|
||||||
|| (!editingMessage()
|
|| (!editingMessage()
|
||||||
&& (isBlocked()
|
&& (isSearching()
|
||||||
|
|| isBlocked()
|
||||||
|| isJoinChannel()
|
|| isJoinChannel()
|
||||||
|| isMuteUnmute()
|
|| isMuteUnmute()
|
||||||
|| isBotStart()
|
|| isBotStart()
|
||||||
|
@ -2736,6 +2750,9 @@ void HistoryWidget::updateControlsVisibility() {
|
||||||
if (_voiceRecordBar) {
|
if (_voiceRecordBar) {
|
||||||
_voiceRecordBar->hideFast();
|
_voiceRecordBar->hideFast();
|
||||||
}
|
}
|
||||||
|
if (_composeSearch) {
|
||||||
|
_composeSearch->hideAnimated();
|
||||||
|
}
|
||||||
if (_inlineResults) {
|
if (_inlineResults) {
|
||||||
_inlineResults->hide();
|
_inlineResults->hide();
|
||||||
}
|
}
|
||||||
|
@ -3606,6 +3623,9 @@ void HistoryWidget::hideChildWidgets() {
|
||||||
if (_voiceRecordBar) {
|
if (_voiceRecordBar) {
|
||||||
_voiceRecordBar->hideFast();
|
_voiceRecordBar->hideFast();
|
||||||
}
|
}
|
||||||
|
if (_composeSearch) {
|
||||||
|
_composeSearch->hideAnimated();
|
||||||
|
}
|
||||||
if (_chooseTheme) {
|
if (_chooseTheme) {
|
||||||
_chooseTheme->hide();
|
_chooseTheme->hide();
|
||||||
}
|
}
|
||||||
|
@ -4297,6 +4317,10 @@ bool HistoryWidget::isMuteUnmute() const {
|
||||||
|| _peer->isRepliesChat());
|
|| _peer->isRepliesChat());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool HistoryWidget::isSearching() const {
|
||||||
|
return _composeSearch != nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
bool HistoryWidget::showRecordButton() const {
|
bool HistoryWidget::showRecordButton() const {
|
||||||
return Media::Capture::instance()->available()
|
return Media::Capture::instance()->available()
|
||||||
&& !_voiceRecordBar->isListenState()
|
&& !_voiceRecordBar->isListenState()
|
||||||
|
@ -4353,6 +4377,37 @@ bool HistoryWidget::updateCmdStartShown() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void HistoryWidget::searchInChat() {
|
||||||
|
if (!_history) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (controller()->isPrimary()) {
|
||||||
|
controller()->content()->searchInChat(_history);
|
||||||
|
} else {
|
||||||
|
const auto update = [=] {
|
||||||
|
updateControlsVisibility();
|
||||||
|
updateBotKeyboard();
|
||||||
|
updateFieldPlaceholder();
|
||||||
|
|
||||||
|
updateControlsGeometry();
|
||||||
|
};
|
||||||
|
_composeSearch = std::make_unique<HistoryView::ComposeSearch>(
|
||||||
|
this,
|
||||||
|
controller(),
|
||||||
|
_history);
|
||||||
|
|
||||||
|
update();
|
||||||
|
_composeSearch->destroyRequests(
|
||||||
|
) | rpl::take(
|
||||||
|
1
|
||||||
|
) | rpl::start_with_next([=] {
|
||||||
|
_composeSearch = nullptr;
|
||||||
|
|
||||||
|
update();
|
||||||
|
}, _composeSearch->lifetime());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool HistoryWidget::kbWasHidden() const {
|
bool HistoryWidget::kbWasHidden() const {
|
||||||
return _history
|
return _history
|
||||||
&& (_keyboard->forMsgId()
|
&& (_keyboard->forMsgId()
|
||||||
|
@ -5260,7 +5315,8 @@ void HistoryWidget::updateHistoryGeometry(
|
||||||
if (isChoosingTheme()) {
|
if (isChoosingTheme()) {
|
||||||
newScrollHeight -= _chooseTheme->height();
|
newScrollHeight -= _chooseTheme->height();
|
||||||
} else if (!editingMessage()
|
} else if (!editingMessage()
|
||||||
&& (isBlocked()
|
&& (isSearching()
|
||||||
|
|| isBlocked()
|
||||||
|| isBotStart()
|
|| isBotStart()
|
||||||
|| isJoinChannel()
|
|| isJoinChannel()
|
||||||
|| isMuteUnmute()
|
|| isMuteUnmute()
|
||||||
|
@ -5532,7 +5588,7 @@ void HistoryWidget::updateBotKeyboard(History *h, bool force) {
|
||||||
&& _history->lastKeyboardUsed) {
|
&& _history->lastKeyboardUsed) {
|
||||||
_history->lastKeyboardHiddenId = _history->lastKeyboardId;
|
_history->lastKeyboardHiddenId = _history->lastKeyboardId;
|
||||||
}
|
}
|
||||||
if (!isBotStart() && !isBlocked() && _canSendMessages && (wasVisible || (_replyToId && _replyEditMsg) || (!HasSendText(_field) && !kbWasHidden()))) {
|
if (!isSearching() && !isBotStart() && !isBlocked() && _canSendMessages && (wasVisible || (_replyToId && _replyEditMsg) || (!HasSendText(_field) && !kbWasHidden()))) {
|
||||||
if (!_a_show.animating()) {
|
if (!_a_show.animating()) {
|
||||||
if (hasMarkup) {
|
if (hasMarkup) {
|
||||||
_kbScroll->show();
|
_kbScroll->show();
|
||||||
|
@ -6574,6 +6630,9 @@ void HistoryWidget::replyToMessage(not_null<HistoryItem*> item) {
|
||||||
}
|
}
|
||||||
|
|
||||||
session().data().cancelForwarding(_history);
|
session().data().cancelForwarding(_history);
|
||||||
|
if (_composeSearch) {
|
||||||
|
_composeSearch->hideAnimated();
|
||||||
|
}
|
||||||
|
|
||||||
if (_editMsgId) {
|
if (_editMsgId) {
|
||||||
if (auto localDraft = _history->localDraft()) {
|
if (auto localDraft = _history->localDraft()) {
|
||||||
|
@ -6621,6 +6680,8 @@ void HistoryWidget::editMessage(not_null<HistoryItem*> item) {
|
||||||
controller()->show(
|
controller()->show(
|
||||||
Ui::MakeInformBox(tr::lng_edit_caption_voice()));
|
Ui::MakeInformBox(tr::lng_edit_caption_voice()));
|
||||||
return;
|
return;
|
||||||
|
} else if (_composeSearch) {
|
||||||
|
_composeSearch->hideAnimated();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isRecording()) {
|
if (isRecording()) {
|
||||||
|
@ -7140,6 +7201,10 @@ void HistoryWidget::updateTopBarSelection() {
|
||||||
|| selectedState.textSelected;
|
|| selectedState.textSelected;
|
||||||
_topBar->showSelected(selectedState);
|
_topBar->showSelected(selectedState);
|
||||||
|
|
||||||
|
if ((selectedState.count > 0) && _composeSearch) {
|
||||||
|
_composeSearch->hideAnimated();
|
||||||
|
}
|
||||||
|
|
||||||
const auto transparent = Qt::WA_TransparentForMouseEvents;
|
const auto transparent = Qt::WA_TransparentForMouseEvents;
|
||||||
if (selectedState.count == 0) {
|
if (selectedState.count == 0) {
|
||||||
_reportMessages->clearState();
|
_reportMessages->clearState();
|
||||||
|
|
|
@ -105,6 +105,7 @@ class TopBarWidget;
|
||||||
class ContactStatus;
|
class ContactStatus;
|
||||||
class Element;
|
class Element;
|
||||||
class PinnedTracker;
|
class PinnedTracker;
|
||||||
|
class ComposeSearch;
|
||||||
namespace Controls {
|
namespace Controls {
|
||||||
class RecordLock;
|
class RecordLock;
|
||||||
class VoiceRecordBar;
|
class VoiceRecordBar;
|
||||||
|
@ -609,6 +610,7 @@ private:
|
||||||
void inlineBotResolveFail(const MTP::Error &error, const QString &username);
|
void inlineBotResolveFail(const MTP::Error &error, const QString &username);
|
||||||
|
|
||||||
[[nodiscard]] bool isRecording() const;
|
[[nodiscard]] bool isRecording() const;
|
||||||
|
[[nodiscard]] bool isSearching() const;
|
||||||
|
|
||||||
[[nodiscard]] bool isBotStart() const;
|
[[nodiscard]] bool isBotStart() const;
|
||||||
[[nodiscard]] bool isBlocked() const;
|
[[nodiscard]] bool isBlocked() const;
|
||||||
|
@ -630,6 +632,8 @@ private:
|
||||||
|
|
||||||
bool kbWasHidden() const;
|
bool kbWasHidden() const;
|
||||||
|
|
||||||
|
void searchInChat();
|
||||||
|
|
||||||
MTP::Sender _api;
|
MTP::Sender _api;
|
||||||
MsgId _replyToId = 0;
|
MsgId _replyToId = 0;
|
||||||
Ui::Text::String _replyToName;
|
Ui::Text::String _replyToName;
|
||||||
|
@ -743,6 +747,7 @@ private:
|
||||||
object_ptr<Ui::IconButton> _scheduled = { nullptr };
|
object_ptr<Ui::IconButton> _scheduled = { nullptr };
|
||||||
std::unique_ptr<HistoryView::Controls::TTLButton> _ttlInfo;
|
std::unique_ptr<HistoryView::Controls::TTLButton> _ttlInfo;
|
||||||
const std::unique_ptr<VoiceRecordBar> _voiceRecordBar;
|
const std::unique_ptr<VoiceRecordBar> _voiceRecordBar;
|
||||||
|
std::unique_ptr<HistoryView::ComposeSearch> _composeSearch;
|
||||||
bool _cmdStartShown = false;
|
bool _cmdStartShown = false;
|
||||||
object_ptr<Ui::InputField> _field;
|
object_ptr<Ui::InputField> _field;
|
||||||
bool _inReplyEditForward = false;
|
bool _inReplyEditForward = false;
|
||||||
|
|
|
@ -252,6 +252,7 @@ public:
|
||||||
[[nodiscard]] rpl::producer<SearchRequest> searchRequests() const;
|
[[nodiscard]] rpl::producer<SearchRequest> searchRequests() const;
|
||||||
[[nodiscard]] rpl::producer<PeerData*> fromValue() const;
|
[[nodiscard]] rpl::producer<PeerData*> fromValue() const;
|
||||||
[[nodiscard]] rpl::producer<> queryChanges() const;
|
[[nodiscard]] rpl::producer<> queryChanges() const;
|
||||||
|
[[nodiscard]] rpl::producer<> closeRequests() const;
|
||||||
|
|
||||||
void setFrom(PeerData *peer);
|
void setFrom(PeerData *peer);
|
||||||
|
|
||||||
|
@ -346,6 +347,10 @@ rpl::producer<> TopBar::queryChanges() const {
|
||||||
return _queryChanges.events();
|
return _queryChanges.events();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rpl::producer<> TopBar::closeRequests() const {
|
||||||
|
return _cancel->clicks() | rpl::to_empty;
|
||||||
|
}
|
||||||
|
|
||||||
rpl::producer<PeerData*> TopBar::fromValue() const {
|
rpl::producer<PeerData*> TopBar::fromValue() const {
|
||||||
return _from.value();
|
return _from.value();
|
||||||
}
|
}
|
||||||
|
@ -688,9 +693,13 @@ public:
|
||||||
not_null<History*> history);
|
not_null<History*> history);
|
||||||
~Inner();
|
~Inner();
|
||||||
|
|
||||||
|
void hideAnimated();
|
||||||
|
|
||||||
|
[[nodiscard]] rpl::producer<> destroyRequests() const;
|
||||||
|
[[nodiscard]] rpl::lifetime &lifetime();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void showAnimated();
|
void showAnimated();
|
||||||
void hideAnimated();
|
|
||||||
void hideList();
|
void hideList();
|
||||||
|
|
||||||
const not_null<Window::SessionController*> _window;
|
const not_null<Window::SessionController*> _window;
|
||||||
|
@ -709,6 +718,8 @@ private:
|
||||||
rpl::event_stream<BottomBar::Index> jumps;
|
rpl::event_stream<BottomBar::Index> jumps;
|
||||||
} _pendingJump;
|
} _pendingJump;
|
||||||
|
|
||||||
|
rpl::event_stream<> _destroyRequests;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
ComposeSearch::Inner::Inner(
|
ComposeSearch::Inner::Inner(
|
||||||
|
@ -746,6 +757,11 @@ ComposeSearch::Inner::Inner(
|
||||||
hideList();
|
hideList();
|
||||||
}, _topBar->lifetime());
|
}, _topBar->lifetime());
|
||||||
|
|
||||||
|
_topBar->closeRequests(
|
||||||
|
) | rpl::start_with_next([=] {
|
||||||
|
hideAnimated();
|
||||||
|
}, _topBar->lifetime());
|
||||||
|
|
||||||
_apiSearch.newFounds(
|
_apiSearch.newFounds(
|
||||||
) | rpl::start_with_next([=] {
|
) | rpl::start_with_next([=] {
|
||||||
const auto &apiData = _apiSearch.messages();
|
const auto &apiData = _apiSearch.messages();
|
||||||
|
@ -854,7 +870,10 @@ void ComposeSearch::Inner::showAnimated() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ComposeSearch::Inner::hideAnimated() {
|
void ComposeSearch::Inner::hideAnimated() {
|
||||||
|
hideList();
|
||||||
Ui::Animations::HideWidgets({ _topBar.get(), _bottomBar.get() });
|
Ui::Animations::HideWidgets({ _topBar.get(), _bottomBar.get() });
|
||||||
|
|
||||||
|
_destroyRequests.fire({});
|
||||||
}
|
}
|
||||||
|
|
||||||
void ComposeSearch::Inner::hideList() {
|
void ComposeSearch::Inner::hideList() {
|
||||||
|
@ -863,6 +882,14 @@ void ComposeSearch::Inner::hideList() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rpl::producer<> ComposeSearch::Inner::destroyRequests() const {
|
||||||
|
return _destroyRequests.events();
|
||||||
|
}
|
||||||
|
|
||||||
|
rpl::lifetime &ComposeSearch::Inner::lifetime() {
|
||||||
|
return _topBar->lifetime();
|
||||||
|
}
|
||||||
|
|
||||||
ComposeSearch::Inner::~Inner() {
|
ComposeSearch::Inner::~Inner() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -876,4 +903,16 @@ ComposeSearch::ComposeSearch(
|
||||||
ComposeSearch::~ComposeSearch() {
|
ComposeSearch::~ComposeSearch() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ComposeSearch::hideAnimated() {
|
||||||
|
_inner->hideAnimated();
|
||||||
|
}
|
||||||
|
|
||||||
|
rpl::producer<> ComposeSearch::destroyRequests() const {
|
||||||
|
return _inner->destroyRequests();
|
||||||
|
}
|
||||||
|
|
||||||
|
rpl::lifetime &ComposeSearch::lifetime() {
|
||||||
|
return _inner->lifetime();
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace HistoryView
|
} // namespace HistoryView
|
||||||
|
|
|
@ -27,6 +27,12 @@ public:
|
||||||
not_null<History*> history);
|
not_null<History*> history);
|
||||||
~ComposeSearch();
|
~ComposeSearch();
|
||||||
|
|
||||||
|
void hideAnimated();
|
||||||
|
|
||||||
|
[[nodiscard]] rpl::producer<> destroyRequests() const;
|
||||||
|
|
||||||
|
[[nodiscard]] rpl::lifetime &lifetime();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class Inner;
|
class Inner;
|
||||||
const std::unique_ptr<Inner> _inner;
|
const std::unique_ptr<Inner> _inner;
|
||||||
|
|
|
@ -112,7 +112,6 @@ TopBarWidget::TopBarWidget(
|
||||||
_clear->setClickedCallback([=] { _clearSelection.fire({}); });
|
_clear->setClickedCallback([=] { _clearSelection.fire({}); });
|
||||||
_call->setClickedCallback([=] { call(); });
|
_call->setClickedCallback([=] { call(); });
|
||||||
_groupCall->setClickedCallback([=] { groupCall(); });
|
_groupCall->setClickedCallback([=] { groupCall(); });
|
||||||
_search->setClickedCallback([=] { search(); });
|
|
||||||
_menuToggle->setClickedCallback([=] { showPeerMenu(); });
|
_menuToggle->setClickedCallback([=] { showPeerMenu(); });
|
||||||
_infoToggle->setClickedCallback([=] { toggleInfoSection(); });
|
_infoToggle->setClickedCallback([=] { toggleInfoSection(); });
|
||||||
_back->addClickHandler([=] { backClicked(); });
|
_back->addClickHandler([=] { backClicked(); });
|
||||||
|
@ -230,12 +229,6 @@ void TopBarWidget::refreshLang() {
|
||||||
InvokeQueued(this, [this] { updateControlsGeometry(); });
|
InvokeQueued(this, [this] { updateControlsGeometry(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
void TopBarWidget::search() {
|
|
||||||
if (_activeChat.key) {
|
|
||||||
_controller->content()->searchInChat(_activeChat.key);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void TopBarWidget::call() {
|
void TopBarWidget::call() {
|
||||||
if (const auto peer = _activeChat.key.peer()) {
|
if (const auto peer = _activeChat.key.peer()) {
|
||||||
if (const auto user = peer->asUser()) {
|
if (const auto user = peer->asUser()) {
|
||||||
|
@ -262,6 +255,10 @@ void TopBarWidget::clearChooseMessagesForReport() {
|
||||||
setChooseForReportReason(std::nullopt);
|
setChooseForReportReason(std::nullopt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rpl::producer<> TopBarWidget::searchRequest() const {
|
||||||
|
return _search->clicks() | rpl::to_empty;
|
||||||
|
}
|
||||||
|
|
||||||
void TopBarWidget::setChooseForReportReason(
|
void TopBarWidget::setChooseForReportReason(
|
||||||
std::optional<Ui::ReportReason> reason) {
|
std::optional<Ui::ReportReason> reason) {
|
||||||
if (_chooseForReportReason == reason) {
|
if (_chooseForReportReason == reason) {
|
||||||
|
|
|
@ -71,21 +71,22 @@ public:
|
||||||
void showChooseMessagesForReport(Ui::ReportReason reason);
|
void showChooseMessagesForReport(Ui::ReportReason reason);
|
||||||
void clearChooseMessagesForReport();
|
void clearChooseMessagesForReport();
|
||||||
|
|
||||||
rpl::producer<> forwardSelectionRequest() const {
|
[[nodiscard]] rpl::producer<> forwardSelectionRequest() const {
|
||||||
return _forwardSelection.events();
|
return _forwardSelection.events();
|
||||||
}
|
}
|
||||||
rpl::producer<> sendNowSelectionRequest() const {
|
[[nodiscard]] rpl::producer<> sendNowSelectionRequest() const {
|
||||||
return _sendNowSelection.events();
|
return _sendNowSelection.events();
|
||||||
}
|
}
|
||||||
rpl::producer<> deleteSelectionRequest() const {
|
[[nodiscard]] rpl::producer<> deleteSelectionRequest() const {
|
||||||
return _deleteSelection.events();
|
return _deleteSelection.events();
|
||||||
}
|
}
|
||||||
rpl::producer<> clearSelectionRequest() const {
|
[[nodiscard]] rpl::producer<> clearSelectionRequest() const {
|
||||||
return _clearSelection.events();
|
return _clearSelection.events();
|
||||||
}
|
}
|
||||||
rpl::producer<> cancelChooseForReportRequest() const {
|
[[nodiscard]] rpl::producer<> cancelChooseForReportRequest() const {
|
||||||
return _cancelChooseForReport.events();
|
return _cancelChooseForReport.events();
|
||||||
}
|
}
|
||||||
|
[[nodiscard]] rpl::producer<> searchRequest() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void paintEvent(QPaintEvent *e) override;
|
void paintEvent(QPaintEvent *e) override;
|
||||||
|
@ -108,7 +109,6 @@ private:
|
||||||
void call();
|
void call();
|
||||||
void groupCall();
|
void groupCall();
|
||||||
void startGroupCall(not_null<ChannelData*> megagroup, bool confirmed);
|
void startGroupCall(not_null<ChannelData*> megagroup, bool confirmed);
|
||||||
void search();
|
|
||||||
void showPeerMenu();
|
void showPeerMenu();
|
||||||
void showGroupCallMenu(not_null<PeerData*> peer);
|
void showGroupCallMenu(not_null<PeerData*> peer);
|
||||||
void toggleInfoSection();
|
void toggleInfoSection();
|
||||||
|
|
Loading…
Add table
Reference in a new issue