Compare commits

...

220 Commits

Author SHA1 Message Date
ZavaruKitsu 3e2009d7c4 fix: update langs 2023-09-30 18:08:54 +03:00
ZavaruKitsu 123893ce30 fix: update submodules 2023-09-30 15:23:23 +03:00
ZavaruKitsu 3cc09578c9 Merge tag 'v4.10.2' into dev
# Conflicts:
#	Telegram/Resources/winrc/Telegram.rc
#	Telegram/Resources/winrc/Updater.rc
#	Telegram/SourceFiles/core/version.h
#	Telegram/lib_ui
2023-09-30 15:18:12 +03:00
ZavaruKitsu 4090064561 feat: implement read after actions 2023-09-30 15:04:54 +03:00
John Preston daf545a72a Version 4.10.2: Try fixing Snap action. 2023-09-29 19:29:53 +04:00
ZavaruKitsu 474de0cc46 feat: disable notifications delay
Telegram built-in function that delays notifications on the current client instance if you're online from another client
2023-09-29 14:22:56 +03:00
ZavaruKitsu 3f74919ba6 fix: one more condition for back from archived chats with hide all chats
Co-authored-by: c0re100 <corehusky@gmail.com>
2023-09-29 13:45:13 +03:00
ZavaruKitsu 163252b890 fix: cleanup a bit
fix: localize some strings
2023-09-29 13:34:31 +03:00
John Preston 771869e945 Version 4.10.2: Fix build with GCC. 2023-09-29 09:36:10 +04:00
John Preston ac1fe2cfee Update submodules. 2023-09-29 09:04:43 +04:00
John Preston ed064ee13c Version 4.10.2.
- Bug fixes and other minor improvements.
2023-09-29 00:15:19 +04:00
John Preston 9fcdec4166 Update libvpx revision. 2023-09-29 00:15:19 +04:00
John Preston bd4cf82405 Don't highlight links in non-premium stories. 2023-09-28 23:51:30 +04:00
John Preston 3653a6f011 Improve confirm box text padding. 2023-09-28 23:51:30 +04:00
John Preston adc6930ac6 Skip irrelevant message on changelog story hiding. 2023-09-28 23:51:30 +04:00
John Preston 7305d542ba Fix possible crash in message context menu. 2023-09-28 23:51:30 +04:00
John Preston 874c84ad4e Fix file reference refresh in story forward. 2023-09-28 23:51:29 +04:00
John Preston 4edb11f128 Show channel stories in chats list. 2023-09-28 23:51:29 +04:00
John Preston 785014f7b7 Extract premium layer top bar widget. 2023-09-28 23:51:29 +04:00
John Preston 4cb5bea69b Update API scheme to layer 165. 2023-09-28 23:51:29 +04:00
ZavaruKitsu 2dcc822e48 fix: don't crash if something wrong with database 2023-09-28 22:06:06 +03:00
ZavaruKitsu efc1799674 feat: update README 2023-09-28 01:16:39 +03:00
ZavaruKitsu d71206a72e fix: cleanup font picker mess 2023-09-28 00:53:47 +03:00
ZavaruKitsu e144d5cb10 feat: add new app icons
fix: refactor font picker
2023-09-28 00:30:59 +03:00
ZavaruKitsu 8fecdfad21 fix: update submodule 2023-09-27 20:52:38 +03:00
ZavaruKitsu ad29ab0f51 Merge remote-tracking branch 'upstream-main/dev' into dev
# Conflicts:
#	Telegram/Resources/winrc/Telegram.rc
#	Telegram/Resources/winrc/Updater.rc
#	Telegram/SourceFiles/core/version.h
#	Telegram/lib_ui
#	snap/snapcraft.yaml
2023-09-27 20:38:30 +03:00
MaxPlays35 eb8331c957 feat: add font picker 2023-09-27 20:27:52 +03:00
Ilya Fedin 07bc84d425 Update submodules 2023-09-27 10:32:24 +04:00
Ilya Fedin 9019a2cb08 Remove an unneeded intermediate variable 2023-09-27 10:32:24 +04:00
Ilya Fedin 716cc6ef9e Workaround a crash in snap 2023-09-27 10:32:24 +04:00
Ilya Fedin a509be99b0 Update Qt to 6.6.0-rc1 on Linux 2023-09-26 14:12:26 +04:00
Ilya Fedin 618ce15b21 Revert "Workaround Wayland popup menu bug."
This reverts commit 51027a0bc2.
2023-09-26 12:26:18 +04:00
Ilya Fedin d2b5651c3b Patch Qt for better open url UX on Linux 2023-09-26 12:22:24 +04:00
Ilya Fedin 51ff484913 Update Qt to 6.6.0-beta4 on Linux 2023-09-26 12:15:33 +04:00
John Preston 547a5a14df Correct stories count in the Info title. 2023-09-26 12:12:43 +04:00
John Preston 5179d9a03f Workaround Xcode 15 linker bugs with -Wl,-ld_classic. 2023-09-25 21:37:34 +04:00
John Preston 26e84dbab2 Fix drag starting item. 2023-09-25 21:37:00 +04:00
John Preston 013c8ebeb4 Allow reactions for changelog stories. 2023-09-25 21:36:51 +04:00
John Preston 846e96579d Fix direct story links for channels. 2023-09-25 17:53:02 +04:00
John Preston eaa491518e Remove changelog stories on archive attempt. 2023-09-25 17:39:18 +04:00
John Preston 4df7761e9d Allow deleting selected messages by backspace. 2023-09-25 12:55:29 +04:00
John Preston 6cdc8f9dbc Fix libvpx pkg-config generation on Windows.
Fixes #26849.
2023-09-25 12:41:34 +04:00
John Preston 95e4abd784 Extract system-specific parts of prepare env. 2023-09-25 12:41:34 +04:00
John Preston 6f9a540a61 Fix crash when libvpx decoder is absent.
Fixes #26849.
2023-09-25 12:41:34 +04:00
John Preston 137fca73bd Fix premium counter bubble with disabled animations. 2023-09-25 12:41:34 +04:00
John Preston 2159307643 Accept https://t.me/boost/channelusername links. 2023-09-25 12:41:34 +04:00
23rd ded570a480 Fixed display of bulk download menu item on restricted content. 2023-09-25 06:27:08 +03:00
John Preston 4fd68d97d5 Merge remote-tracking branch into dev 2023-09-23 21:24:20 +04:00
John Preston edfe998811 Fix build of minidump_stackwalk. 2023-09-23 21:23:51 +04:00
John Preston 116ae04f54 Add missing OpenGL resource deinitialization in viewer 2023-09-23 20:38:10 +04:00
Ilya Fedin ce8e42bcc2 Support Wayland display reconnection 2023-09-23 20:38:10 +04:00
John Preston ea9386f0aa Version 4.10.1: Rebuild macOS with older Xcode. 2023-09-23 19:25:24 +04:00
ZavaruKitsu b6cf5ebb19 fix: adjust code for refactor of input fields in lib_ui
fix: organize imports
fix: refactor database initialization
fix: update submodule

adjusted following https://github.com/telegramdesktop/tdesktop/commit/98bb520f476c3ca1df950969d6e5079036ec0de5
2023-09-23 14:00:47 +03:00
ZavaruKitsu 0502acc8a4 Merge tag 'v4.10.0' into dev
# Conflicts:
#	README.md
#	Telegram/Resources/winrc/Telegram.rc
#	Telegram/Resources/winrc/Updater.rc
#	Telegram/SourceFiles/apiwrap.cpp
#	Telegram/SourceFiles/core/version.h
#	Telegram/SourceFiles/data/data_stories.cpp
#	Telegram/SourceFiles/platform/win/windows_app_user_model_id.cpp
#	Telegram/lib_ui
#	snap/snapcraft.yaml
2023-09-23 10:58:57 +03:00
Ilya Fedin 58451aed91 Fix debug build on Linux 2023-09-23 06:29:10 +04:00
John Preston a6df03d990 Version 4.10: Fix channel stories phrases. 2023-09-22 20:59:37 +04:00
John Preston 16b1881268 Version 4.10: Fix spawning args on Linux. 2023-09-22 20:16:22 +04:00
John Preston 0d25b154d9 Version 4.10.
- Stories for Channels.
- Reaction Stickers in Stories.
2023-09-22 18:12:35 +04:00
John Preston 89fac88677 Beta version 4.9.10: Fix after-update relaunch. 2023-09-22 16:08:41 +04:00
John Preston 9604a3bd80 Beta version 4.9.10: Remove legacy checks. 2023-09-22 11:51:47 +04:00
John Preston 5b3ffc778d Merge remote-tracking branch 'origin/dev' into dev 2023-09-22 11:50:47 +04:00
John Preston c6c06c149d Check AppUserModelId better. 2023-09-22 11:50:41 +04:00
ZavaruKitsu ffd42f043d fix: refactor read all
fix: read mentions and reactions too
2023-09-22 10:31:55 +03:00
ZavaruKitsu d3ab1d60ce fix: refactor popup
decouple it from submenu, because submenu causes issues with reactions lol
2023-09-22 10:08:39 +03:00
John Preston a37f7077b0 Beta version 4.9.10: Fix build with GCC. 2023-09-22 11:06:03 +04:00
John Preston 5514ab0ccf Fix warnings after Xcode 15 / target 10.13 update. 2023-09-22 11:01:46 +04:00
John Preston 63a753d35c Beta version 4.9.10.
- Update Qt to 6.2.5 on macOS.
- Update minimum target to macOS 10.13 and toolchain to Xcode 15.
- Update Linux build host from CentOS 7 to Rocky Linux 8.
- Update Linux toolchain to GCC 12.
2023-09-22 09:43:32 +04:00
John Preston 4e82b7973f Suppress warning in libtgvoip json11. 2023-09-22 09:43:32 +04:00
John Preston 09094affed Improve boosted channel replacement design. 2023-09-22 09:43:32 +04:00
John Preston c5634580f6 Add view button to channel boost link previews. 2023-09-22 09:43:32 +04:00
John Preston 7828a92f08 Implement views/reactions polling in channels. 2023-09-22 09:43:32 +04:00
John Preston e60e65f574 Toggle suggested reaction counter animated. 2023-09-22 09:43:32 +04:00
John Preston 7a25d70240 Support all cases for BoostBox. 2023-09-22 09:43:32 +04:00
John Preston 01428572b0 Add shadow for white suggested reactions. 2023-09-22 09:43:32 +04:00
John Preston a43a5ce6c5 Improve reaction selector position. 2023-09-22 09:43:32 +04:00
John Preston d4ba01bad0 Suggested reaction effect around the widget. 2023-09-22 09:43:32 +04:00
John Preston 5d5cae7860 Implement suggested reaction count. 2023-09-22 09:43:32 +04:00
John Preston f3db7e636b Implement channel stories views / reactions. 2023-09-22 09:43:32 +04:00
John Preston 1c2951598b Handle t.me/channel?boost links. 2023-09-22 09:43:32 +04:00
John Preston 39f8394f98 Enable story actions in channels. 2023-09-22 09:43:31 +04:00
John Preston 29c5f6b706 Support channel stories archive. 2023-09-22 09:43:31 +04:00
John Preston b2c9a92c3e Hide reply field in channel stories. 2023-09-22 09:43:31 +04:00
John Preston f3647d7f8c Show saved stories / current stories in channels. 2023-09-22 09:43:31 +04:00
John Preston f3e65181cd Initial suggested reaction implementation. 2023-09-22 09:43:31 +04:00
John Preston d5b429e910 Update API scheme to layer 164. 2023-09-22 09:43:31 +04:00
Ilya Fedin 1bde096417 Minimize amount of code to rebuild when switching options 2023-09-22 09:14:01 +04:00
John Preston 3db0b11a6b Bump minimum macOS deployment target to 10.13. 2023-09-22 09:03:12 +04:00
John Preston 8d00d93949 Fix uninitialized warning in build with GCC. 2023-09-22 09:03:00 +04:00
Ilya Fedin 277fe540dc Update Qt to 6.2.5 on macOS 2023-09-22 08:49:53 +04:00
ZavaruKitsu a67655a532 feat: support expiring messages 2023-09-22 00:21:48 +03:00
ZavaruKitsu d2f4a1b32c feat: refactor 2023-09-21 23:11:02 +03:00
ZavaruKitsu 3a1f8459e2 feat: add settings for ReadAfterAction
feat: write formatted config
fix: don't reset config on missing field

