| 641 | } |
| 642 | |
| 643 | bool MainWidget::sendPaths( |
| 644 | not_null<Data::Thread*> thread, |
| 645 | const QStringList &paths) { |
| 646 | if (!Data::CanSendAnyOf(thread, Data::FilesSendRestrictions())) { |
| 647 | _controller->showToast( |
| 648 | tr::lng_forward_send_files_cant(tr::now)); |
| 649 | return false; |
| 650 | } else if (const auto error = Data::AnyFileRestrictionError( |
| 651 | thread->peer())) { |
| 652 | Data::ShowSendErrorToast(controller(), thread->peer(), error); |
| 653 | return false; |
| 654 | } else { |
| 655 | _controller->showThread( |
| 656 | thread, |
| 657 | ShowAtTheEndMsgId, |
| 658 | Window::SectionShow::Way::ClearStack); |
| 659 | } |
| 660 | return (_controller->activeChatCurrent().thread() == thread) |
| 661 | && (_mainSection |
| 662 | ? _mainSection->confirmSendingFiles(paths) |
| 663 | : _history->confirmSendingFiles(paths)); |
| 664 | } |
| 665 | |
| 666 | bool MainWidget::filesOrForwardDrop( |
| 667 | not_null<Data::Thread*> thread, |
nothing calls this directly
no test coverage detected