mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-18 07:07:08 +02:00
Fix reply in topic after creation.
This commit is contained in:
parent
bf20dbe3bc
commit
1cfda38345
3 changed files with 12 additions and 0 deletions
Telegram/SourceFiles/history/view
|
@ -112,6 +112,7 @@ public:
|
|||
std::shared_ptr<ChatHelpers::Show> show);
|
||||
|
||||
void setHistory(const SetHistoryArgs &args);
|
||||
void updateTopicRootId(MsgId topicRootId);
|
||||
void init();
|
||||
|
||||
void editMessage(FullMsgId id, bool photoEditAllowed = false);
|
||||
|
@ -229,6 +230,10 @@ void FieldHeader::setHistory(const SetHistoryArgs &args) {
|
|||
_topicRootId = args.topicRootId;
|
||||
}
|
||||
|
||||
void FieldHeader::updateTopicRootId(MsgId topicRootId) {
|
||||
_topicRootId = topicRootId;
|
||||
}
|
||||
|
||||
void FieldHeader::init() {
|
||||
sizeValue(
|
||||
) | rpl::start_with_next([=](QSize size) {
|
||||
|
@ -855,6 +860,11 @@ Main::Session &ComposeControls::session() const {
|
|||
return _show->session();
|
||||
}
|
||||
|
||||
void ComposeControls::updateTopicRootId(MsgId topicRootId) {
|
||||
_topicRootId = topicRootId;
|
||||
_header->updateTopicRootId(_topicRootId);
|
||||
}
|
||||
|
||||
void ComposeControls::setHistory(SetHistoryArgs &&args) {
|
||||
_showSlowmodeError = std::move(args.showSlowmodeError);
|
||||
_sendActionFactory = std::move(args.sendActionFactory);
|
||||
|
|
|
@ -135,6 +135,7 @@ public:
|
|||
|
||||
[[nodiscard]] Main::Session &session() const;
|
||||
void setHistory(SetHistoryArgs &&args);
|
||||
void updateTopicRootId(MsgId topicRootId);
|
||||
void setCurrentDialogsEntryState(Dialogs::EntryState state);
|
||||
[[nodiscard]] PeerData *sendAsPeer() const;
|
||||
|
||||
|
|
|
@ -493,6 +493,7 @@ void RepliesWidget::setupTopicViewer() {
|
|||
) | rpl::start_with_next([=](const Data::Session::IdChange &change) {
|
||||
if (_rootId == change.oldId) {
|
||||
_rootId = change.newId.msg;
|
||||
_composeControls->updateTopicRootId(_rootId);
|
||||
_sendAction = owner->sendActionManager().repliesPainter(
|
||||
_history,
|
||||
_rootId);
|
||||
|
|
Loading…
Add table
Reference in a new issue