2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Change chat for forwarded items by click on them.

Closes #3637
This commit is contained in:
John Preston
2017-07-11 13:23:15 +03:00
parent d94ef82327
commit ac99784bf7
9 changed files with 84 additions and 62 deletions

View File

@@ -951,13 +951,14 @@ void MediaView::onShowInFolder() {
void MediaView::onForward() {
auto item = App::histItemById(_msgmigrated ? 0 : _channel, _msgid);
if (!_msgid || !item) return;
if (!_msgid || !item || item->id < 0 || item->serviceMsg()) return;
if (App::wnd()) {
close();
if (App::main()) {
App::contextItem(item);
App::main()->forwardLayer();
if (auto main = App::main()) {
auto items = SelectedItemSet();
items.insert(item->id, item);
main->showForwardLayer(items);
}
}
}