Updated to TD 1.8.13

This commit is contained in:
Eric Kotato 2019-10-03 13:41:04 +03:00
commit eb5cf2177b
9 changed files with 38 additions and 14 deletions

View file

@ -9,7 +9,7 @@
<Identity Name="TelegramMessengerLLP.TelegramDesktop" <Identity Name="TelegramMessengerLLP.TelegramDesktop"
ProcessorArchitecture="ARCHITECTURE" ProcessorArchitecture="ARCHITECTURE"
Publisher="CN=536BC709-8EE1-4478-AF22-F0F0F26FF64A" Publisher="CN=536BC709-8EE1-4478-AF22-F0F0F26FF64A"
Version="1.8.12.0" /> Version="1.8.13.0" />
<Properties> <Properties>
<DisplayName>Telegram Desktop</DisplayName> <DisplayName>Telegram Desktop</DisplayName>
<PublisherDisplayName>Telegram FZ-LLC</PublisherDisplayName> <PublisherDisplayName>Telegram FZ-LLC</PublisherDisplayName>

View file

@ -168,11 +168,20 @@ void AppendFoundEmoji(
std::vector<Result> &result, std::vector<Result> &result,
const QString &label, const QString &label,
const std::vector<LangPackEmoji> &list) { const std::vector<LangPackEmoji> &list) {
// It is important that the 'result' won't relocate while inserting.
result.reserve(result.size() + list.size());
const auto alreadyBegin = result.data();
const auto alreadyEnd = alreadyBegin + result.size();
auto &&add = ranges::view::all( auto &&add = ranges::view::all(
list list
) | ranges::view::filter([&](const LangPackEmoji &entry) { ) | ranges::view::filter([&](const LangPackEmoji &entry) {
const auto i = ranges::find(result, entry.emoji, &Result::emoji); const auto i = ranges::find(
return (i == end(result)); alreadyBegin,
alreadyEnd,
entry.emoji,
&Result::emoji);
return (i == alreadyEnd);
}) | ranges::view::transform([&](const LangPackEmoji &entry) { }) | ranges::view::transform([&](const LangPackEmoji &entry) {
return Result{ entry.emoji, label, entry.text }; return Result{ entry.emoji, label, entry.text };
}); });

View file

@ -15,8 +15,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#define TDESKTOP_ALPHA_VERSION (0ULL) #define TDESKTOP_ALPHA_VERSION (0ULL)
#endif // TDESKTOP_OFFICIAL_TARGET #endif // TDESKTOP_OFFICIAL_TARGET
constexpr auto AppVersion = 1008012; constexpr auto AppVersion = 1008013;
constexpr auto AppVersionStr = "1.8.12"; constexpr auto AppVersionStr = "1.8.13";
constexpr auto AppBetaVersion = false; constexpr auto AppBetaVersion = false;
constexpr auto AppAlphaVersion = TDESKTOP_ALPHA_VERSION; constexpr auto AppAlphaVersion = TDESKTOP_ALPHA_VERSION;
constexpr auto AppKotatoVersion = 1000004; constexpr auto AppKotatoVersion = 1000004;

View file

@ -3165,8 +3165,8 @@ void HistoryWidget::doneShow() {
updateControlsVisibility(); updateControlsVisibility();
if (!_historyInited) { if (!_historyInited) {
updateHistoryGeometry(true); updateHistoryGeometry(true);
} else if (hasPendingResizedItems()) { } else {
updateHistoryGeometry(); handlePendingHistoryUpdate();
} }
preloadHistoryIfNeeded(); preloadHistoryIfNeeded();
if (App::wnd()) { if (App::wnd()) {
@ -5008,11 +5008,15 @@ int HistoryWidget::countAutomaticScrollTop() {
return qMin(result, _scroll->scrollTopMax()); return qMin(result, _scroll->scrollTopMax());
} }
void HistoryWidget::updateHistoryGeometry(bool initial, bool loadedDown, const ScrollChange &change) { void HistoryWidget::updateHistoryGeometry(
bool initial,
bool loadedDown,
const ScrollChange &change) {
if (!_history || (initial && _historyInited) || (!initial && !_historyInited)) { if (!_history || (initial && _historyInited) || (!initial && !_historyInited)) {
return; return;
} }
if (_firstLoadRequest || _a_show.animating()) { if (_firstLoadRequest || _a_show.animating()) {
_updateHistoryGeometryRequired = true;
return; // scrollTopMax etc are not working after recountHistoryGeometry() return; // scrollTopMax etc are not working after recountHistoryGeometry()
} }

View file

@ -27,12 +27,16 @@ Integration &Integration::Instance() {
return *IntegrationInstance; return *IntegrationInstance;
} }
bool Integration::Exists() {
return (IntegrationInstance != nullptr);
}
void Integration::textActionsUpdated() { void Integration::textActionsUpdated() {
} }
void Integration::activationFromTopPanel() { void Integration::activationFromTopPanel() {
} }
std::shared_ptr<ClickHandler> Integration::createLinkHandler( std::shared_ptr<ClickHandler> Integration::createLinkHandler(
EntityType type, EntityType type,
const QString &text, const QString &text,

View file

@ -28,6 +28,7 @@ class Integration {
public: public:
static void Set(not_null<Integration*> instance); static void Set(not_null<Integration*> instance);
static Integration &Instance(); static Integration &Instance();
static bool Exists();
virtual void postponeCall(FnMut<void()> &&callable) = 0; virtual void postponeCall(FnMut<void()> &&callable) = 0;
virtual void registerLeaveSubscription(not_null<QWidget*> widget) = 0; virtual void registerLeaveSubscription(not_null<QWidget*> widget) = 0;

View file

@ -12,7 +12,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
namespace Ui { namespace Ui {
void WriteLogEntry(const QString &message) { void WriteLogEntry(const QString &message) {
Integration::Instance().writeLogEntry(message); if (Integration::Exists()) {
Integration::Instance().writeLogEntry(message);
}
} }
} // namespace Ui } // namespace Ui

View file

@ -1,6 +1,6 @@
AppVersion 1008012 AppVersion 1008013
AppVersionStrMajor 1.8 AppVersionStrMajor 1.8
AppVersionStrSmall 1.8.12 AppVersionStrSmall 1.8.13
AppVersionStr 1.8.12 AppVersionStr 1.8.13
BetaChannel 0 BetaChannel 0
AlphaVersion 0 AlphaVersion 0

View file

@ -1,3 +1,7 @@
1.8.13 (03.10.19)
- Bug fixes and other minor improvements.
1.8.12 (02.10.19) 1.8.12 (02.10.19)
- Bug fixes and other minor improvements. - Bug fixes and other minor improvements.