mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 06:07:06 +02:00
fix: don't select filtered messages
This commit is contained in:
parent
b6c966f18b
commit
3f79ccbcaf
2 changed files with 13 additions and 1 deletions
|
@ -90,7 +90,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
|
||||
// AyuGram includes
|
||||
#include "ayu/ui/context_menu/context_menu.h"
|
||||
#include "styles/style_ayu_icons.h"
|
||||
#include "ayu/utils/telegram_helpers.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
@ -4157,6 +4157,10 @@ bool HistoryInner::goodForSelection(
|
|||
not_null<SelectedItems*> toItems,
|
||||
not_null<HistoryItem*> item,
|
||||
int &totalCount) const {
|
||||
if (isMessageHidden(item)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!item->isRegular() || item->isService()) {
|
||||
return false;
|
||||
} else if (toItems->find(item) == toItems->end()) {
|
||||
|
|
|
@ -74,6 +74,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include <QtWidgets/QApplication>
|
||||
#include <QtCore/QMimeData>
|
||||
|
||||
// AyuGram includes
|
||||
#include "ayu/utils/telegram_helpers.h"
|
||||
|
||||
|
||||
namespace HistoryView {
|
||||
namespace {
|
||||
|
||||
|
@ -1187,6 +1191,10 @@ bool ListWidget::isGoodForSelection(
|
|||
bool ListWidget::addToSelection(
|
||||
SelectedMap &applyTo,
|
||||
not_null<HistoryItem*> item) const {
|
||||
if (isMessageHidden(item)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const auto itemId = item->fullId();
|
||||
auto [iterator, ok] = applyTo.try_emplace(
|
||||
itemId,
|
||||
|
|
Loading…
Add table
Reference in a new issue