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

Add a Reopen Topic button on topic top for admins.

This commit is contained in:
John Preston
2022-10-21 16:32:23 +04:00
parent 92bf925fd0
commit b497e5ea21
9 changed files with 222 additions and 70 deletions

View File

@@ -409,7 +409,7 @@ void Filler::addToggleTopicClosed() {
}
const auto closed = _topic->closed();
const auto weak = base::make_weak(_topic);
_addAction(closed ? u"Reopen"_q : u"Close"_q, [=] {
_addAction(closed ? tr::lng_forum_topic_reopen(tr::now) : tr::lng_forum_topic_close(tr::now), [=] {
if (const auto topic = weak.get()) {
topic->setClosedAndSave(!closed);
}