Skip to content

Commit 41c6274

Browse files
author
Isaac
committed
Merge branch 'master' into beta
# Conflicts: # submodules/TelegramUI/Components/Chat/ChatMessagePollBubbleContentNode/Sources/ChatMessagePollBubbleContentNode.swift # versions.json
2 parents 098efc7 + 80d7198 commit 41c6274

File tree

321 files changed

+37365
-5236
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

321 files changed

+37365
-5236
lines changed

.gitlab-ci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,10 @@ internal:
2222
- export PATH=/opt/homebrew/opt/ruby/bin:$PATH
2323
- export PATH=`gem environment gemdir`/bin:$PATH
2424
- python3 -u build-system/Make/Make.py remote-build --darwinContainers="$DARWIN_CONTAINERS" --darwinContainersHost="$DARWIN_CONTAINERS_HOST" --cacheHost="$TELEGRAM_BAZEL_CACHE_HOST" --configurationPath="build-system/appcenter-configuration.json" --gitCodesigningRepository="$TELEGRAM_GIT_CODESIGNING_REPOSITORY" --gitCodesigningType=adhoc --configuration=release_arm64
25-
- python3 -u build-system/Make/DeployToFirebase.py --configuration="$TELEGRAM_PRIVATE_DATA_PATH/firebase-configurations/firebase-internal.json" --ipa="build/artifacts/Telegram.ipa" --dsyms="build/artifacts/Telegram.DSYMs.zip"
2625
- python3 -u build-system/Make/DeployBuild.py --configuration="$TELEGRAM_PRIVATE_DATA_PATH/deploy-configurations/internal-configuration.json" --ipa="build/artifacts/Telegram.ipa" --dsyms="build/artifacts/Telegram.DSYMs.zip"
2726
- rm -rf build-input/configuration-repository-workdir
2827
- rm -rf build-input/configuration-repository
2928
- python3 -u build-system/Make/Make.py remote-build --darwinContainers="$DARWIN_CONTAINERS" --darwinContainersHost="$DARWIN_CONTAINERS_HOST" --cacheHost="$TELEGRAM_BAZEL_CACHE_HOST" --configurationPath="$TELEGRAM_PRIVATE_DATA_PATH/build-configurations/enterprise-configuration.json" --gitCodesigningRepository="$TELEGRAM_GIT_CODESIGNING_REPOSITORY" --gitCodesigningType=enterprise --configuration=release_arm64
30-
- python3 -u build-system/Make/DeployToFirebase.py --configuration="$TELEGRAM_PRIVATE_DATA_PATH/firebase-configurations/firebase-enterprise.json" --ipa="build/artifacts/Telegram.ipa" --dsyms="build/artifacts/Telegram.DSYMs.zip"
3129
- python3 -u build-system/Make/DeployBuild.py --configuration="$TELEGRAM_PRIVATE_DATA_PATH/deploy-configurations/enterprise-configuration.json" --ipa="build/artifacts/Telegram.ipa" --dsyms="build/artifacts/Telegram.DSYMs.zip"
3230
environment:
3331
name: internal

MODULE.bazel.lock

Lines changed: 257 additions & 56 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Telegram/SiriIntents/IntentHandler.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,7 @@ class DefaultIntentHandler: INExtension, INSendMessageIntentHandling, INSearchFo
815815

