summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD17
-rw-r--r--range-v3-0.9-pr6501.patch215
3 files changed, 225 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index dbdf33d8c958..a935b7ec2d88 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = telegram-desktop-udf-patched
pkgdesc = Telegram Desktop client with several personal patches
- pkgver = 1.8.8
+ pkgver = 1.8.9
pkgrel = 1
url = https://desktop.telegram.org/
arch = x86_64
@@ -22,7 +22,7 @@ pkgbase = telegram-desktop-udf-patched
optdepends = ttf-opensans: default Open Sans font family
provides = telegram-desktop
conflicts = telegram-desktop
- source = tdesktop::git+https://github.com/telegramdesktop/tdesktop.git#tag=v1.8.8
+ source = tdesktop::git+https://github.com/telegramdesktop/tdesktop.git#tag=v1.8.9
source = libtgvoip::git+https://github.com/telegramdesktop/libtgvoip
source = variant::git+https://github.com/mapbox/variant
source = Catch2::git+https://github.com/catchorg/Catch2.git
@@ -39,6 +39,7 @@ pkgbase = telegram-desktop-udf-patched
source = Use-system-wide-font.patch::https://git.archlinux.org/svntogit/community.git/plain/telegram-desktop/repos/community-x86_64/Use-system-wide-font.patch
source = tdesktop_lottie_animation_qtdebug.patch::https://git.archlinux.org/svntogit/community.git/plain/telegram-desktop/repos/community-x86_64/tdesktop_lottie_animation_qtdebug.patch
source = revert-private-headers.patch::https://github.com/telegramdesktop/tdesktop/commit/b9d3ba621eb8af638af46c6b3cfd7a8330bf0dd5.patch
+ source = range-v3-0.9-pr6501.patch
source = always_delete_for_everyone.patch
source = always_clear_history_for_everyone.patch
source = always_pin_without_notify.patch
@@ -60,6 +61,7 @@ pkgbase = telegram-desktop-udf-patched
sha512sums = ce6be003220267bac5483caf8302b492e1581892bc36d35a61236ebf9f9d766b8bd2159557a1c36256aa85f461797a38bfaae57b12da7a72101b21c0b17ed653
sha512sums = a83b80668b2dc2cc77c857069fdb45b487793fda01ad8a63bab66c6a1c71e5d032050e4ec7efb5b4c3216badc5377c856ef1f4a59c2e02b24ee53b1d83124bf3
sha512sums = e25dc1c54d6001a7a3740c6cee40a12a2313a3fd2e41986268f0ee5d9d8bf2d34812f539efb0eb5d26d3f263b2e4a7849016711532bf215aa9ff38da30175557
+ sha512sums = fd05506cc7408b4b23f83e6432324362f8bf04842e4f42531c269350c44d63b582be9e457f3dcbf29b0dc32b58a482597c12ae9c1cda8a85c700e55ca1ef37db
sha512sums = e88fa96024efc6176c818d0a46684e0ee1fb3a7bdadb323ad3b29f736209c80b6c31b135cf84389e7e2bbd614e57b241e4437c94b6fd114e73cfc418bf130015
sha512sums = 4a7e9de924bbf32fb4cd24ffa2764bcf49e0540bba649829b180da20a62810d4a21ebf11529d4eca22c9ceaa93b434ca3fbfd0b636795f8109ea4e1eddbff8f3
sha512sums = b4eeeb4b2801f3edcc7423f28403b1dfabd3f3869425e4f102a2a4554bde93e63bd73d2d4dbf3e5748ce831b570e441d3917f532fc5cceac1ee5e8fd0832cb30
diff --git a/PKGBUILD b/PKGBUILD
index a56682c2ea69..a45bef9ef0dc 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,5 +1,5 @@
# Maintainer: Sameer Hoosen <tabhooked@gmail.com>
-# Official package maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
+# Official package maintainer: Sven-Hendrik Haase <svenstaro@gmail.com>
# Based on telegram-desktop-dev by: Giovanni 'ItachiSan' Santini <giovannisantini93@yahoo.it>
# Contributor: hexchain <i@hexchain.org>
@@ -10,7 +10,7 @@
# https://github.com/mymedia2/tdesktop
pkgname=telegram-desktop-udf-patched
-pkgver=1.8.8
+pkgver=1.8.9
pkgrel=1
pkgdesc='Telegram Desktop client with several personal patches'
arch=('x86_64')
@@ -43,6 +43,8 @@ source=(
"Use-system-wide-font.patch::https://git.archlinux.org/svntogit/community.git/plain/telegram-desktop/repos/community-x86_64/Use-system-wide-font.patch"
"tdesktop_lottie_animation_qtdebug.patch::https://git.archlinux.org/svntogit/community.git/plain/telegram-desktop/repos/community-x86_64/tdesktop_lottie_animation_qtdebug.patch"
"revert-private-headers.patch::https://github.com/telegramdesktop/tdesktop/commit/b9d3ba621eb8af638af46c6b3cfd7a8330bf0dd5.patch"
+ # This was from the official package, but has since changed
+ "range-v3-0.9-pr6501.patch"
# Custom patches
"always_delete_for_everyone.patch"
"always_clear_history_for_everyone.patch"
@@ -68,6 +70,7 @@ sha512sums=(
'ce6be003220267bac5483caf8302b492e1581892bc36d35a61236ebf9f9d766b8bd2159557a1c36256aa85f461797a38bfaae57b12da7a72101b21c0b17ed653'
'a83b80668b2dc2cc77c857069fdb45b487793fda01ad8a63bab66c6a1c71e5d032050e4ec7efb5b4c3216badc5377c856ef1f4a59c2e02b24ee53b1d83124bf3'
'e25dc1c54d6001a7a3740c6cee40a12a2313a3fd2e41986268f0ee5d9d8bf2d34812f539efb0eb5d26d3f263b2e4a7849016711532bf215aa9ff38da30175557'
+ 'fd05506cc7408b4b23f83e6432324362f8bf04842e4f42531c269350c44d63b582be9e457f3dcbf29b0dc32b58a482597c12ae9c1cda8a85c700e55ca1ef37db'
# Custom patches
'e88fa96024efc6176c818d0a46684e0ee1fb3a7bdadb323ad3b29f736209c80b6c31b135cf84389e7e2bbd614e57b241e4437c94b6fd114e73cfc418bf130015'
'4a7e9de924bbf32fb4cd24ffa2764bcf49e0540bba649829b180da20a62810d4a21ebf11529d4eca22c9ceaa93b434ca3fbfd0b636795f8109ea4e1eddbff8f3'
@@ -93,6 +96,7 @@ prepare() {
patch -Np1 -i "$srcdir/Use-system-wide-font.patch"
patch -Np1 -i "$srcdir/tdesktop_lottie_animation_qtdebug.patch"
patch -R -Np1 -i "$srcdir/revert-private-headers.patch"
+ patch -Np1 -i "$srcdir/range-v3-0.9-pr6501.patch"
# custom patches
patch -Np1 -i "$srcdir/always_delete_for_everyone.patch"
@@ -103,15 +107,6 @@ prepare() {
# disable static-qt for rlottie
sed "/RLOTTIE_WITH_STATIC_QT/d" -i "$srcdir/tdesktop/Telegram/gyp/lib_rlottie.gyp"
- # fix C++ ranges::sized_iterator_range
- sed "s/ranges::make_iterator_range/ranges::subrange/g" -i "$srcdir/tdesktop/Telegram/SourceFiles/data/data_channel.cpp"
- sed "s/ranges::make_iterator_range/ranges::subrange/g" -i "$srcdir/tdesktop/Telegram/SourceFiles/chat_helpers/emoji_keywords.cpp"
- sed "s/ranges::make_iterator_range/ranges::subrange/g" -i "$srcdir/tdesktop/Telegram/SourceFiles/media/streaming/media_streaming_reader.cpp"
- sed "s/ranges::make_iterator_range/ranges::subrange/g" -i "$srcdir/tdesktop/Telegram/SourceFiles/ui/widgets/input_fields.cpp"
- sed "s/ranges::make_iterator_range/ranges::subrange/g" -i "$srcdir/tdesktop/Telegram/SourceFiles/ui/text/text_entity.cpp"
- sed "s/make_iterator_range/ranges::subrange/g" -i "$srcdir/tdesktop/Telegram/SourceFiles/history/history_inner_widget.cpp"
- sed "/int remainder = 0;/a inline bool operator==(const PercentCounterItem &o) const { return !(*this < o) && !(o < *this);}" -i "$srcdir/tdesktop/Telegram/SourceFiles/history/view/media/history_view_poll.cpp"
-
cd "$srcdir/tdesktop"
cd "Telegram/ThirdParty/libtgvoip"
patch -Np1 -i "$srcdir/libtgvoip.patch"
diff --git a/range-v3-0.9-pr6501.patch b/range-v3-0.9-pr6501.patch
new file mode 100644
index 000000000000..bfeaecded709
--- /dev/null
+++ b/range-v3-0.9-pr6501.patch
@@ -0,0 +1,215 @@
+diff --git a/Telegram/SourceFiles/boxes/single_choice_box.cpp b/Telegram/SourceFiles/boxes/single_choice_box.cpp
+index 8844a1780..de73450de 100644
+--- a/Telegram/SourceFiles/boxes/single_choice_box.cpp
++++ b/Telegram/SourceFiles/boxes/single_choice_box.cpp
+@@ -38,7 +38,7 @@ void SingleChoiceBox::prepare() {
+ content->add(object_ptr<Ui::FixedHeightWidget>(
+ content,
+ st::boxOptionListPadding.top() + st::autolockButton.margin.top()));
+- auto &&ints = ranges::view::ints(0);
++ auto &&ints = ranges::view::ints(0, ranges::unreachable);
+ for (const auto &[i, text] : ranges::view::zip(ints, _optionTexts)) {
+ content->add(
+ object_ptr<Ui::Radiobutton>(
+diff --git a/Telegram/SourceFiles/chat_helpers/emoji_keywords.cpp b/Telegram/SourceFiles/chat_helpers/emoji_keywords.cpp
+index 7773fd310..afde3180c 100644
+--- a/Telegram/SourceFiles/chat_helpers/emoji_keywords.cpp
++++ b/Telegram/SourceFiles/chat_helpers/emoji_keywords.cpp
+@@ -449,7 +449,7 @@ std::vector<Result> EmojiKeywords::LangPack::query(
+ }
+
+ const auto from = _data.emoji.lower_bound(normalized);
+- auto &&chosen = ranges::make_iterator_range(
++ auto &&chosen = ranges::subrange(
+ from,
+ end(_data.emoji)
+ ) | ranges::view::take_while([&](const auto &pair) {
+diff --git a/Telegram/SourceFiles/chat_helpers/emoji_sets_manager.cpp b/Telegram/SourceFiles/chat_helpers/emoji_sets_manager.cpp
+index 47493a65d..0b2043fb0 100644
+--- a/Telegram/SourceFiles/chat_helpers/emoji_sets_manager.cpp
++++ b/Telegram/SourceFiles/chat_helpers/emoji_sets_manager.cpp
+@@ -366,7 +366,7 @@ void Row::paintPreview(Painter &p) const {
+ const auto y = st::manageEmojiPreviewPadding.top();
+ const auto width = st::manageEmojiPreviewWidth;
+ const auto height = st::manageEmojiPreviewWidth;
+- auto &&preview = ranges::view::zip(_preview, ranges::view::ints(0));
++ auto &&preview = ranges::view::zip(_preview, ranges::view::ints(0, int(_preview.size())));
+ for (const auto &[pixmap, index] : preview) {
+ const auto row = (index / 2);
+ const auto column = (index % 2);
+@@ -569,7 +569,7 @@ void Row::setupPreview(const Set &set) {
+ const auto size = st::manageEmojiPreview * cIntRetinaFactor();
+ const auto original = QImage(set.previewPath);
+ const auto full = original.height();
+- auto &&preview = ranges::view::zip(_preview, ranges::view::ints(0));
++ auto &&preview = ranges::view::zip(_preview, ranges::view::ints(0, int(_preview.size())));
+ for (auto &&[pixmap, index] : preview) {
+ pixmap = App::pixmapFromImageInPlace(original.copy(
+ { full * index, 0, full, full }
+diff --git a/Telegram/SourceFiles/data/data_channel.cpp b/Telegram/SourceFiles/data/data_channel.cpp
+index e4496e01d..129a7e028 100644
+--- a/Telegram/SourceFiles/data/data_channel.cpp
++++ b/Telegram/SourceFiles/data/data_channel.cpp
+@@ -764,7 +764,7 @@ void ApplyMegagroupAdmins(
+ }
+
+ auto adding = base::flat_map<UserId, QString>();
+- auto admins = ranges::make_iterator_range(
++ auto admins = ranges::subrange(
+ list.begin(), list.end()
+ ) | ranges::view::transform([](const MTPChannelParticipant &p) {
+ const auto userId = p.match([](const auto &data) {
+diff --git a/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp b/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp
+index 98cadc406..e4749e206 100644
+--- a/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp
++++ b/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp
+@@ -2965,7 +2965,7 @@ void InnerWidget::setupShortcuts() {
+ Command::ChatPinned4,
+ Command::ChatPinned5,
+ };
+- auto &&pinned = ranges::view::zip(kPinned, ranges::view::ints(0));
++ auto &&pinned = ranges::view::zip(kPinned, ranges::view::ints(0, ranges::unreachable));
+ for (const auto [command, index] : pinned) {
+ request->check(command) && request->handle([=, index = index] {
+ const auto list = session().data().chatsList()->indexed();
+diff --git a/Telegram/SourceFiles/export/data/export_data_types.cpp b/Telegram/SourceFiles/export/data/export_data_types.cpp
+index 62a5d47aa..aab49845e 100644
+--- a/Telegram/SourceFiles/export/data/export_data_types.cpp
++++ b/Telegram/SourceFiles/export/data/export_data_types.cpp
+@@ -17,7 +17,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
+ #include <range/v3/algorithm/max_element.hpp>
+ #include <range/v3/view/all.hpp>
+ #include <range/v3/view/transform.hpp>
+-#include <range/v3/to_container.hpp>
++#include <range/v3/range/conversion.hpp>
+
+ namespace App { // Hackish..
+ QString formatPhone(QString phone);
+diff --git a/Telegram/SourceFiles/history/history_inner_widget.cpp b/Telegram/SourceFiles/history/history_inner_widget.cpp
+index fba413539..babdb28a4 100644
+--- a/Telegram/SourceFiles/history/history_inner_widget.cpp
++++ b/Telegram/SourceFiles/history/history_inner_widget.cpp
+@@ -2437,7 +2437,7 @@ MessageIdsList HistoryInner::getSelectedItems() const {
+ return {};
+ }
+
+- auto result = make_iterator_range(
++ auto result = ranges::subrange(
+ _selected.begin(),
+ _selected.end()
+ ) | view::filter([](const auto &selected) {
+diff --git a/Telegram/SourceFiles/history/view/media/history_view_poll.cpp b/Telegram/SourceFiles/history/view/media/history_view_poll.cpp
+index 886440199..d095ad661 100644
+--- a/Telegram/SourceFiles/history/view/media/history_view_poll.cpp
++++ b/Telegram/SourceFiles/history/view/media/history_view_poll.cpp
+@@ -34,6 +34,10 @@ struct PercentCounterItem {
+ int percent = 0;
+ int remainder = 0;
+
++ inline bool operator==(const PercentCounterItem &o) const {
++ return remainder == o.remainder && percent == o.percent;
++ }
++
+ inline bool operator<(const PercentCounterItem &other) const {
+ if (remainder > other.remainder) {
+ return true;
+@@ -87,7 +91,7 @@ void CountNicePercent(
+ auto &&zipped = ranges::view::zip(
+ votes,
+ items,
+- ranges::view::ints(0));
++ ranges::view::ints(0, int(items.size())));
+ for (auto &&[votes, item, index] : zipped) {
+ item.index = index;
+ item.percent = (votes * 100) / total;
+diff --git a/Telegram/SourceFiles/media/streaming/media_streaming_reader.cpp b/Telegram/SourceFiles/media/streaming/media_streaming_reader.cpp
+index c1e1705d5..4eaf64887 100644
+--- a/Telegram/SourceFiles/media/streaming/media_streaming_reader.cpp
++++ b/Telegram/SourceFiles/media/streaming/media_streaming_reader.cpp
+@@ -291,7 +291,7 @@ auto Reader::Slice::prepareFill(int from, int till) -> PrepareFillResult {
+ ranges::less(),
+ &PartsMap::value_type::first);
+ const auto haveTill = FindNotLoadedStart(
+- ranges::make_iterator_range(start, finish),
++ ranges::subrange(start, finish),
+ fromOffset);
+ if (haveTill < till) {
+ result.offsetsFromLoader = offsetsFromLoader(
+@@ -607,14 +607,14 @@ auto Reader::Slices::fill(int offset, bytes::span buffer) -> FillResult {
+ markSliceUsed(fromSlice);
+ CopyLoaded(
+ buffer,
+- ranges::make_iterator_range(first.start, first.finish),
++ ranges::subrange(first.start, first.finish),
+ firstFrom,
+ firstTill);
+ if (fromSlice + 1 < tillSlice) {
+ markSliceUsed(fromSlice + 1);
+ CopyLoaded(
+ buffer.subspan(firstTill - firstFrom),
+- ranges::make_iterator_range(second.start, second.finish),
++ ranges::subrange(second.start, second.finish),
+ secondFrom,
+ secondTill);
+ }
+@@ -644,7 +644,7 @@ auto Reader::Slices::fillFromHeader(int offset, bytes::span buffer)
+ if (prepared.ready) {
+ CopyLoaded(
+ buffer,
+- ranges::make_iterator_range(prepared.start, prepared.finish),
++ ranges::subrange(prepared.start, prepared.finish),
+ from,
+ till);
+ result.filled = true;
+diff --git a/Telegram/SourceFiles/ui/grouped_layout.cpp b/Telegram/SourceFiles/ui/grouped_layout.cpp
+index 8cd1a3bd8..7b98af8b3 100644
+--- a/Telegram/SourceFiles/ui/grouped_layout.cpp
++++ b/Telegram/SourceFiles/ui/grouped_layout.cpp
+@@ -117,7 +117,7 @@ std::string Layouter::CountProportions(const std::vector<float64> &ratios) {
+ ratios
+ ) | ranges::view::transform([](float64 ratio) {
+ return (ratio > 1.2) ? 'w' : (ratio < 0.8) ? 'n' : 'q';
+- }) | ranges::to_<std::string>();
++ }) | ranges::to<std::string>();
+ }
+
+ std::vector<GroupMediaLayout> Layouter::layout() const {
+diff --git a/Telegram/SourceFiles/ui/image/image_prepare.cpp b/Telegram/SourceFiles/ui/image/image_prepare.cpp
+index 7195de55d..edf774b26 100644
+--- a/Telegram/SourceFiles/ui/image/image_prepare.cpp
++++ b/Telegram/SourceFiles/ui/image/image_prepare.cpp
+@@ -212,7 +212,7 @@ QImage BlurLargeImage(QImage image, int radius) {
+ const auto dvs = take(dvcount);
+
+ auto &&ints = ranges::view::ints;
+- for (auto &&[value, index] : ranges::view::zip(dvs, ints(0))) {
++ for (auto &&[value, index] : ranges::view::zip(dvs, ints(0, ranges::unreachable))) {
+ value = (index / divsum);
+ }
+ const auto dv = dvs.data();
+diff --git a/Telegram/SourceFiles/ui/text/text_entity.cpp b/Telegram/SourceFiles/ui/text/text_entity.cpp
+index 91b5b1631..0a660e5dd 100644
+--- a/Telegram/SourceFiles/ui/text/text_entity.cpp
++++ b/Telegram/SourceFiles/ui/text/text_entity.cpp
+@@ -2045,7 +2045,7 @@ EntityInText::EntityInText(
+ int EntityInText::FirstMonospaceOffset(
+ const EntitiesInText &entities,
+ int textLength) {
+- auto &&monospace = ranges::make_iterator_range(
++ auto &&monospace = ranges::subrange(
+ entities.begin(),
+ entities.end()
+ ) | ranges::view::filter([](const EntityInText & entity) {
+diff --git a/Telegram/SourceFiles/ui/widgets/input_fields.cpp b/Telegram/SourceFiles/ui/widgets/input_fields.cpp
+index 7c05d7ec2..270a9368a 100644
+--- a/Telegram/SourceFiles/ui/widgets/input_fields.cpp
++++ b/Telegram/SourceFiles/ui/widgets/input_fields.cpp
+@@ -817,7 +817,7 @@ struct FormattingAction {
+
+ QString ExpandCustomLinks(const TextWithTags &text) {
+ const auto entities = ConvertTextTagsToEntities(text.tags);
+- auto &&urls = ranges::make_iterator_range(
++ auto &&urls = ranges::subrange(
+ entities.begin(),
+ entities.end()
+ ) | ranges::view::filter([](const EntityInText &entity) {