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

Improve sticker file reference refreshing.

This commit is contained in:
John Preston
2018-09-26 21:08:11 +03:00
parent 131f7ec5bb
commit a7772b922c
6 changed files with 25 additions and 12 deletions

View File

@@ -2505,9 +2505,11 @@ void ApiWrap::refreshFileReference(
if (additional) {
const auto i = _fileReferenceHandlers.find(origin);
Assert(i != end(_fileReferenceHandlers));
i->second.push_back([=](auto&&) {
additional();
});
if (i->second.size() == 1) {
i->second.push_back([=](auto&&) {
additional();
});
}
}
};
const auto fail = [&] {