816816
if let searchTerm = searchTerm {
817817
if !searchTerm.isEmpty {
818-
for renderedPeer in transaction.searchPeers(query: searchTerm) {
818+
for renderedPeer in transaction.searchPeers(query: searchTerm, predicate: nil) {
819819
if let peer = renderedPeer.peer, !(peer is TelegramSecretChat), !peer.isDeleted {
820820
peers.append(peer)
821821
}
@@ -988,7 +988,7 @@ private final class WidgetIntentHandler {
988988

989989
if let searchTerm = searchTerm {
990990
if !searchTerm.isEmpty {
991-
for renderedPeer in transaction.searchPeers(query: searchTerm) {
991+
for renderedPeer in transaction.searchPeers(query: searchTerm, predicate: nil) {
992992
if let peer = renderedPeer.peer, !(peer is TelegramSecretChat), !peer.isDeleted {
993993
peers.append(peer)
994994
}

Telegram/Telegram-iOS/en.lproj/Localizable.strings

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16169,3 +16169,10 @@ Error: %8$@";
1616916169
"PeerInfo.UnofficialSecurityRisk" = "%@ uses an unofficial Telegram client – messages to this user may be less secure.";
1617016170

1617116171
"Gallery.Live" = "LIVE";
16172+
16173+
"CreatePoll.QuestionNeeded" = "Enter a question";
16174+
"CreatePoll.OptionsNeeded" = "Add at least two options";
16175+
"CreatePoll.QuizCorrectOptionNeeded" = "Select a correct option";
16176+
"CreatePoll.QuizCorrectOptionNeededMultiple" = "Select at least one correct option";
16177+
16178+
"Stars.Intro.Transaction.Commission.Title" = "%@ commission";

Telegram/Tests/Sources/UITests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class UITests: XCTestCase {
3131
}
3232

3333
func testSignUp() throws {
34-
deleteTestAccount(phone: "9996629999")
34+
deleteTestAccount(phone: "9996625296")
3535
app.launch()
3636

3737
// Welcome screen — tap Start Messaging

Tests/AnimationCacheTest/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ swift_library(
3131
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
3232
"//submodules/Display:Display",
3333
"//submodules/TelegramUI/Components/AnimationCache:AnimationCache",
34+
"//submodules/TelegramUI/Components/DCTAnimationCacheImpl:DCTAnimationCacheImpl",
3435
"//submodules/TelegramUI/Components/VideoAnimationCache:VideoAnimationCache",
3536
"//submodules/TelegramUI/Components/LottieAnimationCache:LottieAnimationCache",
3637
"//submodules/rlottie:RLottieBinding",

Tests/AnimationCacheTest/Sources/ViewController.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import UIKit
33

44
import Display
55
import AnimationCache
6+
import DCTAnimationCacheImpl
67
import SwiftSignalKit
78
import VideoAnimationCache
89
import LottieAnimationCache
@@ -50,7 +51,7 @@ public final class ViewController: UIViewController {
5051
let basePath = NSTemporaryDirectory() + "/animation-cache"
5152
let _ = try? FileManager.default.removeItem(atPath: basePath)
5253
let _ = try? FileManager.default.createDirectory(at: URL(fileURLWithPath: basePath), withIntermediateDirectories: true)
53-
self.cache = AnimationCacheImpl(basePath: basePath, allocateTempFile: {
54+
self.cache = DCTAnimationCacheImpl(basePath: basePath, allocateTempFile: {
5455
return basePath + "/\(Int64.random(in: 0 ... Int64.max))"
5556
})
5657

build-system/Make/DeployBuild.py

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import json
77
import hashlib
88
import base64
9+
import time
910
import requests
1011

1112
def sha256_file(path):
@@ -26,16 +27,55 @@ def init_build(host, token, files, channel):
2627
r.raise_for_status()
2728
return r.json()
2829

30+
class ProgressFileReader:
31+
def __init__(self, path, size):
32+
self._file = open(path, 'rb')
33+
self._size = size
34+
self._sent = 0
35+
self._start_time = time.time()
36+
self._last_print = self._start_time
37+
38+
def __len__(self):
39+
return self._size
40+
41+
def read(self, chunk_size=-1):
42+
if chunk_size == -1:
43+
chunk_size = self._size
44+
data = self._file.read(chunk_size)
45+
if not data:
46+
elapsed = time.time() - self._start_time
47+
speed = self._size / elapsed / 1024 / 1024 if elapsed > 0 else 0
48+
print(' 100% - all bytes sent in {:.1f}s ({:.2f} MB/s), waiting for server response...'.format(elapsed, speed))
49+
return data
50+
self._sent += len(data)
51+
now = time.time()
52+
if now - self._last_print >= 5:
53+
elapsed = now - self._start_time
54+
speed = self._sent / elapsed / 1024 / 1024 if elapsed > 0 else 0
55+
print(' {:.1f}% ({:.1f} / {:.1f} MB) {:.2f} MB/s'.format(
56+
self._sent * 100 / self._size, self._sent / 1024 / 1024, self._size / 1024 / 1024, speed))
57+
self._last_print = now
58+
return data
59+
60+
def close(self):
61+
self._file.close()
62+
2963
def upload_file(path, upload_info):
3064
url = upload_info.get('url')
3165
headers = dict(upload_info.get('headers', {}))
32-
66+
3367
size = os.path.getsize(path)
3468
headers['Content-Length'] = str(size)
3569

36-
print('Uploading', path)
37-
with open(path, 'rb') as f:
38-
r = requests.put(url, data=f, headers=headers, timeout=900)
70+
print('Uploading {} ({:.1f} MB)'.format(path, size / 1024 / 1024))
71+
start_time = time.time()
72+
73+
body = ProgressFileReader(path, size)
74+
try:
75+
r = requests.put(url, data=body, headers=headers, timeout=900)
76+
finally:
77+
body.close()
78+
print(' Server responded: {} ({:.1f}s total)'.format(r.status_code, time.time() - start_time))
3979
if r.status_code != 200:
4080
print('Upload failed', r.status_code)
4181
print(r.text[:500])
Submodule rules_apple updated 133 files

0 commit comments

Comments
 (0)