the last one is for convenient migrating between versions
2023-09-21 22:06:17 +03:00
Ilya Fedin 1683dccb50 Always set AppUserModelID on Windows 2023-09-21 13:39:26 +04:00
Ilya Fedin 47195e316f Don't load SetCurrentProcessExplicitAppUserModelID dynamically
It's supported since Windows 7
2023-09-21 13:39:26 +04:00
Ilya Fedin 8c9014fcf6 Update all third party submodules 2023-09-21 12:53:07 +04:00
Ilya Fedin 2d7675ace0 Update all dependencies in snap 2023-09-21 12:53:07 +04:00
Ilya Fedin 61cc7efc2a Update all dependencies in Dockerfile 2023-09-21 12:53:07 +04:00
Ilya Fedin 0464a558f0 Add Qt window frame string for Wayland 2023-09-21 12:49:45 +04:00
Ilya Fedin ff9321e971 Main thread deadlock detector for debug mode 2023-09-21 12:23:23 +04:00
John Preston d10b7e8402 Update tg_owt+libyuv/libvpx to chromium revisions. 2023-09-21 11:10:44 +04:00
Ilya Fedin 71f3f67fe3 Update submodules & patches on Linux 2023-09-21 10:30:09 +04:00
Ilya Fedin 47983d59fb Use -fno-omit-frame-pointer for better backtraces 2023-09-20 22:32:35 +04:00
Ilya Fedin df29af5aea CentOS 7 -> Rocky Linux 8 2023-09-20 22:32:35 +04:00
Ilya Fedin 27b443b24d Use QStandardPaths to find the externalupdater config
That should be more convenient for everyone and cross-platform...
2023-09-20 18:05:45 +04:00
Ilya Fedin 7b4a542890 Always wait for updater to exit on Linux 2023-09-20 18:05:45 +04:00
Ilya Fedin db6c69fa5f Move writeprotected to global updater variables on Linux 2023-09-20 18:05:45 +04:00
Ilya Fedin 7dfeea3f4e Get rid of workingDirChosen variable
It's set in every codepath where cWorkingDir is non-empty.
2023-09-20 18:05:45 +04:00
Ilya Fedin 92a41c881d Consolidate cForceWorkingDir(psAppDataPath()) 2023-09-20 18:05:45 +04:00
Ilya Fedin 3d769a6dce Get rid of cForceWorkingDir(cWorkingDir())
It has no sense as no code sets working directory directly to the variable anymore.
2023-09-20 18:05:45 +04:00
Ilya Fedin 330dfaa4d9 Consolidate MoveOldDataFiles path determinition 2023-09-20 18:05:45 +04:00
Ilya Fedin b35fff01b0 Restore initial working directory on restart
So executable path computation still works for the new instance on systems deducing it by argv0
2023-09-20 18:05:45 +04:00
Ilya Fedin cc19928977 Fix logging initial working directory when TelegramForcePortable exists 2023-09-20 18:05:45 +04:00
Ilya Fedin c5424d0a9a Get rid of unneeded + '/' for cForceWorkingDir
It does the same on its own
2023-09-20 18:05:45 +04:00
Ilya Fedin f3572e52ac Don't create a QDir instance for its static setCurrent method 2023-09-20 18:05:45 +04:00
Ilya Fedin 949c486cac Use a higher-level API for restarts/updates on Linux
This gets rid of the custom arguments container
2023-09-20 18:05:45 +04:00
Ilya Fedin 082b5ba782 Get rid of sandboxed paths workaround
This is fixed in xdg-desktop-portal 1.17.

There's no way to check xdg-desktop-portal version so it's either not having support for passing last used path at all in sandbox or encountering the bug on old systems.
2023-09-20 17:58:41 +04:00
Ilya Fedin 0f86968afd Use ServerInformation without std::optional 2023-09-20 17:52:39 +04:00
Ilya Fedin 90f52d80d7 Avoid global copying in Linux native notifications 2023-09-20 17:52:39 +04:00
Ilya Fedin 4e97599e9d Use Glib::ustring in Linux notification globals 2023-09-20 17:52:39 +04:00
Ilya Fedin e0b3e69351 Update range-v3 to 0.18.0 2023-09-20 17:52:39 +04:00
Ilya Fedin e0b4d1edce Avoid unneeded std::string casts in exception handling 2023-09-20 17:45:37 +04:00
John Preston a54bc449e4 Version 4.9.9: Add support for Emoji 15. 2023-09-18 23:38:59 +04:00
Ilya Fedin ea41aab713 Make use of templated XDP::ReadSetting 2023-09-18 19:52:48 +04:00
John Preston fd00450f44 Version 4.9.9.
- Several crash fixes.
2023-09-18 12:45:55 +04:00
John Preston e22aed55b0 Update submodules. 2023-09-18 12:44:20 +04:00
Ilya Fedin cb838e6e52 Make use of the new XDP::SettingWatcher constructor 2023-09-18 12:44:20 +04:00
John Preston 3c931b11d6 Clear CacheHelper::waiting mutex in time.
I hope this fixes crashes in streaming semaphore usage.

CacheHelper::waiting points to Context::_semaphore, so it
should be cleared before Context is destroyed, not later.
2023-09-18 12:40:02 +04:00
John Preston a14dbffb65 Fix possible crash in pinned message deletion. 2023-09-18 12:40:02 +04:00
John Preston 64dcae3174 Destroy volume dropdown after volume toggle.
This fixes https://bugs.telegram.org/c/31989

When destroying the dropdown first, the volume toggle receives an Enter
event and tries to show the dropdown (that is being destroyed).
2023-09-18 12:40:02 +04:00
John Preston 6af527ac76 Set dynamic box name to crash annotations. 2023-09-18 12:40:01 +04:00
John Preston e1624e5d22 Fix a possible crash in translations. 2023-09-18 12:40:01 +04:00
Ilya Fedin 21857450f3 Update lib_base 2023-09-17 19:54:54 +04:00
Ilya Fedin 8ea4f26e31 Simplify some using-s 2023-09-17 19:54:54 +04:00
John Preston 76ac6c3be7 Version 4.9.8.
- Fix t.me/botname?startapp=token deeplinks.
- Fix a possible crash in media viewer on Wayland.
2023-09-16 07:55:02 +04:00
John Preston c4c5036ec0 Update submodules. 2023-09-16 07:39:28 +04:00
Ilya Fedin ad87c2a15e Re-use the Wayland AutoDestroyer's lifetime in WaylandIntegration::Private 2023-09-16 06:26:51 +04:00
Ilya Fedin 7dbf331e18 Fix org_kde_plasma_surface destroyer lambda leak 2023-09-16 06:26:51 +04:00
John Preston ab53b4eab7 Fix build of Packer. 2023-09-15 21:48:23 +04:00
John Preston 7d678e5fa7 Fix ringtones downloaded to disk. 2023-09-15 21:18:14 +04:00
John Preston 6adb3e7200 Fix build on macOS. 2023-09-15 20:42:23 +04:00
Ilya Fedin 7906be37b6 Change #if-ery to be more in line with cmake logic (LINUX = NOT WIN32 AND NOT APPLE) 2023-09-15 19:52:22 +04:00
John Preston c12743925e Support ?startapp=value start_param passing. 2023-09-15 15:36:09 +04:00
John Preston b17b806d91 Add hide-chats-list-in-forums setting. 2023-09-15 15:36:09 +04:00
ZavaruKitsu e1babcf69a feat: new message history viewer initial
fix: use Qt formatting

