2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-05 09:05:14 +00:00

Merge remote-tracking branch 'tdesktop/dev' into dev

This commit is contained in:
RadRussianRus
2020-07-01 06:33:36 +03:00
61 changed files with 681 additions and 308 deletions

View File

@@ -212,7 +212,7 @@ Widget::Widget(
});
_inner->chosenRow(
) | rpl::start_with_next([=](const ChosenRow &row) {
const auto openSearchResult = !controller->content()->selectingPeer()
const auto openSearchResult = !controller->selectingPeer()
&& row.filteredRow;
if (const auto history = row.key.history()) {
controller->content()->choosePeer(
@@ -701,7 +701,7 @@ void Widget::escape() {
} else if (controller()->activeChatsFilterCurrent() != cDefaultFilterId()) {
controller()->setActiveChatsFilter(cDefaultFilterId());
}
} else if (!_searchInChat && !controller()->content()->selectingPeer()) {
} else if (!_searchInChat && !controller()->selectingPeer()) {
if (controller()->activeChatEntryCurrent().key) {
emit cancelled();
}
@@ -1267,7 +1267,7 @@ void Widget::peopleFailed(const RPCError &error, mtpRequestId requestId) {
void Widget::dragEnterEvent(QDragEnterEvent *e) {
using namespace Storage;
if (controller()->content()->selectingPeer()) {
if (controller()->selectingPeer()) {
return;
}
@@ -1616,7 +1616,7 @@ void Widget::updateControlsGeometry() {
}
void Widget::updateForwardBar() {
auto selecting = controller()->content()->selectingPeer();
auto selecting = controller()->selectingPeer();
auto oneColumnSelecting = (Adaptive::OneColumn() && selecting);
if (!oneColumnSelecting == !_forwardCancel) {
return;
@@ -1759,7 +1759,7 @@ bool Widget::onCancelSearch() {
void Widget::onCancelSearchInChat() {
cancelSearchRequest();
if (_searchInChat) {
if (Adaptive::OneColumn() && !controller()->content()->selectingPeer()) {
if (Adaptive::OneColumn() && !controller()->selectingPeer()) {
if (const auto peer = _searchInChat.peer()) {
Ui::showPeerHistory(peer, ShowAtUnreadMsgId);
//} else if (const auto feed = _searchInChat.feed()) { // #feed
@@ -1774,7 +1774,7 @@ void Widget::onCancelSearchInChat() {
_filter->clear();
_filter->updatePlaceholder();
applyFilterUpdate();
if (!Adaptive::OneColumn() && !controller()->content()->selectingPeer()) {
if (!Adaptive::OneColumn() && !controller()->selectingPeer()) {
emit cancelled();
}
}
@@ -1786,6 +1786,8 @@ void Widget::onDialogMoved(int movedFrom, int movedTo) {
}
}
Widget::~Widget() = default;
Widget::~Widget() {
cancelSearchRequest();
}
} // namespace Dialogs