mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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
|
// AyuGram includes
|
||||||
#include "ayu/ui/context_menu/context_menu.h"
|
#include "ayu/ui/context_menu/context_menu.h"
|
||||||
#include "styles/style_ayu_icons.h"
|
#include "ayu/utils/telegram_helpers.h"
|
||||||
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
@ -4157,6 +4157,10 @@ bool HistoryInner::goodForSelection(
|
||||||
not_null<SelectedItems*> toItems,
|
not_null<SelectedItems*> toItems,
|
||||||
not_null<HistoryItem*> item,
|
not_null<HistoryItem*> item,
|
||||||
int &totalCount) const {
|
int &totalCount) const {
|
||||||
|
if (isMessageHidden(item)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (!item->isRegular() || item->isService()) {
|
if (!item->isRegular() || item->isService()) {
|
||||||
return false;
|
return false;
|
||||||
} else if (toItems->find(item) == toItems->end()) {
|
} else if (toItems->find(item) == toItems->end()) {
|
||||||
|
|
|
@ -74,6 +74,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include <QtWidgets/QApplication>
|
#include <QtWidgets/QApplication>
|
||||||
#include <QtCore/QMimeData>
|
#include <QtCore/QMimeData>
|
||||||
|
|
||||||
|
// AyuGram includes
|
||||||
|
#include "ayu/utils/telegram_helpers.h"
|
||||||
|
|
||||||
|
|
||||||
namespace HistoryView {
|
namespace HistoryView {
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
@ -1187,6 +1191,10 @@ bool ListWidget::isGoodForSelection(
|
||||||
bool ListWidget::addToSelection(
|
bool ListWidget::addToSelection(
|
||||||
SelectedMap &applyTo,
|
SelectedMap &applyTo,
|
||||||
not_null<HistoryItem*> item) const {
|
not_null<HistoryItem*> item) const {
|
||||||
|
if (isMessageHidden(item)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
const auto itemId = item->fullId();
|
const auto itemId = item->fullId();
|
||||||
auto [iterator, ok] = applyTo.try_emplace(
|
auto [iterator, ok] = applyTo.try_emplace(
|
||||||
itemId,
|
itemId,
|
||||||
|
|
Loading…
Add table
Reference in a new issue