commit e37290addf0482b33f5fa806032b7f64c40a771b
Author: Vitaly Zaitsev <vitaly(a)easycoding.org>
Date: Mon Jun 24 13:38:35 2019 +0200
Updated to version 1.7.9.
.gitignore | 2 +
sources | 4 +-
telegram-desktop-build-fixes.patch | 6 +-
telegram-desktop-system-fonts.patch | 2 +-
telegram-desktop-unbundle-minizip.patch | 6 +-
telegram-desktop-upstream-5c49701.patch | 45 +++++++++++
telegram-desktop-upstream-9c85d58.patch | 84 ++++++++++++++++++++
telegram-desktop-upstream-e5cfa3f.patch | 131 ++++++++++++++++++++++++++++++++
telegram-desktop.spec | 15 +++-
9 files changed, 284 insertions(+), 11 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 55ab99d..5e2009b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -88,3 +88,5 @@
/tdesktop-1.7.3.tar.gz
/qtlottie-a3fac9d.tar.gz
/tdesktop-1.7.7.tar.gz
+/qtlottie-eeeb4ed.tar.gz
+/tdesktop-1.7.9.tar.gz
diff --git a/sources b/sources
index 6c679de..995b8d8 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
22d696169c7e4ae7dbd2ab1e979cadd7 crl-d259aeb.tar.gz
-d5d616c1df58d8c5c9ddc5d48f4fbade qtlottie-a3fac9d.tar.gz
-c9426d112011f0a8f911b7d8206ab568 tdesktop-1.7.7.tar.gz
+b969606543aaa6e77ecc15ad303385ad qtlottie-eeeb4ed.tar.gz
+27c8c44290812c197944ad7bbfcaf6fa tdesktop-1.7.9.tar.gz
diff --git a/telegram-desktop-build-fixes.patch b/telegram-desktop-build-fixes.patch
index 8801c54..033efae 100644
--- a/telegram-desktop-build-fixes.patch
+++ b/telegram-desktop-build-fixes.patch
@@ -1,4 +1,4 @@
-From e8ec8c3c9e418de933a253e64675eb373bcf8bd4 Mon Sep 17 00:00:00 2001
+From 2458b181f090113e1e1ebc81e7841a2fb189fee7 Mon Sep 17 00:00:00 2001
From: Vitaly Zaitsev <vitaly(a)easycoding.org>
Date: Fri, 31 Mar 2017 14:29:58 +0200
Subject: [PATCH 1/3] Fixed build under Fedora using rpmbuild and mock.
@@ -815,10 +815,10 @@ index ffe0e5a96..9bc686d44 100644
],
}], ['<!(pkg-config ayatana-appindicator3-0.1; echo $?) == 0', {
diff --git a/Telegram/gyp/telegram_sources.txt b/Telegram/gyp/telegram_sources.txt
-index 08d6d5484..8ea3b104a 100644
+index 927071480..8f5e18ebf 100644
--- a/Telegram/gyp/telegram_sources.txt
+++ b/Telegram/gyp/telegram_sources.txt
-@@ -876,7 +876,7 @@
+@@ -889,7 +889,7 @@
<(src_loc)/mainwindow.h
<(src_loc)/observer_peer.cpp
<(src_loc)/observer_peer.h
diff --git a/telegram-desktop-system-fonts.patch b/telegram-desktop-system-fonts.patch
index cca545d..4f11fc8 100644
--- a/telegram-desktop-system-fonts.patch
+++ b/telegram-desktop-system-fonts.patch
@@ -1,4 +1,4 @@
-From 9fe5ec0a13038280caa2a1605befd80d16b954f8 Mon Sep 17 00:00:00 2001
+From a39307b9b67e949378a4c035e47bdb90fdc53f6f Mon Sep 17 00:00:00 2001
From: Vitaly Zaitsev <vitaly(a)easycoding.org>
Date: Sun, 24 Jun 2018 22:59:34 +0200
Subject: [PATCH 2/3] Backported and rebased patch from Debian maintainer
diff --git a/telegram-desktop-unbundle-minizip.patch
b/telegram-desktop-unbundle-minizip.patch
index 2f6a897..3754d87 100644
--- a/telegram-desktop-unbundle-minizip.patch
+++ b/telegram-desktop-unbundle-minizip.patch
@@ -1,4 +1,4 @@
-From dbe9b8a1f7c7458aa80e3e35613fc50d062425e8 Mon Sep 17 00:00:00 2001
+From 1eadac076feabaa8078a307d3888e7af7f2e8629 Mon Sep 17 00:00:00 2001
From: Vitaly Zaitsev <vitaly(a)easycoding.org>
Date: Wed, 17 Oct 2018 17:57:59 +0200
Subject: [PATCH 3/3] Use packaged version of minizip on Fedora <= 29.
@@ -50,10 +50,10 @@ index 9bc686d44..806374202 100644
'lzma',
'xxhash',
diff --git a/Telegram/gyp/telegram_sources.txt b/Telegram/gyp/telegram_sources.txt
-index 8ea3b104a..57bbe1c91 100644
+index 8f5e18ebf..45137aec6 100644
--- a/Telegram/gyp/telegram_sources.txt
+++ b/Telegram/gyp/telegram_sources.txt
-@@ -883,13 +883,6 @@
+@@ -896,13 +896,6 @@
<(emoji_suggestions_loc)/emoji_suggestions.h
platforms: !win
diff --git a/telegram-desktop-upstream-5c49701.patch
b/telegram-desktop-upstream-5c49701.patch
new file mode 100644
index 0000000..e58ef2e
--- /dev/null
+++ b/telegram-desktop-upstream-5c49701.patch
@@ -0,0 +1,45 @@
+From 5c497016037a41f85e0e5e0df1ab9305a72d45fb Mon Sep 17 00:00:00 2001
+From: John Preston <johnprestonmail(a)gmail.com>
+Date: Mon, 24 Jun 2019 09:55:10 +0200
+Subject: [PATCH] Fix 2SV setup.
+
+Regression was introduced in 0dddb7694f.
+---
+ Telegram/SourceFiles/boxes/passcode_box.cpp | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/Telegram/SourceFiles/boxes/passcode_box.cpp
b/Telegram/SourceFiles/boxes/passcode_box.cpp
+index 684cb82b2..a9ba2109e 100644
+--- a/Telegram/SourceFiles/boxes/passcode_box.cpp
++++ b/Telegram/SourceFiles/boxes/passcode_box.cpp
+@@ -343,7 +343,7 @@ void PasscodeBox::validateEmail(
+ const auto errors = std::make_shared<rpl::event_stream<QString>>();
+ const auto resent = std::make_shared<rpl::event_stream<QString>>();
+ const auto set = std::make_shared<bool>(false);
+- const auto submit = [=](QString code) {
++ const auto submit = crl::guard(this, [=](QString code) {
+ if (_setRequest) {
+ return;
+ }
+@@ -372,8 +372,8 @@ void PasscodeBox::validateEmail(
+ errors->fire(Lang::Hard::ServerError());
+ }
+ }).handleFloodErrors().send();
+- };
+- const auto resend = [=] {
++ });
++ const auto resend = crl::guard(this, [=] {
+ if (_setRequest) {
+ return;
+ }
+@@ -385,8 +385,8 @@ void PasscodeBox::validateEmail(
+ _setRequest = 0;
+ errors->fire(Lang::Hard::ServerError());
+ }).send();
+- };
+- const auto box = getDelegate()->show(
++ });
++ const auto box = _replacedBy = getDelegate()->show(
+ Passport::VerifyEmailBox(
+ email,
+ codeLength,
diff --git a/telegram-desktop-upstream-9c85d58.patch
b/telegram-desktop-upstream-9c85d58.patch
new file mode 100644
index 0000000..b069894
--- /dev/null
+++ b/telegram-desktop-upstream-9c85d58.patch
@@ -0,0 +1,84 @@
+From 9c85d582359135a323f7b81ffeb333d08fe6190c Mon Sep 17 00:00:00 2001
+From: John Preston <johnprestonmail(a)gmail.com>
+Date: Mon, 24 Jun 2019 10:59:21 +0200
+Subject: [PATCH] Fix crash in closing export panel.
+
+---
+ Telegram/SourceFiles/mainwindow.cpp | 13 ++++++++-----
+ Telegram/SourceFiles/ui/widgets/separate_panel.cpp | 4 +++-
+ Telegram/SourceFiles/window/layer_widget.cpp | 2 +-
+ 3 files changed, 12 insertions(+), 7 deletions(-)
+
+diff --git a/Telegram/SourceFiles/mainwindow.cpp b/Telegram/SourceFiles/mainwindow.cpp
+index e4ee2f3dd..d4cdba90f 100644
+--- a/Telegram/SourceFiles/mainwindow.cpp
++++ b/Telegram/SourceFiles/mainwindow.cpp
+@@ -306,7 +306,9 @@ void MainWindow::ensureLayerCreated() {
+ bodyWidget());
+
+ _layer->hideFinishEvents(
+- ) | rpl::start_with_next([=] {
++ ) | rpl::filter([=] {
++ return _layer != nullptr; // Last hide finish is sent from destructor.
++ }) | rpl::start_with_next([=] {
+ destroyLayer();
+ }, _layer->lifetime());
+
+@@ -319,12 +321,14 @@ void MainWindow::destroyLayer() {
+ if (!_layer) {
+ return;
+ }
++
+ auto layer = base::take(_layer);
+ const auto resetFocus = Ui::InFocusChain(layer);
+ if (resetFocus) {
+ setFocus();
+ }
+ layer = nullptr;
++
+ if (const auto controller = sessionController()) {
+ controller->disableGifPauseReason(Window::GifPauseReason::Layer);
+ }
+@@ -337,11 +341,10 @@ void MainWindow::destroyLayer() {
+ }
+
+ void MainWindow::ui_hideSettingsAndLayer(anim::type animated) {
+- if (_layer) {
++ if (animated == anim::type::instant) {
++ destroyLayer();
++ } else if (_layer) {
+ _layer->hideAll(animated);
+- if (animated == anim::type::instant) {
+- destroyLayer();
+- }
+ }
+ }
+
+diff --git a/Telegram/SourceFiles/ui/widgets/separate_panel.cpp
b/Telegram/SourceFiles/ui/widgets/separate_panel.cpp
+index 3de767913..8877ce53d 100644
+--- a/Telegram/SourceFiles/ui/widgets/separate_panel.cpp
++++ b/Telegram/SourceFiles/ui/widgets/separate_panel.cpp
+@@ -285,7 +285,9 @@ void SeparatePanel::ensureLayerCreated() {
+ _layer->resize(size);
+ }, _layer->lifetime());
+ _layer->hideFinishEvents(
+- ) | rpl::start_with_next([=]{
++ ) | rpl::filter([=] {
++ return _layer != nullptr; // Last hide finish is sent from destructor.
++ }) | rpl::start_with_next([=] {
+ if (Ui::InFocusChain(_layer)) {
+ setFocus();
+ }
+diff --git a/Telegram/SourceFiles/window/layer_widget.cpp
b/Telegram/SourceFiles/window/layer_widget.cpp
+index aad6772c9..fbcbb880a 100644
+--- a/Telegram/SourceFiles/window/layer_widget.cpp
++++ b/Telegram/SourceFiles/window/layer_widget.cpp
+@@ -397,7 +397,7 @@ void LayerStackWidget::hideCurrent(anim::type animated) {
+ }
+
+ void LayerStackWidget::hideLayers(anim::type animated) {
+- startAnimation([] {}, [this] {
++ startAnimation([] {}, [&] {
+ clearLayers();
+ }, Action::HideLayer, animated);
+ }
diff --git a/telegram-desktop-upstream-e5cfa3f.patch
b/telegram-desktop-upstream-e5cfa3f.patch
new file mode 100644
index 0000000..6bec918
--- /dev/null
+++ b/telegram-desktop-upstream-e5cfa3f.patch
@@ -0,0 +1,131 @@
+From e5cfa3fdc9092066507d171907a2eb8855f3409d Mon Sep 17 00:00:00 2001
+From: John Preston <johnprestonmail(a)gmail.com>
+Date: Mon, 24 Jun 2019 10:07:32 +0200
+Subject: [PATCH] Fix adding to contacts + closing box crash.
+
+Regression was introduced in b9d1d8519c.
+---
+ .../boxes/peers/edit_contact_box.cpp | 89 +++++++++++--------
+ 1 file changed, 51 insertions(+), 38 deletions(-)
+
+diff --git a/Telegram/SourceFiles/boxes/peers/edit_contact_box.cpp
b/Telegram/SourceFiles/boxes/peers/edit_contact_box.cpp
+index 8f09dd7dd..e1936d1a9 100644
+--- a/Telegram/SourceFiles/boxes/peers/edit_contact_box.cpp
++++ b/Telegram/SourceFiles/boxes/peers/edit_contact_box.cpp
+@@ -32,6 +32,50 @@ QString UserPhone(not_null<UserData*> user) {
+ : phone;
+ }
+
++void SendRequest(
++ QPointer<GenericBox> box,
++ not_null<UserData*> user,
++ bool sharePhone,
++ const QString &first,
++ const QString &last,
++ const QString &phone) {
++ const auto wasContact = user->isContact();
++ using Flag = MTPcontacts_AddContact::Flag;
++ user->session().api().request(MTPcontacts_AddContact(
++ MTP_flags(sharePhone
++ ? Flag::f_add_phone_privacy_exception
++ : Flag(0)),
++ user->inputUser,
++ MTP_string(first),
++ MTP_string(last),
++ MTP_string(phone)
++ )).done([=](const MTPUpdates &result) {
++ user->setName(
++ first,
++ last,
++ user->nameOrPhone,
++ user->username);
++ user->session().api().applyUpdates(result);
++ if (const auto settings = user->settings()) {
++ using Flag = MTPDpeerSettings::Flag;
++ const auto flags = Flag::f_add_contact
++ | Flag::f_block_contact
++ | Flag::f_report_spam;
++ user->setSettings(*settings & ~flags);
++ }
++ if (box) {
++ box->closeBox();
++ }
++ if (!wasContact) {
++ Ui::Toast::Show(tr::lng_new_contact_add_done(
++ tr::now,
++ lt_user,
++ first));
++ }
++ }).fail([=](const RPCError &error) {
++ }).send();
++}
++
+ class Controller {
+ public:
+ Controller(
+@@ -51,7 +95,6 @@ class Controller {
+ not_null<Ui::InputField*> first,
+ not_null<Ui::InputField*> last,
+ bool inverted);
+- void sendRequest(const QString &first, const QString &last);
+
+ not_null<GenericBox*> _box;
+ not_null<Window::Controller*> _window;
+@@ -155,7 +198,13 @@ void Controller::initNameFields(
+ (inverted ? last : first)->showError();
+ return;
+ }
+- sendRequest(firstValue, lastValue);
++ SendRequest(
++ make_weak(_box),
++ _user,
++ _sharePhone && _sharePhone->checked(),
++ firstValue,
++ lastValue,
++ _phone);
+ };
+ const auto submit = [=] {
+ const auto firstValue = first->getLastText().trimmed();
+@@ -173,42 +222,6 @@ void Controller::initNameFields(
+ QObject::connect(last, &Ui::InputField::submitted, submit);
+ }
+
+-void Controller::sendRequest(const QString &first, const QString &last) {
+- const auto wasContact = _user->isContact();
+- const auto weak = make_weak(_box);
+- using Flag = MTPcontacts_AddContact::Flag;
+- _user->session().api().request(MTPcontacts_AddContact(
+- MTP_flags((_sharePhone && _sharePhone->checked())
+- ? Flag::f_add_phone_privacy_exception
+- : Flag(0)),
+- _user->inputUser,
+- MTP_string(first),
+- MTP_string(last),
+- MTP_string(_phone)
+- )).done([=](const MTPUpdates &result) {
+- _user->setName(
+- first,
+- last,
+- _user->nameOrPhone,
+- _user->username);
+- _user->session().api().applyUpdates(result);
+- if (const auto settings = _user->settings()) {
+- using Flag = MTPDpeerSettings::Flag;
+- const auto flags = Flag::f_add_contact
+- | Flag::f_block_contact
+- | Flag::f_report_spam;
+- _user->setSettings(*settings & ~flags);
+- }
+- if (weak) {
+- weak->closeBox();
+- }
+- if (!wasContact) {
+- Ui::Toast::Show(tr::lng_new_contact_add_done(tr::now, lt_user, first));
+- }
+- }).fail([=](const RPCError &error) {
+- }).send();
+-}
+-
+ void Controller::setupWarning() {
+ if (_user->isContact() || !_phone.isEmpty()) {
+ return;
diff --git a/telegram-desktop.spec b/telegram-desktop.spec
index dc115a6..d539664 100644
--- a/telegram-desktop.spec
+++ b/telegram-desktop.spec
@@ -19,7 +19,7 @@
%global shortcommit1 %(c=%{commit1}; echo ${c:0:7})
# Git revision of qtlottie...
-%global commit2 a3fac9db920b167a5f91d678ee7968f100f6fe51
+%global commit2 eeeb4edb2a087c3f8175dafafcad330864d3efc0
%global shortcommit2 %(c=%{commit2}; echo ${c:0:7})
# Decrease debuginfo verbosity to reduce memory consumption...
@@ -32,7 +32,7 @@
Summary: Telegram Desktop official messaging app
Name: telegram-desktop
-Version: 1.7.7
+Version: 1.7.9
Release: 1%{?dist}
# Application and 3rd-party modules licensing:
@@ -54,6 +54,11 @@ Patch0: %{name}-build-fixes.patch
Patch1: %{name}-system-fonts.patch
Patch2: %{name}-unbundle-minizip.patch
+# Upstream patches...
+Patch100: %{name}-upstream-5c49701.patch
+Patch101: %{name}-upstream-e5cfa3f.patch
+Patch102: %{name}-upstream-9c85d58.patch
+
%{?_qt5:Requires: %{_qt5}%{?_isa} = %{_qt5_version}}
Requires: qt5-qtimageformats%{?_isa}
Requires: hicolor-icon-theme
@@ -215,6 +220,12 @@ appstream-util validate-relax --nonet
%{buildroot}%{_metainfodir}/%{name}.appdat
%{_metainfodir}/%{name}.appdata.xml
%changelog
+* Mon Jun 24 2019 Vitaly Zaitsev <vitaly(a)easycoding.org> - 1.7.9-1
+- Updated to 1.7.9.
+
+* Tue Jun 18 2019 Vitaly Zaitsev <vitaly(a)easycoding.org> - 1.7.8-1
+- Updated to 1.7.8 (beta).
+
* Mon Jun 10 2019 Vitaly Zaitsev <vitaly(a)easycoding.org> - 1.7.7-1
- Updated to 1.7.7.