Compare commits
406 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ea61211a61 | ||
|
|
c560f327cd | ||
|
|
030b298a7d | ||
|
|
b45705f39d | ||
|
|
9871184953 | ||
|
|
7f74084237 | ||
|
|
0fc1a40b42 | ||
|
|
45a6985df5 | ||
|
|
619aca04f9 | ||
|
|
a968e112e8 | ||
|
|
325323e0b3 | ||
|
|
b012847017 | ||
|
|
56d3e69399 | ||
|
|
f1c7409980 | ||
|
|
33ea5ad297 | ||
|
|
a5ea13f248 | ||
|
|
8796572704 | ||
|
|
8829b742fd | ||
|
|
a2b0631932 | ||
|
|
8b804d1995 | ||
|
|
af85aec33b | ||
|
|
e0d4884351 | ||
|
|
b3f5973329 | ||
|
|
f0ed5640db | ||
|
|
39a80e9de7 | ||
|
|
ff0ff1d99c | ||
|
|
ab16c88473 | ||
|
|
26ec440a13 | ||
|
|
fa245099b6 | ||
|
|
ea644a3f81 | ||
|
|
9b6d41a0aa | ||
|
|
7798f88c6f | ||
|
|
2c1e3cd094 | ||
|
|
f1e3d2f513 | ||
|
|
0f08342533 | ||
|
|
2a96f358f6 | ||
|
|
bafa838afc | ||
|
|
de3cc76468 | ||
|
|
b4df7b4efd | ||
|
|
26be382b02 | ||
|
|
7dff10f6fd | ||
|
|
71f6dd85c2 | ||
|
|
abd55679af | ||
|
|
c90e803f1b | ||
|
|
c89a21ef5e | ||
|
|
04843ebdd8 | ||
|
|
60cf1b6490 | ||
|
|
a80f7c53ea | ||
|
|
757e0e6335 | ||
|
|
09b5055fac | ||
|
|
ba1691bf7e | ||
|
|
9873e6d75c | ||
|
|
62a6812259 | ||
|
|
c424607603 | ||
|
|
92ff237c2d | ||
|
|
9059b2e617 | ||
|
|
2b8e76a060 | ||
|
|
9c60d2be80 | ||
|
|
3b7123d159 | ||
|
|
2f2847bfdf | ||
|
|
8099305c53 | ||
|
|
3eadc62cd5 | ||
|
|
c9f56abce5 | ||
|
|
58604406f8 | ||
|
|
a49806bf79 | ||
|
|
65a36e49bd | ||
|
|
db66e93258 | ||
|
|
2f1b029ec9 | ||
|
|
0eb975e679 | ||
|
|
a49a96ba33 | ||
|
|
d2d51cc883 | ||
|
|
e8a99a854d | ||
|
|
a64c8c52b4 | ||
|
|
01054858a4 | ||
|
|
87caa58456 | ||
|
|
6b9675a5b1 | ||
|
|
371f1a51c3 | ||
|
|
8aaaef3ff4 | ||
|
|
7fbec0dbca | ||
|
|
0a86e732cd | ||
|
|
4e10552c12 | ||
|
|
0eae8fe6a0 | ||
|
|
ee2c7fad78 | ||
|
|
b9d89cb4a0 | ||
|
|
f0eba3e283 | ||
|
|
801b500aa6 | ||
|
|
9c1ce702bb | ||
|
|
50778790fe | ||
|
|
b05bf049bc | ||
|
|
b9c24a1fe8 | ||
|
|
c92a798e1b | ||
|
|
8660f976a9 | ||
|
|
f5c79cb1b6 | ||
|
|
6b80ff4bcc | ||
|
|
3556fbf702 | ||
|
|
3577e71782 | ||
|
|
c4aac5fa0e | ||
|
|
68fb9b8b67 | ||
|
|
630c07391c | ||
|
|
4ab3c2dfcb | ||
|
|
973c3f8838 | ||
|
|
a03d42daa8 | ||
|
|
0c84fc1271 | ||
|
|
0f25638545 | ||
|
|
f58efd7ee3 | ||
|
|
26c29f6af7 | ||
|
|
ab82ff0fb7 | ||
|
|
12a4a849ca | ||
|
|
38e2837cb6 | ||
|
|
0e7cefb69c | ||
|
|
21eaa35d8c | ||
|
|
c1ae825d98 | ||
|
|
fbc206ebee | ||
|
|
67739ae3fd | ||
|
|
7ee16ba45c | ||
|
|
236513943c | ||
|
|
cfff744cb1 | ||
|
|
61b6effccc | ||
|
|
642deecbbb | ||
|
|
707aa88974 | ||
|
|
5b04698f5f | ||
|
|
246e4e45bd | ||
|
|
f2ef2fab4f | ||
|
|
1a2755f126 | ||
|
|
801580c46f | ||
|
|
3f1ec52e6c | ||
|
|
2c422dcd73 | ||
|
|
6abf74530d | ||
|
|
08ad74da8f | ||
|
|
38427aa52a | ||
|
|
68eb48be8d | ||
|
|
5e5b4197e9 | ||
|
|
48eb5dd112 | ||
|
|
9b7e3dc3ec | ||
|
|
d1518da1ad | ||
|
|
2f02198ac7 | ||
|
|
da845a089e | ||
|
|
2caa3e3def | ||
|
|
f9a32dc70f | ||
|
|
8dc7f8b8a1 | ||
|
|
78d3bdfe3a | ||
|
|
fbfd3ddd68 | ||
|
|
33b3fa68f0 | ||
|
|
2fae2278f7 | ||
|
|
f073963582 | ||
|
|
22c2054dcf | ||
|
|
b2e5ab36d4 | ||
|
|
159f90a42c | ||
|
|
08a3a5747a | ||
|
|
47910b2ae1 | ||
|
|
5f97b3bc22 | ||
|
|
cf45b0d317 | ||
|
|
1dd461b24a | ||
|
|
626e7c1f76 | ||
|
|
288b7ba100 | ||
|
|
2b8951b2ac | ||
|
|
48cee21b9f | ||
|
|
b2f821d3de | ||
|
|
911f138bf8 | ||
|
|
bb528eaa9c | ||
|
|
3d3d024878 | ||
|
|
9a4fdb1530 | ||
|
|
63a6893fda | ||
|
|
dcd5aa83da | ||
|
|
5901b42a83 | ||
|
|
5d321f7c59 | ||
|
|
996bd942eb | ||
|
|
dc27bfff2d | ||
|
|
63fc552636 | ||
|
|
0659822ac9 | ||
|
|
f9f1826f34 | ||
|
|
ddb9c84a1d | ||
|
|
69960a47da | ||
|
|
f8740c5894 | ||
|
|
58aaed4c0f | ||
|
|
8af684f7f7 | ||
|
|
0fe0311b45 | ||
|
|
89a0cd3e81 | ||
|
|
6de30b1137 | ||
|
|
d26924dd6b | ||
|
|
4293a4857f | ||
|
|
aec6e17b5d | ||
|
|
64dd5139da | ||
|
|
e55e46a0f0 | ||
|
|
4f65d0469c | ||
|
|
a0e2a925ee | ||
|
|
8bfef7d873 | ||
|
|
2d4a743231 | ||
|
|
0247e876df | ||
|
|
39b7f307a4 | ||
|
|
4356b1c193 | ||
|
|
6f885fb6cc | ||
|
|
5f1cb9d31c | ||
|
|
9b430147c0 | ||
|
|
4e8c57a861 | ||
|
|
d9ad3a4bbe | ||
|
|
4ad8c4877c | ||
|
|
edf4180d11 | ||
|
|
d48cafe1a3 | ||
|
|
aede79640d | ||
|
|
4dae89310d | ||
|
|
6102795856 | ||
|
|
7669b8e12b | ||
|
|
5c9a907c88 | ||
|
|
116b5d006a | ||
|
|
db35c3de3b | ||
|
|
be64f18e96 | ||
|
|
39008bf6fe | ||
|
|
c9552390e7 | ||
|
|
5c3f93eee1 | ||
|
|
cf0d4a0559 | ||
|
|
ee5c819cef | ||
|
|
ca548a11d7 | ||
|
|
0b26475300 | ||
|
|
d74992b85b | ||
|
|
08bddc5579 | ||
|
|
cb3e649e61 | ||
|
|
accb20a571 | ||
|
|
08101ba666 | ||
|
|
430a3c2cec | ||
|
|
48ad171a29 | ||
|
|
5f62c2100c | ||
|
|
4c571f5bff | ||
|
|
52b9212625 | ||
|
|
f56df0e1d9 | ||
|
|
6dd8f32f66 | ||
|
|
5ab1cd405a | ||
|
|
3dd2a6bb5b | ||
|
|
9ff02707bf | ||
|
|
2d1dcb36cb | ||
|
|
01d5589594 | ||
|
|
40532e32ab | ||
|
|
ceec71d3e6 | ||
|
|
8fd811517b | ||
|
|
58519300ea | ||
|
|
607655941d | ||
|
|
9acdc4eac1 | ||
|
|
518ff146b2 | ||
|
|
74c65f30f7 | ||
|
|
83306bb01f | ||
|
|
f3ed7a674a | ||
|
|
854870683b | ||
|
|
c58f097535 | ||
|
|
0367319934 | ||
|
|
be0cf8d379 | ||
|
|
305a611211 | ||
|
|
927735dff2 | ||
|
|
0c0d6bc411 | ||
|
|
2862070348 | ||
|
|
58d86af399 | ||
|
|
76c3e9a529 | ||
|
|
9bf8a8108d | ||
|
|
905a024aed | ||
|
|
e1000b79a3 | ||
|
|
c2a10f9c56 | ||
|
|
4d42e7e5b9 | ||
|
|
e200a7d502 | ||
|
|
55a6e70f74 | ||
|
|
6f242f284f | ||
|
|
25471f3952 | ||
|
|
72690ee106 | ||
|
|
edc8c23772 | ||
|
|
0023fdc707 | ||
|
|
2518250ae0 | ||
|
|
08cd46cd4c | ||
|
|
12614ab68c | ||
|
|
7cfb122dea | ||
|
|
cc8f4aa24f | ||
|
|
60e36b1411 | ||
|
|
8aa0b31c1a | ||
|
|
56b6673e17 | ||
|
|
c310cdbb8c | ||
|
|
71f340d9b5 | ||
|
|
5187e6dc58 | ||
|
|
c21f5712f8 | ||
|
|
c6eccc655f | ||
|
|
3767483977 | ||
|
|
14ad7a2479 | ||
|
|
ba8257ce64 | ||
|
|
9bfa6d7cf4 | ||
|
|
826d6011a1 | ||
|
|
fb847135b5 | ||
|
|
49681525ed | ||
|
|
839feed329 | ||
|
|
392d90dc1d | ||
|
|
7808620764 | ||
|
|
fe3181649b | ||
|
|
b5be6df5e2 | ||
|
|
0f0c3b7461 | ||
|
|
ff51423125 | ||
|
|
cc2fd51097 | ||
|
|
321e4ffe9c | ||
|
|
fb244c00b9 | ||
|
|
f980023f49 | ||
|
|
6c17ed2242 | ||
|
|
a0926f2d70 | ||
|
|
d9a14e1227 | ||
|
|
1ab4dbe466 | ||
|
|
37af963717 | ||
|
|
3744bdcbe7 | ||
|
|
4ad293e2ae | ||
|
|
be89a0bf7e | ||
|
|
14de1fe485 | ||
|
|
bec39d89e1 | ||
|
|
467f1449ab | ||
|
|
53c659cbda | ||
|
|
5deee18247 | ||
|
|
60a991bcb0 | ||
|
|
d3c5ed08ab | ||
|
|
2bdce7dce6 | ||
|
|
41b2e7c9c7 | ||
|
|
6021923bf1 | ||
|
|
839cedde65 | ||
|
|
92d10fd34c | ||
|
|
25e0e4b5d3 | ||
|
|
43cc2145a8 | ||
|
|
c3c46f8e29 | ||
|
|
0744f43a0e | ||
|
|
73470c3a95 | ||
|
|
a6d0fa433e | ||
|
|
a9fa49e372 | ||
|
|
2cb69f0c2b | ||
|
|
1da9bfc643 | ||
|
|
78227cd947 | ||
|
|
456a949d01 | ||
|
|
7f598e358a | ||
|
|
a058e75a6d | ||
|
|
48362cd4bc | ||
|
|
bd653dfdff | ||
|
|
bc03c80d8d | ||
|
|
2dcbe15f8b | ||
|
|
b364cbbd69 | ||
|
|
3e374eda51 | ||
|
|
0ae63b072c | ||
|
|
f718410df3 | ||
|
|
74e120bc7b | ||
|
|
5f8ede194b | ||
|
|
4d321b1cf0 | ||
|
|
84858b8940 | ||
|
|
92f95fa9eb | ||
|
|
5d8888bb8b | ||
|
|
4988d21819 | ||
|
|
94964c35ce | ||
|
|
d605b18ec0 | ||
|
|
590e6c8e9d | ||
|
|
67572b0d9a | ||
|
|
5554867553 | ||
|
|
f3102573ea | ||
|
|
0e7ce97da7 | ||
|
|
9d789c2657 | ||
|
|
468975e9f3 | ||
|
|
145dda843e | ||
|
|
6e69069ba2 | ||
|
|
be2b2cbf7e | ||
|
|
0e4d85a5e5 | ||
|
|
653fd1bb63 | ||
|
|
741501d1d9 | ||
|
|
89e1291d86 | ||
|
|
25e3674819 | ||
|
|
c84f99cf3a | ||
|
|
820c7ba84e | ||
|
|
6735605f21 | ||
|
|
d5a2daa8c9 | ||
|
|
25177d9022 | ||
|
|
f24ce584db | ||
|
|
1ed83cf193 | ||
|
|
aaf61dfbad | ||
|
|
be58e23775 | ||
|
|
db631acf80 | ||
|
|
74dc4e0c62 | ||
|
|
99bb09374d | ||
|
|
a6e96f9a28 | ||
|
|
cd3c1c6dc0 | ||
|
|
3971f27c66 | ||
|
|
c4357c7ad3 | ||
|
|
1da9385fe2 | ||
|
|
9ba65e9ca0 | ||
|
|
a12bc60ef5 | ||
|
|
f76dc74040 | ||
|
|
932ed20c4b | ||
|
|
b353af00c9 | ||
|
|
ce2204e120 | ||
|
|
4b3a9fac67 | ||
|
|
54ca5772f8 | ||
|
|
2dacf1b2ef | ||
|
|
817e9aa43d | ||
|
|
dba677dcc7 | ||
|
|
24dcde2f87 | ||
|
|
77fbf19a72 | ||
|
|
3cd9d4b5ec | ||
|
|
d3bf489bea | ||
|
|
efb2972d28 | ||
|
|
3fa3428b4b | ||
|
|
84e9e37353 | ||
|
|
5c0f278775 | ||
|
|
8759d637ff | ||
|
|
95023ca770 | ||
|
|
3f49796c43 | ||
|
|
aa8f62da9d | ||
|
|
eba2a98703 | ||
|
|
d36f6a0322 | ||
|
|
9ec3d24fec | ||
|
|
bf182697b9 | ||
|
|
e87084715d | ||
|
|
3bd1bbc77a | ||
|
|
8aaa70a05a |
@@ -27,7 +27,12 @@ GOTO:EOF
|
||||
call:logInfo "Clone dependencies repository"
|
||||
git clone -q --depth 1 --branch=master https://github.com/telegramdesktop/dependencies_windows.git %LIB_DIR%
|
||||
cd %LIB_DIR%
|
||||
|
||||
git clone https://github.com/ericniebler/range-v3
|
||||
cd range-v3
|
||||
git checkout 0.5.0
|
||||
cd ..
|
||||
|
||||
if exist prepare.bat (
|
||||
call prepare.bat
|
||||
) else (
|
||||
|
||||
6
.gitmodules
vendored
@@ -16,3 +16,9 @@
|
||||
[submodule "Telegram/ThirdParty/xxHash"]
|
||||
path = Telegram/ThirdParty/xxHash
|
||||
url = https://github.com/Cyan4973/xxHash.git
|
||||
[submodule "Telegram/ThirdParty/qtlottie"]
|
||||
path = Telegram/ThirdParty/qtlottie
|
||||
url = https://github.com/telegramdesktop/qtlottie.git
|
||||
[submodule "Telegram/ThirdParty/rapidjson"]
|
||||
path = Telegram/ThirdParty/rapidjson
|
||||
url = https://github.com/Tencent/rapidjson.git
|
||||
|
||||
@@ -31,8 +31,8 @@ addons:
|
||||
- dpatch
|
||||
- equivs
|
||||
- fakeroot
|
||||
- g++-7
|
||||
- gcc-7
|
||||
- g++-8
|
||||
- gcc-8
|
||||
- git
|
||||
- gnome-common
|
||||
- gobject-introspection
|
||||
@@ -56,8 +56,8 @@ addons:
|
||||
- yasm
|
||||
|
||||
before_install:
|
||||
- export CXX="g++-7" CC="gcc-7"
|
||||
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 --slave /usr/bin/g++ g++ /usr/bin/g++-7
|
||||
- export CXX="g++-8" CC="gcc-8"
|
||||
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 60 --slave /usr/bin/g++ g++ /usr/bin/g++-8
|
||||
- sudo update-alternatives --config gcc
|
||||
- g++ --version
|
||||
|
||||
|
||||
@@ -15,9 +15,10 @@ The source code is published under GPLv3 with OpenSSL exception, the license is
|
||||
* Windows XP - Windows 10 (**not** RT)
|
||||
* Mac OS X 10.8 - Mac OS X 10.11
|
||||
* Mac OS X 10.6 - Mac OS X 10.7 (separate build)
|
||||
* Ubuntu 12.04 - Ubuntu 18.10
|
||||
* Fedora 22 - Fedora 29
|
||||
* Ubuntu 12.04 - Ubuntu 19.04
|
||||
* Fedora 22 - Fedora 30
|
||||
* [Snappy](https://snapcraft.io/telegram-desktop)
|
||||
* [Flathub](https://flathub.org/apps/details/org.telegram.desktop)
|
||||
|
||||
## Third-party
|
||||
|
||||
@@ -44,7 +45,7 @@ The source code is published under GPLv3 with OpenSSL exception, the license is
|
||||
|
||||
## Build instructions
|
||||
|
||||
* [Visual Studio 2017][msvc]
|
||||
* [Visual Studio 2019][msvc]
|
||||
* [Xcode 10][xcode]
|
||||
* [GYP/CMake on GNU/Linux][cmake]
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/pylib/gyp/generator/cmake.py b/pylib/gyp/generator/cmake.py
|
||||
index a2b9629..ac59461 100644
|
||||
index 4a2041cf..e5333926 100644
|
||||
--- a/pylib/gyp/generator/cmake.py
|
||||
+++ b/pylib/gyp/generator/cmake.py
|
||||
@@ -1070,6 +1070,23 @@ def WriteTarget(namer, qualified_target, target_dicts, build_dir, config_to_use,
|
||||
@@ -1078,6 +1078,23 @@ def WriteTarget(namer, qualified_target, target_dicts, build_dir, config_to_use,
|
||||
|
||||
output.write(')\n')
|
||||
|
||||
@@ -26,7 +26,7 @@ index a2b9629..ac59461 100644
|
||||
UnsetVariable(output, 'TOOLSET')
|
||||
UnsetVariable(output, 'TARGET')
|
||||
|
||||
@@ -1112,6 +1129,8 @@ def GenerateOutputForConfig(target_list, target_dicts, data,
|
||||
@@ -1120,6 +1137,8 @@ def GenerateOutputForConfig(target_list, target_dicts, data,
|
||||
SetVariable(output, 'configuration', config_to_use)
|
||||
|
||||
ar = None
|
||||
@@ -35,7 +35,7 @@ index a2b9629..ac59461 100644
|
||||
cc = None
|
||||
cxx = None
|
||||
|
||||
@@ -1121,17 +1140,27 @@ def GenerateOutputForConfig(target_list, target_dicts, data,
|
||||
@@ -1129,17 +1148,27 @@ def GenerateOutputForConfig(target_list, target_dicts, data,
|
||||
for key, value in make_global_settings:
|
||||
if key == 'AR':
|
||||
ar = os.path.join(build_to_top, value)
|
||||
@@ -64,48 +64,63 @@ index a2b9629..ac59461 100644
|
||||
SetVariable(output, 'CMAKE_C_COMPILER', cc)
|
||||
if cxx:
|
||||
diff --git a/pylib/gyp/generator/xcode.py b/pylib/gyp/generator/xcode.py
|
||||
index db99d6a..8d56baf 100644
|
||||
index 8bc22bed..24bee427 100644
|
||||
--- a/pylib/gyp/generator/xcode.py
|
||||
+++ b/pylib/gyp/generator/xcode.py
|
||||
@@ -72,6 +72,10 @@ generator_additional_non_configuration_keys = [
|
||||
@@ -74,6 +74,12 @@ generator_additional_non_configuration_keys = [
|
||||
'ios_app_extension',
|
||||
'ios_watch_app',
|
||||
'ios_watchkit_extension',
|
||||
+
|
||||
+ 'mac_sandbox', # sandbox support
|
||||
+ 'mac_sandbox_development_team',
|
||||
+
|
||||
+ 'mac_hardened_runtime', # hardened runtime support
|
||||
+
|
||||
'mac_bundle',
|
||||
'mac_bundle_resources',
|
||||
'mac_framework_headers',
|
||||
@@ -772,6 +776,26 @@ def GenerateOutput(target_list, target_dicts, data, params):
|
||||
@@ -774,6 +780,39 @@ def GenerateOutput(target_list, target_dicts, data, params):
|
||||
xcode_targets[qualified_target] = xct
|
||||
xcode_target_to_target_dict[xct] = spec
|
||||
|
||||
+ # sandbox support
|
||||
+ # sandbox and hardened runtime support
|
||||
+ is_sandbox = int(spec.get('mac_sandbox', 0))
|
||||
+ is_hardened_runtime = int(spec.get('mac_hardened_runtime', 0))
|
||||
+ if is_sandbox or is_hardened_runtime:
|
||||
+ try:
|
||||
+ tmp = pbxp._properties['attributes']['TargetAttributes']
|
||||
+ except KeyError:
|
||||
+ pbxp._properties['attributes']['TargetAttributes'] = {}
|
||||
+ try:
|
||||
+ tmp = pbxp._properties['attributes']['TargetAttributes'][xct]
|
||||
+ except KeyError:
|
||||
+ pbxp._properties['attributes']['TargetAttributes'][xct] = {}
|
||||
+ try:
|
||||
+ tmp = pbxp._properties['attributes']['TargetAttributes'][xct]['SystemCapabilities']
|
||||
+ except KeyError:
|
||||
+ pbxp._properties['attributes']['TargetAttributes'][xct]['SystemCapabilities'] = {}
|
||||
+
|
||||
+ if is_sandbox:
|
||||
+ dev_team = spec.get('mac_sandbox_development_team', '%%ERROR%%')
|
||||
+ assert dev_team != '%%ERROR%%', (
|
||||
+ 'mac_sandbox must be accompanied by mac_sandbox_development_team (target "%s")' %
|
||||
+ target_name)
|
||||
+ try:
|
||||
+ tmp = pbxp._properties['attributes']['TargetAttributes']
|
||||
+ except KeyError:
|
||||
+ pbxp._properties['attributes']['TargetAttributes'] = {}
|
||||
+ pbxp._properties['attributes']['TargetAttributes'][xct] = {
|
||||
+ 'DevelopmentTeam': dev_team,
|
||||
+ 'SystemCapabilities': {
|
||||
+ 'com.apple.Sandbox': {
|
||||
+ 'enabled': 1,
|
||||
+ },
|
||||
+ },
|
||||
+ pbxp._properties['attributes']['TargetAttributes'][xct]['DevelopmentTeam'] = dev_team
|
||||
+ pbxp._properties['attributes']['TargetAttributes'][xct]['SystemCapabilities']['com.apple.Sandbox'] = {
|
||||
+ 'enabled': 1,
|
||||
+ }
|
||||
+
|
||||
+ # hardened runtime support
|
||||
+ if is_hardened_runtime:
|
||||
+ pbxp._properties['attributes']['TargetAttributes'][xct]['SystemCapabilities']['com.apple.HardenedRuntime'] = {
|
||||
+ 'enabled': 1,
|
||||
+ }
|
||||
+
|
||||
spec_actions = spec.get('actions', [])
|
||||
spec_rules = spec.get('rules', [])
|
||||
|
||||
@@ -1141,7 +1165,8 @@ exit 1
|
||||
@@ -1132,7 +1171,8 @@ exit 1
|
||||
groups = [x for x in groups if not x.endswith('_excluded')]
|
||||
for group in groups:
|
||||
for item in rule.get(group, []):
|
||||
|
||||
@@ -252,6 +252,24 @@ index 41834b21ae..8cdf4ab145 100644
|
||||
if (value == WSAEADDRNOTAVAIL) {
|
||||
setError(QAbstractSocket::NetworkError, AddressNotAvailableErrorString);
|
||||
socketState = QAbstractSocket::UnconnectedState;
|
||||
diff --git a/src/platformsupport/cglconvenience/cglconvenience.mm b/src/platformsupport/cglconvenience/cglconvenience.mm
|
||||
index fb609ae485..7cca45ded4 100644
|
||||
--- a/src/platformsupport/cglconvenience/cglconvenience.mm
|
||||
+++ b/src/platformsupport/cglconvenience/cglconvenience.mm
|
||||
@@ -128,7 +128,12 @@ void *qcgl_createNSOpenGLPixelFormat(const QSurfaceFormat &format)
|
||||
if (format.stereo())
|
||||
attrs << NSOpenGLPFAStereo;
|
||||
|
||||
- attrs << NSOpenGLPFAAllowOfflineRenderers;
|
||||
+ // Patch: Fix macOS regression. On 10.14.4, it crashes on GPU switches.
|
||||
+ // See https://bugreports.qt.io/browse/QTCREATORBUG-22215
|
||||
+ static const QAppleOperatingSystemVersion version = qt_apple_os_version();
|
||||
+ if (!(version.major == 10 && version.minor == 14 && version.patch == 4))
|
||||
+ attrs << NSOpenGLPFAAllowOfflineRenderers;
|
||||
+ }
|
||||
|
||||
QByteArray useLayer = qgetenv("QT_MAC_WANTS_LAYER");
|
||||
if (!useLayer.isEmpty() && useLayer.toInt() > 0) {
|
||||
diff --git a/src/platformsupport/dbustray/qdbustrayicon.cpp b/src/platformsupport/dbustray/qdbustrayicon.cpp
|
||||
index 4d6e70720d..9bdb0beb67 100644
|
||||
--- a/src/platformsupport/dbustray/qdbustrayicon.cpp
|
||||
|
||||
@@ -294,4 +294,7 @@ notifyFadeRight: icon {{ "fade_horizontal", notificationBg }};
|
||||
stickerIconLeft: icon {{ "fade_horizontal-flip_horizontal", emojiPanCategories }};
|
||||
stickerIconRight: icon {{ "fade_horizontal", emojiPanCategories }};
|
||||
|
||||
emojiSuggestionsFadeLeft: icon {{ "fade_horizontal-flip_horizontal", boxBg }};
|
||||
emojiSuggestionsFadeRight: icon {{ "fade_horizontal", boxBg }};
|
||||
|
||||
transparentPlaceholderSize: 4px;
|
||||
|
||||
@@ -193,6 +193,7 @@ dialogsSentIconFg: #5dc452; // chat list sent message tick / double tick icon
|
||||
dialogsUnreadBg: windowBgActive; // chat list unread badge background for not muted chat
|
||||
dialogsUnreadBgMuted: #bbbbbb; // chat list unread badge background for muted chat
|
||||
dialogsUnreadFg: windowFgActive; // chat list unread badge text
|
||||
dialogsArchiveFg: #525252 | dialogsNameFg; // chat list archive name text
|
||||
|
||||
dialogsBgOver: windowBgOver; // chat list background with mouse over
|
||||
dialogsNameFgOver: windowBoldFgOver; // chat list name text with mouse over
|
||||
@@ -208,6 +209,7 @@ dialogsSentIconFgOver: dialogsSentIconFg; // chat list sent message tick / doubl
|
||||
dialogsUnreadBgOver: dialogsUnreadBg; // chat list unread badge background for not muted chat with mouse over
|
||||
dialogsUnreadBgMutedOver: dialogsUnreadBgMuted; // chat list unread badge background for muted chat with mouse over
|
||||
dialogsUnreadFgOver: dialogsUnreadFg; // chat list unread badge text with mouse over
|
||||
dialogsArchiveFgOver: #525252 | dialogsNameFgOver; // chat list archive name text
|
||||
|
||||
dialogsBgActive: #419fd9; // chat list background for current (active) chat
|
||||
dialogsNameFgActive: windowFgActive; // chat list name text for current (active) chat
|
||||
@@ -304,6 +306,7 @@ historyPeer8NameFgSelected: historyPeer8NameFg; // orange group member name in a
|
||||
historyPeer8UserpicBg: #faa774; // orange userpic background
|
||||
historyPeerUserpicFg: windowFgActive; // default userpic initials
|
||||
historyPeerSavedMessagesBg: historyPeer4UserpicBg; // saved messages userpic background
|
||||
historyPeerArchiveUserpicBg: dialogsUnreadBgMuted; // archive folder userpic background
|
||||
|
||||
// Some values are marked as (adjusted), it means they're adjusted by
|
||||
// hue and saturation of the average background color if user chooses
|
||||
|
||||
BIN
Telegram/Resources/icons/archive_userpic.png
Normal file
|
After Width: | Height: | Size: 449 B |
BIN
Telegram/Resources/icons/archive_userpic@2x.png
Normal file
|
After Width: | Height: | Size: 814 B |
BIN
Telegram/Resources/icons/archive_userpic@3x.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 307 B After Width: | Height: | Size: 387 B |
|
Before Width: | Height: | Size: 541 B After Width: | Height: | Size: 638 B |
|
Before Width: | Height: | Size: 792 B After Width: | Height: | Size: 907 B |
|
Before Width: | Height: | Size: 343 B After Width: | Height: | Size: 367 B |
|
Before Width: | Height: | Size: 660 B After Width: | Height: | Size: 1013 B |
|
Before Width: | Height: | Size: 838 B After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 807 B After Width: | Height: | Size: 327 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 655 B |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 946 B |
|
Before Width: | Height: | Size: 572 B After Width: | Height: | Size: 456 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 551 B After Width: | Height: | Size: 399 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 829 B |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 225 B After Width: | Height: | Size: 341 B |
|
Before Width: | Height: | Size: 424 B After Width: | Height: | Size: 650 B |
|
Before Width: | Height: | Size: 680 B After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 872 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 337 B After Width: | Height: | Size: 395 B |
|
Before Width: | Height: | Size: 486 B After Width: | Height: | Size: 737 B |
|
Before Width: | Height: | Size: 933 B After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 234 B After Width: | Height: | Size: 364 B |
|
Before Width: | Height: | Size: 458 B After Width: | Height: | Size: 763 B |
|
Before Width: | Height: | Size: 923 B After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 444 B After Width: | Height: | Size: 452 B |
|
Before Width: | Height: | Size: 855 B After Width: | Height: | Size: 884 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 714 B After Width: | Height: | Size: 781 B |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 557 B After Width: | Height: | Size: 731 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 716 B After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.5 KiB |
BIN
Telegram/Resources/icons/menu_shadow.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
Telegram/Resources/icons/menu_shadow@2x.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
Telegram/Resources/icons/menu_shadow@3x.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 438 B After Width: | Height: | Size: 251 B |
|
Before Width: | Height: | Size: 747 B After Width: | Height: | Size: 528 B |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 722 B |
|
Before Width: | Height: | Size: 517 B After Width: | Height: | Size: 401 B |
|
Before Width: | Height: | Size: 905 B After Width: | Height: | Size: 877 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 939 B |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 715 B After Width: | Height: | Size: 599 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 586 B After Width: | Height: | Size: 470 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 727 B |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 2.1 KiB |
@@ -119,11 +119,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_channel_status" = "channel";
|
||||
"lng_group_status" = "group";
|
||||
|
||||
"lng_channel_members_link#one" = "{count} member";
|
||||
"lng_channel_members_link#other" = "{count} members";
|
||||
"lng_channel_admins_link#one" = "{count} administrator";
|
||||
"lng_channel_admins_link#other" = "{count} administrators";
|
||||
|
||||
"lng_flood_error" = "Too many tries. Please try again later.";
|
||||
"lng_gif_error" = "An error has occurred while reading GIF animation :(";
|
||||
"lng_edit_error" = "You cannot edit this message";
|
||||
@@ -141,6 +136,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_error_cant_ban_admin" = "Sorry, you can't ban this user because they are an admin in this group and you are not allowed to demote them.";
|
||||
"lng_error_admin_limit" = "Sorry, you've reached the maximum number of admins for this group.";
|
||||
"lng_error_admin_limit_channel" = "Sorry, you've reached the maximum number of admins for this channel.";
|
||||
"lng_error_post_link_invalid" = "Unfortunately, you can't access this message. You are not a member of the chat where it was posted.";
|
||||
"lng_sure_add_admin_invite" = "This user is not a member of this group. Add them to the group and promote them to admin?";
|
||||
"lng_sure_add_admin_invite_channel" = "This user is not a subscriber of this channel. Add them to the channel and promote them to admin?";
|
||||
"lng_sure_add_admin_unremove" = "This user is currently restricted or removed. Are you sure you want to promote them?";
|
||||
@@ -162,6 +158,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_pinned_unpin" = "Unpin";
|
||||
"lng_pinned_notify" = "Notify all members";
|
||||
|
||||
"lng_edit_media_album_error" = "This file cannot be saved as a part of an album.";
|
||||
"lng_edit_media_invalid_file" = "Sorry, no way to use this file.";
|
||||
|
||||
"lng_intro_about" = "Welcome to the official Telegram Desktop app.\nIt's fast and secure.";
|
||||
"lng_start_msgs" = "START MESSAGING";
|
||||
|
||||
@@ -289,6 +288,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_settings_count_unread" = "Count unread messages";
|
||||
"lng_settings_events_title" = "Events";
|
||||
"lng_settings_events_joined" = "Contact joined Telegram";
|
||||
"lng_settings_events_pinned" = "Pinned messages";
|
||||
|
||||
"lng_notification_preview" = "You have a new message";
|
||||
"lng_notification_reply" = "Reply";
|
||||
@@ -356,9 +356,11 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_settings_privacy_title" = "Privacy";
|
||||
"lng_settings_last_seen" = "Last seen";
|
||||
"lng_settings_calls" = "Voice calls";
|
||||
"lng_settings_calls_peer_to_peer" = "Peer-to-peer in calls";
|
||||
"lng_settings_calls_peer_to_peer_title" = "Peer-to-peer";
|
||||
"lng_settings_calls_peer_to_peer_button" = "Use peer-to-peer with";
|
||||
"lng_settings_groups_invite" = "Groups";
|
||||
"lng_settings_group_privacy_about" = "Change who can add you to groups and channels.";
|
||||
"lng_settings_phone_number_privacy" = "Phone number";
|
||||
"lng_settings_forwards_privacy" = "Forwarded messages";
|
||||
"lng_settings_profile_photo_privacy" = "Profile photo";
|
||||
"lng_settings_sessions_about" = "Control your sessions on other devices.";
|
||||
@@ -603,7 +605,16 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
|
||||
"lng_edit_privacy_exceptions_count#one" = "{count} user";
|
||||
"lng_edit_privacy_exceptions_count#other" = "{count} users";
|
||||
"lng_edit_privacy_exceptions_add" = "Add users";
|
||||
"lng_edit_privacy_exceptions_add" = "Add users or groups";
|
||||
|
||||
"lng_edit_privacy_phone_number_title" = "Phone number privacy";
|
||||
"lng_edit_privacy_phone_number_header" = "Who can see your phone number";
|
||||
"lng_edit_privacy_phone_number_warning" = "Users who already have your number saved in the contacts will also see it on Telegram.";
|
||||
"lng_edit_privacy_phone_number_always_empty" = "Always share with";
|
||||
"lng_edit_privacy_phone_number_never_empty" = "Never share with";
|
||||
"lng_edit_privacy_phone_number_exceptions" = "These settings will override the values above.";
|
||||
"lng_edit_privacy_phone_number_always_title" = "Always share with";
|
||||
"lng_edit_privacy_phone_number_never_title" = "Never share with";
|
||||
|
||||
"lng_edit_privacy_lastseen_title" = "Last seen privacy";
|
||||
"lng_edit_privacy_lastseen_header" = "Who can see your last seen time";
|
||||
@@ -829,9 +840,31 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
|
||||
"lng_manage_peer_group_type" = "Group type";
|
||||
"lng_manage_peer_channel_type" = "Channel type";
|
||||
"lng_manage_private_group_title" = "Private";
|
||||
"lng_manage_public_group_title" = "Public";
|
||||
"lng_manage_private_peer_title" = "Private";
|
||||
"lng_manage_public_peer_title" = "Public";
|
||||
|
||||
"lng_manage_discussion_group" = "Discussion";
|
||||
"lng_manage_discussion_group_add" = "Add a group";
|
||||
"lng_manage_linked_channel" = "Linked channel";
|
||||
"lng_manage_linked_channel_restore" = "Restore linked channel";
|
||||
"lng_manage_discussion_group_about" = "Select a group chat for discussion that will be displayed in your channel.";
|
||||
"lng_manage_discussion_group_about_chosen" = "A link to {group} is shown to all subscribers in the bottom panel.";
|
||||
"lng_manage_discussion_group_create" = "Create a new group";
|
||||
"lng_manage_discussion_group_unlink" = "Unlink group";
|
||||
"lng_manage_discussion_group_posted" = "Everything you post in the channel is forwarded to this group.";
|
||||
"lng_manage_discussion_group_sure" = "Do you want to make {group} the discussion board for {channel}?";
|
||||
"lng_manage_linked_channel_private" = "Any member of this group will be able to see messages in the channel.";
|
||||
"lng_manage_discussion_group_private" = "Anyone from the channel will be able to see messages in this group.";
|
||||
"lng_manage_discussion_group_link" = "Link group";
|
||||
"lng_manage_discussion_group_private_status" = "private group";
|
||||
"lng_manage_linked_channel_about" = "{channel} is linking the group as its discussion board.";
|
||||
"lng_manage_linked_channel_unlink" = "Unlink channel";
|
||||
"lng_manage_linked_channel_posted" = "All new messages posted in this channel are forwarded to the group.";
|
||||
"lng_manage_discussion_group_warning" = "\"Chat history for new members\" will be switched to {visible}.";
|
||||
"lng_manage_discussion_group_visible" = "Visible";
|
||||
|
||||
"lng_manage_history_visibility_title" = "Chat history for new members";
|
||||
"lng_manage_history_visibility_shown" = "Visible";
|
||||
"lng_manage_history_visibility_shown_about" = "New members will see messages that were sent before they joined.";
|
||||
@@ -1027,6 +1060,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_group_invite_no_room" = "Unable to join this group because there are too many members in it already.";
|
||||
|
||||
"lng_channel_public_link_copied" = "Link copied to clipboard.";
|
||||
"lng_context_about_private_link" = "This link will only work for members of this chat.";
|
||||
|
||||
"lng_forwarded" = "Forwarded from {user}";
|
||||
"lng_forwarded_date" = "Original: {date}";
|
||||
@@ -1040,6 +1074,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_edited" = "edited";
|
||||
"lng_edited_date" = "Edited: {date}";
|
||||
"lng_admin_badge" = "admin";
|
||||
"lng_channel_badge" = "channel";
|
||||
"lng_fast_reply" = "Reply";
|
||||
"lng_cancel_edit_post_sure" = "Cancel editing?";
|
||||
"lng_cancel_edit_post_yes" = "Yes";
|
||||
@@ -1186,10 +1221,20 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_restart_button" = "Restart";
|
||||
"lng_channel_mute" = "Mute";
|
||||
"lng_channel_unmute" = "Unmute";
|
||||
"lng_channel_discuss" = "Discuss";
|
||||
"lng_saved_messages" = "Saved Messages";
|
||||
"lng_saved_short" = "Save";
|
||||
"lng_saved_forward_here" = "Forward messages here for quick access";
|
||||
|
||||
"lng_archived_name" = "Archived chats";
|
||||
"lng_archived_add" = "Archive";
|
||||
"lng_archived_remove" = "Unarchive";
|
||||
"lng_archived_added" = "Chat archived.\nMuted chats will stay archived after new messages arrive.";
|
||||
"lng_archived_removed" = "Chat restored from your archive.";
|
||||
"lng_archived_last_list" = "{accumulated}, {chat}";
|
||||
"lng_archived_last#one" = "{chats} and {count} more chat";
|
||||
"lng_archived_last#other" = "{chats} and {count} more chats";
|
||||
|
||||
"lng_dialogs_text_with_from" = "{from_part} {message}";
|
||||
"lng_dialogs_text_from_wrapped" = "{from}:";
|
||||
"lng_dialogs_text_media" = "{media_part} {caption}";
|
||||
@@ -1201,6 +1246,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_open_link" = "Open";
|
||||
"lng_allow_bot_pass" = "Allow {bot_name} to pass your Telegram name and ID to the web pages you open via this bot?";
|
||||
"lng_allow_bot" = "Allow";
|
||||
"lng_url_auth_open_confirm" = "Do you want to open {link}?";
|
||||
"lng_url_auth_login_option" = "Log in to {domain} as {user}";
|
||||
"lng_url_auth_allow_messages" = "Allow {bot} to send me messages";
|
||||
|
||||
"lng_bot_start" = "Start";
|
||||
"lng_bot_choose_group" = "Select a Group";
|
||||
@@ -1242,7 +1290,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_user_action_upload_file" = "{user} is sending a file";
|
||||
"lng_unread_bar#one" = "{count} unread message";
|
||||
"lng_unread_bar#other" = "{count} unread messages";
|
||||
"lng_unread_bar_some" = "Unread messages";
|
||||
//"lng_unread_bar_some" = "Unread messages";
|
||||
|
||||
"lng_maps_point" = "Location";
|
||||
"lng_save_photo" = "Save image";
|
||||
@@ -1255,17 +1303,20 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_duration_played" = "{played} / {duration}";
|
||||
"lng_date_and_duration" = "{date}, {duration}";
|
||||
"lng_choose_image" = "Choose an image";
|
||||
"lng_choose_file" = "Choose a file";
|
||||
"lng_choose_files" = "Choose files";
|
||||
"lng_game_tag" = "Game";
|
||||
|
||||
"lng_context_view_profile" = "View profile";
|
||||
"lng_context_view_group" = "View group info";
|
||||
"lng_context_view_channel" = "View channel info";
|
||||
"lng_context_view_feed_info" = "View feed info";
|
||||
//"lng_context_view_feed_info" = "View feed info";
|
||||
"lng_context_pin_to_top" = "Pin to top";
|
||||
"lng_context_unpin_from_top" = "Unpin from top";
|
||||
"lng_context_mark_unread" = "Mark as unread";
|
||||
"lng_context_mark_read" = "Mark as read";
|
||||
"lng_context_archive_expand" = "Expand";
|
||||
"lng_context_archive_collapse" = "Collapse";
|
||||
|
||||
"lng_context_promote_admin" = "Promote to admin";
|
||||
"lng_context_edit_permissions" = "Edit permissions";
|
||||
@@ -1533,7 +1584,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_player_message_yesterday" = "Yesterday at {time}";
|
||||
"lng_player_message_date" = "{date} at {time}";
|
||||
//"lng_player_cant_stream" = "This file can't be played before it is fully downloaded.\n\nWould you like to download it?";
|
||||
"lng_player_download" = "Download";
|
||||
//"lng_player_download" = "Download";
|
||||
|
||||
"lng_rights_edit_admin" = "Manage permissions";
|
||||
"lng_rights_edit_admin_header" = "What can this admin do?";
|
||||
@@ -1661,6 +1712,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_admin_log_changed_stickers_group" = "{from} changed the group's {sticker_set}";
|
||||
"lng_admin_log_changed_stickers_set" = "sticker set";
|
||||
"lng_admin_log_removed_stickers_group" = "{from} removed the group's sticker set";
|
||||
"lng_admin_log_changed_linked_chat" = "{from} changed the discussion group to «{chat}»";
|
||||
"lng_admin_log_removed_linked_chat" = "{from} removed the discussion group";
|
||||
"lng_admin_log_changed_linked_channel" = "{from} changed the linked channel to «{chat}»";
|
||||
"lng_admin_log_removed_linked_channel" = "{from} removed the linked channel";
|
||||
"lng_admin_log_user_with_username" = "{name} ({mention})";
|
||||
"lng_admin_log_restricted_forever" = "indefinitely";
|
||||
"lng_admin_log_restricted_until" = "until {date}";
|
||||
@@ -1680,32 +1735,33 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_admin_log_admin_pin_messages" = "Pin messages";
|
||||
"lng_admin_log_admin_add_admins" = "Add new admins";
|
||||
|
||||
"lng_feed_name" = "Feed";
|
||||
"lng_feed_show_next" = "Show Next";
|
||||
// #feed
|
||||
//"lng_feed_name" = "Feed";
|
||||
//"lng_feed_show_next" = "Show Next";
|
||||
|
||||
"lng_feed_group" = "Group in feed";
|
||||
"lng_feed_ungroup" = "Ungroup from feed";
|
||||
"lng_feed_channel_added" = "Channel added to your feed.";
|
||||
"lng_feed_channel_removed" = "Channel removed from your feed.";
|
||||
"lng_feed_no_messages" = "No messages in this feed yet";
|
||||
"lng_feed_channels#one" = "{count} channel";
|
||||
"lng_feed_channels#other" = "{count} channels";
|
||||
"lng_feed_notifications" = "Feed notifications";
|
||||
"lng_feed_ungroup_all" = "Ungroup all channels";
|
||||
"lng_feed_sure_ungroup_all" = "Are you sure you want to ungroup all channels from this feed?";
|
||||
"lng_feed_ungroup_sure" = "Ungroup";
|
||||
"lng_feed_create_new" = "New feed";
|
||||
"lng_feed_too_few_channels#one" = "You need at least {count} channel to create a feed.";
|
||||
"lng_feed_too_few_channels#other" = "You need at least {count} channels to create a feed.";
|
||||
"lng_feed_select_more_channels#one" = "Select {count} channel or more.";
|
||||
"lng_feed_select_more_channels#other" = "Select {count} channels or more.";
|
||||
"lng_feed_create" = "Create";
|
||||
"lng_feed_edit_title" = "Edit feed";
|
||||
"lng_feed_channels_not_found" = "No channels found";
|
||||
//"lng_feed_group" = "Group in feed";
|
||||
//"lng_feed_ungroup" = "Ungroup from feed";
|
||||
//"lng_feed_channel_added" = "Channel added to your feed.";
|
||||
//"lng_feed_channel_removed" = "Channel removed from your feed.";
|
||||
//"lng_feed_no_messages" = "No messages in this feed yet";
|
||||
//"lng_feed_channels#one" = "{count} channel";
|
||||
//"lng_feed_channels#other" = "{count} channels";
|
||||
//"lng_feed_notifications" = "Feed notifications";
|
||||
//"lng_feed_ungroup_all" = "Ungroup all channels";
|
||||
//"lng_feed_sure_ungroup_all" = "Are you sure you want to ungroup all channels from this feed?";
|
||||
//"lng_feed_ungroup_sure" = "Ungroup";
|
||||
//"lng_feed_create_new" = "New feed";
|
||||
//"lng_feed_too_few_channels#one" = "You need at least {count} channel to create a feed.";
|
||||
//"lng_feed_too_few_channels#other" = "You need at least {count} channels to create a feed.";
|
||||
//"lng_feed_select_more_channels#one" = "Select {count} channel or more.";
|
||||
//"lng_feed_select_more_channels#other" = "Select {count} channels or more.";
|
||||
//"lng_feed_create" = "Create";
|
||||
//"lng_feed_edit_title" = "Edit feed";
|
||||
//"lng_feed_channels_not_found" = "No channels found";
|
||||
|
||||
"lng_info_feed_title" = "Feed Info";
|
||||
"lng_info_feed_is_default" = "Group new channels";
|
||||
"lng_info_feed_channels" = "Channels";
|
||||
//"lng_info_feed_title" = "Feed Info";
|
||||
//"lng_info_feed_is_default" = "Group new channels";
|
||||
//"lng_info_feed_channels" = "Channels";
|
||||
|
||||
"lng_terms_signup" = "By signing up,\nyou agree to the {link}.";
|
||||
"lng_terms_signup_link" = "Terms of Service";
|
||||
|
||||
@@ -153,10 +153,13 @@ inputPeerSelf#7da07ec9 = InputPeer;
|
||||
inputPeerChat#179be863 chat_id:int = InputPeer;
|
||||
inputPeerUser#7b8e7de6 user_id:int access_hash:long = InputPeer;
|
||||
inputPeerChannel#20adaef8 channel_id:int access_hash:long = InputPeer;
|
||||
inputPeerUserFromMessage#17bae2e6 peer:InputPeer msg_id:int user_id:int = InputPeer;
|
||||
inputPeerChannelFromMessage#9c95f7bb peer:InputPeer msg_id:int channel_id:int = InputPeer;
|
||||
|
||||
inputUserEmpty#b98886cf = InputUser;
|
||||
inputUserSelf#f7c1b13f = InputUser;
|
||||
inputUser#d8292816 user_id:int access_hash:long = InputUser;
|
||||
inputUserFromMessage#2d117597 peer:InputPeer msg_id:int user_id:int = InputUser;
|
||||
|
||||
inputPhoneContact#f392b7f4 client_id:long phone:string first_name:string last_name:string = InputContact;
|
||||
|
||||
@@ -191,9 +194,12 @@ inputPhoto#3bb3b94a id:long access_hash:long file_reference:bytes = InputPhoto;
|
||||
|
||||
inputFileLocation#dfdaabe1 volume_id:long local_id:int secret:long file_reference:bytes = InputFileLocation;
|
||||
inputEncryptedFileLocation#f5235d55 id:long access_hash:long = InputFileLocation;
|
||||
inputDocumentFileLocation#196683d9 id:long access_hash:long file_reference:bytes = InputFileLocation;
|
||||
inputDocumentFileLocation#bad07584 id:long access_hash:long file_reference:bytes thumb_size:string = InputFileLocation;
|
||||
inputSecureFileLocation#cbc7ee28 id:long access_hash:long = InputFileLocation;
|
||||
inputTakeoutFileLocation#29be5899 = InputFileLocation;
|
||||
inputPhotoFileLocation#40181ffe id:long access_hash:long file_reference:bytes thumb_size:string = InputFileLocation;
|
||||
inputPeerPhotoFileLocation#27d69997 flags:# big:flags.0?true peer:InputPeer volume_id:long local_id:int = InputFileLocation;
|
||||
inputStickerSetThumb#dbaeae9 stickerset:InputStickerSet volume_id:long local_id:int = InputFileLocation;
|
||||
|
||||
peerUser#9db1bc6d user_id:int = Peer;
|
||||
peerChat#bad0e5bb chat_id:int = Peer;
|
||||
@@ -210,14 +216,11 @@ storage.fileMov#4b09ebbc = storage.FileType;
|
||||
storage.fileMp4#b3cea0e4 = storage.FileType;
|
||||
storage.fileWebp#1081464c = storage.FileType;
|
||||
|
||||
fileLocationUnavailable#7c596b46 volume_id:long local_id:int secret:long = FileLocation;
|
||||
fileLocation#91d11eb dc_id:int volume_id:long local_id:int secret:long file_reference:bytes = FileLocation;
|
||||
|
||||
userEmpty#200250ba id:int = User;
|
||||
user#2e13f4c3 flags:# self:flags.10?true contact:flags.11?true mutual_contact:flags.12?true deleted:flags.13?true bot:flags.14?true bot_chat_history:flags.15?true bot_nochats:flags.16?true verified:flags.17?true restricted:flags.18?true min:flags.20?true bot_inline_geo:flags.21?true support:flags.23?true id:int access_hash:flags.0?long first_name:flags.1?string last_name:flags.2?string username:flags.3?string phone:flags.4?string photo:flags.5?UserProfilePhoto status:flags.6?UserStatus bot_info_version:flags.14?int restriction_reason:flags.18?string bot_inline_placeholder:flags.19?string lang_code:flags.22?string = User;
|
||||
user#2e13f4c3 flags:# self:flags.10?true contact:flags.11?true mutual_contact:flags.12?true deleted:flags.13?true bot:flags.14?true bot_chat_history:flags.15?true bot_nochats:flags.16?true verified:flags.17?true restricted:flags.18?true min:flags.20?true bot_inline_geo:flags.21?true support:flags.23?true scam:flags.24?true id:int access_hash:flags.0?long first_name:flags.1?string last_name:flags.2?string username:flags.3?string phone:flags.4?string photo:flags.5?UserProfilePhoto status:flags.6?UserStatus bot_info_version:flags.14?int restriction_reason:flags.18?string bot_inline_placeholder:flags.19?string lang_code:flags.22?string = User;
|
||||
|
||||
userProfilePhotoEmpty#4f11bae1 = UserProfilePhoto;
|
||||
userProfilePhoto#d559d8c8 photo_id:long photo_small:FileLocation photo_big:FileLocation = UserProfilePhoto;
|
||||
userProfilePhoto#ecd75d8c photo_id:long photo_small:FileLocation photo_big:FileLocation dc_id:int = UserProfilePhoto;
|
||||
|
||||
userStatusEmpty#9d05049 = UserStatus;
|
||||
userStatusOnline#edb93949 expires:int = UserStatus;
|
||||
@@ -229,11 +232,11 @@ userStatusLastMonth#77ebc742 = UserStatus;
|
||||
chatEmpty#9ba2d800 id:int = Chat;
|
||||
chat#3bda1bde flags:# creator:flags.0?true kicked:flags.1?true left:flags.2?true deactivated:flags.5?true id:int title:string photo:ChatPhoto participants_count:int date:int version:int migrated_to:flags.6?InputChannel admin_rights:flags.14?ChatAdminRights default_banned_rights:flags.18?ChatBannedRights = Chat;
|
||||
chatForbidden#7328bdb id:int title:string = Chat;
|
||||
channel#4df30834 flags:# creator:flags.0?true left:flags.2?true broadcast:flags.5?true verified:flags.7?true megagroup:flags.8?true restricted:flags.9?true signatures:flags.11?true min:flags.12?true id:int access_hash:flags.13?long title:string username:flags.6?string photo:ChatPhoto date:int version:int restriction_reason:flags.9?string admin_rights:flags.14?ChatAdminRights banned_rights:flags.15?ChatBannedRights default_banned_rights:flags.18?ChatBannedRights participants_count:flags.17?int = Chat;
|
||||
channel#4df30834 flags:# creator:flags.0?true left:flags.2?true broadcast:flags.5?true verified:flags.7?true megagroup:flags.8?true restricted:flags.9?true signatures:flags.11?true min:flags.12?true scam:flags.19?true has_link:flags.20?true id:int access_hash:flags.13?long title:string username:flags.6?string photo:ChatPhoto date:int version:int restriction_reason:flags.9?string admin_rights:flags.14?ChatAdminRights banned_rights:flags.15?ChatBannedRights default_banned_rights:flags.18?ChatBannedRights participants_count:flags.17?int = Chat;
|
||||
channelForbidden#289da732 flags:# broadcast:flags.5?true megagroup:flags.8?true id:int access_hash:long title:string until_date:flags.16?int = Chat;
|
||||
|
||||
chatFull#22a235da flags:# can_set_username:flags.7?true id:int about:string participants:ChatParticipants chat_photo:flags.2?Photo notify_settings:PeerNotifySettings exported_invite:ExportedChatInvite bot_info:flags.3?Vector<BotInfo> pinned_msg_id:flags.6?int = ChatFull;
|
||||
channelFull#1c87a71a flags:# can_view_participants:flags.3?true can_set_username:flags.6?true can_set_stickers:flags.7?true hidden_prehistory:flags.10?true can_view_stats:flags.12?true id:int about:string participants_count:flags.0?int admins_count:flags.1?int kicked_count:flags.2?int banned_count:flags.2?int online_count:flags.13?int read_inbox_max_id:int read_outbox_max_id:int unread_count:int chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:ExportedChatInvite bot_info:Vector<BotInfo> migrated_from_chat_id:flags.4?int migrated_from_max_id:flags.4?int pinned_msg_id:flags.5?int stickerset:flags.8?StickerSet available_min_id:flags.9?int = ChatFull;
|
||||
chatFull#1b7c9db3 flags:# can_set_username:flags.7?true id:int about:string participants:ChatParticipants chat_photo:flags.2?Photo notify_settings:PeerNotifySettings exported_invite:ExportedChatInvite bot_info:flags.3?Vector<BotInfo> pinned_msg_id:flags.6?int folder_id:flags.11?int = ChatFull;
|
||||
channelFull#9882e516 flags:# can_view_participants:flags.3?true can_set_username:flags.6?true can_set_stickers:flags.7?true hidden_prehistory:flags.10?true can_view_stats:flags.12?true id:int about:string participants_count:flags.0?int admins_count:flags.1?int kicked_count:flags.2?int banned_count:flags.2?int online_count:flags.13?int read_inbox_max_id:int read_outbox_max_id:int unread_count:int chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:ExportedChatInvite bot_info:Vector<BotInfo> migrated_from_chat_id:flags.4?int migrated_from_max_id:flags.4?int pinned_msg_id:flags.5?int stickerset:flags.8?StickerSet available_min_id:flags.9?int folder_id:flags.11?int linked_chat_id:flags.13?int pts:int = ChatFull;
|
||||
|
||||
chatParticipant#c8d7493e user_id:int inviter_id:int date:int = ChatParticipant;
|
||||
chatParticipantCreator#da13538a user_id:int = ChatParticipant;
|
||||
@@ -243,11 +246,11 @@ chatParticipantsForbidden#fc900c2b flags:# chat_id:int self_participant:flags.0?
|
||||
chatParticipants#3f460fed chat_id:int participants:Vector<ChatParticipant> version:int = ChatParticipants;
|
||||
|
||||
chatPhotoEmpty#37c1011c = ChatPhoto;
|
||||
chatPhoto#6153276a photo_small:FileLocation photo_big:FileLocation = ChatPhoto;
|
||||
chatPhoto#475cdbd5 photo_small:FileLocation photo_big:FileLocation dc_id:int = ChatPhoto;
|
||||
|
||||
messageEmpty#83e5de54 id:int = Message;
|
||||
message#44f9b43d flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true from_scheduled:flags.18?true id:int from_id:flags.8?int to_id:Peer fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?int reply_to_msg_id:flags.3?int date:int message:string media:flags.9?MessageMedia reply_markup:flags.6?ReplyMarkup entities:flags.7?Vector<MessageEntity> views:flags.10?int edit_date:flags.15?int post_author:flags.16?string grouped_id:flags.17?long = Message;
|
||||
messageService#9e19a1f6 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true id:int from_id:flags.8?int to_id:Peer reply_to_msg_id:flags.3?int date:int action:MessageAction = Message;
|
||||
message#44f9b43d flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true from_scheduled:flags.18?true legacy:flags.19?true id:int from_id:flags.8?int to_id:Peer fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?int reply_to_msg_id:flags.3?int date:int message:string media:flags.9?MessageMedia reply_markup:flags.6?ReplyMarkup entities:flags.7?Vector<MessageEntity> views:flags.10?int edit_date:flags.15?int post_author:flags.16?string grouped_id:flags.17?long = Message;
|
||||
messageService#9e19a1f6 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true legacy:flags.19?true id:int from_id:flags.8?int to_id:Peer reply_to_msg_id:flags.3?int date:int action:MessageAction = Message;
|
||||
|
||||
messageMediaEmpty#3ded6320 = MessageMedia;
|
||||
messageMediaPhoto#695150d7 flags:# photo:flags.0?Photo ttl_seconds:flags.2?int = MessageMedia;
|
||||
@@ -278,7 +281,7 @@ messageActionHistoryClear#9fbab604 = MessageAction;
|
||||
messageActionGameScore#92a72876 game_id:long score:int = MessageAction;
|
||||
messageActionPaymentSentMe#8f31b327 flags:# currency:string total_amount:long payload:bytes info:flags.0?PaymentRequestedInfo shipping_option_id:flags.1?string charge:PaymentCharge = MessageAction;
|
||||
messageActionPaymentSent#40699cd0 currency:string total_amount:long = MessageAction;
|
||||
messageActionPhoneCall#80e11a7f flags:# call_id:long reason:flags.0?PhoneCallDiscardReason duration:flags.1?int = MessageAction;
|
||||
messageActionPhoneCall#80e11a7f flags:# video:flags.2?true call_id:long reason:flags.0?PhoneCallDiscardReason duration:flags.1?int = MessageAction;
|
||||
messageActionScreenshotTaken#4792929b = MessageAction;
|
||||
messageActionCustomAction#fae69f56 message:string = MessageAction;
|
||||
messageActionBotAllowed#abe9affe domain:string = MessageAction;
|
||||
@@ -286,10 +289,11 @@ messageActionSecureValuesSentMe#1b287353 values:Vector<SecureValue> credentials:
|
||||
messageActionSecureValuesSent#d95c6154 types:Vector<SecureValueType> = MessageAction;
|
||||
messageActionContactSignUp#f3f25f76 = MessageAction;
|
||||
|
||||
dialog#e4def5db flags:# pinned:flags.2?true unread_mark:flags.3?true peer:Peer top_message:int read_inbox_max_id:int read_outbox_max_id:int unread_count:int unread_mentions_count:int notify_settings:PeerNotifySettings pts:flags.0?int draft:flags.1?DraftMessage = Dialog;
|
||||
dialog#2c171f72 flags:# pinned:flags.2?true unread_mark:flags.3?true peer:Peer top_message:int read_inbox_max_id:int read_outbox_max_id:int unread_count:int unread_mentions_count:int notify_settings:PeerNotifySettings pts:flags.0?int draft:flags.1?DraftMessage folder_id:flags.4?int = Dialog;
|
||||
dialogFolder#71bd134c flags:# pinned:flags.2?true folder:Folder peer:Peer top_message:int unread_muted_peers_count:int unread_unmuted_peers_count:int unread_muted_messages_count:int unread_unmuted_messages_count:int = Dialog;
|
||||
|
||||
photoEmpty#2331b22d id:long = Photo;
|
||||
photo#9c477dd8 flags:# has_stickers:flags.0?true id:long access_hash:long file_reference:bytes date:int sizes:Vector<PhotoSize> = Photo;
|
||||
photo#d07504a5 flags:# has_stickers:flags.0?true id:long access_hash:long file_reference:bytes date:int sizes:Vector<PhotoSize> dc_id:int = Photo;
|
||||
|
||||
photoSizeEmpty#e17e23c type:string = PhotoSize;
|
||||
photoSize#77bfb61b type:string location:FileLocation w:int h:int size:int = PhotoSize;
|
||||
@@ -327,7 +331,7 @@ inputReportReasonChildAbuse#adf44ee3 = ReportReason;
|
||||
inputReportReasonOther#e1746d0a text:string = ReportReason;
|
||||
inputReportReasonCopyright#9b89f93a = ReportReason;
|
||||
|
||||
userFull#8ea4a881 flags:# blocked:flags.0?true phone_calls_available:flags.4?true phone_calls_private:flags.5?true can_pin_message:flags.7?true user:User about:flags.1?string link:contacts.Link profile_photo:flags.2?Photo notify_settings:PeerNotifySettings bot_info:flags.3?BotInfo pinned_msg_id:flags.6?int common_chats_count:int = UserFull;
|
||||
userFull#745559cc flags:# blocked:flags.0?true phone_calls_available:flags.4?true phone_calls_private:flags.5?true can_pin_message:flags.7?true user:User about:flags.1?string link:contacts.Link profile_photo:flags.2?Photo notify_settings:PeerNotifySettings bot_info:flags.3?BotInfo pinned_msg_id:flags.6?int common_chats_count:int folder_id:flags.11?int = UserFull;
|
||||
|
||||
contact#f911c994 user_id:int mutual:Bool = Contact;
|
||||
|
||||
@@ -352,7 +356,7 @@ messages.dialogsSlice#71e094f3 count:int dialogs:Vector<Dialog> messages:Vector<
|
||||
messages.dialogsNotModified#f0e3e596 count:int = messages.Dialogs;
|
||||
|
||||
messages.messages#8c718e87 messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Messages;
|
||||
messages.messagesSlice#a6c47aaa flags:# inexact:flags.1?true count:int messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Messages;
|
||||
messages.messagesSlice#c8edce1e flags:# inexact:flags.1?true count:int next_rate:flags.0?int messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Messages;
|
||||
messages.channelMessages#99262e37 flags:# inexact:flags.1?true pts:int count:int messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Messages;
|
||||
messages.messagesNotModified#74535f21 count:int = messages.Messages;
|
||||
|
||||
@@ -402,14 +406,14 @@ updateNotifySettings#bec268ef peer:NotifyPeer notify_settings:PeerNotifySettings
|
||||
updateServiceNotification#ebe46819 flags:# popup:flags.0?true inbox_date:flags.1?int type:string message:string media:MessageMedia entities:Vector<MessageEntity> = Update;
|
||||
updatePrivacy#ee3b272a key:PrivacyKey rules:Vector<PrivacyRule> = Update;
|
||||
updateUserPhone#12b9417b user_id:int phone:string = Update;
|
||||
updateReadHistoryInbox#9961fd5c peer:Peer max_id:int pts:int pts_count:int = Update;
|
||||
updateReadHistoryInbox#9c974fdf flags:# folder_id:flags.0?int peer:Peer max_id:int still_unread_count:int pts:int pts_count:int = Update;
|
||||
updateReadHistoryOutbox#2f2f21bf peer:Peer max_id:int pts:int pts_count:int = Update;
|
||||
updateWebPage#7f891213 webpage:WebPage pts:int pts_count:int = Update;
|
||||
updateReadMessagesContents#68c13933 messages:Vector<int> pts:int pts_count:int = Update;
|
||||
updateChannelTooLong#eb0467fb flags:# channel_id:int pts:flags.0?int = Update;
|
||||
updateChannel#b6d45656 channel_id:int = Update;
|
||||
updateNewChannelMessage#62ba04d9 message:Message pts:int pts_count:int = Update;
|
||||
updateReadChannelInbox#4214f37f channel_id:int max_id:int = Update;
|
||||
updateReadChannelInbox#330b5424 flags:# folder_id:flags.0?int channel_id:int max_id:int still_unread_count:int pts:int = Update;
|
||||
updateDeleteChannelMessages#c37521c9 channel_id:int messages:Vector<int> pts:int pts_count:int = Update;
|
||||
updateChannelMessageViews#98a12b4b channel_id:int id:int views:int = Update;
|
||||
updateChatParticipantAdmin#b6901959 chat_id:int user_id:int is_admin:Bool version:int = Update;
|
||||
@@ -431,8 +435,8 @@ updateRecentStickers#9a422c20 = Update;
|
||||
updateConfig#a229dd06 = Update;
|
||||
updatePtsChanged#3354678f = Update;
|
||||
updateChannelWebPage#40771900 channel_id:int webpage:WebPage pts:int pts_count:int = Update;
|
||||
updateDialogPinned#19d27f3c flags:# pinned:flags.0?true peer:DialogPeer = Update;
|
||||
updatePinnedDialogs#ea4cb65b flags:# order:flags.0?Vector<DialogPeer> = Update;
|
||||
updateDialogPinned#6e6fe51c flags:# pinned:flags.0?true folder_id:flags.1?int peer:DialogPeer = Update;
|
||||
updatePinnedDialogs#fa0f3ca2 flags:# folder_id:flags.1?int order:flags.0?Vector<DialogPeer> = Update;
|
||||
updateBotWebhookJSON#8317c0c3 data:DataJSON = Update;
|
||||
updateBotWebhookJSONQuery#9b9240a6 query_id:long data:DataJSON timeout:int = Update;
|
||||
updateBotShippingQuery#e0cdc940 query_id:long user_id:int payload:bytes shipping_address:PostAddress = Update;
|
||||
@@ -449,6 +453,7 @@ updateUserPinnedMessage#4c43da18 user_id:int id:int = Update;
|
||||
updateChatPinnedMessage#e10db349 chat_id:int id:int version:int = Update;
|
||||
updateMessagePoll#aca1657b flags:# poll_id:long poll:flags.0?Poll results:PollResults = Update;
|
||||
updateChatDefaultBannedRights#54c01850 peer:Peer default_banned_rights:ChatBannedRights version:int = Update;
|
||||
updateFolderPeers#19360dc0 folder_peers:Vector<FolderPeer> pts:int pts_count:int = Update;
|
||||
|
||||
updates.state#a56c2a3e pts:int qts:int date:int seq:int unread_count:int = updates.State;
|
||||
|
||||
@@ -475,7 +480,7 @@ upload.fileCdnRedirect#f18cda44 dc_id:int file_token:bytes encryption_key:bytes
|
||||
|
||||
dcOption#18b7a10d flags:# ipv6:flags.0?true media_only:flags.1?true tcpo_only:flags.2?true cdn:flags.3?true static:flags.4?true id:int ip_address:string port:int secret:flags.10?bytes = DcOption;
|
||||
|
||||
config#e6ca25f6 flags:# phonecalls_enabled:flags.1?true default_p2p_contacts:flags.3?true preload_featured_stickers:flags.4?true ignore_phone_entities:flags.5?true revoke_pm_inbox:flags.6?true blocked_mode:flags.8?true pfs_enabled:flags.13?true date:int expires:int test_mode:Bool this_dc:int dc_options:Vector<DcOption> dc_txt_domain_name:string chat_size_max:int megagroup_size_max:int forwarded_count_max:int online_update_period_ms:int offline_blur_timeout_ms:int offline_idle_timeout_ms:int online_cloud_timeout_ms:int notify_cloud_delay_ms:int notify_default_delay_ms:int push_chat_period_ms:int push_chat_limit:int saved_gifs_limit:int edit_time_limit:int revoke_time_limit:int revoke_pm_time_limit:int rating_e_decay:int stickers_recent_limit:int stickers_faved_limit:int channels_read_media_period:int tmp_sessions:flags.0?int pinned_dialogs_count_max:int call_receive_timeout_ms:int call_ring_timeout_ms:int call_connect_timeout_ms:int call_packet_timeout_ms:int me_url_prefix:string autoupdate_url_prefix:flags.7?string gif_search_username:flags.9?string venue_search_username:flags.10?string img_search_username:flags.11?string static_maps_provider:flags.12?string caption_length_max:int message_length_max:int webfile_dc_id:int suggested_lang_code:flags.2?string lang_pack_version:flags.2?int base_lang_pack_version:flags.2?int = Config;
|
||||
config#330b4067 flags:# phonecalls_enabled:flags.1?true default_p2p_contacts:flags.3?true preload_featured_stickers:flags.4?true ignore_phone_entities:flags.5?true revoke_pm_inbox:flags.6?true blocked_mode:flags.8?true pfs_enabled:flags.13?true date:int expires:int test_mode:Bool this_dc:int dc_options:Vector<DcOption> dc_txt_domain_name:string chat_size_max:int megagroup_size_max:int forwarded_count_max:int online_update_period_ms:int offline_blur_timeout_ms:int offline_idle_timeout_ms:int online_cloud_timeout_ms:int notify_cloud_delay_ms:int notify_default_delay_ms:int push_chat_period_ms:int push_chat_limit:int saved_gifs_limit:int edit_time_limit:int revoke_time_limit:int revoke_pm_time_limit:int rating_e_decay:int stickers_recent_limit:int stickers_faved_limit:int channels_read_media_period:int tmp_sessions:flags.0?int pinned_dialogs_count_max:int pinned_infolder_count_max:int call_receive_timeout_ms:int call_ring_timeout_ms:int call_connect_timeout_ms:int call_packet_timeout_ms:int me_url_prefix:string autoupdate_url_prefix:flags.7?string gif_search_username:flags.9?string venue_search_username:flags.10?string img_search_username:flags.11?string static_maps_provider:flags.12?string caption_length_max:int message_length_max:int webfile_dc_id:int suggested_lang_code:flags.2?string lang_pack_version:flags.2?int base_lang_pack_version:flags.2?int = Config;
|
||||
|
||||
nearestDc#8e1a1775 country:string this_dc:int nearest_dc:int = NearestDc;
|
||||
|
||||
@@ -544,6 +549,7 @@ inputPrivacyKeyPhoneCall#fabadc5f = InputPrivacyKey;
|
||||
inputPrivacyKeyPhoneP2P#db9e70d2 = InputPrivacyKey;
|
||||
inputPrivacyKeyForwards#a4dd4c08 = InputPrivacyKey;
|
||||
inputPrivacyKeyProfilePhoto#5719bacc = InputPrivacyKey;
|
||||
inputPrivacyKeyPhoneNumber#352dafa = InputPrivacyKey;
|
||||
|
||||
privacyKeyStatusTimestamp#bc2eab30 = PrivacyKey;
|
||||
privacyKeyChatInvite#500e6dfa = PrivacyKey;
|
||||
@@ -551,6 +557,7 @@ privacyKeyPhoneCall#3d662b7b = PrivacyKey;
|
||||
privacyKeyPhoneP2P#39491cc8 = PrivacyKey;
|
||||
privacyKeyForwards#69ec56a3 = PrivacyKey;
|
||||
privacyKeyProfilePhoto#96151fed = PrivacyKey;
|
||||
privacyKeyPhoneNumber#d19ae46d = PrivacyKey;
|
||||
|
||||
inputPrivacyValueAllowContacts#d09e07b = InputPrivacyRule;
|
||||
inputPrivacyValueAllowAll#184b35ce = InputPrivacyRule;
|
||||
@@ -558,6 +565,8 @@ inputPrivacyValueAllowUsers#131cc67f users:Vector<InputUser> = InputPrivacyRule;
|
||||
inputPrivacyValueDisallowContacts#ba52007 = InputPrivacyRule;
|
||||
inputPrivacyValueDisallowAll#d66b66c9 = InputPrivacyRule;
|
||||
inputPrivacyValueDisallowUsers#90110467 users:Vector<InputUser> = InputPrivacyRule;
|
||||
inputPrivacyValueAllowChatParticipants#4c81c1ba chats:Vector<int> = InputPrivacyRule;
|
||||
inputPrivacyValueDisallowChatParticipants#d82363af chats:Vector<int> = InputPrivacyRule;
|
||||
|
||||
privacyValueAllowContacts#fffe1bac = PrivacyRule;
|
||||
privacyValueAllowAll#65427b82 = PrivacyRule;
|
||||
@@ -565,8 +574,10 @@ privacyValueAllowUsers#4d5bbe0c users:Vector<int> = PrivacyRule;
|
||||
privacyValueDisallowContacts#f888fa1a = PrivacyRule;
|
||||
privacyValueDisallowAll#8b73e763 = PrivacyRule;
|
||||
privacyValueDisallowUsers#c7f49b7 users:Vector<int> = PrivacyRule;
|
||||
privacyValueAllowChatParticipants#18be796b chats:Vector<int> = PrivacyRule;
|
||||
privacyValueDisallowChatParticipants#acae0690 chats:Vector<int> = PrivacyRule;
|
||||
|
||||
account.privacyRules#554abb6f rules:Vector<PrivacyRule> users:Vector<User> = account.PrivacyRules;
|
||||
account.privacyRules#50a04e45 rules:Vector<PrivacyRule> chats:Vector<Chat> users:Vector<User> = account.PrivacyRules;
|
||||
|
||||
accountDaysTTL#b8d0afdf days:int = AccountDaysTTL;
|
||||
|
||||
@@ -590,7 +601,6 @@ messages.affectedMessages#84d19185 pts:int pts_count:int = messages.AffectedMess
|
||||
|
||||
contactLinkUnknown#5f4f9247 = ContactLink;
|
||||
contactLinkNone#feedd3ad = ContactLink;
|
||||
contactLinkHasPhone#268f3f59 = ContactLink;
|
||||
contactLinkContact#d502c2d0 = ContactLink;
|
||||
|
||||
webPageEmpty#eb1477e8 id:long = WebPage;
|
||||
@@ -616,13 +626,13 @@ chatInviteEmpty#69df3769 = ExportedChatInvite;
|
||||
chatInviteExported#fc2e05bc link:string = ExportedChatInvite;
|
||||
|
||||
chatInviteAlready#5a686d7c chat:Chat = ChatInvite;
|
||||
chatInvite#db74f558 flags:# channel:flags.0?true broadcast:flags.1?true public:flags.2?true megagroup:flags.3?true title:string photo:ChatPhoto participants_count:int participants:flags.4?Vector<User> = ChatInvite;
|
||||
chatInvite#dfc2f58e flags:# channel:flags.0?true broadcast:flags.1?true public:flags.2?true megagroup:flags.3?true title:string photo:Photo participants_count:int participants:flags.4?Vector<User> = ChatInvite;
|
||||
|
||||
inputStickerSetEmpty#ffb62b95 = InputStickerSet;
|
||||
inputStickerSetID#9de7a269 id:long access_hash:long = InputStickerSet;
|
||||
inputStickerSetShortName#861cc8a0 short_name:string = InputStickerSet;
|
||||
|
||||
stickerSet#6a90bcb7 flags:# archived:flags.1?true official:flags.2?true masks:flags.3?true installed_date:flags.0?int id:long access_hash:long title:string short_name:string thumb:flags.4?PhotoSize count:int hash:int = StickerSet;
|
||||
stickerSet#eeb46f27 flags:# archived:flags.1?true official:flags.2?true masks:flags.3?true installed_date:flags.0?int id:long access_hash:long title:string short_name:string thumb:flags.4?PhotoSize thumb_dc_id:flags.4?int count:int hash:int = StickerSet;
|
||||
|
||||
messages.stickerSet#b60a24a6 set:StickerSet packs:Vector<StickerPack> documents:Vector<Document> = messages.StickerSet;
|
||||
|
||||
@@ -638,6 +648,8 @@ keyboardButtonRequestGeoLocation#fc796b3f text:string = KeyboardButton;
|
||||
keyboardButtonSwitchInline#568a748 flags:# same_peer:flags.0?true text:string query:string = KeyboardButton;
|
||||
keyboardButtonGame#50f41ccf text:string = KeyboardButton;
|
||||
keyboardButtonBuy#afd93fbb text:string = KeyboardButton;
|
||||
keyboardButtonUrlAuth#10b78d29 flags:# text:string fwd_text:flags.0?string url:string button_id:int = KeyboardButton;
|
||||
inputKeyboardButtonUrlAuth#d02e7fd4 flags:# request_write_access:flags.0?true text:string fwd_text:flags.1?string url:string bot:InputUser = KeyboardButton;
|
||||
|
||||
keyboardButtonRow#77608b83 buttons:Vector<KeyboardButton> = KeyboardButtonRow;
|
||||
|
||||
@@ -664,13 +676,14 @@ messageEntityCashtag#4c4e743f offset:int length:int = MessageEntity;
|
||||
|
||||
inputChannelEmpty#ee8c1e86 = InputChannel;
|
||||
inputChannel#afeb712e channel_id:int access_hash:long = InputChannel;
|
||||
inputChannelFromMessage#2a286531 peer:InputPeer msg_id:int channel_id:int = InputChannel;
|
||||
|
||||
contacts.resolvedPeer#7f077ad9 peer:Peer chats:Vector<Chat> users:Vector<User> = contacts.ResolvedPeer;
|
||||
|
||||
messageRange#ae30253 min_id:int max_id:int = MessageRange;
|
||||
|
||||
updates.channelDifferenceEmpty#3e11affb flags:# final:flags.0?true pts:int timeout:flags.1?int = updates.ChannelDifference;
|
||||
updates.channelDifferenceTooLong#6a9d7b35 flags:# final:flags.0?true pts:int timeout:flags.1?int top_message:int read_inbox_max_id:int read_outbox_max_id:int unread_count:int unread_mentions_count:int messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = updates.ChannelDifference;
|
||||
updates.channelDifferenceTooLong#a4bcc6fe flags:# final:flags.0?true timeout:flags.1?int dialog:Dialog messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = updates.ChannelDifference;
|
||||
updates.channelDifference#2064674e flags:# final:flags.0?true pts:int timeout:flags.1?int new_messages:Vector<Message> other_updates:Vector<Update> chats:Vector<Chat> users:Vector<User> = updates.ChannelDifference;
|
||||
|
||||
channelMessagesFilterEmpty#94d42ee7 = ChannelMessagesFilter;
|
||||
@@ -759,6 +772,8 @@ topPeerCategoryCorrespondents#637b7ed = TopPeerCategory;
|
||||
topPeerCategoryGroups#bd17a14a = TopPeerCategory;
|
||||
topPeerCategoryChannels#161d9628 = TopPeerCategory;
|
||||
topPeerCategoryPhoneCalls#1e76a78c = TopPeerCategory;
|
||||
topPeerCategoryForwardUsers#a8406ca9 = TopPeerCategory;
|
||||
topPeerCategoryForwardChats#fbeec0f0 = TopPeerCategory;
|
||||
|
||||
topPeerCategoryPeers#fb834291 category:TopPeerCategory count:int peers:Vector<TopPeer> = TopPeerCategoryPeers;
|
||||
|
||||
@@ -898,11 +913,11 @@ inputStickerSetItem#ffa0a496 flags:# document:InputDocument emoji:string mask_co
|
||||
inputPhoneCall#1e36fded id:long access_hash:long = InputPhoneCall;
|
||||
|
||||
phoneCallEmpty#5366c915 id:long = PhoneCall;
|
||||
phoneCallWaiting#1b8f4ad1 flags:# id:long access_hash:long date:int admin_id:int participant_id:int protocol:PhoneCallProtocol receive_date:flags.0?int = PhoneCall;
|
||||
phoneCallRequested#83761ce4 id:long access_hash:long date:int admin_id:int participant_id:int g_a_hash:bytes protocol:PhoneCallProtocol = PhoneCall;
|
||||
phoneCallAccepted#6d003d3f id:long access_hash:long date:int admin_id:int participant_id:int g_b:bytes protocol:PhoneCallProtocol = PhoneCall;
|
||||
phoneCall#e6f9ddf3 flags:# p2p_allowed:flags.5?true id:long access_hash:long date:int admin_id:int participant_id:int g_a_or_b:bytes key_fingerprint:long protocol:PhoneCallProtocol connection:PhoneConnection alternative_connections:Vector<PhoneConnection> start_date:int = PhoneCall;
|
||||
phoneCallDiscarded#50ca4de1 flags:# need_rating:flags.2?true need_debug:flags.3?true id:long reason:flags.0?PhoneCallDiscardReason duration:flags.1?int = PhoneCall;
|
||||
phoneCallWaiting#1b8f4ad1 flags:# video:flags.5?true id:long access_hash:long date:int admin_id:int participant_id:int protocol:PhoneCallProtocol receive_date:flags.0?int = PhoneCall;
|
||||
phoneCallRequested#87eabb53 flags:# video:flags.5?true id:long access_hash:long date:int admin_id:int participant_id:int g_a_hash:bytes protocol:PhoneCallProtocol = PhoneCall;
|
||||
phoneCallAccepted#997c454a flags:# video:flags.5?true id:long access_hash:long date:int admin_id:int participant_id:int g_b:bytes protocol:PhoneCallProtocol = PhoneCall;
|
||||
phoneCall#8742ae7f flags:# p2p_allowed:flags.5?true id:long access_hash:long date:int admin_id:int participant_id:int g_a_or_b:bytes key_fingerprint:long protocol:PhoneCallProtocol connections:Vector<PhoneConnection> start_date:int = PhoneCall;
|
||||
phoneCallDiscarded#50ca4de1 flags:# need_rating:flags.2?true need_debug:flags.3?true video:flags.5?true id:long reason:flags.0?PhoneCallDiscardReason duration:flags.1?int = PhoneCall;
|
||||
|
||||
phoneConnection#9d4c17c0 id:long ip:string ipv6:string port:int peer_tag:bytes = PhoneConnection;
|
||||
|
||||
@@ -928,7 +943,7 @@ langPackLanguage#eeca5ce3 flags:# official:flags.0?true rtl:flags.2?true beta:fl
|
||||
channelAdminLogEventActionChangeTitle#e6dfb825 prev_value:string new_value:string = ChannelAdminLogEventAction;
|
||||
channelAdminLogEventActionChangeAbout#55188a2e prev_value:string new_value:string = ChannelAdminLogEventAction;
|
||||
channelAdminLogEventActionChangeUsername#6a4afc38 prev_value:string new_value:string = ChannelAdminLogEventAction;
|
||||
channelAdminLogEventActionChangePhoto#b82f55c3 prev_photo:ChatPhoto new_photo:ChatPhoto = ChannelAdminLogEventAction;
|
||||
channelAdminLogEventActionChangePhoto#434bd2af prev_photo:Photo new_photo:Photo = ChannelAdminLogEventAction;
|
||||
channelAdminLogEventActionToggleInvites#1b7907ae new_value:Bool = ChannelAdminLogEventAction;
|
||||
channelAdminLogEventActionToggleSignatures#26ae0971 new_value:Bool = ChannelAdminLogEventAction;
|
||||
channelAdminLogEventActionUpdatePinned#e9e82c18 message:Message = ChannelAdminLogEventAction;
|
||||
@@ -943,6 +958,7 @@ channelAdminLogEventActionChangeStickerSet#b1c3caa7 prev_stickerset:InputSticker
|
||||
channelAdminLogEventActionTogglePreHistoryHidden#5f5c95f1 new_value:Bool = ChannelAdminLogEventAction;
|
||||
channelAdminLogEventActionDefaultBannedRights#2df5fc0a prev_banned_rights:ChatBannedRights new_banned_rights:ChatBannedRights = ChannelAdminLogEventAction;
|
||||
channelAdminLogEventActionStopPoll#8f079643 message:Message = ChannelAdminLogEventAction;
|
||||
channelAdminLogEventActionChangeLinkedChat#a26f881b prev_value:int new_value:int = ChannelAdminLogEventAction;
|
||||
|
||||
channelAdminLogEvent#3b5a3e40 id:long date:int user_id:int action:ChannelAdminLogEventAction = ChannelAdminLogEvent;
|
||||
|
||||
@@ -974,8 +990,10 @@ inputMessageReplyTo#bad88395 id:int = InputMessage;
|
||||
inputMessagePinned#86872538 = InputMessage;
|
||||
|
||||
inputDialogPeer#fcaafeb7 peer:InputPeer = InputDialogPeer;
|
||||
inputDialogPeerFolder#64600527 folder_id:int = InputDialogPeer;
|
||||
|
||||
dialogPeer#e56dbf05 peer:Peer = DialogPeer;
|
||||
dialogPeerFolder#514519e2 folder_id:int = DialogPeer;
|
||||
|
||||
messages.foundStickerSetsNotModified#d54b65d = messages.FoundStickerSets;
|
||||
messages.foundStickerSets#5108d648 hash:int sets:Vector<StickerSetCovered> = messages.FoundStickerSets;
|
||||
@@ -1131,6 +1149,22 @@ emojiKeywordsDifference#5cc761bd lang_code:string from_version:int version:int k
|
||||
|
||||
emojiURL#a575739d url:string = EmojiURL;
|
||||
|
||||
emojiLanguage#b3fb5361 lang_code:string = EmojiLanguage;
|
||||
|
||||
fileLocationToBeDeprecated#bc7fc6cd volume_id:long local_id:int = FileLocation;
|
||||
|
||||
folder#ff544e65 flags:# autofill_new_broadcasts:flags.0?true autofill_public_groups:flags.1?true autofill_new_correspondents:flags.2?true id:int title:string photo:flags.3?ChatPhoto = Folder;
|
||||
|
||||
inputFolderPeer#fbd2c296 peer:InputPeer folder_id:int = InputFolderPeer;
|
||||
|
||||
folderPeer#e9baa668 peer:Peer folder_id:int = FolderPeer;
|
||||
|
||||
messages.searchCounter#e844ebff flags:# inexact:flags.1?true filter:MessagesFilter count:int = messages.SearchCounter;
|
||||
|
||||
urlAuthResultRequest#92d33a0e flags:# request_write_access:flags.0?true bot:User domain:string = UrlAuthResult;
|
||||
urlAuthResultAccepted#8f8c0e4e url:string = UrlAuthResult;
|
||||
urlAuthResultDefault#a9d6db1f = UrlAuthResult;
|
||||
|
||||
---functions---
|
||||
|
||||
invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X;
|
||||
@@ -1229,14 +1263,14 @@ contacts.unblock#e54100bd id:InputUser = Bool;
|
||||
contacts.getBlocked#f57c350f offset:int limit:int = contacts.Blocked;
|
||||
contacts.search#11f812d8 q:string limit:int = contacts.Found;
|
||||
contacts.resolveUsername#f93ccba3 username:string = contacts.ResolvedPeer;
|
||||
contacts.getTopPeers#d4982db5 flags:# correspondents:flags.0?true bots_pm:flags.1?true bots_inline:flags.2?true phone_calls:flags.3?true groups:flags.10?true channels:flags.15?true offset:int limit:int hash:int = contacts.TopPeers;
|
||||
contacts.getTopPeers#d4982db5 flags:# correspondents:flags.0?true bots_pm:flags.1?true bots_inline:flags.2?true phone_calls:flags.3?true forward_users:flags.4?true forward_chats:flags.5?true groups:flags.10?true channels:flags.15?true offset:int limit:int hash:int = contacts.TopPeers;
|
||||
contacts.resetTopPeerRating#1ae373ac category:TopPeerCategory peer:InputPeer = Bool;
|
||||
contacts.resetSaved#879537f1 = Bool;
|
||||
contacts.getSaved#82f1e39f = Vector<SavedContact>;
|
||||
contacts.toggleTopPeers#8514bdda enabled:Bool = Bool;
|
||||
|
||||
messages.getMessages#63c66506 id:Vector<InputMessage> = messages.Messages;
|
||||
messages.getDialogs#b098aee6 flags:# exclude_pinned:flags.0?true offset_date:int offset_id:int offset_peer:InputPeer limit:int hash:int = messages.Dialogs;
|
||||
messages.getDialogs#a0ee3b73 flags:# exclude_pinned:flags.0?true folder_id:flags.1?int offset_date:int offset_id:int offset_peer:InputPeer limit:int hash:int = messages.Dialogs;
|
||||
messages.getHistory#dcbb8260 peer:InputPeer offset_id:int offset_date:int add_offset:int limit:int max_id:int min_id:int hash:int = messages.Messages;
|
||||
messages.search#8614ef68 flags:# peer:InputPeer q:string from_id:flags.0?InputUser filter:MessagesFilter min_date:int max_date:int offset_id:int add_offset:int limit:int max_id:int min_id:int hash:int = messages.Messages;
|
||||
messages.readHistory#e306d3a peer:InputPeer max_id:int = messages.AffectedMessages;
|
||||
@@ -1283,7 +1317,7 @@ messages.startBot#e6df7378 bot:InputUser peer:InputPeer random_id:long start_par
|
||||
messages.getMessagesViews#c4c8a55d peer:InputPeer id:Vector<int> increment:Bool = Vector<int>;
|
||||
messages.editChatAdmin#a9e69f2e chat_id:int user_id:InputUser is_admin:Bool = Bool;
|
||||
messages.migrateChat#15a3b8e3 chat_id:int = Updates;
|
||||
messages.searchGlobal#9e3cacb0 q:string offset_date:int offset_peer:InputPeer offset_id:int limit:int = messages.Messages;
|
||||
messages.searchGlobal#f79c611 q:string offset_rate:int offset_peer:InputPeer offset_id:int limit:int = messages.Messages;
|
||||
messages.reorderStickerSets#78337739 flags:# masks:flags.0?true order:Vector<long> = Bool;
|
||||
messages.getDocumentByHash#338e2464 sha256:bytes size:int mime_type:string = Document;
|
||||
messages.searchGifs#bf9a776b q:string offset:int = messages.FoundGifs;
|
||||
@@ -1316,8 +1350,8 @@ messages.getCommonChats#d0a48c4 user_id:InputUser max_id:int limit:int = message
|
||||
messages.getAllChats#eba80ff0 except_ids:Vector<int> = messages.Chats;
|
||||
messages.getWebPage#32ca8f91 url:string hash:int = WebPage;
|
||||
messages.toggleDialogPin#a731e257 flags:# pinned:flags.0?true peer:InputDialogPeer = Bool;
|
||||
messages.reorderPinnedDialogs#5b51d63f flags:# force:flags.0?true order:Vector<InputDialogPeer> = Bool;
|
||||
messages.getPinnedDialogs#e254d64e = messages.PeerDialogs;
|
||||
messages.reorderPinnedDialogs#3b1adf37 flags:# force:flags.0?true folder_id:int order:Vector<InputDialogPeer> = Bool;
|
||||
messages.getPinnedDialogs#d6b94df2 folder_id:int = messages.PeerDialogs;
|
||||
messages.setBotShippingResults#e5f672fa flags:# query_id:long error:flags.0?string shipping_options:flags.1?Vector<ShippingOption> = Bool;
|
||||
messages.setBotPrecheckoutResults#9c2dd95 flags:# success:flags.1?true query_id:long error:flags.0?string = Bool;
|
||||
messages.uploadMedia#519bc2b1 peer:InputPeer media:InputMedia = MessageMedia;
|
||||
@@ -1343,7 +1377,11 @@ messages.editChatAbout#def60797 peer:InputPeer about:string = Bool;
|
||||
messages.editChatDefaultBannedRights#a5866b41 peer:InputPeer banned_rights:ChatBannedRights = Updates;
|
||||
messages.getEmojiKeywords#35a0e062 lang_code:string = EmojiKeywordsDifference;
|
||||
messages.getEmojiKeywordsDifference#1508b6af lang_code:string from_version:int = EmojiKeywordsDifference;
|
||||
messages.getEmojiKeywordsLanguages#4e9963b2 lang_codes:Vector<string> = Vector<EmojiLanguage>;
|
||||
messages.getEmojiURL#d5b10c26 lang_code:string = EmojiURL;
|
||||
messages.getSearchCounters#732eef00 peer:InputPeer filters:Vector<MessagesFilter> = Vector<messages.SearchCounter>;
|
||||
messages.requestUrlAuth#e33f5613 peer:InputPeer msg_id:int button_id:int = UrlAuthResult;
|
||||
messages.acceptUrlAuth#f729ea98 flags:# write_allowed:flags.0?true peer:InputPeer msg_id:int button_id:int = UrlAuthResult;
|
||||
|
||||
updates.getState#edd4882a = updates.State;
|
||||
updates.getDifference#25939651 flags:# pts:int pts_total_limit:flags.0?int date:int qts:int = updates.Difference;
|
||||
@@ -1412,6 +1450,9 @@ channels.readMessageContents#eab5dc38 channel:InputChannel id:Vector<int> = Bool
|
||||
channels.deleteHistory#af369d42 channel:InputChannel max_id:int = Bool;
|
||||
channels.togglePreHistoryHidden#eabbb94c channel:InputChannel enabled:Bool = Updates;
|
||||
channels.getLeftChannels#8341ecc0 offset:int = messages.Chats;
|
||||
channels.getGroupsForDiscussion#f5dad378 = messages.Chats;
|
||||
channels.getBroadcastsForDiscussion#1a87f304 = messages.Chats;
|
||||
channels.setDiscussionGroup#40582bb2 broadcast:InputChannel group:InputChannel = Bool;
|
||||
|
||||
bots.sendCustomRequest#aa2769ed custom_method:string params:DataJSON = DataJSON;
|
||||
bots.answerWebhookJSONQuery#e6213f4d query_id:long data:DataJSON = Bool;
|
||||
@@ -1429,11 +1470,11 @@ stickers.changeStickerPosition#ffb6d4ca sticker:InputDocument position:int = mes
|
||||
stickers.addStickerToSet#8653febe stickerset:InputStickerSet sticker:InputStickerSetItem = messages.StickerSet;
|
||||
|
||||
phone.getCallConfig#55451fa9 = DataJSON;
|
||||
phone.requestCall#5b95b3d4 user_id:InputUser random_id:int g_a_hash:bytes protocol:PhoneCallProtocol = phone.PhoneCall;
|
||||
phone.requestCall#42ff96ed flags:# video:flags.0?true user_id:InputUser random_id:int g_a_hash:bytes protocol:PhoneCallProtocol = phone.PhoneCall;
|
||||
phone.acceptCall#3bd2b4a0 peer:InputPhoneCall g_b:bytes protocol:PhoneCallProtocol = phone.PhoneCall;
|
||||
phone.confirmCall#2efe1722 peer:InputPhoneCall g_a:bytes key_fingerprint:long protocol:PhoneCallProtocol = phone.PhoneCall;
|
||||
phone.receivedCall#17d54f61 peer:InputPhoneCall = Bool;
|
||||
phone.discardCall#78d413a6 peer:InputPhoneCall duration:int reason:PhoneCallDiscardReason connection_id:long = Updates;
|
||||
phone.discardCall#b2cbc1c0 flags:# video:flags.0?true peer:InputPhoneCall duration:int reason:PhoneCallDiscardReason connection_id:long = Updates;
|
||||
phone.setCallRating#59ead627 flags:# user_initiative:flags.0?true peer:InputPhoneCall rating:int comment:string = Updates;
|
||||
phone.saveCallDebug#277add7e peer:InputPhoneCall debug:DataJSON = Bool;
|
||||
|
||||
@@ -1443,4 +1484,7 @@ langpack.getDifference#cd984aa5 lang_pack:string lang_code:string from_version:i
|
||||
langpack.getLanguages#42c6978f lang_pack:string = Vector<LangPackLanguage>;
|
||||
langpack.getLanguage#6a596502 lang_pack:string lang_code:string = LangPackLanguage;
|
||||
|
||||
// LAYER 97
|
||||
folders.editPeerFolders#6847d0ab folder_peers:Vector<InputFolderPeer> = Updates;
|
||||
folders.deleteFolder#1c295881 folder_id:int = Updates;
|
||||
|
||||
// LAYER 100
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<Identity Name="TelegramMessengerLLP.TelegramDesktop"
|
||||
ProcessorArchitecture="ARCHITECTURE"
|
||||
Publisher="CN=536BC709-8EE1-4478-AF22-F0F0F26FF64A"
|
||||
Version="1.6.3.0" />
|
||||
Version="1.7.2.0" />
|
||||
<Properties>
|
||||
<DisplayName>Telegram Desktop</DisplayName>
|
||||
<PublisherDisplayName>Telegram Messenger LLP</PublisherDisplayName>
|
||||
|
||||
@@ -34,8 +34,8 @@ IDI_ICON1 ICON "..\\art\\icon256.ico"
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,6,3,0
|
||||
PRODUCTVERSION 1,6,3,0
|
||||
FILEVERSION 1,7,2,0
|
||||
PRODUCTVERSION 1,7,2,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@@ -52,10 +52,10 @@ BEGIN
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Telegram Messenger LLP"
|
||||
VALUE "FileDescription", "Telegram Desktop"
|
||||
VALUE "FileVersion", "1.6.3.0"
|
||||
VALUE "FileVersion", "1.7.2.0"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2014-2019"
|
||||
VALUE "ProductName", "Telegram Desktop"
|
||||
VALUE "ProductVersion", "1.6.3.0"
|
||||
VALUE "ProductVersion", "1.7.2.0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
||||
@@ -25,8 +25,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,6,3,0
|
||||
PRODUCTVERSION 1,6,3,0
|
||||
FILEVERSION 1,7,2,0
|
||||
PRODUCTVERSION 1,7,2,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@@ -43,10 +43,10 @@ BEGIN
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Telegram Messenger LLP"
|
||||
VALUE "FileDescription", "Telegram Desktop Updater"
|
||||
VALUE "FileVersion", "1.6.3.0"
|
||||
VALUE "FileVersion", "1.7.2.0"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2014-2019"
|
||||
VALUE "ProductName", "Telegram Desktop"
|
||||
VALUE "ProductVersion", "1.6.3.0"
|
||||
VALUE "ProductVersion", "1.7.2.0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
||||
@@ -15,6 +15,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
|
||||
bool BetaChannel = false;
|
||||
quint64 AlphaVersion = 0;
|
||||
bool OnlyAlphaKey = false;
|
||||
|
||||
const char *PublicKey = "\
|
||||
-----BEGIN RSA PUBLIC KEY-----\n\
|
||||
@@ -126,6 +127,21 @@ int32 *hashSha1(const void *data, uint32 len, void *dest) {
|
||||
|
||||
QString AlphaSignature;
|
||||
|
||||
int writeAlphaKey() {
|
||||
if (!AlphaVersion) {
|
||||
return 0;
|
||||
}
|
||||
QString keyName(QString("talpha_%1_key").arg(AlphaVersion));
|
||||
QFile key(keyName);
|
||||
if (!key.open(QIODevice::WriteOnly)) {
|
||||
cout << "Can't open '" << keyName.toUtf8().constData() << "' for write..\n";
|
||||
return -1;
|
||||
}
|
||||
key.write(AlphaSignature.toUtf8());
|
||||
key.close();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QString workDir;
|
||||
@@ -146,6 +162,8 @@ int main(int argc, char *argv[])
|
||||
version = QString(argv[i + 1]).toInt();
|
||||
} else if (string("-beta") == argv[i]) {
|
||||
BetaChannel = true;
|
||||
} else if (string("-alphakey") == argv[i]) {
|
||||
OnlyAlphaKey = true;
|
||||
} else if (string("-alpha") == argv[i] && i + 1 < argc) {
|
||||
AlphaVersion = QString(argv[i + 1]).toULongLong();
|
||||
if (AlphaVersion > version * 1000ULL && AlphaVersion < (version + 1) * 1000ULL) {
|
||||
@@ -160,6 +178,9 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
}
|
||||
if (OnlyAlphaKey) {
|
||||
return writeAlphaKey();
|
||||
}
|
||||
|
||||
if (files.isEmpty() || remove.isEmpty() || version <= 1016 || version > 999999999) {
|
||||
#ifdef Q_OS_WIN
|
||||
@@ -464,20 +485,9 @@ int main(int argc, char *argv[])
|
||||
out.write(compressed);
|
||||
out.close();
|
||||
|
||||
if (AlphaVersion) {
|
||||
QString keyName(QString("talpha_%1_key").arg(AlphaVersion));
|
||||
QFile key(keyName);
|
||||
if (!key.open(QIODevice::WriteOnly)) {
|
||||
cout << "Can't open '" << keyName.toUtf8().constData() << "' for write..\n";
|
||||
return -1;
|
||||
}
|
||||
key.write(AlphaSignature.toUtf8());
|
||||
key.close();
|
||||
}
|
||||
|
||||
cout << "Update file '" << outName.toUtf8().constData() << "' written successfully!\n";
|
||||
|
||||
return 0;
|
||||
return writeAlphaKey();
|
||||
}
|
||||
|
||||
QString countAlphaVersionSignature(quint64 version) { // duplicated in autoupdater.cpp
|
||||
|
||||
@@ -60,26 +60,74 @@ inline int32 CountHash(IntRange &&range) {
|
||||
|
||||
class ApiWrap : public MTP::Sender, private base::Subscriber {
|
||||
public:
|
||||
struct Privacy {
|
||||
enum class Key {
|
||||
PhoneNumber,
|
||||
LastSeen,
|
||||
Calls,
|
||||
Invites,
|
||||
CallsPeer2Peer,
|
||||
Forwards,
|
||||
ProfilePhoto,
|
||||
};
|
||||
enum class Option {
|
||||
Everyone,
|
||||
Contacts,
|
||||
Nobody,
|
||||
};
|
||||
Option option = Option::Everyone;
|
||||
std::vector<not_null<PeerData*>> always;
|
||||
std::vector<not_null<PeerData*>> never;
|
||||
|
||||
static MTPInputPrivacyKey Input(Key key);
|
||||
static std::optional<Key> KeyFromMTP(mtpTypeId type);
|
||||
};
|
||||
|
||||
struct BlockedUsersSlice {
|
||||
struct Item {
|
||||
UserData *user = nullptr;
|
||||
TimeId date = 0;
|
||||
|
||||
bool operator==(const Item &other) const;
|
||||
bool operator!=(const Item &other) const;
|
||||
};
|
||||
|
||||
QVector<Item> list;
|
||||
int total = 0;
|
||||
|
||||
bool operator==(const BlockedUsersSlice &other) const;
|
||||
bool operator!=(const BlockedUsersSlice &other) const;
|
||||
};
|
||||
|
||||
ApiWrap(not_null<AuthSession*> session);
|
||||
|
||||
void applyUpdates(const MTPUpdates &updates, uint64 sentMessageRandomId = 0);
|
||||
void applyNotifySettings(
|
||||
MTPInputNotifyPeer peer,
|
||||
const MTPPeerNotifySettings &settings);
|
||||
|
||||
void savePinnedOrder();
|
||||
//void toggleChannelGrouping( // #feed
|
||||
// not_null<ChannelData*> channel,
|
||||
// bool group,
|
||||
// Fn<void()> callback);
|
||||
//void ungroupAllFromFeed(not_null<Data::Feed*> feed);
|
||||
void savePinnedOrder(Data::Folder *folder);
|
||||
void toggleHistoryArchived(
|
||||
not_null<History*> history,
|
||||
bool archived,
|
||||
Fn<void()> callback);
|
||||
//void ungroupAllFromFeed(not_null<Data::Feed*> feed); // #feed
|
||||
|
||||
using RequestMessageDataCallback = Fn<void(ChannelData*, MsgId)>;
|
||||
void requestMessageData(
|
||||
ChannelData *channel,
|
||||
MsgId msgId,
|
||||
RequestMessageDataCallback callback);
|
||||
QString exportDirectMessageLink(not_null<HistoryItem*> item);
|
||||
|
||||
void requestContacts();
|
||||
void requestDialogEntry(not_null<Data::Feed*> feed);
|
||||
//void requestFeedDialogsEntries(not_null<Data::Feed*> feed);
|
||||
void requestDialogs(Data::Folder *folder = nullptr);
|
||||
void requestPinnedDialogs(Data::Folder *folder = nullptr);
|
||||
void requestMoreBlockedByDateDialogs();
|
||||
rpl::producer<bool> dialogsLoadMayBlockByDate() const;
|
||||
rpl::producer<bool> dialogsLoadBlockedByDate() const;
|
||||
|
||||
void requestDialogEntry(not_null<Data::Folder*> folder);
|
||||
void requestDialogEntry(
|
||||
not_null<History*> history,
|
||||
Fn<void()> callback = nullptr);
|
||||
@@ -205,8 +253,12 @@ public:
|
||||
void updateNotifySettingsDelayed(not_null<const PeerData*> peer);
|
||||
void saveDraftToCloudDelayed(not_null<History*> history);
|
||||
|
||||
void savePrivacy(const MTPInputPrivacyKey &key, QVector<MTPInputPrivacyRule> &&rules);
|
||||
void handlePrivacyChange(mtpTypeId keyTypeId, const MTPVector<MTPPrivacyRule> &rules);
|
||||
void savePrivacy(
|
||||
const MTPInputPrivacyKey &key,
|
||||
QVector<MTPInputPrivacyRule> &&rules);
|
||||
void handlePrivacyChange(
|
||||
Privacy::Key key,
|
||||
const MTPVector<MTPPrivacyRule> &rules);
|
||||
static int OnlineTillFromStatus(
|
||||
const MTPUserStatus &status,
|
||||
int currentOnlineTill);
|
||||
@@ -308,9 +360,9 @@ public:
|
||||
void shareContact(not_null<UserData*> user, const SendOptions &options);
|
||||
void readServerHistory(not_null<History*> history);
|
||||
void readServerHistoryForce(not_null<History*> history);
|
||||
void readFeed(
|
||||
not_null<Data::Feed*> feed,
|
||||
Data::MessagePosition position);
|
||||
//void readFeed( // #feed
|
||||
// not_null<Data::Feed*> feed,
|
||||
// Data::MessagePosition position);
|
||||
|
||||
void sendVoiceMessage(
|
||||
QByteArray result,
|
||||
@@ -328,6 +380,13 @@ public:
|
||||
SendMediaType type,
|
||||
const SendOptions &options);
|
||||
|
||||
void editMedia(
|
||||
Storage::PreparedList &&list,
|
||||
SendMediaType type,
|
||||
TextWithTags &&caption,
|
||||
const SendOptions &options,
|
||||
MsgId msgIdToEdit);
|
||||
|
||||
void sendUploadedPhoto(
|
||||
FullMsgId localId,
|
||||
const MTPInputFile &file,
|
||||
@@ -337,6 +396,13 @@ public:
|
||||
const MTPInputFile &file,
|
||||
const std::optional<MTPInputFile> &thumb,
|
||||
bool silent);
|
||||
void editUploadedFile(
|
||||
FullMsgId localId,
|
||||
const MTPInputFile &file,
|
||||
const std::optional<MTPInputFile> &thumb,
|
||||
bool silent,
|
||||
bool isDocument);
|
||||
|
||||
void cancelLocalItem(not_null<HistoryItem*> item);
|
||||
|
||||
struct MessageToSend {
|
||||
@@ -378,29 +444,12 @@ public:
|
||||
|
||||
void saveSelfBio(const QString &text, FnMut<void()> done);
|
||||
|
||||
struct Privacy {
|
||||
enum class Key {
|
||||
LastSeen,
|
||||
Calls,
|
||||
Invites,
|
||||
CallsPeer2Peer,
|
||||
Forwards,
|
||||
ProfilePhoto,
|
||||
};
|
||||
enum class Option {
|
||||
Everyone,
|
||||
Contacts,
|
||||
Nobody,
|
||||
};
|
||||
Option option = Option::Everyone;
|
||||
std::vector<not_null<UserData*>> always;
|
||||
std::vector<not_null<UserData*>> never;
|
||||
|
||||
static MTPInputPrivacyKey Input(Key key);
|
||||
};
|
||||
void reloadPrivacy(Privacy::Key key);
|
||||
rpl::producer<Privacy> privacyValue(Privacy::Key key);
|
||||
|
||||
void reloadBlockedUsers();
|
||||
rpl::producer<BlockedUsersSlice> blockedUsersSlice();
|
||||
|
||||
void reloadSelfDestruct();
|
||||
rpl::producer<int> selfDestructValue() const;
|
||||
void saveSelfDestruct(int days);
|
||||
@@ -413,7 +462,7 @@ public:
|
||||
void sendPollVotes(
|
||||
FullMsgId itemId,
|
||||
const std::vector<QByteArray> &options);
|
||||
void closePoll(FullMsgId itemId);
|
||||
void closePoll(not_null<HistoryItem*> item);
|
||||
void reloadPollResults(not_null<HistoryItem*> item);
|
||||
|
||||
~ApiWrap();
|
||||
@@ -433,7 +482,27 @@ private:
|
||||
crl::time received = 0;
|
||||
};
|
||||
|
||||
void updatesReceived(const MTPUpdates &updates);
|
||||
struct DialogsLoadState {
|
||||
TimeId offsetDate = 0;
|
||||
MsgId offsetId = 0;
|
||||
PeerData *offsetPeer = nullptr;
|
||||
mtpRequestId requestId = 0;
|
||||
bool listReceived = false;
|
||||
|
||||
mtpRequestId pinnedRequestId = 0;
|
||||
bool pinnedReceived = false;
|
||||
};
|
||||
|
||||
void setupSupportMode();
|
||||
void refreshDialogsLoadBlocked();
|
||||
void updateDialogsOffset(
|
||||
Data::Folder *folder,
|
||||
const QVector<MTPDialog> &dialogs,
|
||||
const QVector<MTPMessage> &messages);
|
||||
void requestMoreDialogs(Data::Folder *folder);
|
||||
DialogsLoadState *dialogsLoadState(Data::Folder *folder);
|
||||
void dialogsLoadFinish(Data::Folder *folder);
|
||||
|
||||
void checkQuitPreventFinished();
|
||||
|
||||
void saveDraftsToCloud();
|
||||
@@ -447,9 +516,6 @@ private:
|
||||
QVector<MTPInputMessage> collectMessageIds(const MessageDataRequests &requests);
|
||||
MessageDataRequests *messageDataRequests(ChannelData *channel, bool onlyExisting = false);
|
||||
void applyPeerDialogs(const MTPmessages_PeerDialogs &dialogs);
|
||||
void applyFeedDialogs(
|
||||
not_null<Data::Feed*> feed,
|
||||
const MTPmessages_Dialogs &dialogs);
|
||||
|
||||
void gotChatFull(
|
||||
not_null<PeerData*> peer,
|
||||
@@ -487,10 +553,6 @@ private:
|
||||
MsgRange range,
|
||||
const MTPupdates_ChannelDifference &result);
|
||||
|
||||
void notifySettingReceived(
|
||||
MTPInputNotifyPeer peer,
|
||||
const MTPPeerNotifySettings &settings);
|
||||
|
||||
void stickerSetDisenabled(mtpRequestId requestId);
|
||||
void stickersSaveOrder();
|
||||
|
||||
@@ -507,17 +569,17 @@ private:
|
||||
const QVector<MTPChannelParticipant> &participants);
|
||||
|
||||
void jumpToHistoryDate(not_null<PeerData*> peer, const QDate &date);
|
||||
void jumpToFeedDate(not_null<Data::Feed*> feed, const QDate &date);
|
||||
//void jumpToFeedDate(not_null<Data::Feed*> feed, const QDate &date); // #feed
|
||||
template <typename Callback>
|
||||
void requestMessageAfterDate(
|
||||
not_null<PeerData*> peer,
|
||||
const QDate &date,
|
||||
Callback &&callback);
|
||||
template <typename Callback>
|
||||
void requestMessageAfterDate(
|
||||
not_null<Data::Feed*> feed,
|
||||
const QDate &date,
|
||||
Callback &&callback);
|
||||
//template <typename Callback> // #feed
|
||||
//void requestMessageAfterDate(
|
||||
// not_null<Data::Feed*> feed,
|
||||
// const QDate &date,
|
||||
// Callback &&callback);
|
||||
|
||||
void sharedMediaDone(
|
||||
not_null<PeerData*> peer,
|
||||
@@ -586,7 +648,7 @@ private:
|
||||
uint64 randomId);
|
||||
FileLoadTo fileLoadTaskOptions(const SendOptions &options) const;
|
||||
|
||||
void readFeeds();
|
||||
//void readFeeds(); // #feed
|
||||
|
||||
void getProxyPromotionDelayed(TimeId now, TimeId next);
|
||||
void proxyPromotionDone(const MTPhelp_ProxyData &proxy);
|
||||
@@ -636,8 +698,8 @@ private:
|
||||
Fn<void(
|
||||
const MTPchannels_ChannelParticipants&)> _channelMembersForAddCallback;
|
||||
base::flat_map<
|
||||
not_null<ChannelData*>,
|
||||
std::pair<mtpRequestId,Fn<void()>>> _channelGroupingRequests;
|
||||
not_null<History*>,
|
||||
std::pair<mtpRequestId,Fn<void()>>> _historyArchivedRequests;
|
||||
|
||||
using KickRequest = std::pair<
|
||||
not_null<ChannelData*>,
|
||||
@@ -686,7 +748,7 @@ private:
|
||||
|
||||
mtpRequestId _contactsRequestId = 0;
|
||||
mtpRequestId _contactsStatusesRequestId = 0;
|
||||
base::flat_set<not_null<Data::Feed*>> _dialogFeedRequests;
|
||||
base::flat_set<not_null<Data::Folder*>> _dialogFolderRequests;
|
||||
base::flat_map<
|
||||
not_null<History*>,
|
||||
std::vector<Fn<void()>>> _dialogRequests;
|
||||
@@ -705,19 +767,28 @@ private:
|
||||
|
||||
base::flat_map<not_null<UserData*>, mtpRequestId> _userPhotosRequests;
|
||||
|
||||
base::flat_set<not_null<Data::Feed*>> _feedChannelsGetRequests;
|
||||
//base::flat_set<not_null<Data::Feed*>> _feedChannelsGetRequests; // #feed
|
||||
//base::flat_map<
|
||||
// not_null<Data::Feed*>,
|
||||
// mtpRequestId> _feedChannelsSetRequests;
|
||||
//base::flat_set<std::tuple<
|
||||
// not_null<Data::Feed*>,
|
||||
// Data::MessagePosition,
|
||||
// SliceType>> _feedMessagesRequests;
|
||||
//base::flat_set<std::tuple<
|
||||
// not_null<Data::Feed*>,
|
||||
// Data::MessagePosition,
|
||||
// SliceType>> _feedMessagesRequestsPending;
|
||||
//mtpRequestId _saveDefaultFeedIdRequest = 0;
|
||||
|
||||
std::unique_ptr<DialogsLoadState> _dialogsLoadState;
|
||||
TimeId _dialogsLoadTill = 0;
|
||||
rpl::variable<bool> _dialogsLoadMayBlockByDate = false;
|
||||
rpl::variable<bool> _dialogsLoadBlockedByDate = false;
|
||||
|
||||
base::flat_map<
|
||||
not_null<Data::Feed*>,
|
||||
mtpRequestId> _feedChannelsSetRequests;
|
||||
base::flat_set<std::tuple<
|
||||
not_null<Data::Feed*>,
|
||||
Data::MessagePosition,
|
||||
SliceType>> _feedMessagesRequests;
|
||||
base::flat_set<std::tuple<
|
||||
not_null<Data::Feed*>,
|
||||
Data::MessagePosition,
|
||||
SliceType>> _feedMessagesRequestsPending;
|
||||
mtpRequestId _saveDefaultFeedIdRequest = 0;
|
||||
not_null<Data::Folder*>,
|
||||
DialogsLoadState> _foldersLoadState;
|
||||
|
||||
rpl::event_stream<SendOptions> _sendActions;
|
||||
|
||||
@@ -740,9 +811,10 @@ private:
|
||||
|
||||
rpl::event_stream<uint64> _stickerSetInstalled;
|
||||
|
||||
base::flat_map<not_null<Data::Feed*>, crl::time> _feedReadsDelayed;
|
||||
base::flat_map<not_null<Data::Feed*>, mtpRequestId> _feedReadRequests;
|
||||
base::Timer _feedReadTimer;
|
||||
// #feed
|
||||
//base::flat_map<not_null<Data::Feed*>, crl::time> _feedReadsDelayed;
|
||||
//base::flat_map<not_null<Data::Feed*>, mtpRequestId> _feedReadRequests;
|
||||
//base::Timer _feedReadTimer;
|
||||
|
||||
mtpRequestId _proxyPromotionRequestId = 0;
|
||||
std::pair<QString, uint32> _proxyPromotionKey;
|
||||
@@ -789,6 +861,10 @@ private:
|
||||
base::flat_map<Privacy::Key, Privacy> _privacyValues;
|
||||
std::map<Privacy::Key, rpl::event_stream<Privacy>> _privacyChanges;
|
||||
|
||||
mtpRequestId _blockedUsersRequestId = 0;
|
||||
std::optional<BlockedUsersSlice> _blockedUsersSlice;
|
||||
rpl::event_stream<BlockedUsersSlice> _blockedUsersChanges;
|
||||
|
||||
mtpRequestId _selfDestructRequestId = 0;
|
||||
std::optional<int> _selfDestructDays;
|
||||
rpl::event_stream<int> _selfDestructChanges;
|
||||
@@ -808,4 +884,6 @@ private:
|
||||
|
||||
mtpRequestId _attachedStickerSetsRequestId = 0;
|
||||
|
||||
base::flat_map<FullMsgId, QString> _unlikelyMessageLinks;
|
||||
|
||||
};
|
||||
|
||||
@@ -53,21 +53,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
namespace {
|
||||
App::LaunchState _launchState = App::Launched;
|
||||
|
||||
using DependentItemsSet = OrderedSet<HistoryItem*>;
|
||||
using DependentItems = QMap<HistoryItem*, DependentItemsSet>;
|
||||
DependentItems dependentItems;
|
||||
|
||||
using MsgsData = QHash<MsgId, HistoryItem*>;
|
||||
MsgsData msgsData;
|
||||
using ChannelMsgsData = QMap<ChannelId, MsgsData>;
|
||||
ChannelMsgsData channelMsgsData;
|
||||
|
||||
using RandomData = QMap<uint64, FullMsgId>;
|
||||
RandomData randomData;
|
||||
|
||||
using SentData = QMap<uint64, QPair<PeerId, QString>>;
|
||||
SentData sentData;
|
||||
|
||||
HistoryView::Element *hoveredItem = nullptr,
|
||||
*pressedItem = nullptr,
|
||||
*hoveredLinkItem = nullptr,
|
||||
@@ -129,53 +114,6 @@ namespace App {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool checkEntitiesAndViewsUpdate(const MTPDmessage &m) {
|
||||
auto peerId = peerFromMTP(m.vto_id);
|
||||
if (m.has_from_id() && peerId == Auth().userPeerId()) {
|
||||
peerId = peerFromUser(m.vfrom_id);
|
||||
}
|
||||
if (const auto existing = App::histItemById(peerToChannel(peerId), m.vid.v)) {
|
||||
auto text = qs(m.vmessage);
|
||||
auto entities = m.has_entities()
|
||||
? TextUtilities::EntitiesFromMTP(m.ventities.v)
|
||||
: EntitiesInText();
|
||||
const auto media = m.has_media() ? &m.vmedia : nullptr;
|
||||
existing->setText({ text, entities });
|
||||
existing->updateSentMedia(m.has_media() ? &m.vmedia : nullptr);
|
||||
existing->updateReplyMarkup(m.has_reply_markup()
|
||||
? (&m.vreply_markup)
|
||||
: nullptr);
|
||||
existing->updateForwardedInfo(m.has_fwd_from()
|
||||
? &m.vfwd_from
|
||||
: nullptr);
|
||||
existing->setViewsCount(m.has_views() ? m.vviews.v : -1);
|
||||
existing->indexAsNewItem();
|
||||
Auth().data().requestItemTextRefresh(existing);
|
||||
if (existing->mainView()) {
|
||||
App::checkSavedGif(existing);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void updateEditedMessage(const MTPMessage &message) {
|
||||
message.match([](const MTPDmessageEmpty &) {
|
||||
}, [](const auto &message) {
|
||||
auto peerId = peerFromMTP(message.vto_id);
|
||||
if (message.has_from_id() && peerId == Auth().userPeerId()) {
|
||||
peerId = peerFromUser(message.vfrom_id);
|
||||
}
|
||||
const auto existing = App::histItemById(
|
||||
peerToChannel(peerId),
|
||||
message.vid.v);
|
||||
if (existing) {
|
||||
existing->applyEdition(message);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void addSavedGif(DocumentData *doc) {
|
||||
auto &saved = Auth().data().savedGifsRef();
|
||||
int32 index = saved.indexOf(doc);
|
||||
@@ -203,181 +141,6 @@ namespace App {
|
||||
}
|
||||
}
|
||||
|
||||
void feedMsgs(const QVector<MTPMessage> &msgs, NewMessageType type) {
|
||||
auto indices = base::flat_map<uint64, int>();
|
||||
for (int i = 0, l = msgs.size(); i != l; ++i) {
|
||||
const auto &msg = msgs[i];
|
||||
if (msg.type() == mtpc_message) {
|
||||
const auto &data = msg.c_message();
|
||||
if (type == NewMessageUnread) { // new message, index my forwarded messages to links overview
|
||||
if (checkEntitiesAndViewsUpdate(data)) { // already in blocks
|
||||
LOG(("Skipping message, because it is already in blocks!"));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
const auto msgId = IdFromMessage(msg);
|
||||
indices.emplace((uint64(uint32(msgId)) << 32) | uint64(i), i);
|
||||
}
|
||||
for (const auto [position, index] : indices) {
|
||||
Auth().data().addNewMessage(msgs[index], type);
|
||||
}
|
||||
}
|
||||
|
||||
void feedMsgs(const MTPVector<MTPMessage> &msgs, NewMessageType type) {
|
||||
return feedMsgs(msgs.v, type);
|
||||
}
|
||||
|
||||
ImagePtr image(const MTPPhotoSize &size) {
|
||||
switch (size.type()) {
|
||||
case mtpc_photoSize: {
|
||||
auto &d = size.c_photoSize();
|
||||
if (d.vlocation.type() == mtpc_fileLocation) {
|
||||
auto &l = d.vlocation.c_fileLocation();
|
||||
return Images::Create(
|
||||
StorageImageLocation(
|
||||
d.vw.v,
|
||||
d.vh.v,
|
||||
l.vdc_id.v,
|
||||
l.vvolume_id.v,
|
||||
l.vlocal_id.v,
|
||||
l.vsecret.v,
|
||||
l.vfile_reference.v),
|
||||
d.vsize.v);
|
||||
}
|
||||
} break;
|
||||
case mtpc_photoCachedSize: {
|
||||
auto &d = size.c_photoCachedSize();
|
||||
if (d.vlocation.type() == mtpc_fileLocation) {
|
||||
auto &l = d.vlocation.c_fileLocation();
|
||||
auto bytes = qba(d.vbytes);
|
||||
return Images::Create(
|
||||
StorageImageLocation(
|
||||
d.vw.v,
|
||||
d.vh.v,
|
||||
l.vdc_id.v,
|
||||
l.vvolume_id.v,
|
||||
l.vlocal_id.v,
|
||||
l.vsecret.v,
|
||||
l.vfile_reference.v),
|
||||
bytes);
|
||||
} else if (d.vlocation.type() == mtpc_fileLocationUnavailable) {
|
||||
const auto bytes = qba(d.vbytes);
|
||||
if (auto image = App::readImage(bytes); !image.isNull()) {
|
||||
return Images::Create(std::move(image), "JPG");
|
||||
}
|
||||
}
|
||||
} break;
|
||||
case mtpc_photoStrippedSize: {
|
||||
const auto &d = size.c_photoStrippedSize();
|
||||
auto bytes = qba(d.vbytes);
|
||||
if (bytes.size() >= 3 && bytes[0] == '\x01') {
|
||||
const char header[] = "\xff\xd8\xff\xe0\x00\x10\x4a\x46\x49"
|
||||
"\x46\x00\x01\x01\x00\x00\x01\x00\x01\x00\x00\xff\xdb\x00\x43\x00\x28\x1c"
|
||||
"\x1e\x23\x1e\x19\x28\x23\x21\x23\x2d\x2b\x28\x30\x3c\x64\x41\x3c\x37\x37"
|
||||
"\x3c\x7b\x58\x5d\x49\x64\x91\x80\x99\x96\x8f\x80\x8c\x8a\xa0\xb4\xe6\xc3"
|
||||
"\xa0\xaa\xda\xad\x8a\x8c\xc8\xff\xcb\xda\xee\xf5\xff\xff\xff\x9b\xc1\xff"
|
||||
"\xff\xff\xfa\xff\xe6\xfd\xff\xf8\xff\xdb\x00\x43\x01\x2b\x2d\x2d\x3c\x35"
|
||||
"\x3c\x76\x41\x41\x76\xf8\xa5\x8c\xa5\xf8\xf8\xf8\xf8\xf8\xf8\xf8\xf8\xf8"
|
||||
"\xf8\xf8\xf8\xf8\xf8\xf8\xf8\xf8\xf8\xf8\xf8\xf8\xf8\xf8\xf8\xf8\xf8\xf8"
|
||||
"\xf8\xf8\xf8\xf8\xf8\xf8\xf8\xf8\xf8\xf8\xf8\xf8\xf8\xf8\xf8\xf8\xf8\xf8"
|
||||
"\xf8\xf8\xf8\xf8\xf8\xff\xc0\x00\x11\x08\x00\x00\x00\x00\x03\x01\x22\x00"
|
||||
"\x02\x11\x01\x03\x11\x01\xff\xc4\x00\x1f\x00\x00\x01\x05\x01\x01\x01\x01"
|
||||
"\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x07\x08"
|
||||
"\x09\x0a\x0b\xff\xc4\x00\xb5\x10\x00\x02\x01\x03\x03\x02\x04\x03\x05\x05"
|
||||
"\x04\x04\x00\x00\x01\x7d\x01\x02\x03\x00\x04\x11\x05\x12\x21\x31\x41\x06"
|
||||
"\x13\x51\x61\x07\x22\x71\x14\x32\x81\x91\xa1\x08\x23\x42\xb1\xc1\x15\x52"
|
||||
"\xd1\xf0\x24\x33\x62\x72\x82\x09\x0a\x16\x17\x18\x19\x1a\x25\x26\x27\x28"
|
||||
"\x29\x2a\x34\x35\x36\x37\x38\x39\x3a\x43\x44\x45\x46\x47\x48\x49\x4a\x53"
|
||||
"\x54\x55\x56\x57\x58\x59\x5a\x63\x64\x65\x66\x67\x68\x69\x6a\x73\x74\x75"
|
||||
"\x76\x77\x78\x79\x7a\x83\x84\x85\x86\x87\x88\x89\x8a\x92\x93\x94\x95\x96"
|
||||
"\x97\x98\x99\x9a\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xb2\xb3\xb4\xb5\xb6"
|
||||
"\xb7\xb8\xb9\xba\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xd2\xd3\xd4\xd5\xd6"
|
||||
"\xd7\xd8\xd9\xda\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xf1\xf2\xf3\xf4"
|
||||
"\xf5\xf6\xf7\xf8\xf9\xfa\xff\xc4\x00\x1f\x01\x00\x03\x01\x01\x01\x01\x01"
|
||||
"\x01\x01\x01\x01\x00\x00\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x07\x08"
|
||||
"\x09\x0a\x0b\xff\xc4\x00\xb5\x11\x00\x02\x01\x02\x04\x04\x03\x04\x07\x05"
|
||||
"\x04\x04\x00\x01\x02\x77\x00\x01\x02\x03\x11\x04\x05\x21\x31\x06\x12\x41"
|
||||
"\x51\x07\x61\x71\x13\x22\x32\x81\x08\x14\x42\x91\xa1\xb1\xc1\x09\x23\x33"
|
||||
"\x52\xf0\x15\x62\x72\xd1\x0a\x16\x24\x34\xe1\x25\xf1\x17\x18\x19\x1a\x26"
|
||||
"\x27\x28\x29\x2a\x35\x36\x37\x38\x39\x3a\x43\x44\x45\x46\x47\x48\x49\x4a"
|
||||
"\x53\x54\x55\x56\x57\x58\x59\x5a\x63\x64\x65\x66\x67\x68\x69\x6a\x73\x74"
|
||||
"\x75\x76\x77\x78\x79\x7a\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x92\x93\x94"
|
||||
"\x95\x96\x97\x98\x99\x9a\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xb2\xb3\xb4"
|
||||
"\xb5\xb6\xb7\xb8\xb9\xba\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xd2\xd3\xd4"
|
||||
"\xd5\xd6\xd7\xd8\xd9\xda\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xf2\xf3\xf4"
|
||||
"\xf5\xf6\xf7\xf8\xf9\xfa\xff\xda\x00\x0c\x03\x01\x00\x02\x11\x03\x11\x00"
|
||||
"\x3f\x00";
|
||||
const char footer[] = "\xff\xd9";
|
||||
auto real = QByteArray(header, sizeof(header) - 1);
|
||||
real[164] = bytes[1];
|
||||
real[166] = bytes[2];
|
||||
bytes = real + bytes.mid(3) + QByteArray::fromRawData(footer, sizeof(footer) - 1);
|
||||
if (auto image = App::readImage(bytes); !image.isNull()) {
|
||||
return Images::Create(std::move(image), "JPG");
|
||||
}
|
||||
}
|
||||
} break;
|
||||
}
|
||||
return ImagePtr();
|
||||
}
|
||||
|
||||
void feedInboxRead(const PeerId &peer, MsgId upTo) {
|
||||
if (const auto history = Auth().data().historyLoaded(peer)) {
|
||||
history->inboxRead(upTo);
|
||||
}
|
||||
}
|
||||
|
||||
void feedOutboxRead(const PeerId &peer, MsgId upTo, TimeId when) {
|
||||
if (auto history = Auth().data().historyLoaded(peer)) {
|
||||
history->outboxRead(upTo);
|
||||
if (const auto user = history->peer->asUser()) {
|
||||
user->madeAction(when);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
inline MsgsData *fetchMsgsData(ChannelId channelId, bool insert = true) {
|
||||
if (channelId == NoChannel) return &msgsData;
|
||||
ChannelMsgsData::iterator i = channelMsgsData.find(channelId);
|
||||
if (i == channelMsgsData.cend()) {
|
||||
if (insert) {
|
||||
i = channelMsgsData.insert(channelId, MsgsData());
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return &(*i);
|
||||
}
|
||||
|
||||
void feedWereDeleted(
|
||||
ChannelId channelId,
|
||||
const QVector<MTPint> &msgsIds) {
|
||||
const auto data = fetchMsgsData(channelId, false);
|
||||
if (!data) return;
|
||||
|
||||
const auto affectedHistory = (channelId != NoChannel)
|
||||
? Auth().data().history(peerFromChannel(channelId)).get()
|
||||
: nullptr;
|
||||
|
||||
auto historiesToCheck = base::flat_set<not_null<History*>>();
|
||||
for (const auto msgId : msgsIds) {
|
||||
auto j = data->constFind(msgId.v);
|
||||
if (j != data->cend()) {
|
||||
const auto history = (*j)->history();
|
||||
(*j)->destroy();
|
||||
if (!history->chatListMessageKnown()) {
|
||||
historiesToCheck.emplace(history);
|
||||
}
|
||||
} else if (affectedHistory) {
|
||||
affectedHistory->unknownMessageDeleted(msgId.v);
|
||||
}
|
||||
}
|
||||
for (const auto history : historiesToCheck) {
|
||||
history->requestChatListMessage();
|
||||
}
|
||||
}
|
||||
|
||||
void feedUserLink(MTPint userId, const MTPContactLink &myLink, const MTPContactLink &foreignLink) {
|
||||
if (const auto user = Auth().data().userLoaded(userId.v)) {
|
||||
const auto wasShowPhone = (user->contactStatus() == UserData::ContactStatus::CanAdd);
|
||||
@@ -385,9 +148,6 @@ namespace App {
|
||||
case mtpc_contactLinkContact:
|
||||
user->setContactStatus(UserData::ContactStatus::Contact);
|
||||
break;
|
||||
case mtpc_contactLinkHasPhone:
|
||||
user->setContactStatus(UserData::ContactStatus::CanAdd);
|
||||
break;
|
||||
case mtpc_contactLinkNone:
|
||||
case mtpc_contactLinkUnknown:
|
||||
user->setContactStatus(UserData::ContactStatus::PhoneUnknown);
|
||||
@@ -421,137 +181,6 @@ namespace App {
|
||||
return peer ? ((forDialogs && peer->isUser() && !peer->asUser()->nameOrPhone.isEmpty()) ? peer->asUser()->nameOrPhone : peer->name) : lang(lng_deleted);
|
||||
}
|
||||
|
||||
HistoryItem *histItemById(ChannelId channelId, MsgId itemId) {
|
||||
if (!itemId) return nullptr;
|
||||
|
||||
const auto data = fetchMsgsData(channelId, false);
|
||||
if (!data) return nullptr;
|
||||
|
||||
const auto i = data->constFind(itemId);
|
||||
return (i != data->cend()) ? i.value() : nullptr;
|
||||
}
|
||||
|
||||
HistoryItem *histItemById(const ChannelData *channel, MsgId itemId) {
|
||||
return histItemById(channel ? peerToChannel(channel->id) : 0, itemId);
|
||||
}
|
||||
|
||||
void historyRegItem(not_null<HistoryItem*> item) {
|
||||
const auto data = fetchMsgsData(item->channelId());
|
||||
const auto i = data->constFind(item->id);
|
||||
if (i == data->cend()) {
|
||||
data->insert(item->id, item);
|
||||
} else if (i.value() != item) {
|
||||
LOG(("App Error: trying to historyRegItem() an already registered item"));
|
||||
i.value()->destroy();
|
||||
data->insert(item->id, item);
|
||||
}
|
||||
}
|
||||
|
||||
void historyUnregItem(not_null<HistoryItem*> item) {
|
||||
const auto data = fetchMsgsData(item->channelId(), false);
|
||||
if (!data) return;
|
||||
|
||||
const auto i = data->find(item->id);
|
||||
if (i != data->cend()) {
|
||||
if (i.value() == item) {
|
||||
data->erase(i);
|
||||
}
|
||||
}
|
||||
const auto j = ::dependentItems.find(item);
|
||||
if (j != ::dependentItems.cend()) {
|
||||
DependentItemsSet items;
|
||||
std::swap(items, j.value());
|
||||
::dependentItems.erase(j);
|
||||
|
||||
for_const (auto dependent, items) {
|
||||
dependent->dependencyItemRemoved(item);
|
||||
}
|
||||
}
|
||||
item->history()->session().notifications().clearFromItem(item);
|
||||
}
|
||||
|
||||
void historyUpdateDependent(not_null<HistoryItem*> item) {
|
||||
const auto j = ::dependentItems.find(item);
|
||||
if (j != ::dependentItems.cend()) {
|
||||
for_const (const auto dependent, j.value()) {
|
||||
dependent->updateDependencyItem();
|
||||
}
|
||||
}
|
||||
if (App::main()) {
|
||||
App::main()->itemEdited(item);
|
||||
}
|
||||
}
|
||||
|
||||
void historyClearMsgs() {
|
||||
::dependentItems.clear();
|
||||
const auto oldData = base::take(msgsData);
|
||||
const auto oldChannelData = base::take(channelMsgsData);
|
||||
for (const auto item : oldData) {
|
||||
delete item;
|
||||
}
|
||||
for (const auto &data : oldChannelData) {
|
||||
for (const auto item : data) {
|
||||
delete item;
|
||||
}
|
||||
}
|
||||
|
||||
clearMousedItems();
|
||||
}
|
||||
|
||||
void historyClearItems() {
|
||||
randomData.clear();
|
||||
sentData.clear();
|
||||
cSetSavedPeers(SavedPeers());
|
||||
cSetSavedPeersByTime(SavedPeersByTime());
|
||||
cSetRecentInlineBots(RecentInlineBots());
|
||||
cSetRecentStickers(RecentStickerPack());
|
||||
cSetReportSpamStatuses(ReportSpamStatuses());
|
||||
}
|
||||
|
||||
void historyRegDependency(HistoryItem *dependent, HistoryItem *dependency) {
|
||||
::dependentItems[dependency].insert(dependent);
|
||||
}
|
||||
|
||||
void historyUnregDependency(HistoryItem *dependent, HistoryItem *dependency) {
|
||||
auto i = ::dependentItems.find(dependency);
|
||||
if (i != ::dependentItems.cend()) {
|
||||
i.value().remove(dependent);
|
||||
if (i.value().isEmpty()) {
|
||||
::dependentItems.erase(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void historyRegRandom(uint64 randomId, const FullMsgId &itemId) {
|
||||
randomData.insert(randomId, itemId);
|
||||
}
|
||||
|
||||
void historyUnregRandom(uint64 randomId) {
|
||||
randomData.remove(randomId);
|
||||
}
|
||||
|
||||
FullMsgId histItemByRandom(uint64 randomId) {
|
||||
RandomData::const_iterator i = randomData.constFind(randomId);
|
||||
if (i != randomData.cend()) {
|
||||
return i.value();
|
||||
}
|
||||
return FullMsgId();
|
||||
}
|
||||
|
||||
void historyRegSentData(uint64 randomId, const PeerId &peerId, const QString &text) {
|
||||
sentData.insert(randomId, qMakePair(peerId, text));
|
||||
}
|
||||
|
||||
void historyUnregSentData(uint64 randomId) {
|
||||
sentData.remove(randomId);
|
||||
}
|
||||
|
||||
void histSentDataByItem(uint64 randomId, PeerId &peerId, QString &text) {
|
||||
QPair<PeerId, QString> d = sentData.value(randomId);
|
||||
peerId = d.first;
|
||||
text = d.second;
|
||||
}
|
||||
|
||||
void prepareCorners(RoundCorners index, int32 radius, const QBrush &brush, const style::color *shadow = nullptr, QImage *cors = nullptr) {
|
||||
Expects(::corners.size() > index);
|
||||
int32 r = radius * cIntRetinaFactor(), s = st::msgShadow * cIntRetinaFactor();
|
||||
|
||||
@@ -9,7 +9,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
|
||||
#include "data/data_types.h"
|
||||
|
||||
enum NewMessageType : char;
|
||||
enum class ImageRoundRadius;
|
||||
class MainWindow;
|
||||
class MainWidget;
|
||||
@@ -66,42 +65,10 @@ namespace App {
|
||||
|
||||
QString formatPhone(QString phone);
|
||||
|
||||
bool checkEntitiesAndViewsUpdate(const MTPDmessage &m); // returns true if item found and it is not detached
|
||||
void updateEditedMessage(const MTPMessage &m);
|
||||
void addSavedGif(DocumentData *doc);
|
||||
void checkSavedGif(HistoryItem *item);
|
||||
void feedMsgs(const QVector<MTPMessage> &msgs, NewMessageType type);
|
||||
void feedMsgs(const MTPVector<MTPMessage> &msgs, NewMessageType type);
|
||||
void feedInboxRead(const PeerId &peer, MsgId upTo);
|
||||
void feedOutboxRead(const PeerId &peer, MsgId upTo, TimeId when);
|
||||
void feedWereDeleted(ChannelId channelId, const QVector<MTPint> &msgsIds);
|
||||
void feedUserLink(MTPint userId, const MTPContactLink &myLink, const MTPContactLink &foreignLink);
|
||||
|
||||
ImagePtr image(const MTPPhotoSize &size);
|
||||
|
||||
[[nodiscard]] QString peerName(const PeerData *peer, bool forDialogs = false);
|
||||
|
||||
[[nodiscard]] HistoryItem *histItemById(ChannelId channelId, MsgId itemId);
|
||||
[[nodiscard]] HistoryItem *histItemById(
|
||||
const ChannelData *channel,
|
||||
MsgId itemId);
|
||||
[[nodiscard]] inline HistoryItem *histItemById(const FullMsgId &msgId) {
|
||||
return histItemById(msgId.channel, msgId.msg);
|
||||
}
|
||||
void historyRegItem(not_null<HistoryItem*> item);
|
||||
void historyUnregItem(not_null<HistoryItem*> item);
|
||||
void historyUpdateDependent(not_null<HistoryItem*> item);
|
||||
void historyClearMsgs();
|
||||
void historyClearItems();
|
||||
void historyRegDependency(HistoryItem *dependent, HistoryItem *dependency);
|
||||
void historyUnregDependency(HistoryItem *dependent, HistoryItem *dependency);
|
||||
|
||||
void historyRegRandom(uint64 randomId, const FullMsgId &itemId);
|
||||
void historyUnregRandom(uint64 randomId);
|
||||
FullMsgId histItemByRandom(uint64 randomId);
|
||||
void historyRegSentData(uint64 randomId, const PeerId &peerId, const QString &text);
|
||||
void historyUnregSentData(uint64 randomId);
|
||||
void histSentDataByItem(uint64 randomId, PeerId &peerId, QString &text);
|
||||
void feedUserLink(MTPint userId, const MTPContactLink &myLink, const MTPContactLink &foreignLink);
|
||||
|
||||
void hoveredItem(HistoryView::Element *item);
|
||||
HistoryView::Element *hoveredItem();
|
||||
|
||||
@@ -93,6 +93,8 @@ QByteArray AuthSessionSettings::serialize() const {
|
||||
stream << qint32(_variables.exeLaunchWarning ? 1 : 0);
|
||||
stream << autoDownload;
|
||||
stream << qint32(_variables.supportAllSearchResults.current() ? 1 : 0);
|
||||
stream << qint32(_variables.archiveCollapsed.current() ? 1 : 0);
|
||||
stream << qint32(_variables.notifyAboutPinned.current() ? 1 : 0);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -129,6 +131,8 @@ void AuthSessionSettings::constructFromSerialized(const QByteArray &serialized)
|
||||
qint32 exeLaunchWarning = _variables.exeLaunchWarning ? 1 : 0;
|
||||
QByteArray autoDownload;
|
||||
qint32 supportAllSearchResults = _variables.supportAllSearchResults.current() ? 1 : 0;
|
||||
qint32 archiveCollapsed = _variables.archiveCollapsed.current() ? 1 : 0;
|
||||
qint32 notifyAboutPinned = _variables.notifyAboutPinned.current() ? 1 : 0;
|
||||
|
||||
stream >> selectorTab;
|
||||
stream >> lastSeenWarningSeen;
|
||||
@@ -208,6 +212,12 @@ void AuthSessionSettings::constructFromSerialized(const QByteArray &serialized)
|
||||
if (!stream.atEnd()) {
|
||||
stream >> supportAllSearchResults;
|
||||
}
|
||||
if (!stream.atEnd()) {
|
||||
stream >> archiveCollapsed;
|
||||
}
|
||||
if (!stream.atEnd()) {
|
||||
stream >> notifyAboutPinned;
|
||||
}
|
||||
if (stream.status() != QDataStream::Ok) {
|
||||
LOG(("App Error: "
|
||||
"Bad data for AuthSessionSettings::constructFromSerialized()"));
|
||||
@@ -277,6 +287,8 @@ void AuthSessionSettings::constructFromSerialized(const QByteArray &serialized)
|
||||
_variables.countUnreadMessages = (countUnreadMessages == 1);
|
||||
_variables.exeLaunchWarning = (exeLaunchWarning == 1);
|
||||
_variables.supportAllSearchResults = (supportAllSearchResults == 1);
|
||||
_variables.archiveCollapsed = (archiveCollapsed == 1);
|
||||
_variables.notifyAboutPinned = (notifyAboutPinned == 1);
|
||||
}
|
||||
|
||||
void AuthSessionSettings::setSupportChatsTimeSlice(int slice) {
|
||||
@@ -371,8 +383,32 @@ rpl::producer<int> AuthSessionSettings::thirdColumnWidthChanges() const {
|
||||
return _variables.thirdColumnWidth.changes();
|
||||
}
|
||||
|
||||
void AuthSessionSettings::setArchiveCollapsed(bool collapsed) {
|
||||
_variables.archiveCollapsed = collapsed;
|
||||
}
|
||||
|
||||
bool AuthSessionSettings::archiveCollapsed() const {
|
||||
return _variables.archiveCollapsed.current();
|
||||
}
|
||||
|
||||
rpl::producer<bool> AuthSessionSettings::archiveCollapsedChanges() const {
|
||||
return _variables.archiveCollapsed.changes();
|
||||
}
|
||||
|
||||
void AuthSessionSettings::setNotifyAboutPinned(bool notify) {
|
||||
_variables.notifyAboutPinned = notify;
|
||||
}
|
||||
|
||||
bool AuthSessionSettings::notifyAboutPinned() const {
|
||||
return _variables.notifyAboutPinned.current();
|
||||
}
|
||||
|
||||
rpl::producer<bool> AuthSessionSettings::notifyAboutPinnedChanges() const {
|
||||
return _variables.notifyAboutPinned.changes();
|
||||
}
|
||||
|
||||
AuthSession &Auth() {
|
||||
auto result = Core::App().authSession();
|
||||
const auto result = Core::App().authSession();
|
||||
Assert(result != nullptr);
|
||||
return *result;
|
||||
}
|
||||
@@ -389,6 +425,7 @@ AuthSession::AuthSession(const MTPUser &user)
|
||||
, _user(_data->processUser(user))
|
||||
, _changelogs(Core::Changelogs::Create(this))
|
||||
, _supportHelper(Support::Helper::Create(this)) {
|
||||
|
||||
_saveDataTimer.setCallback([=] {
|
||||
Local::writeUserSettings();
|
||||
});
|
||||
@@ -480,6 +517,12 @@ void AuthSession::localPasscodeChanged() {
|
||||
checkAutoLock();
|
||||
}
|
||||
|
||||
void AuthSession::termsDeleteNow() {
|
||||
api().request(MTPaccount_DeleteAccount(
|
||||
MTP_string("Decline ToS update")
|
||||
)).send();
|
||||
}
|
||||
|
||||
void AuthSession::checkAutoLock() {
|
||||
if (!Global::LocalPasscode()
|
||||
|| Core::App().passcodeLocked()) {
|
||||
|
||||
@@ -188,6 +188,14 @@ public:
|
||||
return _variables.autoDownload;
|
||||
}
|
||||
|
||||
void setArchiveCollapsed(bool collapsed);
|
||||
bool archiveCollapsed() const;
|
||||
rpl::producer<bool> archiveCollapsedChanges() const;
|
||||
|
||||
void setNotifyAboutPinned(bool notify);
|
||||
bool notifyAboutPinned() const;
|
||||
rpl::producer<bool> notifyAboutPinnedChanges() const;
|
||||
|
||||
bool hadLegacyCallsPeerToPeerNobody() const {
|
||||
return _variables.hadLegacyCallsPeerToPeerNobody;
|
||||
}
|
||||
@@ -240,6 +248,8 @@ private:
|
||||
bool countUnreadMessages = true;
|
||||
bool exeLaunchWarning = true;
|
||||
Data::AutoDownload::Full autoDownload;
|
||||
rpl::variable<bool> archiveCollapsed = false;
|
||||
rpl::variable<bool> notifyAboutPinned = true;
|
||||
|
||||
static constexpr auto kDefaultSupportChatsLimitSlice
|
||||
= 7 * 24 * 60 * 60;
|
||||
@@ -317,6 +327,7 @@ public:
|
||||
void checkAutoLock();
|
||||
void checkAutoLockIn(crl::time time);
|
||||
void localPasscodeChanged();
|
||||
void termsDeleteNow();
|
||||
|
||||
rpl::lifetime &lifetime() {
|
||||
return _lifetime;
|
||||
|
||||
@@ -20,9 +20,11 @@ public:
|
||||
binary_guard &operator=(binary_guard &&other);
|
||||
~binary_guard();
|
||||
|
||||
bool alive() const;
|
||||
|
||||
binary_guard &operator=(std::nullptr_t);
|
||||
|
||||
bool alive() const;
|
||||
binary_guard make_guard();
|
||||
|
||||
explicit operator bool() const;
|
||||
|
||||
private:
|
||||
@@ -30,8 +32,6 @@ private:
|
||||
|
||||
std::atomic<bool> *_bothAlive = nullptr;
|
||||
|
||||
friend std::pair<binary_guard, binary_guard> make_binary_guard();
|
||||
|
||||
};
|
||||
|
||||
inline binary_guard::binary_guard(binary_guard &&other)
|
||||
@@ -46,6 +46,10 @@ inline binary_guard &binary_guard::operator=(binary_guard &&other) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline binary_guard::~binary_guard() {
|
||||
destroy();
|
||||
}
|
||||
|
||||
inline binary_guard &binary_guard::operator=(std::nullptr_t) {
|
||||
destroy();
|
||||
return *this;
|
||||
@@ -59,10 +63,6 @@ inline bool binary_guard::alive() const {
|
||||
return _bothAlive && _bothAlive->load();
|
||||
}
|
||||
|
||||
inline binary_guard::~binary_guard() {
|
||||
destroy();
|
||||
}
|
||||
|
||||
inline void binary_guard::destroy() {
|
||||
if (const auto both = base::take(_bothAlive)) {
|
||||
auto old = true;
|
||||
@@ -72,11 +72,11 @@ inline void binary_guard::destroy() {
|
||||
}
|
||||
}
|
||||
|
||||
inline std::pair<binary_guard, binary_guard> make_binary_guard() {
|
||||
auto result = std::pair<binary_guard, binary_guard>();
|
||||
result.first._bothAlive
|
||||
= result.second._bothAlive
|
||||
= new std::atomic<bool>(true);
|
||||
inline binary_guard binary_guard::make_guard() {
|
||||
destroy();
|
||||
|
||||
auto result = binary_guard();
|
||||
_bothAlive = result._bothAlive = new std::atomic<bool>(true);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -268,7 +268,6 @@ ConcurrentTimer::ConcurrentTimer(
|
||||
}
|
||||
|
||||
Fn<void()> ConcurrentTimer::createAdjuster() {
|
||||
auto guards = base::make_binary_guard();
|
||||
_guard = std::make_shared<bool>(true);
|
||||
return [=, runner = _runner, guard = std::weak_ptr<bool>(_guard)] {
|
||||
runner([=] {
|
||||
@@ -294,12 +293,10 @@ void ConcurrentTimer::start(
|
||||
}
|
||||
|
||||
void ConcurrentTimer::cancelAndSchedule(int timeout) {
|
||||
auto guards = base::make_binary_guard();
|
||||
_running = std::move(guards.first);
|
||||
auto method = [
|
||||
=,
|
||||
runner = _runner,
|
||||
guard = std::move(guards.second)
|
||||
guard = _running.make_guard()
|
||||
]() mutable {
|
||||
if (!guard) {
|
||||
return;
|
||||
|
||||
@@ -686,6 +686,40 @@ public:
|
||||
}
|
||||
return { where, false };
|
||||
}
|
||||
std::pair<iterator, bool> insert_or_assign(
|
||||
const Key &key,
|
||||
const Type &value) {
|
||||
if (this->empty() || this->compare()(key, this->front().first)) {
|
||||
this->impl().emplace_front(key, value);
|
||||
return { this->begin(), true };
|
||||
} else if (this->compare()(this->back().first, key)) {
|
||||
this->impl().emplace_back(key, value);
|
||||
return { this->end() - 1, true };
|
||||
}
|
||||
auto where = this->getLowerBound(key);
|
||||
if (this->compare()(key, where->first)) {
|
||||
return { this->impl().insert(where, value_type(key, value)), true };
|
||||
}
|
||||
where->second = value;
|
||||
return { where, false };
|
||||
}
|
||||
std::pair<iterator, bool> insert_or_assign(
|
||||
const Key &key,
|
||||
Type &&value) {
|
||||
if (this->empty() || this->compare()(key, this->front().first)) {
|
||||
this->impl().emplace_front(key, std::move(value));
|
||||
return { this->begin(), true };
|
||||
} else if (this->compare()(this->back().first, key)) {
|
||||
this->impl().emplace_back(key, std::move(value));
|
||||
return { this->end() - 1, true };
|
||||
}
|
||||
auto where = this->getLowerBound(key);
|
||||
if (this->compare()(key, where->first)) {
|
||||
return { this->impl().insert(where, value_type(key, std::move(value))), true };
|
||||
}
|
||||
where->second = std::move(value);
|
||||
return { where, false };
|
||||
}
|
||||
template <typename... Args>
|
||||
std::pair<iterator, bool> emplace(
|
||||
const Key &key,
|
||||
@@ -695,6 +729,14 @@ public:
|
||||
Type(std::forward<Args>(args)...)));
|
||||
}
|
||||
template <typename... Args>
|
||||
std::pair<iterator, bool> emplace_or_assign(
|
||||
const Key &key,
|
||||
Args&&... args) {
|
||||
return this->insert_or_assign(
|
||||
key,
|
||||
Type(std::forward<Args>(args)...));
|
||||
}
|
||||
template <typename... Args>
|
||||
std::pair<iterator, bool> try_emplace(
|
||||
const Key &key,
|
||||
Args&&... args) {
|
||||
|
||||
@@ -9,9 +9,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QThread>
|
||||
#include "base/observer.h"
|
||||
#include "base/flat_map.h"
|
||||
|
||||
#include <crl/crl_time.h>
|
||||
|
||||
namespace base {
|
||||
|
||||
class Timer final : private QObject {
|
||||
|
||||
@@ -12,6 +12,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
|
||||
#include "zip.h"
|
||||
#include "unzip.h"
|
||||
#include "logs.h"
|
||||
|
||||
#ifdef small
|
||||
#undef small
|
||||
|
||||
@@ -436,7 +436,7 @@ QPointer<Ui::IconButton> AbstractBox::addTopButton(const style::IconButton &st,
|
||||
return result;
|
||||
}
|
||||
|
||||
void AbstractBox::setDimensions(int newWidth, int maxHeight) {
|
||||
void AbstractBox::setDimensions(int newWidth, int maxHeight, bool forceCenterPosition) {
|
||||
_maxContentHeight = maxHeight;
|
||||
|
||||
auto fullHeight = countFullHeight();
|
||||
@@ -447,10 +447,16 @@ void AbstractBox::setDimensions(int newWidth, int maxHeight) {
|
||||
resize(newWidth, countRealHeight());
|
||||
auto newGeometry = geometry();
|
||||
auto parentHeight = parentWidget()->height();
|
||||
if (newGeometry.top() + newGeometry.height() + st::boxVerticalMargin > parentHeight) {
|
||||
auto newTop = qMax(parentHeight - int(st::boxVerticalMargin) - newGeometry.height(), (parentHeight - newGeometry.height()) / 2);
|
||||
if (newGeometry.top() + newGeometry.height() + st::boxVerticalMargin > parentHeight
|
||||
|| forceCenterPosition) {
|
||||
const auto top1 = parentHeight - int(st::boxVerticalMargin) - newGeometry.height();
|
||||
const auto top2 = (parentHeight - newGeometry.height()) / 2;
|
||||
const auto newTop = forceCenterPosition
|
||||
? std::min(top1, top2)
|
||||
: std::max(top1, top2);
|
||||
if (newTop != newGeometry.top()) {
|
||||
move(newGeometry.left(), newTop);
|
||||
resizeEvent(0);
|
||||
}
|
||||
}
|
||||
parentWidget()->update(oldGeometry.united(geometry()).marginsAdded(st::boxRoundShadow.extend));
|
||||
|
||||
@@ -44,7 +44,10 @@ public:
|
||||
object_ptr<BoxContent> box,
|
||||
LayerOptions options,
|
||||
anim::type animated) = 0;
|
||||
virtual void setDimensions(int newWidth, int maxHeight) = 0;
|
||||
virtual void setDimensions(
|
||||
int newWidth,
|
||||
int maxHeight,
|
||||
bool forceCenterPosition = false) = 0;
|
||||
virtual void setNoContentMargin(bool noContentMargin) = 0;
|
||||
virtual bool isBoxShown() const = 0;
|
||||
virtual void closeBox() = 0;
|
||||
@@ -158,8 +161,11 @@ protected:
|
||||
}
|
||||
getDelegate()->setNoContentMargin(noContentMargin);
|
||||
}
|
||||
void setDimensions(int newWidth, int maxHeight) {
|
||||
getDelegate()->setDimensions(newWidth, maxHeight);
|
||||
void setDimensions(
|
||||
int newWidth,
|
||||
int maxHeight,
|
||||
bool forceCenterPosition = false) {
|
||||
getDelegate()->setDimensions(newWidth, maxHeight, forceCenterPosition);
|
||||
}
|
||||
void setDimensionsToContent(
|
||||
int newWidth,
|
||||
@@ -264,7 +270,10 @@ public:
|
||||
void updateButtonsPositions() override;
|
||||
QPointer<QWidget> outerContainer() override;
|
||||
|
||||
void setDimensions(int newWidth, int maxHeight) override;
|
||||
void setDimensions(
|
||||
int newWidth,
|
||||
int maxHeight,
|
||||
bool forceCenterPosition = false) override;
|
||||
|
||||
void setNoContentMargin(bool noContentMargin) override {
|
||||
if (_noContentMargin != noContentMargin) {
|
||||
@@ -343,12 +352,6 @@ protected:
|
||||
|
||||
};
|
||||
|
||||
enum CreatingGroupType {
|
||||
CreatingGroupNone,
|
||||
CreatingGroupGroup,
|
||||
CreatingGroupChannel,
|
||||
};
|
||||
|
||||
class BoxPointer {
|
||||
public:
|
||||
BoxPointer() = default;
|
||||
|
||||
@@ -134,6 +134,8 @@ void ShowAddParticipantsError(
|
||||
return lang(lng_failed_add_not_mutual);
|
||||
} else if (error == qstr("USER_ALREADY_PARTICIPANT") && hasBot) {
|
||||
return lang(lng_bot_already_in_group);
|
||||
} else if (error == qstr("BOT_GROUPS_BLOCKED")) {
|
||||
return lang(lng_error_cant_add_bot);
|
||||
} else if (error == qstr("PEER_FLOOD")) {
|
||||
const auto isGroup = (chat->isChat() || chat->isMegagroup());
|
||||
return PeerFloodErrorText(isGroup
|
||||
@@ -398,9 +400,14 @@ void AddContactBox::updateButtons() {
|
||||
}
|
||||
}
|
||||
|
||||
GroupInfoBox::GroupInfoBox(QWidget*, CreatingGroupType creating, bool fromTypeChoose)
|
||||
: _creating(creating)
|
||||
, _fromTypeChoose(fromTypeChoose) {
|
||||
GroupInfoBox::GroupInfoBox(
|
||||
QWidget*,
|
||||
Type type,
|
||||
const QString &title,
|
||||
Fn<void(not_null<ChannelData*>)> channelDone)
|
||||
: _type(type)
|
||||
, _initialTitle(title)
|
||||
, _channelDone(std::move(channelDone)) {
|
||||
}
|
||||
|
||||
void GroupInfoBox::prepare() {
|
||||
@@ -408,7 +415,7 @@ void GroupInfoBox::prepare() {
|
||||
|
||||
_photo.create(
|
||||
this,
|
||||
lang((_creating == CreatingGroupChannel)
|
||||
lang((_type == Type::Channel)
|
||||
? lng_create_channel_crop
|
||||
: lng_create_group_crop),
|
||||
Ui::UserpicButton::Role::ChangePhoto,
|
||||
@@ -416,9 +423,10 @@ void GroupInfoBox::prepare() {
|
||||
_title.create(
|
||||
this,
|
||||
st::defaultInputField,
|
||||
langFactory(_creating == CreatingGroupChannel
|
||||
langFactory((_type == Type::Channel)
|
||||
? lng_dlg_new_channel_name
|
||||
: lng_dlg_new_group_name));
|
||||
: lng_dlg_new_group_name),
|
||||
_initialTitle);
|
||||
_title->setMaxLength(kMaxGroupChannelTitle);
|
||||
_title->setInstantReplaces(Ui::InstantReplaces::Default());
|
||||
_title ->setInstantReplacesEnabled(Global::ReplaceEmojiValue());
|
||||
@@ -426,7 +434,7 @@ void GroupInfoBox::prepare() {
|
||||
getDelegate()->outerContainer(),
|
||||
_title);
|
||||
|
||||
if (_creating == CreatingGroupChannel) {
|
||||
if (_type != Type::Group) {
|
||||
_description.create(
|
||||
this,
|
||||
st::newGroupDescription,
|
||||
@@ -449,8 +457,8 @@ void GroupInfoBox::prepare() {
|
||||
|
||||
connect(_title, &Ui::InputField::submitted, [=] { submitName(); });
|
||||
|
||||
addButton(langFactory(_creating == CreatingGroupChannel ? lng_create_group_create : lng_create_group_next), [this] { submit(); });
|
||||
addButton(langFactory(_fromTypeChoose ? lng_create_group_back : lng_cancel), [this] { closeBox(); });
|
||||
addButton(langFactory((_type != Type::Group) ? lng_create_group_create : lng_create_group_next), [this] { submit(); });
|
||||
addButton(langFactory(lng_cancel), [this] { closeBox(); });
|
||||
|
||||
updateMaxHeight();
|
||||
}
|
||||
@@ -590,7 +598,7 @@ void GroupInfoBox::submit() {
|
||||
_title->showError();
|
||||
return;
|
||||
}
|
||||
if (_creating != CreatingGroupGroup) {
|
||||
if (_type != Type::Group) {
|
||||
createChannel(title, description);
|
||||
} else {
|
||||
auto initBox = [title, weak = make_weak(this)](
|
||||
@@ -619,8 +627,9 @@ void GroupInfoBox::submit() {
|
||||
}
|
||||
|
||||
void GroupInfoBox::createChannel(const QString &title, const QString &description) {
|
||||
bool mega = false;
|
||||
auto flags = mega ? MTPchannels_CreateChannel::Flag::f_megagroup : MTPchannels_CreateChannel::Flag::f_broadcast;
|
||||
const auto flags = (_type == Type::Megagroup)
|
||||
? MTPchannels_CreateChannel::Flag::f_megagroup
|
||||
: MTPchannels_CreateChannel::Flag::f_broadcast;
|
||||
_creationRequestId = request(MTPchannels_CreateChannel(
|
||||
MTP_flags(flags),
|
||||
MTP_string(title),
|
||||
@@ -628,7 +637,7 @@ void GroupInfoBox::createChannel(const QString &title, const QString &descriptio
|
||||
)).done([=](const MTPUpdates &result) {
|
||||
Auth().api().applyUpdates(result);
|
||||
|
||||
auto success = base::make_optional(&result)
|
||||
const auto success = base::make_optional(&result)
|
||||
| [](auto updates) -> std::optional<const QVector<MTPChat>*> {
|
||||
switch (updates->type()) {
|
||||
case mtpc_updates:
|
||||
@@ -663,7 +672,14 @@ void GroupInfoBox::createChannel(const QString &title, const QString &descriptio
|
||||
auto link = qs(result.c_chatInviteExported().vlink);
|
||||
_createdChannel->setInviteLink(link);
|
||||
}
|
||||
Ui::show(Box<SetupChannelBox>(_createdChannel));
|
||||
if (_channelDone) {
|
||||
const auto callback = _channelDone;
|
||||
const auto argument = _createdChannel;
|
||||
closeBox();
|
||||
callback(argument);
|
||||
} else {
|
||||
Ui::show(Box<SetupChannelBox>(_createdChannel));
|
||||
}
|
||||
}).send();
|
||||
};
|
||||
if (!success) {
|
||||
|
||||
@@ -84,7 +84,16 @@ private:
|
||||
|
||||
class GroupInfoBox : public BoxContent, private MTP::Sender {
|
||||
public:
|
||||
GroupInfoBox(QWidget*, CreatingGroupType creating, bool fromTypeChoose);
|
||||
enum class Type {
|
||||
Group,
|
||||
Channel,
|
||||
Megagroup,
|
||||
};
|
||||
GroupInfoBox(
|
||||
QWidget*,
|
||||
Type type,
|
||||
const QString &title = QString(),
|
||||
Fn<void(not_null<ChannelData*>)> channelDone = nullptr);
|
||||
|
||||
protected:
|
||||
void prepare() override;
|
||||
@@ -101,8 +110,9 @@ private:
|
||||
void descriptionResized();
|
||||
void updateMaxHeight();
|
||||
|
||||
CreatingGroupType _creating;
|
||||
bool _fromTypeChoose = false;
|
||||
Type _type = Type::Group;
|
||||
QString _initialTitle;
|
||||
Fn<void(not_null<ChannelData*>)> _channelDone;
|
||||
|
||||
object_ptr<Ui::UserpicButton> _photo = { nullptr };
|
||||
object_ptr<Ui::InputField> _title = { nullptr };
|
||||
|
||||
@@ -39,8 +39,7 @@ public:
|
||||
Painter &p,
|
||||
int left,
|
||||
int top,
|
||||
int outerWidth,
|
||||
crl::time ms) override;
|
||||
int outerWidth) override;
|
||||
QImage prepareRippleMask() const override;
|
||||
bool checkRippleStartPosition(QPoint position) const override;
|
||||
|
||||
@@ -241,14 +240,13 @@ void ServiceCheck::paint(
|
||||
Painter &p,
|
||||
int left,
|
||||
int top,
|
||||
int outerWidth,
|
||||
crl::time ms) {
|
||||
int outerWidth) {
|
||||
Frames().paintFrame(
|
||||
p,
|
||||
left + _st.margin.left(),
|
||||
top + _st.margin.top(),
|
||||
&_st,
|
||||
currentAnimationValue(ms));
|
||||
currentAnimationValue());
|
||||
}
|
||||
|
||||
QImage ServiceCheck::prepareRippleMask() const {
|
||||
@@ -287,7 +285,7 @@ AdminLog::OwnedItem GenerateTextItem(
|
||||
| (out ? Flag::f_out : Flag(0));
|
||||
const auto replyTo = 0;
|
||||
const auto viaBotId = 0;
|
||||
const auto item = new HistoryMessage(
|
||||
const auto item = history->owner().makeMessage(
|
||||
history,
|
||||
++id,
|
||||
flags,
|
||||
@@ -400,7 +398,7 @@ BackgroundPreviewBox::BackgroundPreviewBox(
|
||||
lang(lng_background_text2),
|
||||
true))
|
||||
, _paper(paper)
|
||||
, _radial(animation(this, &BackgroundPreviewBox::step_radial)) {
|
||||
, _radial([=](crl::time now) { radialAnimationCallback(now); }) {
|
||||
subscribe(Auth().downloaderTaskFinished(), [=] { update(); });
|
||||
}
|
||||
|
||||
@@ -507,20 +505,20 @@ void BackgroundPreviewBox::paintEvent(QPaintEvent *e) {
|
||||
}
|
||||
if (!color || _paper.isPattern()) {
|
||||
if (!_scaled.isNull() || setScaledFromThumb()) {
|
||||
paintImage(p, ms);
|
||||
paintRadial(p, ms);
|
||||
paintImage(p);
|
||||
paintRadial(p);
|
||||
} else if (!color) {
|
||||
p.fillRect(e->rect(), st::boxBg);
|
||||
return;
|
||||
} else {
|
||||
// Progress of pattern loading.
|
||||
paintRadial(p, ms);
|
||||
paintRadial(p);
|
||||
}
|
||||
}
|
||||
paintTexts(p, ms);
|
||||
}
|
||||
|
||||
void BackgroundPreviewBox::paintImage(Painter &p, crl::time ms) {
|
||||
void BackgroundPreviewBox::paintImage(Painter &p) {
|
||||
Expects(!_scaled.isNull());
|
||||
|
||||
const auto master = _paper.isPattern()
|
||||
@@ -536,7 +534,7 @@ void BackgroundPreviewBox::paintImage(Painter &p, crl::time ms) {
|
||||
height() * factor);
|
||||
const auto guard = gsl::finally([&] { p.setOpacity(1.); });
|
||||
|
||||
const auto fade = _fadeIn.current(ms, 1.);
|
||||
const auto fade = _fadeIn.value(1.);
|
||||
if (fade < 1. && !_fadeOutThumbnail.isNull()) {
|
||||
p.drawPixmap(rect(), _fadeOutThumbnail, from);
|
||||
}
|
||||
@@ -548,14 +546,9 @@ void BackgroundPreviewBox::paintImage(Painter &p, crl::time ms) {
|
||||
checkBlurAnimationStart();
|
||||
}
|
||||
|
||||
void BackgroundPreviewBox::paintRadial(Painter &p, crl::time ms) {
|
||||
bool radial = false;
|
||||
float64 radialOpacity = 0;
|
||||
if (_radial.animating()) {
|
||||
_radial.step(ms);
|
||||
radial = _radial.animating();
|
||||
radialOpacity = _radial.opacity();
|
||||
}
|
||||
void BackgroundPreviewBox::paintRadial(Painter &p) {
|
||||
const auto radial = _radial.animating();
|
||||
const auto radialOpacity = radial ? _radial.opacity() : 0.;
|
||||
if (!radial) {
|
||||
return;
|
||||
}
|
||||
@@ -623,7 +616,7 @@ void BackgroundPreviewBox::paintDate(Painter &p) {
|
||||
p.drawText(bubbleLeft + st::msgServicePadding.left(), bubbleTop + st::msgServicePadding.top() + st::msgServiceFont->ascent, text);
|
||||
}
|
||||
|
||||
void BackgroundPreviewBox::step_radial(crl::time ms, bool timer) {
|
||||
void BackgroundPreviewBox::radialAnimationCallback(crl::time now) {
|
||||
Expects(_paper.document() != nullptr);
|
||||
|
||||
const auto document = _paper.document();
|
||||
@@ -631,9 +624,8 @@ void BackgroundPreviewBox::step_radial(crl::time ms, bool timer) {
|
||||
const auto updated = _radial.update(
|
||||
document->progress(),
|
||||
!document->loading(),
|
||||
ms);
|
||||
if (timer
|
||||
&& (wasAnimating || _radial.animating())
|
||||
now);
|
||||
if ((wasAnimating || _radial.animating())
|
||||
&& (!anim::Disabled() || updated)) {
|
||||
update(radialRect());
|
||||
}
|
||||
@@ -711,13 +703,11 @@ void BackgroundPreviewBox::checkLoadedDocument() {
|
||||
return;
|
||||
}
|
||||
const auto generateCallback = [=](QImage &&image) {
|
||||
auto [left, right] = base::make_binary_guard();
|
||||
_generating = std::move(left);
|
||||
crl::async([
|
||||
this,
|
||||
image = std::move(image),
|
||||
patternBackground = patternBackgroundColor(),
|
||||
guard = std::move(right)
|
||||
guard = _generating.make_guard()
|
||||
]() mutable {
|
||||
auto scaled = PrepareScaledFromFull(image, patternBackground);
|
||||
const auto ms = crl::now();
|
||||
@@ -766,31 +756,3 @@ bool BackgroundPreviewBox::Start(
|
||||
HistoryView::Context BackgroundPreviewBox::elementContext() {
|
||||
return HistoryView::Context::ContactPreview;
|
||||
}
|
||||
|
||||
std::unique_ptr<HistoryView::Element> BackgroundPreviewBox::elementCreate(
|
||||
not_null<HistoryMessage*> message) {
|
||||
return std::make_unique<HistoryView::Message>(delegate(), message);
|
||||
}
|
||||
|
||||
std::unique_ptr<HistoryView::Element> BackgroundPreviewBox::elementCreate(
|
||||
not_null<HistoryService*> message) {
|
||||
Unexpected("Service message in BackgroundPreviewBox.");
|
||||
}
|
||||
|
||||
bool BackgroundPreviewBox::elementUnderCursor(
|
||||
not_null<const Element*> view) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void BackgroundPreviewBox::elementAnimationAutoplayAsync(
|
||||
not_null<const Element*> element) {
|
||||
}
|
||||
|
||||
crl::time BackgroundPreviewBox::elementHighlightTime(
|
||||
not_null<const Element*> element) {
|
||||
return crl::time(0);
|
||||
}
|
||||
|
||||
bool BackgroundPreviewBox::elementInSelectionMode() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "window/themes/window_theme.h"
|
||||
#include "history/admin_log/history_admin_log_item.h"
|
||||
#include "history/view/history_view_element.h"
|
||||
#include "ui/effects/animations.h"
|
||||
#include "ui/effects/radial_animation.h"
|
||||
|
||||
namespace Ui {
|
||||
@@ -20,7 +21,7 @@ class Checkbox;
|
||||
|
||||
class BackgroundPreviewBox
|
||||
: public BoxContent
|
||||
, private HistoryView::ElementDelegate {
|
||||
, private HistoryView::SimpleElementDelegate {
|
||||
public:
|
||||
BackgroundPreviewBox(QWidget*, const Data::WallPaper &paper);
|
||||
|
||||
@@ -37,20 +38,10 @@ private:
|
||||
using Element = HistoryView::Element;
|
||||
not_null<HistoryView::ElementDelegate*> delegate();
|
||||
HistoryView::Context elementContext() override;
|
||||
std::unique_ptr<Element> elementCreate(
|
||||
not_null<HistoryMessage*> message) override;
|
||||
std::unique_ptr<Element> elementCreate(
|
||||
not_null<HistoryService*> message) override;
|
||||
bool elementUnderCursor(not_null<const Element*> view) override;
|
||||
void elementAnimationAutoplayAsync(
|
||||
not_null<const Element*> element) override;
|
||||
crl::time elementHighlightTime(
|
||||
not_null<const Element*> element) override;
|
||||
bool elementInSelectionMode() override;
|
||||
|
||||
void apply();
|
||||
void share();
|
||||
void step_radial(crl::time ms, bool timer);
|
||||
void radialAnimationCallback(crl::time now);
|
||||
QRect radialRect() const;
|
||||
|
||||
void checkLoadedDocument();
|
||||
@@ -58,8 +49,8 @@ private:
|
||||
void setScaledFromImage(QImage &&image, QImage &&blurred);
|
||||
void updateServiceBg(std::optional<QColor> background);
|
||||
std::optional<QColor> patternBackgroundColor() const;
|
||||
void paintImage(Painter &p, crl::time ms);
|
||||
void paintRadial(Painter &p, crl::time ms);
|
||||
void paintImage(Painter &p);
|
||||
void paintRadial(Painter &p);
|
||||
void paintTexts(Painter &p, crl::time ms);
|
||||
void paintDate(Painter &p);
|
||||
void createBlurCheckbox();
|
||||
@@ -72,7 +63,7 @@ private:
|
||||
Data::WallPaper _paper;
|
||||
QImage _full;
|
||||
QPixmap _scaled, _blurred, _fadeOutThumbnail;
|
||||
Animation _fadeIn;
|
||||
Ui::Animations::Simple _fadeIn;
|
||||
Ui::RadialAnimation _radial;
|
||||
base::binary_guard _generating;
|
||||
std::optional<QColor> _serviceBg;
|
||||
|
||||
@@ -595,6 +595,23 @@ backgroundScroll: ScrollArea(boxLayerScroll) {
|
||||
deltab: 10px;
|
||||
}
|
||||
|
||||
editMediaButtonSize: 29px;
|
||||
editMediaButtonSkip: 8px;
|
||||
editMediaButtonFileSkipRight: 1px;
|
||||
editMediaButtonFileSkipTop: 7px;
|
||||
|
||||
editMediaButtonIconFile: icon {{ "settings_edit", menuIconFg }};
|
||||
editMediaButtonIconPhoto: icon {{ "settings_edit", msgServiceFg }};
|
||||
editMediaButton: IconButton {
|
||||
width: editMediaButtonSize;
|
||||
height: editMediaButtonSize;
|
||||
|
||||
icon: editMediaButtonIconPhoto;
|
||||
|
||||
rippleAreaSize: editMediaButtonSize;
|
||||
ripple: defaultRippleAnimation;
|
||||
}
|
||||
|
||||
calendarTitleHeight: boxTitleHeight;
|
||||
calendarPrevious: IconButton {
|
||||
width: calendarTitleHeight;
|
||||
@@ -643,6 +660,8 @@ usernameTextStyle: TextStyle(boxTextStyle, passcodeTextStyle) {
|
||||
}
|
||||
usernameDefaultFg: windowSubTextFg;
|
||||
|
||||
editMediaCheckboxMargins: margins(0px, 15px, 23px, 15px);
|
||||
|
||||
downloadPathSkip: 10px;
|
||||
|
||||
colorEditWidth: 390px;
|
||||
@@ -699,7 +718,8 @@ adminLogFilterUserCheckbox: Checkbox(defaultBoxCheckbox) {
|
||||
checkPosition: point(8px, 6px);
|
||||
}
|
||||
|
||||
rightsCheckbox: Checkbox(defaultBoxCheckbox) {
|
||||
rightsCheckbox: Checkbox(defaultCheckbox) {
|
||||
textPosition: point(10px, 1px);
|
||||
rippleBg: attentionButtonBgOver;
|
||||
}
|
||||
rightsToggle: Toggle(defaultToggle) {
|
||||
@@ -950,3 +970,10 @@ backgroundCheck: ServiceCheck {
|
||||
color: msgServiceFg;
|
||||
duration: 200;
|
||||
}
|
||||
|
||||
urlAuthCheckbox: Checkbox(defaultBoxCheckbox) {
|
||||
width: 240px;
|
||||
}
|
||||
|
||||
linkedChatAbout: membersAbout;
|
||||
linkedChatAboutPadding: margins(20px, 20px, 20px, 20px);
|
||||
|
||||
@@ -320,7 +320,7 @@ void CalendarBox::Inner::paintRows(Painter &p, QRect clip) {
|
||||
}
|
||||
return st::windowBgOver;
|
||||
};
|
||||
it->second->paint(p, innerLeft, innerTop, width(), ms, &(colorOverride()->c));
|
||||
it->second->paint(p, innerLeft, innerTop, width(), &(colorOverride()->c));
|
||||
if (it->second->empty()) {
|
||||
_ripples.erase(it);
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "window/window_controller.h"
|
||||
#include "storage/localstorage.h"
|
||||
#include "data/data_session.h"
|
||||
#include "data/data_photo.h"
|
||||
#include "data/data_channel.h"
|
||||
#include "data/data_chat.h"
|
||||
#include "data/data_user.h"
|
||||
@@ -32,7 +33,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "observer_peer.h"
|
||||
|
||||
TextParseOptions _confirmBoxTextOptions = {
|
||||
TextParseLinks | TextParseMultiline | TextParseRichText, // flags
|
||||
TextParseLinks | TextParseMultiline | TextParseMarkdown | TextParseRichText, // flags
|
||||
0, // maxw
|
||||
0, // maxh
|
||||
Qt::LayoutDirectionAuto, // dir
|
||||
@@ -485,8 +486,7 @@ DeleteMessagesBox::DeleteMessagesBox(
|
||||
void DeleteMessagesBox::prepare() {
|
||||
auto details = TextWithEntities();
|
||||
const auto appendDetails = [&](TextWithEntities &&text) {
|
||||
TextUtilities::Append(details, { "\n\n" });
|
||||
TextUtilities::Append(details, std::move(text));
|
||||
details.append(qstr("\n\n")).append(std::move(text));
|
||||
};
|
||||
auto deleteKey = lng_box_delete;
|
||||
auto deleteStyle = &st::defaultBoxButton;
|
||||
@@ -576,7 +576,7 @@ void DeleteMessagesBox::prepare() {
|
||||
PeerData *DeleteMessagesBox::checkFromSinglePeer() const {
|
||||
auto result = (PeerData*)nullptr;
|
||||
for (const auto fullId : std::as_const(_ids)) {
|
||||
if (const auto item = App::histItemById(fullId)) {
|
||||
if (const auto item = Auth().data().message(fullId)) {
|
||||
const auto peer = item->history()->peer;
|
||||
if (!result) {
|
||||
result = peer;
|
||||
@@ -606,8 +606,8 @@ auto DeleteMessagesBox::revokeText(not_null<PeerData*> peer) const
|
||||
|
||||
const auto items = ranges::view::all(
|
||||
_ids
|
||||
) | ranges::view::transform([](FullMsgId id) {
|
||||
return App::histItemById(id);
|
||||
) | ranges::view::transform([&](FullMsgId id) {
|
||||
return peer->owner().message(id);
|
||||
}) | ranges::view::filter([](HistoryItem *item) {
|
||||
return (item != nullptr);
|
||||
}) | ranges::to_vector;
|
||||
@@ -647,7 +647,7 @@ auto DeleteMessagesBox::revokeText(not_null<PeerData*> peer) const
|
||||
if (const auto user = peer->asUser()) {
|
||||
auto boldName = TextWithEntities{ user->firstName };
|
||||
boldName.entities.push_back(
|
||||
EntityInText(EntityInTextBold, 0, boldName.text.size()));
|
||||
{ EntityType::Bold, 0, boldName.text.size() });
|
||||
if (canRevokeOutgoingCount == 1) {
|
||||
result.description = lng_selected_unsend_about_user_one__generic<TextWithEntities>(
|
||||
lt_user,
|
||||
@@ -754,7 +754,7 @@ void DeleteMessagesBox::deleteAndClear() {
|
||||
|
||||
base::flat_map<not_null<PeerData*>, QVector<MTPint>> idsByPeer;
|
||||
for (const auto itemId : _ids) {
|
||||
if (const auto item = App::histItemById(itemId)) {
|
||||
if (const auto item = Auth().data().message(itemId)) {
|
||||
const auto history = item->history();
|
||||
const auto wasOnServer = IsServerMsgId(item->id);
|
||||
const auto wasLast = (history->lastMessage() == item);
|
||||
@@ -790,7 +790,7 @@ ConfirmInviteBox::ConfirmInviteBox(
|
||||
const auto status = [&] {
|
||||
if (_participants.empty() || _participants.size() >= count) {
|
||||
if (count > 0) {
|
||||
return lng_chat_status_members(lt_count, count);
|
||||
return lng_chat_status_members(lt_count_decimal, count);
|
||||
} else {
|
||||
return lang(_isChannel
|
||||
? lng_channel_status
|
||||
@@ -802,24 +802,17 @@ ConfirmInviteBox::ConfirmInviteBox(
|
||||
}();
|
||||
_title->setText(title);
|
||||
_status->setText(status);
|
||||
if (data.vphoto.type() == mtpc_chatPhoto) {
|
||||
const auto &photo = data.vphoto.c_chatPhoto();
|
||||
const auto size = 160;
|
||||
const auto location = StorageImageLocation::FromMTP(
|
||||
size,
|
||||
size,
|
||||
photo.vphoto_small);
|
||||
if (!location.isNull()) {
|
||||
_photo = Images::Create(location);
|
||||
if (!_photo->loaded()) {
|
||||
subscribe(Auth().downloaderTaskFinished(), [=] {
|
||||
update();
|
||||
});
|
||||
_photo->load(Data::FileOrigin());
|
||||
}
|
||||
|
||||
const auto photo = Auth().data().processPhoto(data.vphoto);
|
||||
if (!photo->isNull()) {
|
||||
_photo = photo->thumbnail();
|
||||
if (!_photo->loaded()) {
|
||||
subscribe(Auth().downloaderTaskFinished(), [=] {
|
||||
update();
|
||||
});
|
||||
_photo->load(Data::FileOrigin());
|
||||
}
|
||||
}
|
||||
if (!_photo) {
|
||||
} else {
|
||||
_photoEmpty = std::make_unique<Ui::EmptyUserpic>(
|
||||
Data::PeerUserpicColor(0),
|
||||
title);
|
||||
|
||||
@@ -211,7 +211,7 @@ private:
|
||||
Fn<void()> _submit;
|
||||
object_ptr<Ui::FlatLabel> _title;
|
||||
object_ptr<Ui::FlatLabel> _status;
|
||||
ImagePtr _photo;
|
||||
Image *_photo = nullptr;
|
||||
std::unique_ptr<Ui::EmptyUserpic> _photoEmpty;
|
||||
std::vector<not_null<UserData*>> _participants;
|
||||
bool _isChannel = false;
|
||||
|
||||