Compare commits
327 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 084967354b | |||
| bde3caded7 | |||
| 29dd896c83 | |||
| d6457ebcc7 | |||
| c9fa0166e6 | |||
| 66b1fe7beb | |||
| 0f8187fa36 | |||
| cb3dece478 | |||
| c86ca6a61a | |||
| 8e2240d9d9 | |||
| 28acaf06ad | |||
| fe12c3639b | |||
| 0e2131e6eb | |||
| 98be0a69df | |||
| d6aecdfe4b | |||
| fa63a220fa | |||
| 2611899448 | |||
| 514ced1d8e | |||
| 1a69975131 | |||
| 27b284ef5b | |||
| a546b3a9b6 | |||
| 28d9330969 | |||
| 8c3fa14a75 | |||
| e58940a876 | |||
| ae1da5baf4 | |||
| 2542ec5d93 | |||
| dfe55b26a2 | |||
| 6de95fc4ed | |||
| 1e57563349 | |||
| 9f0b4bc799 | |||
| ac8117a6d8 | |||
| 9ef0e5cf83 | |||
| f433d6fbc9 | |||
| e24b86d460 | |||
| bfebb1339a | |||
| 49b59d73be | |||
| d41961945d | |||
| aa29d1c619 | |||
| d6d76c8477 | |||
| 6057bb2b37 | |||
| 5aaf119b36 | |||
| 8f9123bb96 | |||
| 77b2076e0f | |||
| 7681f14a3c | |||
| 4ad51ffb42 | |||
| 0f3faf59ca | |||
| d28ba4fad9 | |||
| 3f19dc0486 | |||
| fc86bb7a5f | |||
| 0da515abc5 | |||
| 4c5c2aadc4 | |||
| 17f89ba1f9 | |||
| a8de145e01 | |||
| c1d20d16fd | |||
| dc04a1afdb | |||
| 856f39c123 | |||
| 909f3bf011 | |||
| 19ab740da2 | |||
| 11ea5e61cf | |||
| 78897dd143 | |||
| 23a0413113 | |||
| b5b5c28ac5 | |||
| 5652abfd49 | |||
| 324f2f68ba | |||
| f8825e8135 | |||
| 4dbe5c0a0f | |||
| 2df6729f2d | |||
| 30d72f1d1d | |||
| db0a31b87e | |||
| 4b5e2582d9 | |||
| 6a87fef851 | |||
| 1fbcec1d24 | |||
| 25d0123b9f | |||
| 69b9d404c0 | |||
| 0865776d9a | |||
| 32008161a0 | |||
| 36a8c49213 | |||
| 91fba41e2c | |||
| 7d2d0bdfa2 | |||
| 2bb8850e69 | |||
| 1056a5cc8e | |||
| 34d0dac351 | |||
| f88eee8047 | |||
| 173a5046e8 | |||
| 44f6280d0a | |||
| b7346c203a | |||
| c3254a53bc | |||
| 5ea066e6a7 | |||
| bc6556ebc4 | |||
| 4c6d33fd54 | |||
| 96b651c29b | |||
| 0ffda016da | |||
| 43a8733fc7 | |||
| 1e26c33b3d | |||
| 4ad70965e9 | |||
| 3a67e4f1f4 | |||
| dcc326e17f | |||
| f442d69cb6 | |||
| 17fa50bdff | |||
| a04145d981 | |||
| e8c9cb7d2a | |||
| 467a6c25a8 | |||
| 1852386ace | |||
| a93340c2e4 | |||
| 4a0ee22670 | |||
| 87a042b029 | |||
| 960761ef37 | |||
| b60e50df10 | |||
| 4696f731da | |||
| 0f9d83f34b | |||
| cfc254bd90 | |||
| bdee6e0155 | |||
| ac6765ebdb | |||
| df3ae2c5f8 | |||
| 1af4af6ff3 | |||
| a92e9f7162 | |||
| 6af28f6089 | |||
| 98b8840019 | |||
| 5f5d5e43be | |||
| 1fc63407e5 | |||
| dc6cd45f50 | |||
| 8a4dd965e1 | |||
| 627322f563 | |||
| 27d9fa6acb | |||
| 7d4362267a | |||
| 1ba52402b5 | |||
| 5d0a36e456 | |||
| af6e15ed59 | |||
| 25216a140e | |||
| 65fc7d2b10 | |||
| 99da95880e | |||
| 12272a450f | |||
| 819020e515 | |||
| acb1a7ccf2 | |||
| 596460172f | |||
| baa99be6a5 | |||
| f748de9dc4 | |||
| 85e2d54a05 | |||
| f629bf76ff | |||
| f6cb9072d2 | |||
| 497aa6dbc8 | |||
| 830e9a5953 | |||
| 5cabfb56e0 | |||
| 8a19fab19c | |||
| c592b66f5b | |||
| 8ce9a92898 | |||
| df8c80226b | |||
| 53b342f722 | |||
| d2b6012bfd | |||
| 69efd127eb | |||
| 22cedbc9cc | |||
| d4d2eef291 | |||
| 98bd5757b0 | |||
| edb7cf197a | |||
| 617be49e55 | |||
| 9324ceeb24 | |||
| 1e6cf839e2 | |||
| 95f18f2120 | |||
| ae3dfacdf9 | |||
| 468d4c5e4f | |||
| c530d7cc89 | |||
| f7ea0e1d00 | |||
| aa0d733cde | |||
| b959877598 | |||
| 8d0fe601cf | |||
| a5b446f6df | |||
| 2afc171bec | |||
| d6bd88d119 | |||
| 639a82ce28 | |||
| ef1b197771 | |||
| ad05998575 | |||
| b403f600e7 | |||
| 9b2f2b104f | |||
| e4d920b148 | |||
| c5d1739e95 | |||
| a41bbd27c8 | |||
| 2d67557a91 | |||
| ca1a548fb8 | |||
| 97bd865916 | |||
| f7ab8298cf | |||
| 33cf9a0702 | |||
| 282c076931 | |||
| 135ffb13fd | |||
| 9d4e1689fa | |||
| 27e2a4b5d2 | |||
| c9cad4186b | |||
| 3522d9c62e | |||
| 43aa8825a5 | |||
| 4b28e910e8 | |||
| 4150cdff86 | |||
| 474fa56cc0 | |||
| 6ca777102c | |||
| 49d5cf939c | |||
| b56b9b1fb9 | |||
| 0293700e0f | |||
| 524a7a6a23 | |||
| b1459e41d3 | |||
| ef685aa0da | |||
| 3ac222db62 | |||
| 642b0ed032 | |||
| a7090c5fba | |||
| ebcd4eb97b | |||
| a76534b19f | |||
| ee33d139cd | |||
| c9cabfb084 | |||
| 3dd415d0c2 | |||
| 4592e4e4bb | |||
| 1cb762913c | |||
| 6eb7d68d49 | |||
| 36662c51dd | |||
| 4e915e9d1a | |||
| 86d6280776 | |||
| eea7caeb94 | |||
| b77e74de7f | |||
| 8a804fcfad | |||
| f7ad91e80c | |||
| 61a9d9c01d | |||
| e98f56b0b7 | |||
| b2eeab53c5 | |||
| d7539349c7 | |||
| 5350c97f82 | |||
| 20ba417ddd | |||
| 5b6f26af21 | |||
| ac1da83401 | |||
| 7b32e9af5e | |||
| 332ae22111 | |||
| b8c76cac61 | |||
| 150432e4d1 | |||
| d6c3760646 | |||
| 537c656ee1 | |||
| 4e0490494e | |||
| 56ad825693 | |||
| aab4ac8526 | |||
| 5c98406e1a | |||
| 3b40bc6297 | |||
| 12e164c4df | |||
| 855cc8e900 | |||
| 0a38cf2501 | |||
| 6def067e98 | |||
| a4e5ea01dc | |||
| f4cfbc5ed8 | |||
| 336705a503 | |||
| 764b0d3dcd | |||
| 72c8999e50 | |||
| 79b5f7eda9 | |||
| 6fcf80c6cf | |||
| e9a8acdc54 | |||
| 01573af0de | |||
| 69b24c494e | |||
| 2b4047b20d | |||
| 2b1a46356a | |||
| 36a91dd32b | |||
| d8e38b43d9 | |||
| d2d69a7a36 | |||
| 85fdc04d48 | |||
| 5e28b2d601 | |||
| 33f6fc7d8c | |||
| 3c8188e0b4 | |||
| 3ecf3f7c55 | |||
| fc6d4d66b7 | |||
| 2d097ca9ae | |||
| af03660cab | |||
| 986d347ea4 | |||
| 2dcd8a9640 | |||
| 5a55e850d9 | |||
| aa6edea33a | |||
| e67d2e5db2 | |||
| 67bbb477c7 | |||
| 5b0c48bb52 | |||
| e00016312e | |||
| 9df551a145 | |||
| 1852161fbf | |||
| 1851b6ff30 | |||
| 98f3fa76a2 | |||
| 6db4b8821e | |||
| 0f45abd534 | |||
| 4ad0804d55 | |||
| 9e10a80e00 | |||
| 01d9864036 | |||
| 8927a1b9a2 | |||
| b41c94be29 | |||
| 8ebf329cd9 | |||
| c3251aaf7b | |||
| d031046edb | |||
| 7808cc6d41 | |||
| a7b60c43b5 | |||
| a8b959826c | |||
| 42f96f3c43 | |||
| cc97093c5a | |||
| 7d5d086ade | |||
| 3da44eb5dd | |||
| 4955cdcdce | |||
| b806e714a6 | |||
| 597195a2e2 | |||
| 5966c74a27 | |||
| caa1ae4436 | |||
| 15ee46dab4 | |||
| acea390f3a | |||
| af5ad84e72 | |||
| 728ed02a1c | |||
| 8e369a4aa5 | |||
| 1f66e8ebeb | |||
| d0b0b02b62 | |||
| 35e457c924 | |||
| 097c3c4a5a | |||
| 10022a3c6d | |||
| 0dbb195106 | |||
| 6493cb9ed8 | |||
| 1cfda38345 | |||
| bf20dbe3bc | |||
| 46d3f232af | |||
| ade97fd2d2 | |||
| 39614aab3f | |||
| 6bab2b4df6 | |||
| b4c7272351 | |||
| d831775e2f | |||
| bde39970a0 | |||
| 076291b98f | |||
| 1341907cfd | |||
| b793c06759 | |||
| 475b2ac739 | |||
| d1c310de00 | |||
| 8615a25cd1 | |||
| de4eb1e59b | |||
| 8e8f6f905f | |||
| a57eecd420 | |||
| f306b11676 |
@@ -0,0 +1,160 @@
|
||||
name: MacOS Packaged.
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- '**.md'
|
||||
- 'changelog.txt'
|
||||
- 'LEGAL'
|
||||
- 'LICENSE'
|
||||
- '.github/**'
|
||||
- '!.github/workflows/mac_packaged.yml'
|
||||
- 'lib/xdg/**'
|
||||
- 'snap/**'
|
||||
- 'Telegram/build/**'
|
||||
- 'Telegram/Resources/uwp/**'
|
||||
- 'Telegram/Resources/winrc/**'
|
||||
- 'Telegram/SourceFiles/platform/win/**'
|
||||
- 'Telegram/SourceFiles/platform/linux/**'
|
||||
- 'Telegram/configure.bat'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- '**.md'
|
||||
- 'changelog.txt'
|
||||
- 'LEGAL'
|
||||
- 'LICENSE'
|
||||
- '.github/**'
|
||||
- '!.github/workflows/mac_packaged.yml'
|
||||
- 'lib/xdg/**'
|
||||
- 'snap/**'
|
||||
- 'Telegram/build/**'
|
||||
- 'Telegram/Resources/uwp/**'
|
||||
- 'Telegram/Resources/winrc/**'
|
||||
- 'Telegram/SourceFiles/platform/win/**'
|
||||
- 'Telegram/SourceFiles/platform/linux/**'
|
||||
- 'Telegram/configure.bat'
|
||||
|
||||
jobs:
|
||||
|
||||
macos:
|
||||
name: MacOS
|
||||
runs-on: macos-13
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
defines:
|
||||
- ""
|
||||
|
||||
env:
|
||||
GIT: "https://github.com"
|
||||
OPENALDIR: "/usr/local/opt/openal-soft"
|
||||
UPLOAD_ARTIFACT: "false"
|
||||
ONLY_CACHE: "false"
|
||||
MANUAL_CACHING: "1"
|
||||
AUTO_CACHING: "1"
|
||||
|
||||
steps:
|
||||
- name: Get repository name.
|
||||
run: echo "REPO_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
|
||||
|
||||
- name: Clone.
|
||||
uses: actions/checkout@v3.1.0
|
||||
with:
|
||||
submodules: recursive
|
||||
path: ${{ env.REPO_NAME }}
|
||||
|
||||
- name: First set up.
|
||||
run: |
|
||||
brew update
|
||||
brew upgrade || true
|
||||
brew install autoconf automake boost cmake ffmpeg openal-soft openssl opus ninja pkg-config python qt yasm xz
|
||||
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
|
||||
|
||||
xcodebuild -version > CACHE_KEY.txt
|
||||
echo $MANUAL_CACHING >> CACHE_KEY.txt
|
||||
echo "$GITHUB_WORKSPACE" >> CACHE_KEY.txt
|
||||
if [ "$AUTO_CACHING" = "1" ]; then
|
||||
thisFile=$REPO_NAME/.github/workflows/mac_packaged.yml
|
||||
echo `md5 -q $thisFile` >> CACHE_KEY.txt
|
||||
fi
|
||||
echo "CACHE_KEY=`md5 -q CACHE_KEY.txt`" >> $GITHUB_ENV
|
||||
|
||||
echo "LibrariesPath=`pwd`" >> $GITHUB_ENV
|
||||
|
||||
curl -o tg_owt-version.json https://api.github.com/repos/desktop-app/tg_owt/git/refs/heads/master
|
||||
|
||||
- name: RNNoise.
|
||||
run: |
|
||||
cd $LibrariesPath
|
||||
|
||||
git clone --depth=1 https://gitlab.xiph.org/xiph/rnnoise.git
|
||||
cd rnnoise
|
||||
./autogen.sh
|
||||
./configure --disable-examples --disable-doc
|
||||
make -j$(sysctl -n hw.logicalcpu)
|
||||
make install
|
||||
|
||||
- name: WebRTC cache.
|
||||
id: cache-webrtc
|
||||
uses: actions/cache@v3.0.11
|
||||
with:
|
||||
path: ${{ env.LibrariesPath }}/tg_owt
|
||||
key: ${{ runner.OS }}-webrtc-${{ env.CACHE_KEY }}-${{ hashFiles('**/tg_owt-version.json') }}
|
||||
- name: WebRTC.
|
||||
if: steps.cache-webrtc.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cd $LibrariesPath
|
||||
|
||||
git clone --recursive --depth=1 $GIT/desktop-app/tg_owt.git
|
||||
cd tg_owt
|
||||
|
||||
cmake -B build . -GNinja -DCMAKE_BUILD_TYPE=Debug
|
||||
cmake --build build --parallel
|
||||
|
||||
- name: Telegram Desktop build.
|
||||
if: env.ONLY_CACHE == 'false'
|
||||
env:
|
||||
tg_owt_DIR: ${{ env.LibrariesPath }}/tg_owt/build
|
||||
run: |
|
||||
cd $REPO_NAME
|
||||
|
||||
DEFINE=""
|
||||
if [ -n "${{ matrix.defines }}" ]; then
|
||||
DEFINE="-D ${{ matrix.defines }}=ON"
|
||||
echo Define from matrix: $DEFINE
|
||||
echo "ARTIFACT_NAME=Telegram_${{ matrix.defines }}" >> $GITHUB_ENV
|
||||
else
|
||||
echo "ARTIFACT_NAME=Telegram" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
cmake -Bbuild -GNinja . \
|
||||
-DCMAKE_BUILD_TYPE=Debug \
|
||||
-DCMAKE_FIND_FRAMEWORK=LAST \
|
||||
-DTDESKTOP_API_TEST=ON \
|
||||
-DDESKTOP_APP_USE_PACKAGED_LAZY=ON \
|
||||
$DEFINE
|
||||
|
||||
cmake --build build --parallel
|
||||
|
||||
cd build
|
||||
macdeployqt Telegram.app
|
||||
codesign --remove-signature Telegram.app
|
||||
|
||||
mkdir dmgsrc
|
||||
mv Telegram.app dmgsrc
|
||||
hdiutil create -volname Telegram -srcfolder dmgsrc -ov -format UDZO Telegram.dmg
|
||||
|
||||
- name: Move artifact.
|
||||
if: env.UPLOAD_ARTIFACT == 'true'
|
||||
run: |
|
||||
cd $REPO_NAME/build
|
||||
mkdir artifact
|
||||
mv Telegram.dmg artifact/
|
||||
- uses: actions/upload-artifact@master
|
||||
if: env.UPLOAD_ARTIFACT == 'true'
|
||||
name: Upload artifact.
|
||||
with:
|
||||
name: ${{ env.ARTIFACT_NAME }}
|
||||
path: ${{ env.REPO_NAME }}/build/artifact/
|
||||
@@ -1,7 +1,6 @@
|
||||
name: Windows.
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
@@ -47,10 +46,11 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
arch: [Win32]
|
||||
arch: [Win32, x64]
|
||||
generator: ["", "Ninja Multi-Config"]
|
||||
|
||||
env:
|
||||
UPLOAD_ARTIFACT: "true"
|
||||
UPLOAD_ARTIFACT: "false"
|
||||
ONLY_CACHE: "false"
|
||||
PREPARE_PATH: "Telegram/build/prepare/prepare.py"
|
||||
|
||||
@@ -110,19 +110,42 @@ jobs:
|
||||
cd %TBUILD%
|
||||
%REPO_NAME%\Telegram\build\prepare\win.bat skip-release silent
|
||||
|
||||
- name: Read defines.
|
||||
- name: Read configuration matrix.
|
||||
shell: bash
|
||||
run: |
|
||||
ARTIFACT_NAME="Telegram"
|
||||
|
||||
ARCH=""
|
||||
if [ -n "${{ matrix.arch }}" ]; then
|
||||
case "${{ matrix.arch }}" in
|
||||
Win32) ARCH="x86";;
|
||||
*) ARCH="${{ matrix.arch }}";;
|
||||
esac
|
||||
echo "Architecture from matrix: $ARCH"
|
||||
ARTIFACT_NAME="${ARTIFACT_NAME}_${{ matrix.arch }}"
|
||||
fi
|
||||
|
||||
GENERATOR=""
|
||||
if [ -n "${{ matrix.generator }}" ]; then
|
||||
GENERATOR="-G \"${{ matrix.generator }}\""
|
||||
echo "Generator from matrix: $GENERATOR"
|
||||
ARTIFACT_NAME="${ARTIFACT_NAME}_${{ matrix.generator }}"
|
||||
fi
|
||||
echo "TDESKTOP_BUILD_GENERATOR=$GENERATOR" >> $GITHUB_ENV
|
||||
|
||||
[ -n "$GENERATOR" ] && ARCH=""
|
||||
echo "TDESKTOP_BUILD_ARCH=$ARCH" >> $GITHUB_ENV
|
||||
|
||||
DEFINE=""
|
||||
if [ -n "${{ matrix.defines }}" ]; then
|
||||
DEFINE="-D ${{ matrix.defines }}=ON"
|
||||
echo "Define from matrix: $DEFINE"
|
||||
echo "ARTIFACT_NAME=Telegram_${{ matrix.arch }}_${{ matrix.defines }}" >> $GITHUB_ENV
|
||||
else
|
||||
echo "ARTIFACT_NAME=Telegram_${{ matrix.arch }}" >> $GITHUB_ENV
|
||||
ARTIFACT_NAME="${ARTIFACT_NAME}_${{ matrix.defines }}"
|
||||
fi
|
||||
echo "TDESKTOP_BUILD_DEFINE=$DEFINE" >> $GITHUB_ENV
|
||||
|
||||
echo "ARTIFACT_NAME=$ARTIFACT_NAME" >> $GITHUB_ENV
|
||||
|
||||
API="-D TDESKTOP_API_TEST=ON"
|
||||
if [ $GITHUB_REF == 'refs/heads/nightly' ]; then
|
||||
echo "Use the open credentials."
|
||||
@@ -143,50 +166,23 @@ jobs:
|
||||
cd %TBUILD%\%REPO_NAME%\Telegram
|
||||
|
||||
call configure.bat ^
|
||||
${{ matrix.arch }} ^
|
||||
%TDESKTOP_BUILD_GENERATOR% ^
|
||||
%TDESKTOP_BUILD_ARCH% ^
|
||||
%TDESKTOP_BUILD_API% ^
|
||||
-D DESKTOP_APP_DISABLE_CRASH_REPORTS=OFF ^
|
||||
-D DESKTOP_APP_NO_PDB=ON ^
|
||||
%TDESKTOP_BUILD_DEFINE% ^
|
||||
-DCMAKE_SYSTEM_VERSION=%SDK%
|
||||
%TDESKTOP_BUILD_DEFINE%
|
||||
|
||||
cd ..\out
|
||||
msbuild -m Telegram.sln /p:Configuration=Debug,Platform=${{ matrix.arch }},DebugSymbols=false,DebugType=none
|
||||
cmake --build ..\out --config Debug --parallel
|
||||
|
||||
- name: Move artifact.
|
||||
if: (env.UPLOAD_ARTIFACT == 'true') || ${{ github.ref == 'refs/heads/nightly' }}
|
||||
if: (env.UPLOAD_ARTIFACT == 'true') || (github.ref == 'refs/heads/nightly')
|
||||
run: |
|
||||
mkdir artifact
|
||||
move %TBUILD%\%REPO_NAME%\out\Debug\AyuGram.exe artifact/
|
||||
move %TBUILD%\%REPO_NAME%\out\Debug\Telegram.exe artifact/
|
||||
- uses: actions/upload-artifact@master
|
||||
name: Upload artifact.
|
||||
if: (env.UPLOAD_ARTIFACT == 'true') || ${{ github.ref == 'refs/heads/nightly' }}
|
||||
if: (env.UPLOAD_ARTIFACT == 'true') || (github.ref == 'refs/heads/nightly')
|
||||
with:
|
||||
name: ${{ env.ARTIFACT_NAME }}
|
||||
path: artifact\
|
||||
|
||||
release:
|
||||
name: Release
|
||||
needs: [windows]
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: true
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Merge Releases
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: Telegram_Win32
|
||||
path: artifact
|
||||
|
||||
- name: Upload release
|
||||
uses: Hs1r1us/Release-AIO@v1.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
# The name of the tag
|
||||
tag_name: prelease-${{ github.run_number }}
|
||||
prerelease: true
|
||||
release_name: Ayugram CI
|
||||
asset_files: './artifact'
|
||||
|
||||
@@ -76,9 +76,6 @@
|
||||
[submodule "Telegram/lib_webview"]
|
||||
path = Telegram/lib_webview
|
||||
url = https://github.com/desktop-app/lib_webview.git
|
||||
[submodule "Telegram/ThirdParty/jemalloc"]
|
||||
path = Telegram/ThirdParty/jemalloc
|
||||
url = https://github.com/jemalloc/jemalloc
|
||||
[submodule "Telegram/ThirdParty/dispatch"]
|
||||
path = Telegram/ThirdParty/dispatch
|
||||
url = https://github.com/apple/swift-corelibs-libdispatch
|
||||
|
||||
@@ -10,8 +10,9 @@ if (APPLE)
|
||||
else()
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
endif()
|
||||
cmake_policy(SET CMP0076 NEW)
|
||||
cmake_policy(SET CMP0091 NEW)
|
||||
if (POLICY CMP0149)
|
||||
cmake_policy(SET CMP0149 NEW)
|
||||
endif()
|
||||
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
@@ -59,9 +60,9 @@ include(cmake/options.cmake)
|
||||
|
||||
if (NOT DESKTOP_APP_USE_PACKAGED)
|
||||
if (WIN32)
|
||||
set(qt_version 5.15.10)
|
||||
set(qt_version 5.15.11)
|
||||
elseif (APPLE)
|
||||
set(qt_version 6.2.5)
|
||||
set(qt_version 6.2.6)
|
||||
endif()
|
||||
endif()
|
||||
include(cmake/external/qt/package.cmake)
|
||||
|
||||
@@ -197,6 +197,8 @@ PRIVATE
|
||||
api/api_messages_search.h
|
||||
api/api_messages_search_merged.cpp
|
||||
api/api_messages_search_merged.h
|
||||
api/api_peer_colors.cpp
|
||||
api/api_peer_colors.h
|
||||
api/api_peer_photo.cpp
|
||||
api/api_peer_photo.h
|
||||
api/api_polls.cpp
|
||||
@@ -288,6 +290,8 @@ PRIVATE
|
||||
boxes/peers/peer_short_info_box.h
|
||||
boxes/peers/prepare_short_info_box.cpp
|
||||
boxes/peers/prepare_short_info_box.h
|
||||
boxes/peers/replace_boost_box.cpp
|
||||
boxes/peers/replace_boost_box.h
|
||||
boxes/about_box.cpp
|
||||
boxes/about_box.h
|
||||
boxes/about_sponsored_box.cpp
|
||||
@@ -445,16 +449,18 @@ PRIVATE
|
||||
chat_helpers/gifs_list_widget.h
|
||||
chat_helpers/message_field.cpp
|
||||
chat_helpers/message_field.h
|
||||
chat_helpers/share_message_phrase_factory.cpp
|
||||
chat_helpers/share_message_phrase_factory.h
|
||||
chat_helpers/spellchecker_common.cpp
|
||||
chat_helpers/spellchecker_common.h
|
||||
chat_helpers/stickers_dice_pack.cpp
|
||||
chat_helpers/stickers_dice_pack.h
|
||||
chat_helpers/stickers_emoji_image_loader.cpp
|
||||
chat_helpers/stickers_emoji_image_loader.h
|
||||
chat_helpers/stickers_emoji_pack.cpp
|
||||
chat_helpers/stickers_emoji_pack.h
|
||||
chat_helpers/stickers_gift_box_pack.cpp
|
||||
chat_helpers/stickers_gift_box_pack.h
|
||||
chat_helpers/stickers_dice_pack.cpp
|
||||
chat_helpers/stickers_dice_pack.h
|
||||
chat_helpers/stickers_list_footer.cpp
|
||||
chat_helpers/stickers_list_footer.h
|
||||
chat_helpers/stickers_list_widget.cpp
|
||||
@@ -776,6 +782,8 @@ PRIVATE
|
||||
history/view/media/history_view_premium_gift.h
|
||||
history/view/media/history_view_service_box.cpp
|
||||
history/view/media/history_view_service_box.h
|
||||
history/view/media/history_view_similar_channels.cpp
|
||||
history/view/media/history_view_similar_channels.h
|
||||
history/view/media/history_view_slot_machine.cpp
|
||||
history/view/media/history_view_slot_machine.h
|
||||
history/view/media/history_view_sticker.cpp
|
||||
@@ -837,6 +845,8 @@ PRIVATE
|
||||
history/view/history_view_quick_action.h
|
||||
history/view/history_view_replies_section.cpp
|
||||
history/view/history_view_replies_section.h
|
||||
history/view/history_view_reply.cpp
|
||||
history/view/history_view_reply.h
|
||||
history/view/history_view_requests_bar.cpp
|
||||
history/view/history_view_requests_bar.h
|
||||
history/view/history_view_schedule_box.cpp
|
||||
@@ -849,6 +859,8 @@ PRIVATE
|
||||
history/view/history_view_service_message.h
|
||||
history/view/history_view_spoiler_click_handler.cpp
|
||||
history/view/history_view_spoiler_click_handler.h
|
||||
history/view/history_view_sponsored_click_handler.cpp
|
||||
history/view/history_view_sponsored_click_handler.h
|
||||
history/view/history_view_sticker_toast.cpp
|
||||
history/view/history_view_sticker_toast.h
|
||||
history/view/history_view_transcribe_button.cpp
|
||||
@@ -891,6 +903,10 @@ PRIVATE
|
||||
history/history_view_highlight_manager.h
|
||||
history/history_widget.cpp
|
||||
history/history_widget.h
|
||||
info/boosts/giveaway/giveaway_list_controllers.cpp
|
||||
info/boosts/giveaway/giveaway_list_controllers.h
|
||||
info/boosts/create_giveaway_box.cpp
|
||||
info/boosts/create_giveaway_box.h
|
||||
info/boosts/info_boosts_inner_widget.cpp
|
||||
info/boosts/info_boosts_inner_widget.h
|
||||
info/boosts/info_boosts_widget.cpp
|
||||
@@ -950,6 +966,8 @@ PRIVATE
|
||||
info/profile/info_profile_widget.h
|
||||
info/settings/info_settings_widget.cpp
|
||||
info/settings/info_settings_widget.h
|
||||
info/similar_channels/info_similar_channels_widget.cpp
|
||||
info/similar_channels/info_similar_channels_widget.h
|
||||
info/statistics/info_statistics_common.h
|
||||
info/statistics/info_statistics_inner_widget.cpp
|
||||
info/statistics/info_statistics_inner_widget.h
|
||||
@@ -1087,6 +1105,8 @@ PRIVATE
|
||||
media/stories/media_stories_recent_views.h
|
||||
media/stories/media_stories_reply.cpp
|
||||
media/stories/media_stories_reply.h
|
||||
media/stories/media_stories_repost_view.cpp
|
||||
media/stories/media_stories_repost_view.h
|
||||
media/stories/media_stories_share.cpp
|
||||
media/stories/media_stories_share.h
|
||||
media/stories/media_stories_sibling.cpp
|
||||
@@ -1337,8 +1357,8 @@ PRIVATE
|
||||
settings/settings_calls.h
|
||||
settings/settings_codes.cpp
|
||||
settings/settings_codes.h
|
||||
settings/settings_common.cpp
|
||||
settings/settings_common.h
|
||||
settings/settings_common_session.cpp
|
||||
settings/settings_common_session.h
|
||||
settings/settings_experimental.cpp
|
||||
settings/settings_experimental.h
|
||||
settings/settings_folders.cpp
|
||||
@@ -1498,6 +1518,7 @@ PRIVATE
|
||||
window/window_section_common.h
|
||||
window/window_session_controller.cpp
|
||||
window/window_session_controller.h
|
||||
window/window_session_controller_link_info.h
|
||||
window/window_slide_animation.cpp
|
||||
window/window_slide_animation.h
|
||||
window/window_top_bar_wrap.h
|
||||
@@ -1609,7 +1630,39 @@ elseif (APPLE)
|
||||
endif()
|
||||
|
||||
set(icons_path ${CMAKE_CURRENT_SOURCE_DIR}/Telegram/Images.xcassets)
|
||||
target_add_resource(Telegram ${icons_path})
|
||||
if (CMAKE_GENERATOR STREQUAL Xcode)
|
||||
target_add_resource(Telegram ${icons_path})
|
||||
else()
|
||||
set(icon_path ${icons_path}/Icon.iconset)
|
||||
find_program(ICONUTIL iconutil)
|
||||
find_program(PNG2ICNS png2icns)
|
||||
if (ICONUTIL)
|
||||
add_custom_command(
|
||||
OUTPUT Icon.icns
|
||||
COMMAND ${ICONUTIL}
|
||||
ARGS
|
||||
--convert icns
|
||||
--output Icon.icns
|
||||
${icon_path}
|
||||
)
|
||||
elseif (PNG2ICNS)
|
||||
add_custom_command(
|
||||
OUTPUT Icon.icns
|
||||
COMMAND ${PNG2ICNS}
|
||||
ARGS
|
||||
Icon.icns
|
||||
${icon_path}/icon_16x16.png
|
||||
${icon_path}/icon_32x32.png
|
||||
${icon_path}/icon_128x128.png
|
||||
${icon_path}/icon_256x256.png
|
||||
${icon_path}/icon_512x512.png
|
||||
)
|
||||
endif()
|
||||
if (ICONUTIL OR PNG2ICNS)
|
||||
set_source_files_properties(Icon.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
||||
target_add_resource(Telegram Icon.icns)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(lang_packs
|
||||
en
|
||||
@@ -1636,24 +1689,17 @@ elseif (APPLE)
|
||||
COMMAND cp ${CMAKE_BINARY_DIR}/lib_ui.rcc $<TARGET_FILE_DIR:Telegram>/../Resources
|
||||
COMMAND cp ${CMAKE_BINARY_DIR}/lib_spellcheck.rcc $<TARGET_FILE_DIR:Telegram>/../Resources
|
||||
)
|
||||
if (NOT build_macstore)
|
||||
if (NOT build_macstore AND NOT DESKTOP_APP_DISABLE_CRASH_REPORTS)
|
||||
if (DESKTOP_APP_MAC_ARCH STREQUAL "x86_64" OR DESKTOP_APP_MAC_ARCH STREQUAL "arm64")
|
||||
set(crashpad_dir_part ".${DESKTOP_APP_MAC_ARCH}")
|
||||
else()
|
||||
set(crashpad_dir_part "")
|
||||
endif()
|
||||
add_custom_command(TARGET Telegram
|
||||
PRE_LINK
|
||||
COMMAND mkdir -p $<TARGET_FILE_DIR:Telegram>/../Frameworks
|
||||
COMMAND cp $<TARGET_FILE:Updater> $<TARGET_FILE_DIR:Telegram>/../Frameworks/
|
||||
COMMAND mkdir -p $<TARGET_FILE_DIR:Telegram>/../Helpers
|
||||
COMMAND cp ${libs_loc}/crashpad/out/$<IF:$<CONFIG:Debug>,Debug,Release>${crashpad_dir_part}/crashpad_handler $<TARGET_FILE_DIR:Telegram>/../Helpers/
|
||||
)
|
||||
if (NOT DESKTOP_APP_DISABLE_CRASH_REPORTS)
|
||||
if (DESKTOP_APP_MAC_ARCH STREQUAL "x86_64" OR DESKTOP_APP_MAC_ARCH STREQUAL "arm64")
|
||||
set(crashpad_dir_part ".${DESKTOP_APP_MAC_ARCH}")
|
||||
else()
|
||||
set(crashpad_dir_part "")
|
||||
endif()
|
||||
add_custom_command(TARGET Telegram
|
||||
PRE_LINK
|
||||
COMMAND mkdir -p $<TARGET_FILE_DIR:Telegram>/../Helpers
|
||||
COMMAND cp ${libs_loc}/crashpad/out/$<IF:$<CONFIG:Debug>,Debug,Release>${crashpad_dir_part}/crashpad_handler $<TARGET_FILE_DIR:Telegram>/../Helpers/
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
target_link_libraries(Telegram
|
||||
@@ -1702,7 +1748,11 @@ if (build_macstore)
|
||||
COMMAND rm -rf $<TARGET_FILE_DIR:Telegram>/../Frameworks/Breakpad.framework/Resources/Inspector
|
||||
)
|
||||
else()
|
||||
set(bundle_identifier "com.tdesktop.Telegram$<$<CONFIG:Debug>:Debug>")
|
||||
if (CMAKE_GENERATOR STREQUAL Xcode)
|
||||
set(bundle_identifier "com.tdesktop.Telegram$<$<CONFIG:Debug>:Debug>")
|
||||
else()
|
||||
set(bundle_identifier "com.tdesktop.Telegram")
|
||||
endif()
|
||||
set(bundle_entitlements "Telegram.entitlements")
|
||||
if (LINUX AND DESKTOP_APP_USE_PACKAGED)
|
||||
set(output_name "ayugram-desktop")
|
||||
@@ -1711,6 +1761,12 @@ else()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (CMAKE_GENERATOR STREQUAL Xcode)
|
||||
set(bundle_identifier_plist "$(PRODUCT_BUNDLE_IDENTIFIER)")
|
||||
else()
|
||||
set(bundle_identifier_plist ${bundle_identifier})
|
||||
endif()
|
||||
|
||||
set_target_properties(Telegram PROPERTIES
|
||||
OUTPUT_NAME ${output_name}
|
||||
MACOSX_BUNDLE_GUI_IDENTIFIER ${bundle_identifier}
|
||||
@@ -1755,6 +1811,10 @@ endif()
|
||||
set_target_properties(Telegram PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${output_folder})
|
||||
|
||||
if (WIN32)
|
||||
target_link_libraries(Telegram
|
||||
PRIVATE
|
||||
delayimp
|
||||
)
|
||||
target_link_options(Telegram
|
||||
PRIVATE
|
||||
/DELAYLOAD:secur32.dll
|
||||
@@ -1784,7 +1844,7 @@ endif()
|
||||
|
||||
target_prepare_qrc(Telegram)
|
||||
|
||||
if ((NOT DESKTOP_APP_DISABLE_AUTOUPDATE OR APPLE) AND NOT build_macstore AND NOT build_winstore)
|
||||
if (NOT DESKTOP_APP_DISABLE_AUTOUPDATE AND NOT build_macstore AND NOT build_winstore)
|
||||
add_executable(Updater WIN32)
|
||||
init_non_host_target(Updater)
|
||||
|
||||
@@ -1811,6 +1871,10 @@ if ((NOT DESKTOP_APP_DISABLE_AUTOUPDATE OR APPLE) AND NOT build_macstore AND NOT
|
||||
)
|
||||
target_include_directories(Updater PRIVATE ${lib_base_loc})
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
target_link_libraries(Updater
|
||||
PRIVATE
|
||||
delayimp
|
||||
)
|
||||
target_link_options(Updater
|
||||
PRIVATE
|
||||
/DELAYLOAD:user32.dll
|
||||
@@ -1822,6 +1886,12 @@ if ((NOT DESKTOP_APP_DISABLE_AUTOUPDATE OR APPLE) AND NOT build_macstore AND NOT
|
||||
else()
|
||||
target_link_options(Updater PRIVATE -municode)
|
||||
endif()
|
||||
elseif (APPLE)
|
||||
add_custom_command(TARGET Updater
|
||||
PRE_LINK
|
||||
COMMAND mkdir -p $<TARGET_FILE_DIR:Telegram>/../Frameworks
|
||||
COMMAND cp $<TARGET_FILE:Updater> $<TARGET_FILE_DIR:Telegram>/../Frameworks/
|
||||
)
|
||||
endif()
|
||||
|
||||
if (DESKTOP_APP_SPECIAL_TARGET)
|
||||
@@ -1875,6 +1945,7 @@ if (LINUX AND DESKTOP_APP_USE_PACKAGED)
|
||||
install(FILES "Resources/art/icon128.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/128x128/apps" RENAME "ayugram.png")
|
||||
install(FILES "Resources/art/icon256.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/256x256/apps" RENAME "ayugram.png")
|
||||
install(FILES "Resources/art/icon512.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/512x512/apps" RENAME "ayugram.png")
|
||||
install(FILES "Resources/icons/tray_monochrome.svg" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/symbolic/apps" RENAME "telegram-symbolic.svg")
|
||||
install(FILES "../lib/xdg/ayugram.desktop.desktop" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications")
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ayugram.desktop.service" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/dbus-1/services")
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ayugram.desktop.metainfo.xml" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/metainfo")
|
||||
|
||||
|
After Width: | Height: | Size: 324 B |
|
After Width: | Height: | Size: 521 B |
|
After Width: | Height: | Size: 692 B |
|
After Width: | Height: | Size: 613 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 621 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 727 B |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 386 B |
|
After Width: | Height: | Size: 630 B |
|
After Width: | Height: | Size: 841 B |
|
After Width: | Height: | Size: 368 B |
|
After Width: | Height: | Size: 648 B |
|
After Width: | Height: | Size: 864 B |
|
Before Width: | Height: | Size: 438 B After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 785 B After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 402 B After Width: | Height: | Size: 759 B |
|
Before Width: | Height: | Size: 858 B After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 829 B |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 593 B |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 676 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 711 B |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 661 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 266 B |
|
After Width: | Height: | Size: 358 B |
|
After Width: | Height: | Size: 489 B |
|
After Width: | Height: | Size: 261 B |
|
After Width: | Height: | Size: 399 B |
|
After Width: | Height: | Size: 557 B |
|
After Width: | Height: | Size: 277 B |
|
After Width: | Height: | Size: 474 B |
|
After Width: | Height: | Size: 619 B |
|
After Width: | Height: | Size: 324 B |
|
After Width: | Height: | Size: 610 B |
|
After Width: | Height: | Size: 890 B |
|
After Width: | Height: | Size: 239 B |
|
After Width: | Height: | Size: 416 B |
|
After Width: | Height: | Size: 554 B |
|
After Width: | Height: | Size: 470 B |
|
After Width: | Height: | Size: 899 B |
|
After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 280 B After Width: | Height: | Size: 141 B |
|
Before Width: | Height: | Size: 519 B After Width: | Height: | Size: 151 B |
|
Before Width: | Height: | Size: 721 B After Width: | Height: | Size: 182 B |
|
After Width: | Height: | Size: 481 B |
|
After Width: | Height: | Size: 780 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 357 B After Width: | Height: | Size: 622 B |
|
Before Width: | Height: | Size: 603 B After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 822 B After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 745 B |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 913 B |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 383 B After Width: | Height: | Size: 599 B |
|
Before Width: | Height: | Size: 593 B After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 806 B After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 497 B |
|
After Width: | Height: | Size: 976 B |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 465 B |
|
After Width: | Height: | Size: 855 B |
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="plane" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<path d="M1.3311718,6.36592184 C5.3576954,4.67244493 8.04267511,3.5560013 9.38611094,3.01659096 C13.2218932,1.47646481 14.0189359,1.2089284 14.5384372,1.2 C14.6526967,1.19815119 14.9081723,1.22548649 15.0736587,1.35511219 C15.2133922,1.4645656 15.2518384,1.61242159 15.2702362,1.71619544 C15.288634,1.81996929 15.3115436,2.05636876 15.2933322,2.24108442 C15.0854698,4.34939964 14.1860526,9.46572464 13.7284802,11.8270738 C13.5348641,12.8262491 13.1536281,13.1612675 12.7845475,13.1940535 C11.9824498,13.265305 11.3733733,12.6823476 10.5965026,12.190753 C9.3808532,11.4215044 8.69408865,10.9426448 7.51409044,10.1920004 C6.15039834,9.32450079 7.03442319,8.84770795 7.81158733,8.06849502 C8.01497489,7.86457129 11.5490353,4.7615061 11.6174372,4.48000946 C11.625992,4.44480359 11.6339313,4.31357282 11.5531696,4.24427815 C11.472408,4.17498349 11.3532107,4.19867957 11.2671947,4.21752527 C11.1452695,4.24423848 9.20325394,5.48334063 5.44114787,7.93483171 C4.88991321,8.30022994 4.39062196,8.47826423 3.94327414,8.46893456 C3.45010907,8.45864936 2.50145729,8.19975808 1.79623221,7.97846422 C0.931244952,7.70703829 0.243770289,7.56353344 0.303633888,7.10256824 C0.334814555,6.86246904 0.677327192,6.61692024 1.3311718,6.36592184 Z" id="Path-3" fill="#FFFFFF"></path>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
@@ -546,6 +546,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_settings_workmode_tray" = "Show tray icon";
|
||||
"lng_settings_workmode_window" = "Show taskbar icon";
|
||||
"lng_settings_close_to_taskbar" = "Close to taskbar";
|
||||
"lng_settings_monochrome_icon" = "Use monochrome icon";
|
||||
"lng_settings_window_system" = "Window title";
|
||||
"lng_settings_title_chat_name" = "Show chat name";
|
||||
"lng_settings_title_account_name" = "Show active account";
|
||||
@@ -838,6 +839,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_background_dimming" = "Background dimming";
|
||||
"lng_background_sure_reset_default" = "Are you sure you want to reset the wallpaper?";
|
||||
"lng_background_reset_default" = "Reset";
|
||||
"lng_background_apply_me" = "Apply for me";
|
||||
"lng_background_apply_both" = "Apply for me and {user}";
|
||||
|
||||
"lng_download_path_ask" = "Ask download path for each file";
|
||||
"lng_download_path" = "Download path";
|
||||
@@ -1174,6 +1177,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_profile_bot_privacy" = "Bot Privacy Policy";
|
||||
"lng_profile_common_groups#one" = "{count} group in common";
|
||||
"lng_profile_common_groups#other" = "{count} groups in common";
|
||||
"lng_profile_similar_channels#one" = "{count} similar channel";
|
||||
"lng_profile_similar_channels#other" = "{count} similar channels";
|
||||
"lng_profile_participants_section" = "Members";
|
||||
"lng_profile_subscribers_section" = "Subscribers";
|
||||
"lng_profile_add_contact" = "Add Contact";
|
||||
@@ -1346,6 +1351,13 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_manage_peer_reactions_none_about" = "Members of the group can't add any reactions to messages.";
|
||||
"lng_manage_peer_reactions_some_title" = "Only allow these reactions";
|
||||
"lng_manage_peer_reactions_available" = "Available reactions";
|
||||
"lng_manage_peer_reactions_own" = "You can also {link} emoji packs and use them as reactions.";
|
||||
"lng_manage_peer_reactions_own_link" = "create your own";
|
||||
"lng_manage_peer_reactions_level#one" = "Your channel needs to reach level **{count}** to use **{same_count}** custom reaction.";
|
||||
"lng_manage_peer_reactions_level#other" = "Your channel needs to reach level **{count}** to use **{same_count}** custom reactions.";
|
||||
"lng_manage_peer_reactions_boost" = "Boost your channel {link}.";
|
||||
"lng_manage_peer_reactions_boost_link" = "here";
|
||||
"lng_manage_peer_reactions_limit" = "Channels can't have more custom reactions.";
|
||||
|
||||
"lng_manage_peer_antispam" = "Aggressive Anti-Spam";
|
||||
"lng_manage_peer_antispam_about" = "Telegram will filter more spam but may occasionally affect ordinary messages. You can report False Positives in Recent Actions.";
|
||||
@@ -1640,11 +1652,13 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"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_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_both_me" = "You set a new wallpaper for {user} and you.";
|
||||
"lng_action_set_wallpaper_button" = "View Wallpaper";
|
||||
"lng_action_set_same_wallpaper_me" = "You set the same wallpaper for this chat";
|
||||
"lng_action_set_same_wallpaper" = "{user} set the same wallpaper for this chat";
|
||||
"lng_action_set_wallpaper_remove" = "Remove";
|
||||
"lng_action_set_same_wallpaper_me" = "You set the same wallpaper for this chat.";
|
||||
"lng_action_set_same_wallpaper" = "{user} set the same wallpaper for this chat.";
|
||||
"lng_action_topic_created_inside" = "Topic created";
|
||||
"lng_action_topic_closed_inside" = "Topic closed";
|
||||
"lng_action_topic_reopened_inside" = "Topic reopened";
|
||||
@@ -1666,6 +1680,18 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_action_story_mention_me_unavailable" = "The story where you mentioned {user} is no longer available.";
|
||||
"lng_action_story_mention_unavailable" = "The story where {user} mentioned you is no longer available.";
|
||||
"lng_action_giveaway_started" = "{from} just started a giveaway of Telegram Premium subscriptions to its followers.";
|
||||
"lng_action_giveaway_results#one" = "{count} winner of the giveaway was randomly selected by Telegram and received private messages with giftcodes.";
|
||||
"lng_action_giveaway_results#other" = "{count} winners of the giveaway were randomly selected by Telegram and received private messages with giftcodes.";
|
||||
"lng_action_giveaway_results_some" = "Some winners of the giveaway was randomly selected by Telegram and received private messages with giftcodes.";
|
||||
"lng_action_giveaway_results_none" = "No winners of the giveaway could be selected.";
|
||||
|
||||
"lng_similar_channels_title" = "Similar channels";
|
||||
"lng_similar_channels_view_all" = "View all";
|
||||
"lng_similar_channels_more" = "More Channels";
|
||||
"lng_similar_channels_premium_all#one" = "Subscribe to {link} to unlock up to **{count}** similar channel.";
|
||||
"lng_similar_channels_premium_all#other" = "Subscribe to {link} to unlock up to **{count}** similar channels.";
|
||||
"lng_similar_channels_premium_all_link" = "Telegram Premium";
|
||||
"lng_similar_channels_show_more" = "Show more channels";
|
||||
|
||||
"lng_premium_gift_duration_months#one" = "for {count} month";
|
||||
"lng_premium_gift_duration_months#other" = "for {count} months";
|
||||
@@ -1807,8 +1833,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_forwarded_hidden" = "The account was hidden by the user.";
|
||||
"lng_forwarded_imported" = "This message was imported from another app. It may not be real.";
|
||||
"lng_signed_author" = "Author: {user}";
|
||||
"lng_sponsored" = "sponsored";
|
||||
"lng_recommended" = "recommended";
|
||||
"lng_sponsored_message_title" = "Sponsored";
|
||||
"lng_recommended_message_title" = "Recommended";
|
||||
"lng_edited" = "edited";
|
||||
"lng_edited_date" = "Edited: {date}";
|
||||
"lng_sent_date" = "Sent: {date}";
|
||||
@@ -1920,6 +1946,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_premium_summary_subtitle_gift#other" = "{user} has gifted you a {count}-months subscription for Telegram Premium.";
|
||||
"lng_premium_summary_subtitle_gift_me#one" = "You gifted {user} a {count}-month subscription for Telegram Premium.";
|
||||
"lng_premium_summary_subtitle_gift_me#other" = "You gifted {user} a {count}-months subscription for Telegram Premium.";
|
||||
"lng_premium_summary_subtitle_wallpapers" = "Wallpapers for Both Sides";
|
||||
"lng_premium_summary_about_wallpapers" = "Set custom wallpapers for you and your chat partner.";
|
||||
"lng_premium_summary_subtitle_stories" = "Upgraded Stories";
|
||||
"lng_premium_summary_about_stories" = "Priority order, stealth mode, permanent views history and more.";
|
||||
"lng_premium_summary_subtitle_double_limits" = "Doubled Limits";
|
||||
@@ -2029,6 +2057,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_premium_gift_terms_link" = "here";
|
||||
|
||||
"lng_boost_channel_button" = "Boost Channel";
|
||||
"lng_boost_again_button" = "Boost Again";
|
||||
"lng_boost_level#one" = "Level {count}";
|
||||
"lng_boost_level#other" = "Level {count}";
|
||||
"lng_boost_channel_title_first" = "Enable stories for channel";
|
||||
@@ -2050,6 +2079,11 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"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_need_more" = "More boosts needed";
|
||||
"lng_boost_need_more_text#one" = "To boost {channel}, gift **Telegram Premium** to a friend and get **{count}** boosts.";
|
||||
"lng_boost_need_more_text#other" = "To boost {channel}, gift **Telegram Premium** to a friend and get **{count}** boosts.";
|
||||
"lng_boost_need_more_again#one" = "To boost {channel} again, gift **Telegram Premium** to a friend and get **{count}** additional boost.";
|
||||
"lng_boost_need_more_again#other" = "To boost {channel} again, gift **Telegram Premium** to a friend and get **{count}** additional boosts.";
|
||||
"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!";
|
||||
@@ -2059,10 +2093,28 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"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_boost_reassign_title" = "Reassign boost";
|
||||
"lng_boost_reassign_text" = "To boost {channel}, reassign a previous boost or {gift}.";
|
||||
"lng_boost_reassign_gift#one" = "gift **Telegram Premium** to a friend to get **{count}** additional boost";
|
||||
"lng_boost_reassign_gift#other" = "gift **Telegram Premium** to a friend to get **{count}** additional boosts";
|
||||
"lng_boost_remove_title" = "Remove your boost from";
|
||||
"lng_boost_reassign_button" = "Reassign";
|
||||
"lng_boost_available_in" = "available in {duration}";
|
||||
"lng_boost_available_in_toast#one" = "Wait until the boost is available or get **{count}** more boost by gifting a **Telegram Premium** subscription.";
|
||||
"lng_boost_available_in_toast#other" = "Wait until the boost is available or get **{count}** more boosts by gifting a **Telegram Premium** subscription.";
|
||||
"lng_boost_reassign_done#one" = "{count} boost is reassigned from {channels}.";
|
||||
"lng_boost_reassign_done#other" = "{count} boosts are reassigned from {channels}.";
|
||||
"lng_boost_reassign_channels#one" = "{count} channel";
|
||||
"lng_boost_reassign_channels#other" = "{count} channels";
|
||||
|
||||
"lng_boost_channel_title_color" = "Enable colors";
|
||||
"lng_boost_channel_needs_level_color#one" = "Your channel needs to reach **Level {count}** to change channel color.";
|
||||
"lng_boost_channel_needs_level_color#other" = "Your channel needs to reach **Level {count}** to change channel color.";
|
||||
|
||||
"lng_boost_channel_title_reactions" = "Custom reactions";
|
||||
"lng_boost_channel_needs_level_reactions#one" = "Your channel needs to reach **Level {count}** to add **{same_count}** custom emoji as a reaction.";
|
||||
"lng_boost_channel_needs_level_reactions#other" = "Your channel needs to reach **Level {count}** to add **{same_count}** custom emoji as reactions.";
|
||||
|
||||
"lng_boost_channel_ask" = "Ask your **Premium** subscribers to boost your channel with this link:";
|
||||
"lng_boost_channel_ask_button" = "Copy Link";
|
||||
"lng_boost_channel_or" = "or";
|
||||
@@ -2077,9 +2129,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_giveaway_award_subtitle" = "Select recipients >";
|
||||
"lng_giveaway_award_chosen#one" = "{count} recipient >";
|
||||
"lng_giveaway_award_chosen#other" = "{count} recipients >";
|
||||
"lng_giveaway_quantity_title" = "Quantity of prizes / boosts";
|
||||
"lng_giveaway_quantity#one" = "{count} Subscription / Boost";
|
||||
"lng_giveaway_quantity#other" = "{count} Subscriptions / Boosts";
|
||||
"lng_giveaway_quantity_title" = "Quantity of prizes";
|
||||
"lng_giveaway_quantity#one" = "{count} boost";
|
||||
"lng_giveaway_quantity#other" = "{count} boosts";
|
||||
"lng_giveaway_quantity_about" = "Choose how many Premium subscriptions to give away and boosts to receive.";
|
||||
"lng_giveaway_channels_title" = "Channels included in the giveaway";
|
||||
"lng_giveaway_channels_this#one" = "this channel will receive {count} boost";
|
||||
@@ -2088,10 +2140,15 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_giveaway_channels_about" = "Choose the channels the users need to join to take part in the giveaway.";
|
||||
"lng_giveaway_users_title" = "Users eligible for the giveaway";
|
||||
"lng_giveaway_users_all" = "All subscribers";
|
||||
"lng_giveaway_users_from_all_countries" = "from all countries";
|
||||
"lng_giveaway_users_from_one_country" = "from {country}";
|
||||
"lng_giveaway_users_from_countries#one" = "from {count} country";
|
||||
"lng_giveaway_users_from_countries#other" = "from {count} countries";
|
||||
"lng_giveaway_users_new" = "Only new subscribers";
|
||||
"lng_giveaway_users_about" = "Choose if you want to limit the giveaway only to the newly joined subscribers.";
|
||||
"lng_giveaway_users_about" = "Choose if you want to limit the giveaway only to those who joined the channel after the giveaway started or to users from specific countries.";
|
||||
"lng_giveaway_start" = "Start Giveaway";
|
||||
"lng_giveaway_award" = "Gift Premium";
|
||||
"lng_giveaway_start_sure" = "Are you sure you want to start this prepaid giveaway now? This action cannot be undone.";
|
||||
"lng_giveaway_date_title" = "Date when giveaway ends";
|
||||
"lng_giveaway_date" = "Date and Time";
|
||||
"lng_giveaway_date_about#one" = "Choose when {count} subscriber of your channel will be randomly selected to receive Telegram Premium.";
|
||||
@@ -2099,14 +2156,26 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_giveaway_duration_title#one" = "Duration of Premium subscription";
|
||||
"lng_giveaway_duration_title#other" = "Duration of Premium subscriptions";
|
||||
"lng_giveaway_duration_price" = "{price} x {amount}";
|
||||
"lng_giveaway_duration_about" = "You can review the list of features and terms of use for Telegram Premium {link}.";
|
||||
"lng_giveaway_duration_about_link" = "here";
|
||||
"lng_giveaway_date_select" = "Select Date and Time";
|
||||
"lng_giveaway_date_confirm" = "Confirm";
|
||||
"lng_giveaway_channels_select#one" = "Select up to {count} channel";
|
||||
"lng_giveaway_channels_select#other" = "Select up to {count} channels";
|
||||
"lng_giveaway_recipients_save" = "Save Recipients";
|
||||
"lng_giveaway_recipients_deselect" = "Deselect All";
|
||||
"lng_giveaway_maximum_countries_error#one" = "You can select maximum {count} country.";
|
||||
"lng_giveaway_maximum_countries_error#other" = "You can select maximum {count} countries.";
|
||||
"lng_giveaway_maximum_channels_error#one" = "You can select maximum {count} channel.";
|
||||
"lng_giveaway_maximum_channels_error#other" = "You can select maximum {count} channels.";
|
||||
"lng_giveaway_maximum_users_error#one" = "You can select maximum {count} user.";
|
||||
"lng_giveaway_maximum_users_error#other" = "You can select maximum {count} users.";
|
||||
"lng_giveaway_channels_confirm_title" = "Channel is Private";
|
||||
"lng_giveaway_channels_confirm_about" = "Are you sure you want to add a private channel? Users won't be able to join it without an invite link.";
|
||||
|
||||
"lng_giveaway_created_title" = "Giveaway created";
|
||||
"lng_giveaway_created_body" = "Check your channels' {link} to see how this giveaway boosted your channel.";
|
||||
"lng_giveaway_awarded_title" = "Premium subscriptions gifted";
|
||||
"lng_giveaway_awarded_body" = "Check your channels' {link} to see how gifts boosted your channel.";
|
||||
"lng_giveaway_created_link" = "Statistics";
|
||||
|
||||
"lng_prize_title" = "Congratulations!";
|
||||
"lng_prize_about" = "You won a prize in a giveaway organized by {channel}.";
|
||||
@@ -2142,10 +2211,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_prizes_end_when_finish" = "On {date}, Telegram automatically selected {winners}.";
|
||||
"lng_prizes_end_activated#one" = "**{count}** of the winners already used their gift link.";
|
||||
"lng_prizes_end_activated#other" = "**{count}** of the winners already used their gift links.";
|
||||
"lng_prizes_winners_all_of_one#one" = "{count} random subscribers of {channel}.";
|
||||
"lng_prizes_winners_all_of_one#other" = "{count} random subscribers of {channel}.";
|
||||
"lng_prizes_winners_all_of_many#one" = "{count} random subscribers of {channel} and other listed channels.";
|
||||
"lng_prizes_winners_all_of_many#other" = "{count} random subscribers of {channel} and other listed channels.";
|
||||
"lng_prizes_winners_all_of_one#one" = "{count} random subscribers of {channel}";
|
||||
"lng_prizes_winners_all_of_one#other" = "{count} random subscribers of {channel}";
|
||||
"lng_prizes_winners_all_of_many#one" = "{count} random subscribers of {channel} and other listed channels";
|
||||
"lng_prizes_winners_all_of_many#other" = "{count} random subscribers of {channel} and other listed channels";
|
||||
"lng_prizes_winners_new_of_one#one" = "{count} random user that joined {channel} after {start_date}";
|
||||
"lng_prizes_winners_new_of_one#other" = "{count} random users that joined {channel} after {start_date}";
|
||||
"lng_prizes_winners_new_of_many#one" = "{count} random user that joined {channel} and other listed channels after {start_date}";
|
||||
@@ -2182,6 +2251,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_gift_link_used_about" = "This link was used to activate\na **Telegram Premium** subscription.";
|
||||
"lng_gift_link_used_footer" = "This link was used on {date}.";
|
||||
"lng_gift_link_expired" = "Gift code link expired";
|
||||
"lng_gift_link_pending_about" = "This link allows {user} to activate\na **Telegram Premium** subscription.";
|
||||
"lng_gift_link_pending_toast" = "Only the recipient can see the link.";
|
||||
"lng_gift_link_pending_footer" = "This link hasn't been activated yet.";
|
||||
|
||||
"lng_accounts_limit_title" = "Limit Reached";
|
||||
"lng_accounts_limit1#one" = "You have reached the limit of **{count}** connected accounts.";
|
||||
@@ -2674,6 +2746,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_forwarding_from_two" = "{user} and {second_user}";
|
||||
"lng_inline_switch_choose" = "Choose conversation...";
|
||||
"lng_inline_switch_cant" = "Sorry, no way to write here :(";
|
||||
"lng_preview_reply_to" = "Reply to {name}";
|
||||
"lng_preview_reply_to_quote" = "Reply to quote by {name}";
|
||||
|
||||
"lng_reply_in_another_title" = "Reply in...";
|
||||
"lng_reply_in_another_chat" = "Reply in Another Chat";
|
||||
@@ -2684,6 +2758,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_reply_options_quote" = "Update Quote";
|
||||
"lng_reply_header_short" = "Reply";
|
||||
"lng_reply_quote_selected" = "Quote Selected";
|
||||
"lng_reply_from_private_chat" = "This reply is from a private chat.";
|
||||
"lng_link_options_header" = "Link Preview Settings";
|
||||
"lng_link_header_short" = "Link";
|
||||
"lng_link_move_up" = "Move Up";
|
||||
@@ -2703,6 +2778,16 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_share_wrong_user" = "This game was opened from a different user.";
|
||||
"lng_share_game_link_copied" = "Game link copied to clipboard.";
|
||||
"lng_share_done" = "Done!";
|
||||
"lng_share_message_to_saved_messages" = "Message forwarded to **Saved Messages**.";
|
||||
"lng_share_messages_to_saved_messages" = "Messages forwarded to **Saved Messages**.";
|
||||
"lng_share_message_to_chat" = "Message forwarded to **{chat}**.";
|
||||
"lng_share_messages_to_chat" = "Messages forwarded to **{chat}**.";
|
||||
"lng_share_message_to_two_chats" = "Message forwarded to **{user}** and **{chat}**.";
|
||||
"lng_share_messages_to_two_chats" = "Messages forwarded to **{user}** and **{chat}**.";
|
||||
"lng_share_message_to_many_chats#one" = "Message forwarded to **{count} chat**.";
|
||||
"lng_share_message_to_many_chats#other" = "Message forwarded to **{count} chats**.";
|
||||
"lng_share_messages_to_many_chats#one" = "Messages forwarded to **{count} chat**.";
|
||||
"lng_share_messages_to_many_chats#other" = "Messages forwarded to **{count} chats**.";
|
||||
|
||||
"lng_contact_phone" = "Phone Number";
|
||||
"lng_enter_contact_data" = "New Contact";
|
||||
@@ -3251,6 +3336,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_audio_player_reverse" = "Reverse order";
|
||||
"lng_audio_player_shuffle" = "Shuffle";
|
||||
"lng_audio_transcribe_long" = "This voice message is too long.";
|
||||
"lng_audio_transcribe_trials_left#one" = "You have {count} free transcription left until {date}.";
|
||||
"lng_audio_transcribe_trials_left#other" = "You have {count} free transcriptions left until {date}.";
|
||||
"lng_audio_transcribe_trials_over" = "You have used all your free transcriptions this week. Wait until {date} to use it again or subscribe to {link} now.";
|
||||
|
||||
"lng_rights_edit_admin" = "Manage permissions";
|
||||
"lng_rights_edit_admin_header" = "What can this admin do?";
|
||||
@@ -4053,6 +4141,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_view_button_request_join" = "Request to Join";
|
||||
"lng_view_button_external_link" = "Open link";
|
||||
"lng_view_button_boost" = "Boost";
|
||||
"lng_view_button_giftcode" = "Open";
|
||||
|
||||
"lng_sponsored_hide_ads" = "Hide";
|
||||
"lng_sponsored_title" = "What are sponsored messages?";
|
||||
@@ -4098,10 +4187,13 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_forum_topics_no_discussion" = "Topics can't be enabled in discussion groups at the moment.";
|
||||
"lng_forum_choose_title_and_icon" = "Choose title and icon for your topic";
|
||||
"lng_forum_replies_only" = "You can reply to messages in topics.";
|
||||
"lng_forum_message_in" = "Message in {topic}";
|
||||
"lng_forum_reply_in" = "Reply in {topic}";
|
||||
"lng_forum_no_topics" = "No topics currently created in this forum.";
|
||||
"lng_forum_create_topic" = "Create topic";
|
||||
"lng_forum_discard_sure" = "Are you sure you want to discard this topic?";
|
||||
"lng_forum_view_as_messages" = "View as Messages";
|
||||
"lng_forum_view_as_topics" = "View as Topics";
|
||||
"lng_forum_no_messages" = "No messages";
|
||||
"lng_forum_messages#one" = "{count} message";
|
||||
"lng_forum_messages#other" = "{count} messages";
|
||||
@@ -4243,12 +4335,22 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
|
||||
"lng_stats_title" = "Statistics";
|
||||
"lng_stats_message_title" = "Message Statistic";
|
||||
"lng_stats_story_title" = "Story Statistic";
|
||||
"lng_stats_zoom_out" = "Zoom Out";
|
||||
|
||||
"lng_stats_day_month_year" = "{days_count} {month} {year}";
|
||||
"lng_stats_day_month" = "{days_count} {month}";
|
||||
"lng_stats_weekday_day_month_year" = "{day}, {days_count} {month} {year}";
|
||||
"lng_stats_weekday_day_month_time" = "{day}, {days_count} {month} {time}";
|
||||
|
||||
"lng_stats_overview_title" = "Overview";
|
||||
"lng_stats_overview_member_count" = "Followers";
|
||||
"lng_stats_overview_mean_view_count" = "Views Per Post";
|
||||
"lng_stats_overview_mean_share_count" = "Shared Per Post";
|
||||
"lng_stats_overview_mean_reactions_count" = "Reactions Per Post";
|
||||
"lng_stats_overview_mean_story_view_count" = "Views Per Story";
|
||||
"lng_stats_overview_mean_story_share_count" = "Shared Per Story";
|
||||
"lng_stats_overview_mean_story_reactions_count" = "Reactions Per Story";
|
||||
"lng_stats_overview_enabled_notifications" = "Enabled Notifications";
|
||||
"lng_stats_overview_messages" = "Messages";
|
||||
"lng_stats_overview_group_mean_view_count" = "Viewing Members";
|
||||
@@ -4278,8 +4380,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_stats_recent_messages_title" = "Recent posts";
|
||||
"lng_stats_recent_messages_views#one" = "{count} view";
|
||||
"lng_stats_recent_messages_views#other" = "{count} views";
|
||||
"lng_stats_recent_messages_shares#one" = "{count} share";
|
||||
"lng_stats_recent_messages_shares#other" = "{count} shares";
|
||||
|
||||
"lng_stats_loading" = "Loading stats...";
|
||||
"lng_stats_loading_subtext" = "Please wait a few moments while we generate your stats.";
|
||||
@@ -4293,6 +4393,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_chart_title_language" = "Languages";
|
||||
"lng_chart_title_message_interaction" = "Interactions";
|
||||
"lng_chart_title_instant_view_interaction" = "IV Interactions";
|
||||
"lng_chart_title_reactions_by_emotion" = "Reactions";
|
||||
"lng_chart_title_story_interactions" = "Story Interactions";
|
||||
"lng_chart_title_story_reactions_by_emotion" = "Story reactions";
|
||||
|
||||
"lng_chart_title_group_join" = "Group members";
|
||||
"lng_chart_title_group_join_by_source" = "New members by source";
|
||||
@@ -4307,13 +4410,32 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"lng_boosts_existing" = "Existing boosts";
|
||||
"lng_boosts_premium_audience" = "Premium subscribers";
|
||||
"lng_boosts_next_level" = "Boosts to level up";
|
||||
"lng_boosts_list_title#one" = "{count} booster";
|
||||
"lng_boosts_list_title#other" = "{count} boosters";
|
||||
"lng_boosts_list_title#one" = "{count} Boost";
|
||||
"lng_boosts_list_title#other" = "{count} Boosts";
|
||||
"lng_boosts_list_subtext" = "Your channel is currently boosted by these users.";
|
||||
"lng_boosts_show_more" = "Show More Boosts";
|
||||
"lng_boosts_show_more_boosts#one" = "Show {count} More Boosts";
|
||||
"lng_boosts_show_more_boosts#other" = "Show {count} More Boosts";
|
||||
"lng_boosts_show_more_gifts#one" = "Show {count} More Boosts";
|
||||
"lng_boosts_show_more_gifts#other" = "Show {count} More Boosts";
|
||||
"lng_boosts_list_status" = "boost expires on {date}";
|
||||
"lng_boosts_link_title" = "Link for boosting";
|
||||
"lng_boosts_link_subtext" = "Share this link with your subscribers to get more boosts.";
|
||||
"lng_boosts_get_boosts" = "Get Boosts via Gifts";
|
||||
"lng_boosts_get_boosts_subtext" = "Get more boosts for your channel by gifting Telegram Premium to your subscribers.";
|
||||
"lng_boosts_list_unclaimed" = "Unclaimed";
|
||||
"lng_boosts_list_pending" = "To be distributed";
|
||||
"lng_boosts_list_pending_about" = "The recipient will be selected when the giveaway ends.";
|
||||
"lng_boosts_list_tab_gifts#one" = "{count} Gifts";
|
||||
"lng_boosts_list_tab_gifts#other" = "{count} Gifts";
|
||||
|
||||
"lng_boosts_prepaid_giveaway_title" = "Prepaid giveaways";
|
||||
"lng_boosts_prepaid_giveaway_single" = "Prepaid giveaway";
|
||||
"lng_boosts_prepaid_giveaway_quantity#one" = "{count} Telegram Premium";
|
||||
"lng_boosts_prepaid_giveaway_quantity#other" = "{count} Telegram Premium";
|
||||
"lng_boosts_prepaid_giveaway_moths#one" = "{count}-month subscriptions";
|
||||
"lng_boosts_prepaid_giveaway_moths#other" = "{count}-month subscriptions";
|
||||
"lng_boosts_prepaid_giveaway_status#one" = "{count} subscription {duration}";
|
||||
"lng_boosts_prepaid_giveaway_status#other" = "{count} subscriptions {duration}";
|
||||
|
||||
// Wnd specific
|
||||
|
||||
@@ -4385,6 +4507,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
// AyuGram keys generated
|
||||
|
||||
"ayu_AyuPreferences" = "AyuGram Preferences";
|
||||
"ayu_DocsText" = "Documentation";
|
||||
"ayu_GhostEssentialsHeader" = "Ghost essentials";
|
||||
"ayu_DontReadMessages" = "Don't read messages";
|
||||
"ayu_DontReadStories" = "Don't read stories";
|
||||
@@ -4432,6 +4555,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"ayu_SettingsShowID_Hide" = "Hide";
|
||||
"ayu_SettingsRecentStickersCount" = "Recent stickers count";
|
||||
"ayu_SettingsCustomizationHint" = "After making changes to the \"Customization\" section, you must restart the application.";
|
||||
"ayu_DrawerElementsHeader" = "Drawer Elements";
|
||||
"ayu_TrayElementsHeader" = "Tray Elements";
|
||||
"ayu_RegexFilters" = "Message Filters";
|
||||
"ayu_RegexFiltersAmount" = "filters";
|
||||
"ayu_RegexFiltersHeader" = "Filters";
|
||||
@@ -4445,6 +4570,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"ayu_EnableExpression" = "Enable expression";
|
||||
"ayu_CaseInsensitiveExpression" = "Case insensitive expression";
|
||||
"ayu_RegexFiltersAddError" = "Regex syntax error";
|
||||
"ayu_RegexFilterQuickAdd" = "Add filter";
|
||||
"ayu_AyuSyncHeader" = "AyuSync";
|
||||
"ayu_AyuSyncStatusTitle" = "Sync status";
|
||||
"ayu_AyuSyncStatusOk" = "connected";
|
||||
@@ -4467,7 +4593,12 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"ayu_AyuSyncDownloadAgent" = "Download agent";
|
||||
"ayu_IconDefault" = "Default";
|
||||
"ayu_IconAlternative" = "AyuGram Alt";
|
||||
"ayu_IconDiscord" = "Discord";
|
||||
"ayu_IconSpotify" = "Spotify";
|
||||
"ayu_IconExtera" = "extera";
|
||||
"ayu_IconNothing" = "Nothing";
|
||||
"ayu_IconBard" = "Google Bard";
|
||||
"ayu_IconYaPlus" = "Yandex Plus";
|
||||
"ayu_WALMode" = "Enable WAL mode";
|
||||
"ayu_PushNotificationCount" = "FCM notifications received";
|
||||
"ayu_ClearAyuDatabase" = "Clear Ayu Database";
|
||||
@@ -4494,8 +4625,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"ayu_DisableStreamerModeTray" = "Disable Streamer Mode";
|
||||
"ayu_EditsHistoryTitle" = "Edits history";
|
||||
"ayu_EditsHistoryMenuText" = "History";
|
||||
"ayu_PeekOnlineMenuText" = "Peek Online";
|
||||
"ayu_ClearDeletedMenuText" = "Clear Deleted";
|
||||
"ayu_ViewFiltersMenuText" = "View Filters";
|
||||
"ayu_PeekOnlineSuccess" = "Peeked via";
|
||||
"ayu_OneViewTTL" = "one view";
|
||||
"ayu_ReadUntilMenuText" = "Read Message";
|
||||
"ayu_DeleteKeepLocally" = "Keep locally";
|
||||
@@ -4506,11 +4639,16 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"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_SuggestGhostModeStoryText" = "Do you want to enable **Ghost Mode** before viewing the story?";
|
||||
"ayu_SuggestGhostModeStoryActionTextYes" = "Yes";
|
||||
"ayu_SuggestGhostModeStoryActionTextNo" = "No";
|
||||
"ayu_HideNextViewsDescriptionAyu" = "Hide my views forever, until Ghost Mode disabled.";
|
||||
"ayu_EnableGhostModeStories" = "Enable Ghost Mode";
|
||||
"ayu_GhostModeIsActive" = "Ghost Mode Is Active";
|
||||
"ayu_SimpleQuotesAndReplies" = "Disable colorful replies";
|
||||
"ayu_DisableSimilarChannels" = "Disable similar channels";
|
||||
"ayu_CollapseSimilarChannels" = "Collapse similar channels";
|
||||
"ayu_HideSimilarChannelsTab" = "Hide similar channels tab";
|
||||
"ayu_MainFont" = "Application font";
|
||||
"ayu_MonospaceFont" = "Monospace font";
|
||||
"ayu_FontDefault" = "Default";
|
||||
@@ -4520,6 +4658,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
"ayu_AyuForwardForwardingDescription" = "Please keep this window open while AyuGram is forwarding your messages.";
|
||||
"ayu_AyuForwardLoadingMediaDescription" = "Please keep this window open while AyuGram is downloading media from your messages.";
|
||||
"ayu_DeleteDateMenuText" = "Delete Date";
|
||||
"ayu_ForwardableMenuText" = "Forwardable";
|
||||
"ayu_ForwardableMenuTextNo" = "No";
|
||||
"ayu_LikelyOfflineStatus" = "offline ?";
|
||||
"ayu_GhostModeShortcut" = "Enter with Ghost";
|
||||
"ayu_SettingsShowMessageSeconds" = "Show message seconds";
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
<file alias="icons/settings/dino.svg">../../icons/settings/dino.svg</file>
|
||||
<file alias="icons/settings/star.svg">../../icons/settings/star.svg</file>
|
||||
<file alias="icons/settings/starmini.svg">../../icons/settings/starmini.svg</file>
|
||||
<file alias="icons/tray/monochrome.svg">../../icons/tray_monochrome.svg</file>
|
||||
<file alias="topic_icons/blue.svg">../../art/topic_icons/blue.svg</file>
|
||||
<file alias="topic_icons/yellow.svg">../../art/topic_icons/yellow.svg</file>
|
||||
<file alias="topic_icons/violet.svg">../../art/topic_icons/violet.svg</file>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<Identity Name="TelegramMessengerLLP.TelegramDesktop"
|
||||
ProcessorArchitecture="ARCHITECTURE"
|
||||
Publisher="CN=536BC709-8EE1-4478-AF22-F0F0F26FF64A"
|
||||
Version="4.11.1.0" />
|
||||
Version="4.12.2.0" />
|
||||
<Properties>
|
||||
<DisplayName>Telegram Desktop</DisplayName>
|
||||
<PublisherDisplayName>Telegram Messenger LLP</PublisherDisplayName>
|
||||
|
||||
@@ -44,8 +44,8 @@ IDI_ICON1 ICON "..\\art\\icon256.ico"
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 4,11,1,0
|
||||
PRODUCTVERSION 4,11,1,0
|
||||
FILEVERSION 4,12,2,0
|
||||
PRODUCTVERSION 4,12,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.11.1.0"
|
||||
VALUE "FileVersion", "4.12.2.0"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2014-2023"
|
||||
VALUE "ProductName", "AyuGram Desktop"
|
||||
VALUE "ProductVersion", "4.11.1.0"
|
||||
VALUE "ProductVersion", "4.12.2.0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
||||
@@ -35,8 +35,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 4,11,1,0
|
||||
PRODUCTVERSION 4,11,1,0
|
||||
FILEVERSION 4,12,2,0
|
||||
PRODUCTVERSION 4,12,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.11.1.0"
|
||||
VALUE "FileVersion", "4.12.2.0"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2014-2023"
|
||||
VALUE "ProductName", "AyuGram Desktop"
|
||||
VALUE "ProductVersion", "4.11.1.0"
|
||||
VALUE "ProductVersion", "4.12.2.0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
||||
@@ -20,12 +20,12 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "history/history.h"
|
||||
#include "lang/lang_keys.h"
|
||||
#include "main/main_session.h"
|
||||
#include "settings/settings_common.h"
|
||||
#include "ui/boxes/confirm_box.h"
|
||||
#include "ui/controls/filter_link_header.h"
|
||||
#include "ui/text/text_utilities.h"
|
||||
#include "ui/widgets/buttons.h"
|
||||
#include "ui/filter_icons.h"
|
||||
#include "ui/vertical_list.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "styles/style_filter_icons.h"
|
||||
#include "styles/style_layers.h"
|
||||
@@ -341,7 +341,7 @@ void ToggleChatsController::setupAboveWidget() {
|
||||
_addedTopWidget = container->add(object_ptr<Ui::RpWidget>(container));
|
||||
const auto realAbove = container->add(
|
||||
object_ptr<Ui::VerticalLayout>(container));
|
||||
AddDivider(realAbove);
|
||||
Ui::AddDivider(realAbove);
|
||||
const auto totalCount = [&] {
|
||||
if (_chats.empty()) {
|
||||
return _additional.size();
|
||||
@@ -422,7 +422,7 @@ void ToggleChatsController::setupBelowWidget() {
|
||||
auto widget = object_ptr<Ui::DividerLabel>(
|
||||
(QWidget*)nullptr,
|
||||
std::move(layout),
|
||||
st::settingsDividerLabelPadding);
|
||||
st::defaultBoxDividerLabelPadding);
|
||||
raw->add(object_ptr<Ui::FlatLabel>(
|
||||
raw,
|
||||
(_action == ToggleAction::Removing
|
||||
|
||||
@@ -211,6 +211,29 @@ void ApplyBotsList(
|
||||
Data::PeerUpdate::Flag::FullInfo);
|
||||
}
|
||||
|
||||
[[nodiscard]] ChatParticipants::Channels ParseSimilar(
|
||||
not_null<ChannelData*> channel,
|
||||
const MTPmessages_Chats &chats) {
|
||||
auto result = ChatParticipants::Channels();
|
||||
std::vector<not_null<ChannelData*>>();
|
||||
chats.match([&](const auto &data) {
|
||||
const auto &list = data.vchats().v;
|
||||
result.list.reserve(list.size());
|
||||
for (const auto &chat : list) {
|
||||
const auto peer = channel->owner().processChat(chat);
|
||||
if (const auto channel = peer->asChannel()) {
|
||||
result.list.push_back(channel);
|
||||
}
|
||||
}
|
||||
if constexpr (MTPDmessages_chatsSlice::Is<decltype(data)>()) {
|
||||
if (channel->session().premiumPossible()) {
|
||||
result.more = data.vcount().v - data.vchats().v.size();
|
||||
}
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
ChatParticipant::ChatParticipant(
|
||||
@@ -685,4 +708,50 @@ void ChatParticipants::unblock(
|
||||
_kickRequests.emplace(kick, requestId);
|
||||
}
|
||||
|
||||
void ChatParticipants::loadSimilarChannels(not_null<ChannelData*> channel) {
|
||||
if (!channel->isBroadcast()) {
|
||||
return;
|
||||
} else if (const auto i = _similar.find(channel); i != end(_similar)) {
|
||||
if (i->second.requestId
|
||||
|| !i->second.channels.more
|
||||
|| !channel->session().premium()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
_similar[channel].requestId = _api.request(
|
||||
MTPchannels_GetChannelRecommendations(channel->inputChannel)
|
||||
).done([=](const MTPmessages_Chats &result) {
|
||||
auto &similar = _similar[channel];
|
||||
similar.requestId = 0;
|
||||
auto parsed = ParseSimilar(channel, result);
|
||||
if (similar.channels == parsed) {
|
||||
return;
|
||||
}
|
||||
similar.channels = std::move(parsed);
|
||||
if (const auto history = channel->owner().historyLoaded(channel)) {
|
||||
if (const auto item = history->joinedMessageInstance()) {
|
||||
history->owner().requestItemResize(item);
|
||||
}
|
||||
}
|
||||
_similarLoaded.fire_copy(channel);
|
||||
}).send();
|
||||
}
|
||||
|
||||
auto ChatParticipants::similar(not_null<ChannelData*> channel)
|
||||
-> const Channels & {
|
||||
const auto i = channel->isBroadcast()
|
||||
? _similar.find(channel)
|
||||
: end(_similar);
|
||||
if (i != end(_similar)) {
|
||||
return i->second.channels;
|
||||
}
|
||||
static const auto empty = Channels();
|
||||
return empty;
|
||||
}
|
||||
|
||||
auto ChatParticipants::similarLoaded() const
|
||||
-> rpl::producer<not_null<ChannelData*>> {
|
||||
return _similarLoaded.events();
|
||||
}
|
||||
|
||||
} // namespace Api
|
||||
|
||||
@@ -120,7 +120,26 @@ public:
|
||||
not_null<ChannelData*> channel,
|
||||
not_null<PeerData*> participant);
|
||||
|
||||
void loadSimilarChannels(not_null<ChannelData*> channel);
|
||||
|
||||
struct Channels {
|
||||
std::vector<not_null<ChannelData*>> list;
|
||||
int more = 0;
|
||||
|
||||
friend inline bool operator==(
|
||||
const Channels &,
|
||||
const Channels &) = default;
|
||||
};
|
||||
[[nodiscard]] const Channels &similar(not_null<ChannelData*> channel);
|
||||
[[nodiscard]] auto similarLoaded() const
|
||||
-> rpl::producer<not_null<ChannelData*>>;
|
||||
|
||||
private:
|
||||
struct SimilarChannels {
|
||||
Channels channels;
|
||||
mtpRequestId requestId = 0;
|
||||
};
|
||||
|
||||
MTP::Sender _api;
|
||||
|
||||
using PeerRequests = base::flat_map<PeerData*, mtpRequestId>;
|
||||
@@ -143,6 +162,9 @@ private:
|
||||
not_null<PeerData*>>;
|
||||
base::flat_map<KickRequest, mtpRequestId> _kickRequests;
|
||||
|
||||
base::flat_map<not_null<ChannelData*>, SimilarChannels> _similar;
|
||||
rpl::event_stream<not_null<ChannelData*>> _similarLoaded;
|
||||
|
||||
};
|
||||
|
||||
} // namespace Api
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
/*
|
||||
This file is part of Telegram Desktop,
|
||||
the official desktop application for the Telegram messaging service.
|
||||
|
||||
For license and copyright information please follow this link:
|
||||
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
*/
|
||||
#include "api/api_peer_colors.h"
|
||||
|
||||
#include "apiwrap.h"
|
||||
#include "ui/chat/chat_style.h"
|
||||
|
||||
namespace Api {
|
||||
namespace {
|
||||
|
||||
constexpr auto kRequestEach = 3600 * crl::time(1000);
|
||||
|
||||
} // namespace
|
||||
|
||||
PeerColors::PeerColors(not_null<ApiWrap*> api)
|
||||
: _api(&api->instance())
|
||||
, _timer([=] { request(); }) {
|
||||
request();
|
||||
_timer.callEach(kRequestEach);
|
||||
}
|
||||
|
||||
PeerColors::~PeerColors() = default;
|
||||
|
||||
void PeerColors::request() {
|
||||
if (_requestId) {
|
||||
return;
|
||||
}
|
||||
_requestId = _api.request(MTPhelp_GetPeerColors(
|
||||
MTP_int(_hash)
|
||||
)).done([=](const MTPhelp_PeerColors &result) {
|
||||
_requestId = 0;
|
||||
result.match([&](const MTPDhelp_peerColors &data) {
|
||||
_hash = data.vhash().v;
|
||||
apply(data);
|
||||
}, [](const MTPDhelp_peerColorsNotModified &) {
|
||||
});
|
||||
}).fail([=] {
|
||||
_requestId = 0;
|
||||
}).send();
|
||||
}
|
||||
|
||||
std::vector<uint8> PeerColors::suggested() const {
|
||||
return _suggested.current();
|
||||
}
|
||||
|
||||
rpl::producer<std::vector<uint8>> PeerColors::suggestedValue() const {
|
||||
return _suggested.value();
|
||||
}
|
||||
|
||||
auto PeerColors::indicesValue() const
|
||||
-> rpl::producer<Ui::ColorIndicesCompressed> {
|
||||
return rpl::single(_colorIndicesCurrent
|
||||
? *_colorIndicesCurrent
|
||||
: Ui::ColorIndicesCompressed()
|
||||
) | rpl::then(_colorIndicesChanged.events() | rpl::map([=] {
|
||||
return *_colorIndicesCurrent;
|
||||
}));
|
||||
}
|
||||
|
||||
void PeerColors::apply(const MTPDhelp_peerColors &data) {
|
||||
auto suggested = std::vector<uint8>();
|
||||
auto colors = std::make_shared<
|
||||
std::array<Ui::ColorIndexData, Ui::kColorIndexCount>>();
|
||||
|
||||
using ParsedColor = std::array<uint32, Ui::kColorPatternsCount>;
|
||||
const auto parseColors = [](const MTPhelp_PeerColorSet &set) {
|
||||
return set.match([&](const MTPDhelp_peerColorSet &data) {
|
||||
auto result = ParsedColor();
|
||||
const auto &list = data.vcolors().v;
|
||||
if (list.empty() || list.size() > Ui::kColorPatternsCount) {
|
||||
LOG(("API Error: Bad count for PeerColorSet.colors: %1"
|
||||
).arg(list.size()));
|
||||
return ParsedColor();
|
||||
}
|
||||
auto fill = result.data();
|
||||
for (const auto &color : list) {
|
||||
*fill++ = (uint32(1) << 24) | uint32(color.v);
|
||||
}
|
||||
return result;
|
||||
}, [](const MTPDhelp_peerColorProfileSet &) {
|
||||
LOG(("API Error: peerColorProfileSet in colors result!"));
|
||||
return ParsedColor();
|
||||
});
|
||||
};
|
||||
|
||||
const auto &list = data.vcolors().v;
|
||||
suggested.reserve(list.size());
|
||||
for (const auto &color : list) {
|
||||
const auto &data = color.data();
|
||||
const auto colorIndexBare = data.vcolor_id().v;
|
||||
if (colorIndexBare < 0 || colorIndexBare >= Ui::kColorIndexCount) {
|
||||
LOG(("API Error: Bad color index: %1").arg(colorIndexBare));
|
||||
continue;
|
||||
}
|
||||
const auto colorIndex = uint8(colorIndexBare);
|
||||
if (!data.is_hidden()) {
|
||||
suggested.push_back(colorIndex);
|
||||
}
|
||||
if (const auto light = data.vcolors()) {
|
||||
auto &fields = (*colors)[colorIndex];
|
||||
fields.light = parseColors(*light);
|
||||
if (const auto dark = data.vdark_colors()) {
|
||||
fields.dark = parseColors(*dark);
|
||||
} else {
|
||||
fields.dark = fields.light;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!_colorIndicesCurrent) {
|
||||
_colorIndicesCurrent = std::make_unique<Ui::ColorIndicesCompressed>(
|
||||
Ui::ColorIndicesCompressed{ std::move(colors) });
|
||||
_colorIndicesChanged.fire({});
|
||||
} else if (*_colorIndicesCurrent->colors != *colors) {
|
||||
_colorIndicesCurrent->colors = std::move(colors);
|
||||
_colorIndicesChanged.fire({});
|
||||
}
|
||||
_suggested = std::move(suggested);
|
||||
}
|
||||
|
||||
} // namespace Api
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
This file is part of Telegram Desktop,
|
||||
the official desktop application for the Telegram messaging service.
|
||||
|
||||
For license and copyright information please follow this link:
|
||||
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "base/timer.h"
|
||||
#include "mtproto/sender.h"
|
||||
|
||||
class ApiWrap;
|
||||
|
||||
namespace Ui {
|
||||
struct ColorIndicesCompressed;
|
||||
} // namespace Ui
|
||||
|
||||
namespace Api {
|
||||
|
||||
class PeerColors final {
|
||||
public:
|
||||
explicit PeerColors(not_null<ApiWrap*> api);
|
||||
~PeerColors();
|
||||
|
||||
[[nodiscard]] std::vector<uint8> suggested() const;
|
||||
[[nodiscard]] rpl::producer<std::vector<uint8>> suggestedValue() const;
|
||||
[[nodiscard]] auto indicesValue() const
|
||||
-> rpl::producer<Ui::ColorIndicesCompressed>;
|
||||
|
||||
private:
|
||||
void request();
|
||||
void apply(const MTPDhelp_peerColors &data);
|
||||
|
||||
MTP::Sender _api;
|
||||
int32 _hash = 0;
|
||||
|
||||
mtpRequestId _requestId = 0;
|
||||
base::Timer _timer;
|
||||
rpl::variable<std::vector<uint8>> _suggested;
|
||||
rpl::event_stream<> _colorIndicesChanged;
|
||||
std::unique_ptr<Ui::ColorIndicesCompressed> _colorIndicesCurrent;
|
||||
|
||||
};
|
||||
|
||||
} // namespace Api
|
||||
@@ -21,7 +21,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "main/main_session.h"
|
||||
|
||||
// AyuGram includes
|
||||
#include "ayu/ayu_state.h"
|
||||
#include "ayu/ayu_settings.h"
|
||||
#include "ayu/utils/telegram_helpers.h"
|
||||
|
||||
|
||||
namespace Api {
|
||||
@@ -156,8 +157,7 @@ void Polls::sendVotes(
|
||||
const auto settings = &AyuSettings::getInstance();
|
||||
if (!settings->sendReadMessages && settings->markReadAfterPoll && item)
|
||||
{
|
||||
AyuState::setAllowSendReadPacket(true);
|
||||
item->history()->session().data().histories().readInboxOnNewMessage(item);
|
||||
readHistory(item);
|
||||
}
|
||||
}).fail([=] {
|
||||
_pollVotesRequestIds.erase(itemId);
|
||||
|
||||
@@ -9,12 +9,17 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
|
||||
#include "api/api_premium_option.h"
|
||||
#include "api/api_text_entities.h"
|
||||
#include "main/main_session.h"
|
||||
#include "data/data_peer_values.h"
|
||||
#include "data/data_document.h"
|
||||
#include "data/data_session.h"
|
||||
#include "data/data_peer.h"
|
||||
#include "apiwrap.h"
|
||||
#include "base/random.h"
|
||||
#include "data/data_document.h"
|
||||
#include "data/data_peer.h"
|
||||
#include "data/data_peer_values.h"
|
||||
#include "data/data_session.h"
|
||||
#include "main/main_account.h"
|
||||
#include "main/main_app_config.h"
|
||||
#include "main/main_session.h"
|
||||
#include "payments/payments_form.h"
|
||||
#include "ui/text/format_values.h"
|
||||
|
||||
namespace Api {
|
||||
namespace {
|
||||
@@ -31,6 +36,24 @@ namespace {
|
||||
};
|
||||
}
|
||||
|
||||
[[nodiscard]] Data::SubscriptionOptions GiftCodesFromTL(
|
||||
const QVector<MTPPremiumGiftCodeOption> &tlOptions) {
|
||||
auto options = SubscriptionOptionsFromTL(tlOptions);
|
||||
for (auto i = 0; i < options.size(); i++) {
|
||||
const auto &tlOption = tlOptions[i].data();
|
||||
const auto perUserText = Ui::FillAmountAndCurrency(
|
||||
tlOption.vamount().v / float64(tlOption.vusers().v),
|
||||
qs(tlOption.vcurrency()),
|
||||
false);
|
||||
options[i].costPerMonth = perUserText
|
||||
+ ' '
|
||||
+ QChar(0x00D7)
|
||||
+ ' '
|
||||
+ QString::number(tlOption.vusers().v);
|
||||
}
|
||||
return options;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
Premium::Premium(not_null<ApiWrap*> api)
|
||||
@@ -311,4 +334,165 @@ const Data::SubscriptionOptions &Premium::subscriptionOptions() const {
|
||||
return _subscriptionOptions;
|
||||
}
|
||||
|
||||
PremiumGiftCodeOptions::PremiumGiftCodeOptions(not_null<PeerData*> peer)
|
||||
: _peer(peer)
|
||||
, _api(&peer->session().api().instance()) {
|
||||
}
|
||||
|
||||
rpl::producer<rpl::no_value, QString> PremiumGiftCodeOptions::request() {
|
||||
return [=](auto consumer) {
|
||||
auto lifetime = rpl::lifetime();
|
||||
const auto channel = _peer->asChannel();
|
||||
if (!channel) {
|
||||
return lifetime;
|
||||
}
|
||||
|
||||
using TLOption = MTPPremiumGiftCodeOption;
|
||||
_api.request(MTPpayments_GetPremiumGiftCodeOptions(
|
||||
MTP_flags(
|
||||
MTPpayments_GetPremiumGiftCodeOptions::Flag::f_boost_peer),
|
||||
_peer->input
|
||||
)).done([=](const MTPVector<TLOption> &result) {
|
||||
auto tlMapOptions = base::flat_map<Amount, QVector<TLOption>>();
|
||||
for (const auto &tlOption : result.v) {
|
||||
const auto &data = tlOption.data();
|
||||
tlMapOptions[data.vusers().v].push_back(tlOption);
|
||||
|
||||
const auto token = Token{ data.vusers().v, data.vmonths().v };
|
||||
_stores[token] = Store{
|
||||
.amount = data.vamount().v,
|
||||
.product = qs(data.vstore_product().value_or_empty()),
|
||||
.quantity = data.vstore_quantity().value_or_empty(),
|
||||
};
|
||||
if (!ranges::contains(_availablePresets, data.vusers().v)) {
|
||||
_availablePresets.push_back(data.vusers().v);
|
||||
}
|
||||
}
|
||||
for (const auto &[amount, tlOptions] : tlMapOptions) {
|
||||
if (amount == 1 && _optionsForOnePerson.currency.isEmpty()) {
|
||||
_optionsForOnePerson.currency = qs(
|
||||
tlOptions.front().data().vcurrency());
|
||||
for (const auto &option : tlOptions) {
|
||||
_optionsForOnePerson.months.push_back(
|
||||
option.data().vmonths().v);
|
||||
_optionsForOnePerson.totalCosts.push_back(
|
||||
option.data().vamount().v);
|
||||
}
|
||||
}
|
||||
_subscriptionOptions[amount] = GiftCodesFromTL(tlOptions);
|
||||
}
|
||||
consumer.put_done();
|
||||
}).fail([=](const MTP::Error &error) {
|
||||
consumer.put_error_copy(error.type());
|
||||
}).send();
|
||||
|
||||
return lifetime;
|
||||
};
|
||||
}
|
||||
|
||||
rpl::producer<rpl::no_value, QString> PremiumGiftCodeOptions::applyPrepaid(
|
||||
const Payments::InvoicePremiumGiftCode &invoice,
|
||||
uint64 prepaidId) {
|
||||
return [=](auto consumer) {
|
||||
auto lifetime = rpl::lifetime();
|
||||
const auto channel = _peer->asChannel();
|
||||
if (!channel) {
|
||||
return lifetime;
|
||||
}
|
||||
|
||||
_api.request(MTPpayments_LaunchPrepaidGiveaway(
|
||||
_peer->input,
|
||||
MTP_long(prepaidId),
|
||||
Payments::InvoicePremiumGiftCodeGiveawayToTL(invoice)
|
||||
)).done([=](const MTPUpdates &result) {
|
||||
_peer->session().api().applyUpdates(result);
|
||||
consumer.put_done();
|
||||
}).fail([=](const MTP::Error &error) {
|
||||
consumer.put_error_copy(error.type());
|
||||
}).send();
|
||||
|
||||
return lifetime;
|
||||
};
|
||||
}
|
||||
|
||||
const std::vector<int> &PremiumGiftCodeOptions::availablePresets() const {
|
||||
return _availablePresets;
|
||||
}
|
||||
|
||||
[[nodiscard]] int PremiumGiftCodeOptions::monthsFromPreset(int monthsIndex) {
|
||||
return _optionsForOnePerson.months[monthsIndex];
|
||||
}
|
||||
|
||||
Payments::InvoicePremiumGiftCode PremiumGiftCodeOptions::invoice(
|
||||
int users,
|
||||
int months) {
|
||||
const auto randomId = base::RandomValue<uint64>();
|
||||
const auto token = Token{ users, months };
|
||||
const auto &store = _stores[token];
|
||||
return Payments::InvoicePremiumGiftCode{
|
||||
.randomId = randomId,
|
||||
.currency = _optionsForOnePerson.currency,
|
||||
.amount = store.amount,
|
||||
.storeProduct = store.product,
|
||||
.storeQuantity = store.quantity,
|
||||
.users = token.users,
|
||||
.months = token.months,
|
||||
};
|
||||
}
|
||||
|
||||
Data::SubscriptionOptions PremiumGiftCodeOptions::options(int amount) {
|
||||
const auto it = _subscriptionOptions.find(amount);
|
||||
if (it != end(_subscriptionOptions)) {
|
||||
return it->second;
|
||||
} else {
|
||||
auto tlOptions = QVector<MTPPremiumGiftCodeOption>();
|
||||
for (auto i = 0; i < _optionsForOnePerson.months.size(); i++) {
|
||||
tlOptions.push_back(MTP_premiumGiftCodeOption(
|
||||
MTP_flags(MTPDpremiumGiftCodeOption::Flags(0)),
|
||||
MTP_int(amount),
|
||||
MTP_int(_optionsForOnePerson.months[i]),
|
||||
MTPstring(),
|
||||
MTPint(),
|
||||
MTP_string(_optionsForOnePerson.currency),
|
||||
MTP_long(_optionsForOnePerson.totalCosts[i] * amount)));
|
||||
}
|
||||
_subscriptionOptions[amount] = GiftCodesFromTL(tlOptions);
|
||||
return _subscriptionOptions[amount];
|
||||
}
|
||||
}
|
||||
|
||||
int PremiumGiftCodeOptions::giveawayBoostsPerPremium() const {
|
||||
constexpr auto kFallbackCount = 4;
|
||||
return _peer->session().account().appConfig().get<int>(
|
||||
u"giveaway_boosts_per_premium"_q,
|
||||
kFallbackCount);
|
||||
}
|
||||
|
||||
int PremiumGiftCodeOptions::giveawayCountriesMax() const {
|
||||
constexpr auto kFallbackCount = 10;
|
||||
return _peer->session().account().appConfig().get<int>(
|
||||
u"giveaway_countries_max"_q,
|
||||
kFallbackCount);
|
||||
}
|
||||
|
||||
int PremiumGiftCodeOptions::giveawayAddPeersMax() const {
|
||||
constexpr auto kFallbackCount = 10;
|
||||
return _peer->session().account().appConfig().get<int>(
|
||||
u"giveaway_add_peers_max"_q,
|
||||
kFallbackCount);
|
||||
}
|
||||
|
||||
int PremiumGiftCodeOptions::giveawayPeriodMax() const {
|
||||
constexpr auto kFallbackCount = 3600 * 24 * 7;
|
||||
return _peer->session().account().appConfig().get<int>(
|
||||
u"giveaway_period_max"_q,
|
||||
kFallbackCount);
|
||||
}
|
||||
|
||||
bool PremiumGiftCodeOptions::giveawayGiftsPurchaseAvailable() const {
|
||||
return _peer->session().account().appConfig().get<bool>(
|
||||
u"giveaway_gifts_purchase_available"_q,
|
||||
false);
|
||||
}
|
||||
|
||||
} // namespace Api
|
||||
|
||||
@@ -16,6 +16,10 @@ namespace Main {
|
||||
class Session;
|
||||
} // namespace Main
|
||||
|
||||
namespace Payments {
|
||||
struct InvoicePremiumGiftCode;
|
||||
} // namespace Payments
|
||||
|
||||
namespace Api {
|
||||
|
||||
struct GiftCode {
|
||||
@@ -141,4 +145,55 @@ private:
|
||||
|
||||
};
|
||||
|
||||
class PremiumGiftCodeOptions final {
|
||||
public:
|
||||
PremiumGiftCodeOptions(not_null<PeerData*> peer);
|
||||
|
||||
[[nodiscard]] rpl::producer<rpl::no_value, QString> request();
|
||||
[[nodiscard]] Data::SubscriptionOptions options(int amount);
|
||||
[[nodiscard]] const std::vector<int> &availablePresets() const;
|
||||
[[nodiscard]] int monthsFromPreset(int monthsIndex);
|
||||
[[nodiscard]] Payments::InvoicePremiumGiftCode invoice(
|
||||
int users,
|
||||
int months);
|
||||
[[nodiscard]] rpl::producer<rpl::no_value, QString> applyPrepaid(
|
||||
const Payments::InvoicePremiumGiftCode &invoice,
|
||||
uint64 prepaidId);
|
||||
|
||||
[[nodiscard]] int giveawayBoostsPerPremium() const;
|
||||
[[nodiscard]] int giveawayCountriesMax() const;
|
||||
[[nodiscard]] int giveawayAddPeersMax() const;
|
||||
[[nodiscard]] int giveawayPeriodMax() const;
|
||||
[[nodiscard]] bool giveawayGiftsPurchaseAvailable() const;
|
||||
|
||||
private:
|
||||
struct Token final {
|
||||
int users = 0;
|
||||
int months = 0;
|
||||
|
||||
friend inline constexpr auto operator<=>(Token, Token) = default;
|
||||
|
||||
};
|
||||
struct Store final {
|
||||
uint64 amount = 0;
|
||||
QString product;
|
||||
int quantity = 0;
|
||||
};
|
||||
using Amount = int;
|
||||
const not_null<PeerData*> _peer;
|
||||
base::flat_map<Amount, Data::SubscriptionOptions> _subscriptionOptions;
|
||||
struct {
|
||||
std::vector<int> months;
|
||||
std::vector<float64> totalCosts;
|
||||
QString currency;
|
||||
} _optionsForOnePerson;
|
||||
|
||||
std::vector<int> _availablePresets;
|
||||
|
||||
base::flat_map<Token, Store> _stores;
|
||||
|
||||
MTP::Sender _api;
|
||||
|
||||
};
|
||||
|
||||
} // namespace Api
|
||||
|
||||