kanged from `admin_log` and cleaned up a bit
2023-09-14 17:36:14 +03:00
John Preston 98ab91a56a More correct way of applying min stories. 2023-09-14 10:58:29 +04:00
John Preston 0f8d9e885a Re-update lib_base submodule. 2023-09-14 10:15:22 +04:00
John Preston bc891ca55e Don't build too much in libwebp. 2023-09-14 10:10:54 +04:00
Ilya Fedin 9653cfdd56 Update lib_base 2023-09-14 09:27:13 +04:00
Ilya Fedin 0b4a255acc Use SNAP_INSTANCE_NAME in SingleInstanceLocalServerName
That's what snapd's apparmor profiles use
2023-09-14 09:27:13 +04:00
John Preston 94feb953aa Version 4.9.7.
- Fix direct bot web app links handling.
- Close main menu when opening a web app.
- Bump libwebp revision.
2023-09-13 21:16:03 +04:00
John Preston 7b65c9174f Link system libwebp instead of Qt-s. 2023-09-13 21:07:24 +04:00
John Preston e74021fbc9 Show "Open Bot" button for main menu apps. 2023-09-13 20:51:01 +04:00
John Preston e6a474d720 Close main menu on a web app opening. 2023-09-13 20:51:01 +04:00
23rd 976c696004 Slightly improved style of mini icons in dialogs list for replies story. 2023-09-13 12:09:16 +03:00
John Preston c057c88d30 Try title overscroll colors only on macOS. 2023-09-13 09:04:29 +04:00
John Preston 674bab69f5 Send viewport updates in web-apps. 2023-09-13 09:04:28 +04:00
John Preston 97d93b23dc Fix direct bot app links. 2023-09-13 08:24:38 +04:00
23rd d363a6ea84 Replaced url click handler in view buttons with external sponsored link. 2023-09-13 00:34:00 +03:00
John Preston da7e8a8dc3 Version 4.9.6: Fix build. 2023-09-12 21:14:01 +04:00
John Preston 4296f93e1a Version 4.9.6.
- Some bot web-app improvements.
- Bug fixes and other minor improvements.
2023-09-12 21:02:22 +04:00
John Preston d0b16ce05b Fix macOS webview transparent background. 2023-09-12 21:01:12 +04:00
John Preston c3340fd016 Don't destroy by timer single-view media. 2023-09-12 21:01:12 +04:00
John Preston 36f1a18b3b Show terms on attach bot direct link app. 2023-09-12 21:01:12 +04:00
John Preston ef969df86e Improve main menu bots disclaimer acceptance. 2023-09-12 21:01:12 +04:00
John Preston 229f7a2c15 Handle background / title colors in web-apps. 2023-09-12 21:01:12 +04:00
John Preston fbd8abc1c6 Start main menu bots. 2023-09-12 21:01:12 +04:00
John Preston 73f3110403 Update API scheme to layer 163. 2023-09-12 21:01:11 +04:00
Ilya Fedin dfa5386a27 Ensure closing is supported for running in background 2023-09-12 19:49:48 +04:00
John Preston e5227a7e05 Improve OpenGL windows on macOS.
Fix #26268 by adding a workaround for incorrect FBO size.
Fix #26166 by forcing sRGB color scheme on all app windows.
2023-09-12 11:41:31 +04:00
John Preston a6b844408a Add verified/fake/scam badge to ConfirmInviteBox. 2023-09-12 11:40:33 +04:00
John Preston dbd4aecc56 Don't show message bottom info in bot about. 2023-09-12 11:40:33 +04:00
23rd 3332f012cf Added tooltip and ability to copy external link to sponsored messages. 2023-09-12 11:40:33 +04:00
23rd 456f4d7b8a Fixed api id and hash in Github Action on Windows for nightly builds. 2023-09-12 11:40:33 +04:00
Ilya Fedin 0b4ef3214e Leverage QImage's CoW in Linux native notifications 2023-09-12 10:29:29 +04:00
Ilya Fedin e946bf5338 Run in background on Linux when minimization is not supported 2023-09-12 10:27:13 +04:00
Ilya Fedin e8a1fc0300 Add a method to check whether to run in background instead of checking for macOS 2023-09-12 10:27:13 +04:00
Ilya Fedin 0bf0fb29d2 Add nodiscard for a bunch of platform specific methods 2023-09-12 10:27:13 +04:00
Ilya Fedin 566f2dd670 Switch XDP open with dialog to QWaylandWindow::requestXdgActivationToken 2023-09-11 11:12:08 +04:00
Ilya Fedin e52e1672e8 Make PortalAutostart asynchronous 2023-09-11 11:11:40 +04:00
Ilya Fedin bf255c0e00 Don't use crl::on_main unnecessarily in Linux native notifications code
All those dbus methods call callbacks on the same thread
2023-09-11 11:11:04 +04:00
Ilya Fedin 55fb3405e5 Move feature warnings to the relevant code 2023-09-11 11:05:05 +04:00
23rd adbe5e9605 Slightly improved style of mini icons in dialogs list. 2023-09-08 11:40:18 +03:00
23rd 29bfe43386 Added ability to export chat for html and json formats simultaneously. 2023-09-08 11:40:18 +03:00
23rd ca30c35c2b Added initial export writer for both html and json formats. 2023-09-08 11:40:18 +03:00
23rd d4ad5d9f13 Removed uppercase from some phrases in export. 2023-09-08 11:40:18 +03:00
23rd fd79973509 Fixed crash when importing custom theme with duplicated entries. 2023-09-08 11:40:18 +03:00
23rd d2bd109169 Removed uppercase from some phrases in theme editor. 2023-09-08 11:40:18 +03:00
23rd 1b5b9f46d2 Allowed to save not loaded photos from bulk download menu item. 2023-09-08 11:40:18 +03:00
23rd ed345e0823 Allowed to select loaded documents for bulk download menu item. 2023-09-08 11:40:18 +03:00
23rd 90adc2d97c Fixed misaligned line in expanded reaction menu with disabled animation.
Fixed #26748.
2023-09-08 11:40:18 +03:00
23rd 787ed443f4 Increased clickable area to change forward options in sections. 2023-09-08 11:40:18 +03:00
23rd 7ffb341597 Removed some unwanted include directives of styles in header files. 2023-09-08 11:40:18 +03:00
Ilya Fedin 483909854a Use brackets include for QtWaylandScanner-generated headers 2023-09-08 07:28:13 +04:00
Ilya Fedin 289257dd0f Update submodules 2023-09-08 07:10:53 +04:00
ZavaruKitsu ba93a50062 fix: build on Linux
fix: missing skip in prefs
2023-09-07 22:05:46 +03:00
ZavaruKitsu a7666b1156 fix: update submodule 2023-09-07 21:52:25 +03:00
ZavaruKitsu 3ccb0e16fc fix: taskbar on Windows
fix: more branding
fix: smth
2023-09-07 21:51:22 +03:00
Ilya Fedin 547a39d835 Update tg_owt in snap 2023-09-07 07:40:52 +04:00
John Preston eef3cdd31b Update mini_forward/mini_reply_story icons. 2023-09-05 21:33:04 +04:00
John Preston 4bfe40d02e Don't close ShareBox by outside click. 2023-09-05 21:33:04 +04:00
John Preston 107b72f442 Fix possible crash in AddBotToGroupBox. 2023-09-05 21:33:04 +04:00
John Preston 8adbbe6885 Don't expect itemId from shareContact. 2023-09-05 19:30:29 +04:00
John Preston 191f832e52 Use notarytool instead of altool for notarization. 2023-09-05 16:42:12 +04:00
John Preston 9f0a756f71 Version 4.9.5: Fix build with GCC. 2023-09-05 13:10:03 +04:00
Ilya Fedin 0079a18e97 Call D-Bus ReloadConfig asynchronously 2023-09-04 18:11:25 +04:00
John Preston 876a803e0e Version 4.9.5.
- Several new bot web-app features.
- Bug fixes and other minor improvements.
2023-09-04 17:54:11 +04:00
John Preston 7009e967d0 Fix build with MSVC. 2023-09-04 17:38:02 +04:00
John Preston 076aa9452e Unblock the bot before sharing phone number. 2023-09-04 17:36:55 +04:00
John Preston d77c7a70ab Implement new bot web-app methods. 2023-09-04 17:36:55 +04:00
John Preston 8255de1ba8 Update API scheme to layer 162. 2023-09-04 17:36:55 +04:00
23rd aad1296829 Fixed overlapping right badges on ellipsis in dialogs list. 2023-09-04 17:36:54 +04:00
23rd 738aff9c4f Fixed paint of mini icon in dialogs list even there is no space for it. 2023-09-04 17:36:54 +04:00
23rd 7740780eeb Respected presence of plain link in preview text for mini icons. 2023-09-04 17:36:54 +04:00
23rd 9edbb9762a Fixed some cases when peer may not be removed from filter from menu. 2023-09-04 17:36:54 +04:00
23rd 98bb520f47 Adjusted code for refactor of input fields in lib_ui. 2023-09-04 17:36:54 +04:00
23rd ae2182c1e5 Removed document's requirement when it's unavailable in userpic builder. 2023-09-04 17:36:54 +04:00
Ilya Fedin 4807244682 Don't use crl::on_main unnecessarily with XDP::SettingWatcher
g_dbus_connection_signal_subscribe calls the callback on the same thread
2023-09-04 16:21:58 +04:00
John Preston 119f7e757d Don't show yourself in notification exceptions. 2023-09-01 12:00:25 +04:00
GitHub Action e34e640dbb Update User-Agent for DNS to Chrome 116.0.5845.96. 2023-09-01 11:08:21 +04:00
Ilya Fedin e755851237 Update lib_base 2023-08-31 22:46:54 +04:00
495 changed files with 16770 additions and 6735 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

