Fixed editing of last message with uploading media.

This commit is contained in:
23rd 2024-05-18 02:00:46 +03:00 committed by John Preston
parent 1a393ddebb
commit f0a82de784
1 changed files with 2 additions and 1 deletions

View File

@ -4008,7 +4008,8 @@ void ListWidget::editMessageRequestNotify(FullMsgId item) const {
bool ListWidget::lastMessageEditRequestNotify() const {
const auto now = base::unixtime::now();
auto proj = [&](not_null<Element*> view) {
return view->data()->allowsEdit(now);
return view->data()->allowsEdit(now)
&& !view->data()->isUploading();
};
const auto &list = ranges::views::reverse(_items);
const auto it = ranges::find_if(list, std::move(proj));