mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Don't allow selected items together with text.
This commit is contained in:
parent
c77f4dd794
commit
02f48a7781
1 changed files with 4 additions and 0 deletions
|
@ -3168,6 +3168,10 @@ void HistoryInner::addToSelection(
|
||||||
not_null<HistoryItem*> item) const {
|
not_null<HistoryItem*> item) const {
|
||||||
const auto i = toItems->find(item);
|
const auto i = toItems->find(item);
|
||||||
if (i == toItems->cend()) {
|
if (i == toItems->cend()) {
|
||||||
|
if (toItems->size() == 1
|
||||||
|
&& toItems->begin()->second != FullSelection) {
|
||||||
|
toItems->clear();
|
||||||
|
}
|
||||||
toItems->emplace(item, FullSelection);
|
toItems->emplace(item, FullSelection);
|
||||||
} else if (i->second != FullSelection) {
|
} else if (i->second != FullSelection) {
|
||||||
i->second = FullSelection;
|
i->second = FullSelection;
|
||||||
|
|
Loading…
Add table
Reference in a new issue