2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 22:55:11 +00:00

Allow topic deletion.

This commit is contained in:
John Preston
2022-10-19 14:59:37 +04:00
parent adaa1d0c55
commit 7cdf20a7c5
43 changed files with 144 additions and 64 deletions

View File

@@ -202,6 +202,13 @@ bool ForumTopic::canEdit() const {
return (_flags & Flag::My) || channel()->canEditTopics();
}
bool ForumTopic::canDelete() const {
return !creating()
&& (channel()->canEditTopics()
// We don't know if we can delete or not.
/*|| ((_flags & Flag::My) && onlyOneMyMessage)*/);
}
bool ForumTopic::canToggleClosed() const {
return !creating() && canEdit();
}