Fixed editing of last message with uploading media.
This commit is contained in:
parent
1a393ddebb
commit
f0a82de784
1 changed files with 2 additions and 1 deletions
|
@ -4008,7 +4008,8 @@ void ListWidget::editMessageRequestNotify(FullMsgId item) const {
|
||||||
bool ListWidget::lastMessageEditRequestNotify() const {
|
bool ListWidget::lastMessageEditRequestNotify() const {
|
||||||
const auto now = base::unixtime::now();
|
const auto now = base::unixtime::now();
|
||||||
auto proj = [&](not_null<Element*> view) {
|
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 &list = ranges::views::reverse(_items);
|
||||||
const auto it = ranges::find_if(list, std::move(proj));
|
const auto it = ranges::find_if(list, std::move(proj));
|
||||||
|
|
Loading…
Reference in a new issue