2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Fixed refreshing of file reference in api toggling media module.

This commit is contained in:
23rd
2022-04-07 19:12:58 +03:00
parent cf6b995c50
commit 4ad31ce4e0
3 changed files with 24 additions and 16 deletions

View File

@@ -2332,6 +2332,9 @@ void ApiWrap::refreshFileReference(
void ApiWrap::refreshFileReference(
Data::FileOrigin origin,
FileReferencesHandler &&handler) {
const auto fail = [&] {
handler(UpdatedFileReferences());
};
const auto request = [&](
auto &&data,
Fn<void()> &&additional = nullptr) {
@@ -2349,9 +2352,6 @@ void ApiWrap::refreshFileReference(
}
}
};
const auto fail = [&] {
handler(UpdatedFileReferences());
};
v::match(origin.data, [&](Data::FileOriginMessage data) {
if (const auto item = _session->data().message(data)) {
if (item->isScheduled()) {