mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fixed build with Xcode.
This commit is contained in:
parent
8eb24f620d
commit
5e29f382cd
4 changed files with 5 additions and 5 deletions
|
@ -801,7 +801,7 @@ void InnerWidget::paintEvent(QPaintEvent *e) {
|
||||||
p.fillRect(dialogsClip, currentBg());
|
p.fillRect(dialogsClip, currentBg());
|
||||||
}
|
}
|
||||||
} else if (_state == WidgetState::Filtered) {
|
} else if (_state == WidgetState::Filtered) {
|
||||||
auto top = 0;
|
[[maybe_unused]] auto top = 0;
|
||||||
if (!_hashtagResults.empty()) {
|
if (!_hashtagResults.empty()) {
|
||||||
auto from = floorclamp(r.y(), st::mentionHeight, 0, _hashtagResults.size());
|
auto from = floorclamp(r.y(), st::mentionHeight, 0, _hashtagResults.size());
|
||||||
auto to = ceilclamp(r.y() + r.height(), st::mentionHeight, 0, _hashtagResults.size());
|
auto to = ceilclamp(r.y() + r.height(), st::mentionHeight, 0, _hashtagResults.size());
|
||||||
|
|
|
@ -8,6 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "base/qt/qt_compare.h"
|
#include "base/qt/qt_compare.h"
|
||||||
|
#include "data/data_message_reaction_id.h"
|
||||||
|
|
||||||
class History;
|
class History;
|
||||||
class PeerData;
|
class PeerData;
|
||||||
|
|
|
@ -56,9 +56,9 @@ FixedHashtagSearchQuery FixHashtagSearchQuery(
|
||||||
const QString &query,
|
const QString &query,
|
||||||
int cursorPosition) {
|
int cursorPosition) {
|
||||||
const auto trimmed = query.trimmed();
|
const auto trimmed = query.trimmed();
|
||||||
const auto hash = trimmed.isEmpty()
|
const auto hash = int(trimmed.isEmpty()
|
||||||
? query.size()
|
? query.size()
|
||||||
: query.indexOf(trimmed);
|
: query.indexOf(trimmed));
|
||||||
const auto start = std::min(cursorPosition, hash);
|
const auto start = std::min(cursorPosition, hash);
|
||||||
auto result = query.mid(0, start);
|
auto result = query.mid(0, start);
|
||||||
for (const auto &ch : query.mid(start)) {
|
for (const auto &ch : query.mid(start)) {
|
||||||
|
@ -198,4 +198,4 @@ void ChatSearchTabs::paintEvent(QPaintEvent *e) {
|
||||||
QPainter(this).fillRect(e->rect(), st::dialogsBg);
|
QPainter(this).fillRect(e->rect(), st::dialogsBg);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Dialogs
|
} // namespace Dialogs
|
||||||
|
|
|
@ -733,7 +733,6 @@ void MainWidget::hideSingleUseKeyboard(FullMsgId replyToId) {
|
||||||
void MainWidget::searchMessages(const QString &query, Dialogs::Key inChat) {
|
void MainWidget::searchMessages(const QString &query, Dialogs::Key inChat) {
|
||||||
auto tags = Data::SearchTagsFromQuery(query);
|
auto tags = Data::SearchTagsFromQuery(query);
|
||||||
if (controller()->isPrimary()) {
|
if (controller()->isPrimary()) {
|
||||||
using Tab = Dialogs::ChatSearchTab;
|
|
||||||
auto state = Dialogs::SearchState{
|
auto state = Dialogs::SearchState{
|
||||||
.inChat = ((tags.empty() || inChat.sublist())
|
.inChat = ((tags.empty() || inChat.sublist())
|
||||||
? inChat
|
? inChat
|
||||||
|
|
Loading…
Add table
Reference in a new issue