mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Support replies to stories layout in messages.
This commit is contained in:
@@ -10,10 +10,12 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "base/timer.h"
|
||||
#include "base/power_save_blocker.h"
|
||||
#include "chat_helpers/compose/compose_show.h"
|
||||
#include "data/data_changes.h"
|
||||
#include "data/data_file_origin.h"
|
||||
#include "data/data_session.h"
|
||||
#include "data/data_stories.h"
|
||||
#include "data/data_user.h"
|
||||
#include "main/main_session.h"
|
||||
#include "media/stories/media_stories_caption_full_view.h"
|
||||
#include "media/stories/media_stories_delegate.h"
|
||||
#include "media/stories/media_stories_header.h"
|
||||
@@ -394,6 +396,18 @@ void Controller::show(
|
||||
_slider->show({ .index = _index, .total = list.total });
|
||||
_replyArea->show({ .user = list.user, .id = id });
|
||||
|
||||
const auto session = &list.user->session();
|
||||
if (_session != session) {
|
||||
_session = session;
|
||||
_sessionLifetime = session->changes().storyUpdates(
|
||||
Data::StoryUpdate::Flag::Destroyed
|
||||
) | rpl::start_with_next([=](Data::StoryUpdate update) {
|
||||
if (update.story->fullId() == _shown) {
|
||||
_delegate->storiesClose();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (_contentFaded) {
|
||||
togglePaused(true);
|
||||
}
|
||||
|
Reference in New Issue
Block a user