mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-31 17:41:16 +00:00
Changed Up arrow shortcut for albums to edit item with caption.
Fixed #10134.
This commit is contained in:
@@ -145,4 +145,20 @@ void Groups::refreshViews(const HistoryItemsList &items) {
|
||||
}
|
||||
}
|
||||
|
||||
not_null<HistoryItem*> Groups::findItemToEdit(
|
||||
not_null<HistoryItem*> item) const {
|
||||
const auto group = find(item);
|
||||
if (!group) {
|
||||
return item;
|
||||
}
|
||||
const auto &list = group->items;
|
||||
const auto it = ranges::find_if(
|
||||
list,
|
||||
ranges::not_fn(&HistoryItem::emptyText));
|
||||
if (it == end(list)) {
|
||||
return list.front();
|
||||
}
|
||||
return (*it);
|
||||
}
|
||||
|
||||
} // namespace Data
|
||||
|
||||
Reference in New Issue
Block a user