+2 -2
View File
@@ -41,7 +41,7 @@ on:
jobs:
linux:
name: CentOS 7
name: Rocky Linux 8
runs-on: ubuntu-latest
container:
image: ghcr.io/${{ github.repository }}/centos_env
@@ -51,7 +51,7 @@ jobs:
defaults:
run:
shell: scl enable rh-python38 -- scl enable llvm-toolset-7.0 -- scl enable devtoolset-10 -- bash --noprofile --norc -eo pipefail {0}
shell: scl enable gcc-toolset-12 -- bash --noprofile --norc -eo pipefail {0}
strategy:
matrix:
+1 -1
View File
@@ -61,7 +61,7 @@ jobs:
sudo snap run lxd waitready
- name: Free up some disk space.
uses: jlumbroso/free-disk-space@76866dbe54312617f00798d1762df7f43def6e5c
uses: jlumbroso/free-disk-space@f68fdb76e2ea636224182cfb7377ff9a1708f9b8
- name: Telegram Desktop snap build.
run: sg lxd -c 'snap run snapcraft -v'
+1 -1
View File
@@ -124,7 +124,7 @@ jobs:
echo "TDESKTOP_BUILD_DEFINE=$DEFINE" >> $GITHUB_ENV
API="-D TDESKTOP_API_TEST=ON"
if [ ${{ github.ref == 'refs/heads/nightly' }} ]; then
if [ $GITHUB_REF == 'refs/heads/nightly' ]; then
echo "Use the open credentials."
API="-D TDESKTOP_API_ID=611335 -D TDESKTOP_API_HASH=d524b414d21f4d37f08684c1df41ac9c"
fi
-3
View File
@@ -58,9 +58,6 @@
[submodule "Telegram/ThirdParty/range-v3"]
path = Telegram/ThirdParty/range-v3
url = https://github.com/ericniebler/range-v3.git
[submodule "Telegram/ThirdParty/fcitx-qt5"]
path = Telegram/ThirdParty/fcitx-qt5
url = https://github.com/fcitx/fcitx-qt5.git
[submodule "Telegram/ThirdParty/nimf"]
path = Telegram/ThirdParty/nimf
url = https://github.com/hamonikr/nimf.git
+3 -3
View File
@@ -29,8 +29,8 @@ endif()
project(Telegram
LANGUAGES ${project_langs}
VERSION ${desktop_app_version_cmake}
DESCRIPTION "Official Telegram Desktop messenger"
HOMEPAGE_URL "https://desktop.telegram.org"
DESCRIPTION "AyuGram Desktop"
HOMEPAGE_URL "https://ayugram.one"
)
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT Telegram)
@@ -61,7 +61,7 @@ if (NOT DESKTOP_APP_USE_PACKAGED)
if (WIN32)
set(qt_version 5.15.10)
elseif (APPLE)
set(qt_version 6.3.2)
set(qt_version 6.2.5)
endif()
endif()
include(cmake/external/qt/package.cmake)
+14 -6
View File
@@ -7,33 +7,41 @@
- Full ghost mode (flexible)
- Messages history
- Anti-recall
- Some appearance customization stuff
- Font customization
- Streamer mode
- Material Design switches
- Local Telegram Premium
- Sync read states and message history with AyuSync *(TBA)*
![AyuGram Preferences](.github/preview.png)
<img src='.github/demos/demo1.png' width='250'> <img src='.github/demos/demo2.png' width='250'> <img src='.github/demos/demo3.png' width='250'>
## Downloads
### Windows
You can download prebuilt Windows binary from [Releases tab](https://github.com/AyuGram/AyuGramDesktop/releases) or from the [Telegram topic](https://t.me/ayugramchat/12788).
You can download prebuilt Windows binary from [Releases tab](https://github.com/AyuGram/AyuGramDesktop/releases) or from
the [Telegram topic](https://t.me/ayugramchat/12788).
Follow [official guide](https://github.com/AyuGram/AyuGramDesktop/blob/dev/docs/building-win-x64.md) if you want to build by yourself.
Follow [official guide](https://github.com/AyuGram/AyuGramDesktop/blob/dev/docs/building-win-x64.md) if you want to
build by yourself.
### Arch Linux
You can install `ayugram-desktop-git` or `ayugram-desktop-bin` from [AUR](https://aur.archlinux.org/packages?O=0&K=ayugram).
It is recommended to build AyuGram from source on any Linux distro.
But if you're brave enough, you can install `ayugram-desktop-git` or `ayugram-desktop-bin`
from [AUR](https://aur.archlinux.org/packages?O=0&K=ayugram).
These packages maintained by [westpain](https://github.com/incycledream). *We're not responsible for them.*
### Any other Linux distro
Follow [official guide](https://github.com/AyuGram/AyuGramDesktop/blob/dev/docs/building-linux.md).
Follow the [official guide](https://github.com/AyuGram/AyuGramDesktop/blob/dev/docs/building-linux.md).
### Remarks for Windows
Make sure you have these components installed with VS Build Tools:
- C++ MFC latest (x86 & x64)
- C++ ATL latest (x86 & x64)
- latest Windows 11 SDK
+16
View File
@@ -101,9 +101,15 @@ PRIVATE
ayu/ayu_settings.h
ayu/ayu_lang.cpp
ayu/ayu_lang.h
ayu/ayu_infra.cpp
ayu/ayu_infra.h
ayu/ayu_constants.h
ayu/utils/ayu_mapper.cpp
ayu/utils/ayu_mapper.h
ayu/utils/telegram_helpers.cpp
ayu/utils/telegram_helpers.h
ayu/utils/windows_utils.cpp
ayu/utils/windows_utils.h
ayu/ui/ayu_lottie.cpp
ayu/ui/ayu_lottie.h
ayu/ui/ayu_assets.cpp
@@ -116,6 +122,12 @@ PRIVATE
ayu/ui/settings/settings_ayu.h
ayu/ui/context_menu/context_menu.cpp
ayu/ui/context_menu/context_menu.h
ayu/ui/sections/edited/edited_log_inner.cpp
ayu/ui/sections/edited/edited_log_inner.h
ayu/ui/sections/edited/edited_log_item.cpp
ayu/ui/sections/edited/edited_log_item.h
ayu/ui/sections/edited/edited_log_section.cpp
ayu/ui/sections/edited/edited_log_section.h
ayu/ui/boxes/voice_confirmation_box.cpp
ayu/ui/boxes/voice_confirmation_box.h
ayu/ui/boxes/message_history_box.cpp
@@ -126,6 +138,8 @@ PRIVATE
ayu/ui/boxes/edit_deleted_mark.h
ayu/ui/boxes/edit_edited_mark.cpp
ayu/ui/boxes/edit_edited_mark.h
ayu/ui/boxes/font_selector.cpp
ayu/ui/boxes/font_selector.h
ayu/sync/ayu_sync_controller.cpp
ayu/sync/ayu_sync_controller.h
ayu/sync/models.h
@@ -466,6 +480,7 @@ PRIVATE
core/crash_report_window.h
core/crash_reports.cpp
core/crash_reports.h
core/deadlock_detector.h
core/file_utilities.cpp
core/file_utilities.h
core/launcher.cpp
@@ -1529,6 +1544,7 @@ PRIVATE
qrc/emoji_5.qrc
qrc/emoji_6.qrc
qrc/emoji_7.qrc
qrc/emoji_8.qrc
qrc/emoji_preview.qrc
qrc/telegram/animations.qrc
qrc/telegram/export.qrc
Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 832 B

After

Width:  |  Height:  |  Size: 738 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 821 KiB

After

Width:  |  Height:  |  Size: 832 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 464 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 796 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 476 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 884 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 337 B

After

Width:  |  Height:  |  Size: 319 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 527 B

After

Width:  |  Height:  |  Size: 539 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 772 B

After

Width:  |  Height:  |  Size: 777 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 563 B

After

Width:  |  Height:  |  Size: 588 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 366 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 863 B

+116 -7
View File
@@ -548,6 +548,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_settings_title_account_name" = "Show active account";
"lng_settings_title_total_count" = "Total unread count";
"lng_settings_native_frame" = "Use system window frame";
"lng_settings_qt_frame" = "Use Qt window frame";
"lng_settings_auto_start" = "Launch Telegram when system starts";
"lng_settings_start_min" = "Launch minimized";
"lng_settings_auto_start_disabled_uwp" = "Starting with the system was disabled in Windows Settings.\n\nPlease enable Telegram Desktop in the Startup Apps Settings.";
@@ -1182,6 +1183,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_profile_loading" = "Loading...";
"lng_profile_saved_stories#one" = "{count} saved story";
"lng_profile_saved_stories#other" = "{count} saved stories";
"lng_profile_posts#one" = "{count} post";
"lng_profile_posts#other" = "{count} posts";
"lng_profile_photos#one" = "{count} photo";
"lng_profile_photos#other" = "{count} photos";
"lng_profile_gifs#one" = "{count} GIF";
@@ -1611,6 +1614,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_action_suggested_video" = "{user} suggests you to use this profile video.";
"lng_action_suggested_video_button" = "View Video";
"lng_action_attach_menu_bot_allowed" = "You allowed this bot to message you when you added it in the attachment menu.";
"lng_action_webapp_bot_allowed" = "You allowed this bot to message you in his web-app.";
"lng_action_set_wallpaper_me" = "You set a new wallpaper for this chat";
"lng_action_set_wallpaper" = "{user} set a new wallpaper for this chat";
"lng_action_set_wallpaper_button" = "View Wallpaper";
@@ -1799,6 +1803,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_bot_share_location_unavailable" = "Sorry, location sharing is currently unavailable in Telegram Desktop.";
"lng_bot_share_phone" = "Do you want to share your phone number with this bot?";
"lng_bot_share_phone_confirm" = "Share";
"lng_bot_allow_write_title" = "Allow messaging";
"lng_bot_allow_write" = "Do you want to allow this bot writing you?";
"lng_bot_allow_write_confirm" = "Allow";
"lng_attach_failed" = "Failed";
"lng_attach_file" = "File";
@@ -1995,6 +2002,38 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_premium_gift_terms" = "You can review the list of features and terms of use for Telegram Premium {link}.";
"lng_premium_gift_terms_link" = "here";
"lng_boost_channel_button" = "Boost Channel";
"lng_boost_level#one" = "Level {count}";
"lng_boost_level#other" = "Level {count}";
"lng_boost_channel_title_first" = "Enable stories for channel";
"lng_boost_channel_needs_first#one" = "{channel} needs **{count}** more boost to enable posting stories. Help make it possible!";
"lng_boost_channel_needs_first#other" = "{channel} needs **{count}** more boosts to enable posting stories. Help make it possible!";
"lng_boost_channel_title_more" = "Help upgrade channel";
"lng_boost_channel_needs_more#one" = "{channel} needs **{count}** more boost to be able to {post}.";
"lng_boost_channel_needs_more#other" = "{channel} needs **{count}** more boosts to be able to {post}.";
"lng_boost_channel_title_max" = "Maximum level reached";
"lng_boost_channel_you_title" = "You boosted {channel}!";
"lng_boost_channel_you_first#one" = "This channel needs **{count}** more boost\nto enable stories.";
"lng_boost_channel_you_first#other" = "This channel needs **{count}** more boosts\nto enable stories.";
"lng_boost_channel_you_more#one" = "This channel needs **{count}** more boost\nto be able to {post}.";
"lng_boost_channel_you_more#other" = "This channel needs **{count}** more boosts\nto be able to {post}.";
"lng_boost_channel_reached_first" = "This channel reached **Level 1** and can now post stories.";
"lng_boost_channel_reached_more#one" = "This channel reached **Level {count}** and can now {post}.";
"lng_boost_channel_reached_more#other" = "This channel reached **Level {count}** and can now {post}.";
"lng_boost_channel_post_stories#one" = "post **{count} story** per day";
"lng_boost_channel_post_stories#other" = "post **{count} stories** per day";
"lng_boost_error_gifted_title" = "Can't boost with gifted Premium!";
"lng_boost_error_gifted_text" = "Because your **Telegram Premium** subscription was gifted to you, you can't use it to boost channels.";
"lng_boost_error_already_title" = "Already Boosted!";
"lng_boost_error_already_text" = "You are already boosting this channel.";
"lng_boost_error_premium_title" = "Premium needed!";
"lng_boost_error_premium_text" = "Only **Telegram Premium** subscribers can boost channels. Do you want to subscribe to **Telegram Premium**?";
"lng_boost_error_premium_yes" = "Yes";
"lng_boost_error_flood_title" = "Can't boost too often!";
"lng_boost_error_flood_text" = "You can change the channel you boost only once a day. Next time you can boost is in {left}.";
"lng_boost_now_instead" = "You currently boost {channel}. Do you want to boost {other} instead?";
"lng_boost_now_replace" = "Replace";
"lng_accounts_limit_title" = "Limit Reached";
"lng_accounts_limit1#one" = "You have reached the limit of **{count}** connected accounts.";
"lng_accounts_limit1#other" = "You have reached the limit of **{count}** connected accounts.";
@@ -2256,17 +2295,24 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_bot_remove_from_menu" = "Remove From Menu";
"lng_bot_remove_from_menu_sure" = "Remove {bot} from the attachment menu?";
"lng_bot_remove_from_menu_done" = "Bot removed from the menu.";
"lng_bot_remove_from_side_menu" = "Remove From Menu";
"lng_bot_remove_from_side_menu_sure" = "Remove {bot} from the main menu?";
"lng_bot_remove_from_side_menu_done" = "Bot removed from the main menu.";
"lng_bot_settings" = "Settings";
"lng_bot_open" = "Open Bot";
"lng_bot_reload_page" = "Reload Page";
"lng_bot_add_to_menu" = "{bot} asks your permission to be added as an option to your attachments menu so you can access it from any chat.";
"lng_bot_add_to_menu_done" = "Bot added to the menu.";
"lng_bot_will_be_added" = "{bot} shortcuts will be added to the attachment options and the main menu.";
"lng_bot_side_menu_new" = "NEW";
"lng_bot_menu_not_supported" = "This bot isn't supported in the attach menu.";
"lng_bot_menu_already_added" = "This bot is already added in your attach menu.";
"lng_bot_menu_button" = "Menu";
"lng_bot_close_warning_title" = "Warning";
"lng_bot_close_warning" = "Changes that you made may not be saved.";
"lng_bot_close_warning_sure" = "Close anyway";
"lng_bot_add_to_side_menu" = "{bot} asks your permission to be added as an option to your main menu so you can access it any time.";
"lng_bot_add_to_side_menu_done" = "Bot added to the main menu.";
"lng_typing" = "typing";
"lng_user_typing" = "{user} is typing";
@@ -2370,6 +2416,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_context_open_gif" = "Open GIF";
"lng_context_save_gif" = "Save GIF";
"lng_context_delete_gif" = "Delete GIF";
"lng_context_open_channel" = "Open Channel";
"lng_context_attached_stickers" = "Attached Stickers";
"lng_context_to_msg" = "Go To Message";
"lng_context_reply_msg" = "Reply";
@@ -2747,6 +2794,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_payments_terms_title" = "Terms of Service";
"lng_payments_terms_text" = "Subscribe and accept terms of service of {bot}?";
"lng_payments_terms_text_once" = "Are you accepting terms of service of {bot}?";
"lng_payments_terms_agree" = "I agree to {link}";
"lng_payments_terms_link" = "Terms of Service";
"lng_payments_terms_accept" = "Accept";
@@ -3079,9 +3127,14 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_gigagroup_suggest_more" = "Learn more";
"lng_rights_channel_info" = "Change channel info";
"lng_rights_channel_manage" = "Manage messages";
"lng_rights_channel_post" = "Post messages";
"lng_rights_channel_edit" = "Edit messages of others";
"lng_rights_channel_delete" = "Delete messages of others";
"lng_rights_channel_manage_stories" = "Manage stories";
"lng_rights_channel_post_stories" = "Post stories";
"lng_rights_channel_edit_stories" = "Edit stories of others";
"lng_rights_channel_delete_stories" = "Delete stories of others";
"lng_rights_channel_manage_calls" = "Manage live streams";
"lng_rights_group_info" = "Change group info";
"lng_rights_group_ban" = "Ban users";
@@ -3340,6 +3393,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_admin_log_admin_post_messages" = "Post messages";
"lng_admin_log_admin_edit_messages" = "Edit messages";
"lng_admin_log_admin_delete_messages" = "Delete messages";
"lng_admin_log_admin_post_stories" = "Post stories";
"lng_admin_log_admin_edit_stories" = "Edit stories";
"lng_admin_log_admin_delete_stories" = "Delete stories";
"lng_admin_log_admin_remain_anonymous" = "Remain anonymous";
"lng_admin_log_admin_ban_users" = "Ban users";
"lng_admin_log_admin_invite_users" = "Add members";
@@ -3555,6 +3611,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_export_option_choose_format" = "Choose export format";
"lng_export_option_html" = "Human-readable HTML";
"lng_export_option_json" = "Machine-readable JSON";
"lng_export_option_html_and_json" = "Both";
"lng_export_limits" = "From: {from}, to: {till}";
"lng_export_beginning" = "the oldest message";
"lng_export_end" = "present";
@@ -3819,6 +3876,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_view_button_voice_chat_channel" = "Live stream";
"lng_view_button_request_join" = "Request to Join";
"lng_view_button_external_link" = "Open link";
"lng_view_button_boost" = "Boost";
"lng_sponsored_hide_ads" = "Hide";
"lng_sponsored_title" = "What are sponsored messages?";
@@ -3829,6 +3887,12 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_telegram_features_url" = "https://t.me/TelegramTips";
"lng_mini_apps_disclaimer_title" = "Warning";
"lng_mini_apps_disclaimer_text" = "You are about to use a mini app operated by an independent party **not affiliated with Telegram**. You must agree to the Terms of Use of mini apps to continue.";
"lng_mini_apps_disclaimer_button" = "I agree to the {link}";
"lng_mini_apps_disclaimer_link" = "Terms of Use";
"lng_mini_apps_tos_url" = "https://telegram.org/tos/mini-apps";
"lng_ringtones_box_title" = "Notification Sound";
"lng_ringtones_box_cloud_subtitle" = "Choose your tone";
"lng_ringtones_box_upload_choose" = "Choose ringtone";
@@ -3946,6 +4010,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_stories_recent_button" = "Recent Stories";
"lng_stories_archive_title" = "Stories Archive";
"lng_stories_archive_about" = "Only you can see archived stories unless you choose to save them to your profile.";
"lng_stories_channel_archive_about" = "Only admins of the channel can see archived stories unless they are saved to the channel page.";
"lng_stories_reply_sent" = "Message Sent";
"lng_stories_hidden_to_contacts" = "Stories from {user} will now be shown in **Archived Chats**.";
"lng_stories_shown_in_chats" = "Stories from {user} will now be shown in the **Chats List**.";
@@ -3965,6 +4030,19 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_stories_archive_done" = "This story is hidden from your profile.";
"lng_stories_archive_done_many#one" = "{count} story is hidden from your profile.";
"lng_stories_archive_done_many#other" = "{count} stories are hidden from your profile.";
"lng_stories_channel_save_sure" = "Do you want to save this story to the channel page?";
"lng_stories_channel_save_sure_many#one" = "Do you want to save {count} story to the channel page?";
"lng_stories_channel_save_sure_many#other" = "Do you want to save {count} stories to the channel page?";
"lng_stories_channel_save_done" = "This story is saved to the channel page.";
"lng_stories_channel_save_done_many#one" = "{count} story is saved to the channel page.";
"lng_stories_channel_save_done_many#other" = "{count} stories are saved to the channel page.";
"lng_stories_channel_save_done_about" = "Saved stories can be viewed by others on the channel page until they are removed.";
"lng_stories_channel_archive_sure" = "Do you want to hide this story from the channel page?";
"lng_stories_channel_archive_sure_many#one" = "Do you want to hide {count} story from the channel page?";
"lng_stories_channel_archive_sure_many#other" = "Do you want to hide {count} stories from the channel page?";
"lng_stories_channel_archive_done" = "This story is hidden from the channel page.";
"lng_stories_channel_archive_done_many#one" = "{count} story is hidden from the channel page.";
"lng_stories_channel_archive_done_many#other" = "{count} stories are hidden from the channel page.";
"lng_stories_save_promo" = "Subscribe to {link} to download other people's unprotected stories to disk.";
"lng_stealth_mode_menu_item" = "Stealth Mode";
@@ -4063,8 +4141,12 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"ayu_DontSendOnlinePackets" = "Don't send online";
"ayu_DontSendUploadProgress" = "Don't send typing";
"ayu_SendOfflinePacketAfterOnline" = "Immediate offline after online";
"ayu_MarkReadAfterSend" = "Send read status after reply";
"ayu_MarkReadAfterAction" = "Mark read after actions";
"ayu_MarkReadAfterSend" = "Send";
"ayu_MarkReadAfterReaction" = "Reaction";
"ayu_MarkReadAfterPoll" = "Poll";
"ayu_UseScheduledMessages" = "Schedule messages";
"ayu_SuggestGhostModeBeforeViewingStory" = "Alert before opening story";
"ayu_SpyEssentialsHeader" = "Spy essentials";
"ayu_SaveDeletedMessages" = "Save deleted messages";
"ayu_SaveMessagesHistory" = "Save edits history";
@@ -4085,8 +4167,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"ayu_MessageSavingSaveForBots" = "Save in bot dialogs";
"ayu_QoLTogglesHeader" = "Useful features";
"ayu_KeepAliveService" = "AyuGram Push Service";
"ayu_DisableStories" = "Disable stories";
"ayu_DisableAds" = "Disable ads";
"ayu_DisableStories" = "Disable stories";
"ayu_DisableNotificationsDelay" = "Disable notify delay";
"ayu_LocalPremium" = "Local Telegram Premium";
"ayu_CopyUsernameAsLink" = "Copy username as link";
"ayu_CustomizationHeader" = "Customization";
@@ -4102,11 +4185,15 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"ayu_RegexFilters" = "Message Filters";
"ayu_RegexFiltersAmount" = "filters";
"ayu_RegexFiltersHeader" = "Filters";
"ayu_RegexFiltersEnableInChats" = "Enable in chats";
"ayu_RegexFiltersCaseInsensitive" = "Case insensitive expressions";
"ayu_RegexFiltersShared" = "Shared filters";
"ayu_FiltersHideFromBlocked" = "Hide from blocked users";
"ayu_FiltersHideFromBlockedNote" = "Message filters were enabled.";
"ayu_RegexFiltersEnableSharedInChats" = "Enable shared filters in chats";
"ayu_RegexFiltersAdd" = "Add filter";
"ayu_RegexFiltersEdit" = "Edit filter";
"ayu_RegexFiltersPlaceholder" = "Expression";
"ayu_EnableExpression" = "Enable expression";
"ayu_CaseInsensitiveExpression" = "Case insensitive expression";
"ayu_RegexFiltersAddError" = "Regex syntax error";
"ayu_AyuSyncHeader" = "AyuSync";
"ayu_AyuSyncStatusTitle" = "Sync status";
@@ -4132,15 +4219,16 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"ayu_IconAlternative" = "AyuGram Alt";
"ayu_IconNothing" = "Nothing";
"ayu_WALMode" = "Enable WAL mode";
"ayu_PushNotificationCount" = "FCM notifications received";
"ayu_ClearAyuDatabase" = "Clear Ayu Database";
"ayu_ClearAyuDatabaseNotification" = "AyuGram database cleared";
"ayu_ClearAyuAttachments" = "Clear Ayu Attachments";
"ayu_ClearAyuAttachmentsNotification" = "AyuGram attachments folder cleared";
"ayu_EraseLocalDatabase" = "Erase Local Database";
"ayu_ConfirmationsTitle" = "Confirmations";
"ayu_StickerConfirmation" = "Confirmation when sending stickers";
"ayu_GIFConfirmation" = "Confirmation when sending GIFs";
"ayu_VoiceConfirmation" = "Confirmation when sending voice messages";
"ayu_StickerConfirmation" = "For stickers";
"ayu_GIFConfirmation" = "For GIFs";
"ayu_VoiceConfirmation" = "For voice messages";
"ayu_KillApp" = "Kill App";
"ayu_LReadMessages" = "Read on Local";
"ayu_SReadMessages" = "Read on Server";
@@ -4156,11 +4244,27 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"ayu_DisableStreamerModeTray" = "Disable Streamer Mode";
"ayu_EditsHistoryTitle" = "Edits history";
"ayu_EditsHistoryMenuText" = "History";
"ayu_ClearDeletedMenuText" = "Clear Deleted";
"ayu_ViewFiltersMenuText" = "View Filters";
"ayu_OneViewTTL" = "one view";
"ayu_ReadUntilMenuText" = "Read Message";
"ayu_DeleteKeepLocally" = "Keep locally";
"ayu_BoxActionReset" = "Reset";
"ayu_ReadConfirmationBoxQuestion" = "Do you want to read all messages?";
"ayu_ReadConfirmationBoxActionText" = "Read";
"ayu_ClearDeletedMessagesTitle" = "Clear deleted messages";
"ayu_ClearDeletedMessagesText" = "Are you sure you want to clear all deleted messages in this chat?";
"ayu_ClearDeletedMessagesActionText" = "Clear";
"ayu_SuggestGhostModeTitle" = "Ghost Mode";
"ayu_SuggestGhostModeStoryText" = "Do you want to enable Ghost Mode before viewing the story?";
"ayu_SuggestGhostModeStoryActionText" = "Enable";
"ayu_HideNextViewsDescriptionAyu" = "Hide my views forever, until Ghost Mode disabled.";
"ayu_EnableGhostModeStories" = "Enable Ghost Mode";
"ayu_GhostModeIsActive" = "Ghost Mode Is Active";
"ayu_MainFont" = "Application font";
"ayu_MonospaceFont" = "Monospace font";
"ayu_FontDefault" = "Default";
"ayu_CustomizeFontTitle" = "Customize font";
"ayu_AyuForwardStatusForwarding" = "Forwarding messages…";
"ayu_AyuForwardStatusLoadingMedia" = "Loading media…";
"ayu_AyuForwardForwardingDescription" = "Please keep this window open while AyuGram is forwarding your messages.";
@@ -4175,5 +4279,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"ayu_ContextCopyCallbackData" = "Copy Callback Data";
"ayu_LocalPremiumNotice" = "You're using **local** Telegram Premium.\nIt **won't** give you any benefits, except translator.\n**Enjoy the star near your nickname!**";
"ayu_SettingsWatermark" = "AyuGram developed and maintained by Radolyn Labs.";
"ayu_ConfirmationSticker" = "Do you want to send this sticker?";
"ayu_ConfirmationGIF" = "Do you want to send this GIF?";
"ayu_ConfirmationVoice" = "Do you want to send this voice message?";
"ayu_IntroAbout" = "Welcome to the AyuGram Desktop.\nIt's cool and looks less ugly.";
"ayu_AboutText1" = "Just a cool Telegram client based on {api_link}.";
"ayu_UpdateAyuGram" = "Update AyuGram";
"ayu_UtilityRestartRequired" = "App will close in 5 seconds.";
+24 -4
View File
@@ -1,8 +1,28 @@
<RCC>
<qresource prefix="/gui">
<file alias="art/ayu/alt/logo256.png">../../art/ayu/alt/logo256.png</file>
<file alias="art/ayu/alt/logo256_no_margin.png">../../art/ayu/alt/logo256_no_margin.png</file>
<file alias="art/ayu/nothing/logo256.png">../../art/ayu/nothing/logo256.png</file>
<file alias="art/ayu/nothing/logo256_no_margin.png">../../art/ayu/nothing/logo256_no_margin.png</file>
<file alias="art/ayu/alt/app.png">../../art/ayu/alt/app.png</file>
<file alias="art/ayu/alt/app_preview.png">../../art/ayu/alt/app_preview.png</file>
<file alias="art/ayu/alt/app_icon.ico">../../art/ayu/alt/app_icon.ico</file>
<file alias="art/ayu/bard/app.png">../../art/ayu/bard/app.png</file>
<file alias="art/ayu/bard/app_preview.png">../../art/ayu/bard/app_preview.png</file>
<file alias="art/ayu/bard/app_icon.ico">../../art/ayu/bard/app_icon.ico</file>
<file alias="art/ayu/default/app.png">../../art/ayu/default/app.png</file>
<file alias="art/ayu/default/app_preview.png">../../art/ayu/default/app_preview.png</file>
<file alias="art/ayu/default/app_icon.ico">../../art/ayu/default/app_icon.ico</file>
<file alias="art/ayu/discord/app.png">../../art/ayu/discord/app.png</file>
<file alias="art/ayu/discord/app_preview.png">../../art/ayu/discord/app_preview.png</file>
<file alias="art/ayu/discord/app_icon.ico">../../art/ayu/discord/app_icon.ico</file>
<file alias="art/ayu/extera/app.png">../../art/ayu/extera/app.png</file>
<file alias="art/ayu/extera/app_preview.png">../../art/ayu/extera/app_preview.png</file>
<file alias="art/ayu/extera/app_icon.ico">../../art/ayu/extera/app_icon.ico</file>
<file alias="art/ayu/nothing/app.png">../../art/ayu/nothing/app.png</file>
<file alias="art/ayu/nothing/app_preview.png">../../art/ayu/nothing/app_preview.png</file>
<file alias="art/ayu/nothing/app_icon.ico">../../art/ayu/nothing/app_icon.ico</file>
<file alias="art/ayu/spotify/app.png">../../art/ayu/spotify/app.png</file>
<file alias="art/ayu/spotify/app_preview.png">../../art/ayu/spotify/app_preview.png</file>
<file alias="art/ayu/spotify/app_icon.ico">../../art/ayu/spotify/app_icon.ico</file>
<file alias="art/ayu/yaplus/app.png">../../art/ayu/yaplus/app.png</file>
<file alias="art/ayu/yaplus/app_preview.png">../../art/ayu/yaplus/app_preview.png</file>
<file alias="art/ayu/yaplus/app_icon.ico">../../art/ayu/yaplus/app_icon.ico</file>
</qresource>
</RCC>
+5
View File
@@ -0,0 +1,5 @@
<RCC>
<qresource prefix="/gui">
<file alias="emoji/emoji_8.webp">../emoji/emoji_8.webp</file>
</qresource>
</RCC>
+1 -1
View File
@@ -10,7 +10,7 @@
<Identity Name="TelegramMessengerLLP.TelegramDesktop"
ProcessorArchitecture="ARCHITECTURE"
Publisher="CN=536BC709-8EE1-4478-AF22-F0F0F26FF64A"
Version="4.9.4.0" />
Version="4.10.2.0" />
<Properties>
<DisplayName>Telegram Desktop</DisplayName>
<PublisherDisplayName>Telegram Messenger LLP</PublisherDisplayName>
+4 -4
View File
@@ -44,8 +44,8 @@ IDI_ICON1 ICON "..\\art\\icon256.ico"
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 4,9,4,0
PRODUCTVERSION 4,9,4,0
FILEVERSION 4,10,2,0
PRODUCTVERSION 4,10,2,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -62,10 +62,10 @@ BEGIN
BEGIN
VALUE "CompanyName", "Radolyn Labs"
VALUE "FileDescription", "AyuGram Desktop"
VALUE "FileVersion", "4.9.4.0"
VALUE "FileVersion", "4.10.2.0"
VALUE "LegalCopyright", "Copyright (C) 2014-2023"
VALUE "ProductName", "AyuGram Desktop"
VALUE "ProductVersion", "4.9.4.0"
VALUE "ProductVersion", "4.10.2.0"
END
END
BLOCK "VarFileInfo"
+4 -4
View File
@@ -35,8 +35,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 4,9,4,0
PRODUCTVERSION 4,9,4,0
FILEVERSION 4,10,2,0
PRODUCTVERSION 4,10,2,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -53,10 +53,10 @@ BEGIN
BEGIN
VALUE "CompanyName", "Radolyn Labs"
VALUE "FileDescription", "AyuGram Desktop Updater"
VALUE "FileVersion", "4.9.4.0"
VALUE "FileVersion", "4.10.2.0"
VALUE "LegalCopyright", "Copyright (C) 2014-2023"
VALUE "ProductName", "AyuGram Desktop"
VALUE "ProductVersion", "4.9.4.0"
VALUE "ProductVersion", "4.10.2.0"
END
END
BLOCK "VarFileInfo"
+3 -5
View File
@@ -267,7 +267,7 @@ int main(int argc, char *argv[])
}
QByteArray inner = f.readAll();
stream << name << quint32(inner.size()) << inner;
#ifdef Q_OS_UNIX
#ifndef Q_OS_WIN
stream << (QFileInfo(fullName).isExecutable() ? true : false);
#endif
}
@@ -281,7 +281,7 @@ int main(int argc, char *argv[])
cout << "Compression start, size: " << resultSize << "\n";
QByteArray compressed, resultCheck;
#if defined Q_OS_WIN && !defined DESKTOP_APP_USE_PACKAGED // use Lzma SDK for win
#if defined Q_OS_WIN && !defined TDESKTOP_USE_PACKAGED // use Lzma SDK for win
const int32 hSigLen = 128, hShaLen = 20, hPropsLen = LZMA_PROPS_SIZE, hOriginalSizeLen = sizeof(int32), hSize = hSigLen + hShaLen + hPropsLen + hOriginalSizeLen; // header
compressed.resize(hSize + resultSize + 1024 * 1024); // rsa signature + sha1 + lzma props + max compressed size
@@ -496,10 +496,8 @@ int main(int argc, char *argv[])
QString outName((targetwin64 ? QString("tx64upd%1") : QString("tupdate%1")).arg(AlphaVersion ? AlphaVersion : version));
#elif defined Q_OS_MAC
QString outName((targetarmac ? QString("tarmacupd%1") : QString("tmacupd%1")).arg(AlphaVersion ? AlphaVersion : version));
#elif defined Q_OS_UNIX
QString outName(QString("tlinuxupd%1").arg(AlphaVersion ? AlphaVersion : version));
#else
#error Unknown platform!
QString outName(QString("tlinuxupd%1").arg(AlphaVersion ? AlphaVersion : version));
#endif
if (AlphaVersion) {
outName += "_" + AlphaSignature;
+1 -1
View File
@@ -27,7 +27,7 @@ extern "C" {
#include <openssl/evp.h>
} // extern "C"
#if defined Q_OS_WIN && !defined DESKTOP_APP_USE_PACKAGED // use Lzma SDK for win
#if defined Q_OS_WIN && !defined TDESKTOP_USE_PACKAGED // use Lzma SDK for win
#include <LzmaLib.h>
#else
#include <lzma.h>
+42 -35
View File
@@ -41,6 +41,7 @@ bool do_mkdir(const char *path) { // from http://stackoverflow.com/questions/675
}
bool _debug = false;
bool writeprotected = false;
string updaterDir;
string updaterName;
string workDir;
@@ -88,7 +89,7 @@ void writeLog(const char *format, ...) {
va_end(args);
}
bool copyFile(const char *from, const char *to, bool writeprotected) {
bool copyFile(const char *from, const char *to) {
FILE *ffrom = fopen(from, "rb"), *fto = fopen(to, "wb");
if (!ffrom) {
if (fto) fclose(fto);
@@ -211,7 +212,7 @@ void delFolder() {
rmdir(delFolder.c_str());
}
bool update(bool writeprotected) {
bool update() {
writeLog("Update started..");
string updDir = workDir + "tupdates/temp", readyFilePath = workDir + "tupdates/temp/ready", tdataDir = workDir + "tupdates/temp/tdata";
@@ -324,7 +325,7 @@ bool update(bool writeprotected) {
writeLog("Copying file '%s' to '%s'..", fname.c_str(), tofname.c_str());
int copyTries = 0, triesLimit = 30;
do {
if (!copyFile(fname.c_str(), tofname.c_str(), writeprotected)) {
if (!copyFile(fname.c_str(), tofname.c_str())) {
++copyTries;
usleep(100000);
} else {
@@ -359,10 +360,10 @@ int main(int argc, char *argv[]) {
bool needupdate = true;
bool autostart = false;
bool debug = false;
bool writeprotected = false;
bool tosettings = false;
bool startintray = false;
bool customWorkingDir = false;
bool justUpdate = false;
char *key = 0;
char *workdir = 0;
@@ -381,6 +382,9 @@ int main(int argc, char *argv[]) {
customWorkingDir = true;
} else if (equal(argv[i], "-writeprotected")) {
writeprotected = true;
justUpdate = true;
} else if (equal(argv[i], "-justupdate")) {
justUpdate = true;
} else if (equal(argv[i], "-key") && ++i < argc) {
key = argv[i];
} else if (equal(argv[i], "-workpath") && ++i < argc) {
@@ -455,7 +459,7 @@ int main(int argc, char *argv[]) {
} else {
writeLog("Passed workpath is '%s'", workDir.c_str());
}
update(writeprotected);
update();
}
} else {
writeLog("Error: bad exe name!");
@@ -464,36 +468,38 @@ int main(int argc, char *argv[]) {
writeLog("Error: short exe name!");
}
const auto fullBinaryPath = exePath + exeName;
auto values = vector<string>();
const auto push = [&](string arg) {
// Force null-terminated .data() call result.
values.push_back(arg + char(0));
};
push(!argv0.empty() ? argv0 : fullBinaryPath);
push("-noupdate");
if (autostart) push("-autostart");
if (debug) push("-debug");
if (startintray) push("-startintray");
if (tosettings) push("-tosettings");
if (key) {
push("-key");
push(key);
}
if (customWorkingDir && workdir) {
push("-workdir");
push(workdir);
}
auto args = vector<char*>();
for (auto &arg : values) {
args.push_back(arg.data());
}
args.push_back(nullptr);
// let the parent launch instead
if (!writeprotected) {
if (justUpdate) {
writeLog("Closing log and quitting..");
} else {
const auto fullBinaryPath = exePath + exeName;
auto values = vector<string>();
const auto push = [&](string arg) {
// Force null-terminated .data() call result.
values.push_back(arg + char(0));
};
push(!argv0.empty() ? argv0 : fullBinaryPath);
push("-noupdate");
if (autostart) push("-autostart");
if (debug) push("-debug");
if (startintray) push("-startintray");
if (tosettings) push("-tosettings");
if (key) {
push("-key");
push(key);
}
if (customWorkingDir && workdir) {
push("-workdir");
push(workdir);
}
auto args = vector<char*>();
for (auto &arg : values) {
args.push_back(arg.data());
}
args.push_back(nullptr);
pid_t pid = fork();
switch (pid) {
case -1:
@@ -503,9 +509,10 @@ int main(int argc, char *argv[]) {
execv(fullBinaryPath.c_str(), args.data());
return 1;
}
writeLog("Executed Telegram, closing log and quitting..");
}
writeLog("Executed Telegram, closing log and quitting..");
closeLog();
return 0;
+75 -28
View File
@@ -77,45 +77,59 @@ void BlockedPeers::block(not_null<PeerData*> peer) {
_session->changes().peerUpdated(
peer,
Data::PeerUpdate::Flag::IsBlocked);
} else if (_blockRequests.find(peer) == end(_blockRequests)) {
const auto requestId = _api.request(MTPcontacts_Block(
MTP_flags(0),
peer->input
)).done([=] {
_blockRequests.erase(peer);
peer->setIsBlocked(true);
if (_slice) {
_slice->list.insert(
_slice->list.begin(),
{ peer->id, base::unixtime::now() });
++_slice->total;
_changes.fire_copy(*_slice);
}
}).fail([=] {
_blockRequests.erase(peer);
}).send();
_blockRequests.emplace(peer, requestId);
return;
} else if (blockAlreadySent(peer, true)) {
return;
}
const auto requestId = _api.request(MTPcontacts_Block(
MTP_flags(0),
peer->input
)).done([=] {
const auto data = _blockRequests.take(peer);
peer->setIsBlocked(true);
if (_slice) {
_slice->list.insert(
_slice->list.begin(),
{ peer->id, base::unixtime::now() });
++_slice->total;
_changes.fire_copy(*_slice);
}
if (data) {
for (const auto &callback : data->callbacks) {
callback(false);
}
}
}).fail([=] {
if (const auto data = _blockRequests.take(peer)) {
for (const auto &callback : data->callbacks) {
callback(false);
}
}
}).send();
_blockRequests.emplace(peer, Request{
.requestId = requestId,
.blocking = true,
});
}
void BlockedPeers::unblock(
not_null<PeerData*> peer,
Fn<void()> onDone,
Fn<void(bool success)> done,
bool force) {
if (!force && !peer->isBlocked()) {
_session->changes().peerUpdated(
peer,
Data::PeerUpdate::Flag::IsBlocked);
return;
} else if (_blockRequests.find(peer) != end(_blockRequests)) {
} else if (blockAlreadySent(peer, false, done)) {
return;
}
const auto requestId = _api.request(MTPcontacts_Unblock(
MTP_flags(0),
peer->input
)).done([=] {
_blockRequests.erase(peer);
const auto data = _blockRequests.take(peer);
peer->setIsBlocked(false);
if (_slice) {
auto &list = _slice->list;
@@ -130,13 +144,46 @@ void BlockedPeers::unblock(
}
_changes.fire_copy(*_slice);
}
if (onDone) {
onDone();
if (data) {
for (const auto &callback : data->callbacks) {
callback(true);
}
}
}).fail([=] {
_blockRequests.erase(peer);
if (const auto data = _blockRequests.take(peer)) {
for (const auto &callback : data->callbacks) {
callback(false);
}
}
}).send();
_blockRequests.emplace(peer, requestId);
const auto i = _blockRequests.emplace(peer, Request{
.requestId = requestId,
.blocking = false,
}).first;
if (done) {
i->second.callbacks.push_back(std::move(done));
}
}
bool BlockedPeers::blockAlreadySent(
not_null<PeerData*> peer,
bool blocking,
Fn<void(bool success)> done) {
const auto i = _blockRequests.find(peer);
if (i == end(_blockRequests)) {
return false;
} else if (i->second.blocking == blocking) {
if (done) {
i->second.callbacks.push_back(std::move(done));
}
return true;
}
const auto callbacks = base::take(i->second.callbacks);
_blockRequests.erase(i);
for (const auto &callback : callbacks) {
callback(false);
}
return false;
}
void BlockedPeers::reload() {
@@ -160,7 +207,7 @@ auto BlockedPeers::slice() -> rpl::producer<BlockedPeers::Slice> {
: (_changes.events() | rpl::type_erased());
}
void BlockedPeers::request(int offset, Fn<void(BlockedPeers::Slice)> onDone) {
void BlockedPeers::request(int offset, Fn<void(BlockedPeers::Slice)> done) {
if (_requestId) {
return;
}
@@ -170,7 +217,7 @@ void BlockedPeers::request(int offset, Fn<void(BlockedPeers::Slice)> onDone) {
MTP_int(offset ? kBlockedPerPage : kBlockedFirstSlice)
)).done([=](const MTPcontacts_Blocked &result) {
_requestId = 0;
onDone(TLToSlice(result, _session->data()));
done(TLToSlice(result, _session->data()));
}).fail([=] {
_requestId = 0;
}).send();
+14 -3
View File
@@ -39,20 +39,31 @@ public:
void reload();
rpl::producer<Slice> slice();
void request(int offset, Fn<void(Slice)> onDone);
void request(int offset, Fn<void(Slice)> done);
void block(not_null<PeerData*> peer);
void unblock(
not_null<PeerData*> peer,
Fn<void()> onDone = nullptr,
Fn<void(bool success)> done = nullptr,
bool force = false);
private:
struct Request {
std::vector<Fn<void(bool success)>> callbacks;
mtpRequestId requestId = 0;
bool blocking = false;
};
[[nodiscard]] bool blockAlreadySent(
not_null<PeerData*> peer,
bool blocking,
Fn<void(bool success)> done = nullptr);
const not_null<Main::Session*> _session;
MTP::Sender _api;
base::flat_map<not_null<PeerData*>, mtpRequestId> _blockRequests;
base::flat_map<not_null<PeerData*>, Request> _blockRequests;
mtpRequestId _requestId = 0;
std::optional<Slice> _slice;
rpl::event_stream<Slice> _changes;
-1
View File
@@ -366,7 +366,6 @@ void ActivateBotCommand(ClickHandlerContext context, int row, int column) {
const auto itemId = item->id;
const auto topicRootId = item->topicRootId();
const auto history = item->history();
controller->show(Ui::MakeConfirmBox({
.text = tr::lng_bot_share_phone(),
.confirmed = [=] {
+44 -2
View File
@@ -9,6 +9,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "apiwrap.h"
#include "window/window_session_controller.h"
#include "info/profile/info_profile_badge.h"
#include "lang/lang_keys.h"
#include "main/main_session.h"
#include "ui/empty_userpic.h"
@@ -25,6 +26,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/toast/toast.h"
#include "boxes/premium_limits_box.h"
#include "styles/style_boxes.h"
#include "styles/style_info.h"
#include "styles/style_layers.h"
namespace Api {
@@ -195,6 +197,13 @@ ConfirmInviteBox::ConfirmInviteBox(
: _session(session)
, _submit(std::move(submit))
, _title(this, st::confirmInviteTitle)
, _badge(std::make_unique<Info::Profile::Badge>(
this,
st::infoPeerBadge,
_session,
rpl::single(Info::Profile::Badge::Content{ BadgeForInvite(invite) }),
nullptr,
[=] { return false; }))
, _status(this, st::confirmInviteStatus)
, _about(this, st::confirmInviteAbout)
, _aboutRequests(this, st::confirmInviteStatus)
@@ -275,9 +284,24 @@ ConfirmInviteBox::ChatInvite ConfirmInviteBox::Parse(
.isMegagroup = data.is_megagroup(),
.isBroadcast = data.is_broadcast(),
.isRequestNeeded = data.is_request_needed(),
.isFake = data.is_fake(),
.isScam = data.is_scam(),
.isVerified = data.is_verified(),
};
}
[[nodiscard]] Info::Profile::BadgeType ConfirmInviteBox::BadgeForInvite(
const ChatInvite &invite) {
using Type = Info::Profile::BadgeType;
return invite.isVerified
? Type::Verified
: invite.isScam
? Type::Scam
: invite.isFake
? Type::Fake
: Type::None;
}
void ConfirmInviteBox::prepare() {
addButton(
(_requestApprove
@@ -326,8 +350,26 @@ void ConfirmInviteBox::prepare() {
void ConfirmInviteBox::resizeEvent(QResizeEvent *e) {
BoxContent::resizeEvent(e);
_title->move((width() - _title->width()) / 2, st::confirmInviteTitleTop);
_status->move((width() - _status->width()) / 2, st::confirmInviteStatusTop);
const auto padding = st::boxRowPadding;
auto nameWidth = width() - padding.left() - padding.right();
auto badgeWidth = 0;
if (const auto widget = _badge->widget()) {
badgeWidth = st::infoVerifiedCheckPosition.x() + widget->width();
nameWidth -= badgeWidth;
}
_title->resizeToWidth(std::min(nameWidth, _title->textMaxWidth()));
_title->moveToLeft(
(width() - _title->width() - badgeWidth) / 2,
st::confirmInviteTitleTop);
const auto badgeLeft = _title->x() + _title->width();
const auto badgeTop = _title->y();
const auto badgeBottom = _title->y() + _title->height();
_badge->move(badgeLeft, badgeTop, badgeBottom);
_status->move(
(width() - _status->width()) / 2,
st::confirmInviteStatusTop);
auto bottom = _status->y()
+ _status->height()
+ st::boxPadding.bottom()
@@ -12,6 +12,11 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
class UserData;
class ChannelData;
namespace Info::Profile {
class Badge;
enum class BadgeType;
} // namespace Info::Profile
namespace Main {
class Session;
} // namespace Main
@@ -66,10 +71,15 @@ private:
bool isMegagroup = false;
bool isBroadcast = false;
bool isRequestNeeded = false;
bool isFake = false;
bool isScam = false;
bool isVerified = false;
};
[[nodiscard]] static ChatInvite Parse(
not_null<Main::Session*> session,
const MTPDchatInvite &data);
[[nodiscard]] Info::Profile::BadgeType BadgeForInvite(
const ChatInvite &invite);
ConfirmInviteBox(
not_null<Main::Session*> session,
@@ -81,12 +91,14 @@ private:
Fn<void()> _submit;
object_ptr<Ui::FlatLabel> _title;
std::unique_ptr<Info::Profile::Badge> _badge;
object_ptr<Ui::FlatLabel> _status;
object_ptr<Ui::FlatLabel> _about;
object_ptr<Ui::FlatLabel> _aboutRequests;
std::shared_ptr<Data::PhotoMedia> _photo;
std::unique_ptr<Ui::EmptyUserpic> _photoEmpty;
std::vector<Participant> _participants;
bool _isChannel = false;
bool _requestApprove = false;
+11
View File
@@ -20,6 +20,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "history/history_item_helpers.h" // ShouldSendSilent
#include "main/main_session.h"
// AyuGram includes
#include "ayu/ayu_state.h"
namespace Api {
namespace {
@@ -148,6 +152,13 @@ void Polls::sendVotes(
_pollVotesRequestIds.erase(itemId);
hideSending();
_session->updates().applyUpdates(result);
const auto settings = &AyuSettings::getInstance();
if (!settings->sendReadMessages && settings->markReadAfterPoll && item)
{
AyuState::setAllowSendReadPacket(true);
item->history()->session().data().histories().readInboxOnNewMessage(item);
}
}).fail([=] {
_pollVotesRequestIds.erase(itemId);
hideSending();
+1 -5
View File
@@ -78,12 +78,8 @@ void SendReport(
MTP_string(comment)
)).done(std::move(done)).send();
}, [&](StoryId id) {
const auto user = peer->asUser();
if (!user) {
return;
}
peer->session().api().request(MTPstories_Report(
user->inputUser,
peer->input,
MTP_vector<MTPint>(1, MTP_int(id)),
ReasonToTL(reason),
MTP_string(comment)
@@ -15,8 +15,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_peer_values.h"
#include "apiwrap.h"
// AyuGram includes
#include "ayu/ayu_settings.h"
namespace Api {
namespace {
+2
View File
@@ -58,8 +58,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "apiwrap.h"
#include "ui/text/format_values.h" // Ui::FormatPhone
// AyuGram includes
#include "ayu/ayu_settings.h"
namespace Api {
namespace {
+1 -5
View File
@@ -17,11 +17,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
namespace Api {
namespace {
constexpr auto TestApiId = 17349;
constexpr auto SnapApiId = 611335;
constexpr auto DesktopApiId = 2040;
Websites::Entry ParseEntry(
[[nodiscard]] Websites::Entry ParseEntry(
not_null<Data::Session*> owner,
const MTPDwebAuthorization &data) {
auto result = Websites::Entry{
+54 -24
View File
@@ -100,8 +100,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "storage/storage_media_prepare.h"
#include "storage/storage_account.h"
// AyuGram includes
#include "ayu/ayu_settings.h"
namespace {
// Save draft to the cloud with 1 sec extra delay.
@@ -468,7 +470,18 @@ void ApiWrap::toggleHistoryArchived(
if (archived) {
history->setFolder(_session->data().folder(archiveId));
} else {
history->clearFolder();
const auto settings = &AyuSettings::getInstance();
if (settings->hideAllChatsFolder) {
if (const auto window = Core::App().activeWindow()) {
if (const auto controller = window->sessionController()) {
const auto filters = &_session->data().chatsFilters();
const auto lookup_id = filters->lookupId(controller->session().premium() ? 0 : 1);
controller->setActiveChatsFilter(lookup_id);
}
}
} else {
history->clearFolder();
}
}
if (const auto data = _historyArchivedRequests.take(history)) {
data->second();
@@ -778,10 +791,9 @@ QString ApiWrap::exportDirectMessageLink(
QString ApiWrap::exportDirectStoryLink(not_null<Data::Story*> story) {
const auto storyId = story->fullId();
const auto user = story->peer()->asUser();
Assert(user != nullptr);
const auto peer = story->peer();
const auto fallback = [&] {
const auto base = user->username();
const auto base = peer->userName();
const auto story = QString::number(storyId.story);
const auto query = base + "/s/" + story;
return session().createInternalLinkFull(query);
@@ -791,7 +803,7 @@ QString ApiWrap::exportDirectStoryLink(not_null<Data::Story*> story) {
? i->second
: fallback();
request(MTPstories_ExportStoryLink(
story->peer()->asUser()->inputUser,
peer->input,
MTP_int(story->id())
)).done([=](const MTPExportedStoryLink &result) {
const auto link = qs(result.data().vlink());
@@ -2438,7 +2450,13 @@ void ApiWrap::refreshFileReference(
};
v::match(origin.data, [&](Data::FileOriginMessage data) {
if (const auto item = _session->data().message(data)) {
if (item->isScheduled()) {
const auto media = item->media();
const auto storyId = media ? media->storyId() : FullStoryId();
if (storyId) {
request(MTPstories_GetStoriesByID(
_session->data().peer(storyId.peer)->input,
MTP_vector<MTPint>(1, MTP_int(storyId.story))));
} else if (item->isScheduled()) {
const auto &scheduled = _session->data().scheduledMessages();
const auto realId = scheduled.lookupId(item);
request(MTPmessages_GetScheduledMessages(
@@ -2535,14 +2553,9 @@ void ApiWrap::refreshFileReference(
}, [&](Data::FileOriginPremiumPreviews data) {
request(MTPhelp_GetPremiumPromo());
}, [&](Data::FileOriginStory data) {
const auto user = _session->data().peer(data.peerId)->asUser();
if (user) {
request(MTPstories_GetStoriesByID(
user->inputUser,
MTP_vector<MTPint>(1, MTP_int(data.storyId))));
} else {
fail();
}
request(MTPstories_GetStoriesByID(
_session->data().peer(data.peerId)->input,
MTP_vector<MTPint>(1, MTP_int(data.storyId))));
}, [&](v::null_t) {
fail();
});
@@ -3322,25 +3335,37 @@ void ApiWrap::shareContact(
const QString &phone,
const QString &firstName,
const QString &lastName,
const SendAction &action) {
const SendAction &action,
Fn<void(bool)> done) {
const auto userId = UserId(0);
sendSharedContact(phone, firstName, lastName, userId, action);
sendSharedContact(
phone,
firstName,
lastName,
userId,
action,
std::move(done));
}
void ApiWrap::shareContact(
not_null<UserData*> user,
const SendAction &action) {
const SendAction &action,
Fn<void(bool)> done) {
const auto userId = peerToUser(user->id);
const auto phone = _session->data().findContactPhone(user);
if (phone.isEmpty()) {
if (done) {
done(false);
}
return;
}
sendSharedContact(
return sendSharedContact(
phone,
user->firstName,
user->lastName,
userId,
action);
action,
std::move(done));
}
void ApiWrap::sendSharedContact(
@@ -3348,7 +3373,8 @@ void ApiWrap::sendSharedContact(
const QString &firstName,
const QString &lastName,
UserId userId,
const SendAction &action) {
const SendAction &action,
Fn<void(bool)> done) {
sendAction(action);
const auto history = action.history;
@@ -3399,7 +3425,7 @@ void ApiWrap::sendSharedContact(
MTP_string(firstName),
MTP_string(lastName),
MTP_string()); // vcard
sendMedia(item, media, action.options);
sendMedia(item, media, action.options, std::move(done));
_session->data().sendHistoryChangeNotifications();
_session->changes().historyUpdated(
@@ -3949,18 +3975,20 @@ void ApiWrap::uploadAlbumMedia(
void ApiWrap::sendMedia(
not_null<HistoryItem*> item,
const MTPInputMedia &media,
Api::SendOptions options) {
Api::SendOptions options,
Fn<void(bool)> done) {
const auto randomId = base::RandomValue<uint64>();
_session->data().registerMessageRandomId(randomId, item->fullId());
sendMediaWithRandomId(item, media, options, randomId);
sendMediaWithRandomId(item, media, options, randomId, std::move(done));
}
void ApiWrap::sendMediaWithRandomId(
not_null<HistoryItem*> item,
const MTPInputMedia &media,
Api::SendOptions options,
uint64 randomId) {
uint64 randomId,
Fn<void(bool)> done) {
// AyuGram useScheduledMessages
const auto settings = &AyuSettings::getInstance();
if (settings->useScheduledMessages && !options.scheduled)
@@ -4011,10 +4039,12 @@ void ApiWrap::sendMediaWithRandomId(
MTP_int(options.scheduled),
(options.sendAs ? options.sendAs->input : MTP_inputPeerEmpty())
), [=](const MTPUpdates &result, const MTP::Response &response) {
if (done) done(true);
if (updateRecentStickers) {
requestRecentStickersForce(true);
}
}, [=](const MTP::Error &error, const MTP::Response &response) {
if (done) done(false);
sendMessageFail(error, peer, randomId, itemId);
});
}
+12 -5
View File
@@ -294,8 +294,12 @@ public:
const QString &phone,
const QString &firstName,
const QString &lastName,
const SendAction &action);
void shareContact(not_null<UserData*> user, const SendAction &action);
const SendAction &action,
Fn<void(bool)> done = nullptr);
void shareContact(
not_null<UserData*> user,
const SendAction &action,
Fn<void(bool)> done = nullptr);
void applyAffectedMessages(
not_null<PeerData*> peer,
const MTPmessages_AffectedMessages &result);
@@ -489,7 +493,8 @@ private:
const QString &firstName,
const QString &lastName,
UserId userId,
const SendAction &action);
const SendAction &action,
Fn<void(bool)> done);
void deleteHistory(
not_null<PeerData*> peer,
@@ -516,12 +521,14 @@ private:
void sendMedia(
not_null<HistoryItem*> item,
const MTPInputMedia &media,
Api::SendOptions options);
Api::SendOptions options,
Fn<void(bool)> done = nullptr);
void sendMediaWithRandomId(
not_null<HistoryItem*> item,
const MTPInputMedia &media,
Api::SendOptions options,
uint64 randomId);
uint64 randomId,
Fn<void(bool)> done = nullptr);
FileLoadTo fileLoadTaskOptions(const SendAction &action) const;
void getTopPromotionDelayed(TimeId now, TimeId next);

Some files were not shown because too many files have changed in this diff Show More