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

Support topic on-the-fly creation.

This commit is contained in:
John Preston
2022-10-04 19:34:45 +04:00
parent 065d2e2ac9
commit 3722e55b67
32 changed files with 447 additions and 130 deletions

View File

@@ -1318,12 +1318,12 @@ MsgId HistoryService::topicRootId() const {
return Data::ForumTopic::kGeneralId;
}
void HistoryService::setReplyToTop(MsgId replyToTop) {
void HistoryService::setReplyFields(
MsgId replyTo,
MsgId replyToTop,
bool isForumPost) {
const auto data = GetDependentData();
if (!data
|| (data->topId == replyToTop)
|| (data->topId != 0)
|| isScheduled()) {
if (!data || IsServerMsgId(data->topId) || isScheduled()) {
return;
}
data->topId = replyToTop;