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

Implement correct ForumTopic::canWrite logic.

This commit is contained in:
John Preston
2022-10-25 11:20:22 +04:00
parent 1cd02fc3c9
commit 602ba5bba9
35 changed files with 363 additions and 144 deletions

View File

@@ -1219,7 +1219,7 @@ void PeerMenuShareContactBox(
// There is no async to make weak from controller.
const auto weak = std::make_shared<QPointer<Ui::BoxContent>>();
auto callback = [=](not_null<PeerData*> peer) {
if (!peer->canWrite()) {
if (!peer->canWrite()) { // #TODO forum forward
navigation->parentController()->show(
Ui::MakeInformBox(tr::lng_forward_share_cant()),
Ui::LayerOption::KeepOther);
@@ -1529,10 +1529,10 @@ QPointer<Ui::BoxContent> ShowSendNowMessagesBox(
? tr::lng_scheduled_send_now_many(tr::now, lt_count, items.size())
: tr::lng_scheduled_send_now(tr::now);
const auto list = session->data().idsToItems(items);
const auto error = GetErrorTextForSending(
history->peer,
session->data().idsToItems(items),
TextWithTags());
{ .forward = &list });
if (!error.isEmpty()) {
Ui::ShowMultilineToast({
.parentOverride = Window::Show(navigation).toastParent(),