mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Display pinned messages bar after topic creation.
This commit is contained in:
parent
3fcb7c90e0
commit
b5a412929e
2 changed files with 20 additions and 12 deletions
|
@ -483,6 +483,9 @@ void RepliesWidget::setupTopicViewer() {
|
|||
} else {
|
||||
refreshReplies();
|
||||
refreshTopBarActiveChat();
|
||||
if (_topic) {
|
||||
subscribeToPinnedMessages();
|
||||
}
|
||||
}
|
||||
_inner->update();
|
||||
}
|
||||
|
@ -533,6 +536,13 @@ void RepliesWidget::subscribeToTopic() {
|
|||
}, _topicLifetime);
|
||||
|
||||
if (!_topic->creating()) {
|
||||
subscribeToPinnedMessages();
|
||||
}
|
||||
|
||||
_cornerButtons.updateUnreadThingsVisibility();
|
||||
}
|
||||
|
||||
void RepliesWidget::subscribeToPinnedMessages() {
|
||||
using EntryUpdateFlag = Data::EntryUpdate::Flag;
|
||||
session().changes().entryUpdates(
|
||||
EntryUpdateFlag::HasPinnedMessages
|
||||
|
@ -547,9 +557,6 @@ void RepliesWidget::subscribeToTopic() {
|
|||
setupPinnedTracker();
|
||||
}
|
||||
|
||||
_cornerButtons.updateUnreadThingsVisibility();
|
||||
}
|
||||
|
||||
void RepliesWidget::setTopic(Data::ForumTopic *topic) {
|
||||
if (_topic == topic) {
|
||||
return;
|
||||
|
|
|
@ -214,6 +214,7 @@ private:
|
|||
void setupRootView();
|
||||
void setupTopicViewer();
|
||||
void subscribeToTopic();
|
||||
void subscribeToPinnedMessages();
|
||||
void setTopic(Data::ForumTopic *topic);
|
||||
void setupDragArea();
|
||||
void setupShortcuts();
|
||||
|
|
Loading…
Add table
Reference in a new issue