Don't allow selected items together with text.

This commit is contained in:
John Preston 2021-08-18 14:52:49 +03:00
parent c77f4dd794
commit 02f48a7781
1 changed files with 4 additions and 0 deletions

View File

@ -3168,6 +3168,10 @@ void HistoryInner::addToSelection(
not_null<HistoryItem*> item) const {
const auto i = toItems->find(item);
if (i == toItems->cend()) {
if (toItems->size() == 1
&& toItems->begin()->second != FullSelection) {
toItems->clear();
}
toItems->emplace(item, FullSelection);
} else if (i->second != FullSelection) {
i->second = FullSelection;