Fix reply in topic after creation.
This commit is contained in:
parent
bf20dbe3bc
commit
1cfda38345
|
@ -112,6 +112,7 @@ public:
|
||||||
std::shared_ptr<ChatHelpers::Show> show);
|
std::shared_ptr<ChatHelpers::Show> show);
|
||||||
|
|
||||||
void setHistory(const SetHistoryArgs &args);
|
void setHistory(const SetHistoryArgs &args);
|
||||||
|
void updateTopicRootId(MsgId topicRootId);
|
||||||
void init();
|
void init();
|
||||||
|
|
||||||
void editMessage(FullMsgId id, bool photoEditAllowed = false);
|
void editMessage(FullMsgId id, bool photoEditAllowed = false);
|
||||||
|
@ -229,6 +230,10 @@ void FieldHeader::setHistory(const SetHistoryArgs &args) {
|
||||||
_topicRootId = args.topicRootId;
|
_topicRootId = args.topicRootId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FieldHeader::updateTopicRootId(MsgId topicRootId) {
|
||||||
|
_topicRootId = topicRootId;
|
||||||
|
}
|
||||||
|
|
||||||
void FieldHeader::init() {
|
void FieldHeader::init() {
|
||||||
sizeValue(
|
sizeValue(
|
||||||
) | rpl::start_with_next([=](QSize size) {
|
) | rpl::start_with_next([=](QSize size) {
|
||||||
|
@ -855,6 +860,11 @@ Main::Session &ComposeControls::session() const {
|
||||||
return _show->session();
|
return _show->session();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ComposeControls::updateTopicRootId(MsgId topicRootId) {
|
||||||
|
_topicRootId = topicRootId;
|
||||||
|
_header->updateTopicRootId(_topicRootId);
|
||||||
|
}
|
||||||
|
|
||||||
void ComposeControls::setHistory(SetHistoryArgs &&args) {
|
void ComposeControls::setHistory(SetHistoryArgs &&args) {
|
||||||
_showSlowmodeError = std::move(args.showSlowmodeError);
|
_showSlowmodeError = std::move(args.showSlowmodeError);
|
||||||
_sendActionFactory = std::move(args.sendActionFactory);
|
_sendActionFactory = std::move(args.sendActionFactory);
|
||||||
|
|
|
@ -135,6 +135,7 @@ public:
|
||||||
|
|
||||||
[[nodiscard]] Main::Session &session() const;
|
[[nodiscard]] Main::Session &session() const;
|
||||||
void setHistory(SetHistoryArgs &&args);
|
void setHistory(SetHistoryArgs &&args);
|
||||||
|
void updateTopicRootId(MsgId topicRootId);
|
||||||
void setCurrentDialogsEntryState(Dialogs::EntryState state);
|
void setCurrentDialogsEntryState(Dialogs::EntryState state);
|
||||||
[[nodiscard]] PeerData *sendAsPeer() const;
|
[[nodiscard]] PeerData *sendAsPeer() const;
|
||||||
|
|
||||||
|
|
|
@ -493,6 +493,7 @@ void RepliesWidget::setupTopicViewer() {
|
||||||
) | rpl::start_with_next([=](const Data::Session::IdChange &change) {
|
) | rpl::start_with_next([=](const Data::Session::IdChange &change) {
|
||||||
if (_rootId == change.oldId) {
|
if (_rootId == change.oldId) {
|
||||||
_rootId = change.newId.msg;
|
_rootId = change.newId.msg;
|
||||||
|
_composeControls->updateTopicRootId(_rootId);
|
||||||
_sendAction = owner->sendActionManager().repliesPainter(
|
_sendAction = owner->sendActionManager().repliesPainter(
|
||||||
_history,
|
_history,
|
||||||
_rootId);
|
_rootId);
|
||||||
|
|
Loading…
Reference in New Issue