mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-01 15:15:13 +00:00
Don't allow selected items together with text.
This commit is contained in:
@@ -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;
|
||||||
|
Reference in New Issue
Block a user