Don't allow selected items together with text.
This commit is contained in:
parent
c77f4dd794
commit
02f48a7781
|
@ -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…
Reference in New Issue