mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-07 17:30:12 +00:00
Merge branch 'master' into experimental-2
This commit is contained in:
commit
7c8ad70014
134
Telegram/BUILD
134
Telegram/BUILD
@ -78,6 +78,79 @@ genrule(
|
|||||||
cmd = "touch $(OUTS)",
|
cmd = "touch $(OUTS)",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
genrule(
|
||||||
|
name = "GeneratedPresentationStrings",
|
||||||
|
srcs = [
|
||||||
|
"//build-system:GenerateStrings/GenerateStrings.py",
|
||||||
|
"Telegram-iOS/en.lproj/Localizable.strings",
|
||||||
|
],
|
||||||
|
cmd = '''
|
||||||
|
python3 $(location //build-system:GenerateStrings/GenerateStrings.py) \\
|
||||||
|
--source=$(location Telegram-iOS/en.lproj/Localizable.strings) \\
|
||||||
|
--outImplementation=$(location GeneratedPresentationStrings/Sources/PresentationStrings.m) \\
|
||||||
|
--outHeader=$(location GeneratedPresentationStrings/PublicHeaders/PresentationStrings/PresentationStrings.h) \\
|
||||||
|
--outData=$(location GeneratedPresentationStrings/Resources/PresentationStrings.data) \\
|
||||||
|
''',
|
||||||
|
outs = [
|
||||||
|
"GeneratedPresentationStrings/PublicHeaders/PresentationStrings/PresentationStrings.h",
|
||||||
|
"GeneratedPresentationStrings/Sources/PresentationStrings.m",
|
||||||
|
"GeneratedPresentationStrings/Resources/PresentationStrings.data",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
empty_languages = [
|
||||||
|
"ar",
|
||||||
|
"be",
|
||||||
|
"ca",
|
||||||
|
"de",
|
||||||
|
"es",
|
||||||
|
"fa",
|
||||||
|
"fr",
|
||||||
|
"id",
|
||||||
|
"it",
|
||||||
|
"ko",
|
||||||
|
"ms",
|
||||||
|
"nl",
|
||||||
|
"pl",
|
||||||
|
"pt",
|
||||||
|
"ru",
|
||||||
|
"tr",
|
||||||
|
"uk",
|
||||||
|
"uz",
|
||||||
|
]
|
||||||
|
|
||||||
|
[
|
||||||
|
genrule(
|
||||||
|
name = "Localizable_{}.strings".format(language),
|
||||||
|
outs = ["{}.lproj/Localizable.strings".format(language)],
|
||||||
|
cmd = "touch $(OUTS)",
|
||||||
|
) for language in empty_languages
|
||||||
|
]
|
||||||
|
|
||||||
|
objc_library(
|
||||||
|
name = "PresentationStrings",
|
||||||
|
enable_modules = True,
|
||||||
|
module_name = "PresentationStrings",
|
||||||
|
srcs = [
|
||||||
|
"GeneratedPresentationStrings/Sources/PresentationStrings.m",
|
||||||
|
],
|
||||||
|
hdrs = [
|
||||||
|
"GeneratedPresentationStrings/PublicHeaders/PresentationStrings/PresentationStrings.h",
|
||||||
|
],
|
||||||
|
includes = [
|
||||||
|
"GeneratedPresentationStrings/PublicHeaders",
|
||||||
|
],
|
||||||
|
sdk_frameworks = [
|
||||||
|
"Foundation",
|
||||||
|
],
|
||||||
|
deps = [
|
||||||
|
"//submodules/NumberPluralizationForm:NumberPluralizationForm",
|
||||||
|
],
|
||||||
|
visibility = [
|
||||||
|
"//visibility:public",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
swift_library(
|
swift_library(
|
||||||
name = "_LocalDebugOptions",
|
name = "_LocalDebugOptions",
|
||||||
srcs = [":empty"],
|
srcs = [":empty"],
|
||||||
@ -122,9 +195,11 @@ filegroup(
|
|||||||
|
|
||||||
filegroup(
|
filegroup(
|
||||||
name = "AppStringResources",
|
name = "AppStringResources",
|
||||||
srcs = glob([
|
srcs = [
|
||||||
"Telegram-iOS/*.lproj/Localizable.strings",
|
"Telegram-iOS/en.lproj/Localizable.strings",
|
||||||
], exclude = ["Telegram-iOS/*.lproj/**/.*"]),
|
] + [
|
||||||
|
"{}.lproj/Localizable.strings".format(language) for language in empty_languages
|
||||||
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
filegroup(
|
filegroup(
|
||||||
@ -220,6 +295,7 @@ swift_library(
|
|||||||
"//submodules/PasswordSetupUI:PasswordSetupUIAssets",
|
"//submodules/PasswordSetupUI:PasswordSetupUIAssets",
|
||||||
"//submodules/TelegramUI:TelegramUIResources",
|
"//submodules/TelegramUI:TelegramUIResources",
|
||||||
"//submodules/TelegramUI:TelegramUIAssets",
|
"//submodules/TelegramUI:TelegramUIAssets",
|
||||||
|
":GeneratedPresentationStrings/Resources/PresentationStrings.data",
|
||||||
],
|
],
|
||||||
deps = [
|
deps = [
|
||||||
"//submodules/TelegramUI:TelegramUI",
|
"//submodules/TelegramUI:TelegramUI",
|
||||||
@ -745,49 +821,6 @@ ios_framework(
|
|||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
plist_fragment(
|
|
||||||
name = "SyncCoreInfoPlist",
|
|
||||||
extension = "plist",
|
|
||||||
template =
|
|
||||||
"""
|
|
||||||
<key>CFBundleIdentifier</key>
|
|
||||||
<string>{telegram_bundle_id}.SyncCore</string>
|
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
|
||||||
<string>en</string>
|
|
||||||
<key>CFBundleName</key>
|
|
||||||
<string>SyncCore</string>
|
|
||||||
<key>CFBundlePackageType</key>
|
|
||||||
<string>FMWK</string>
|
|
||||||
""".format(
|
|
||||||
telegram_bundle_id = telegram_bundle_id,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
ios_framework(
|
|
||||||
name = "SyncCoreFramework",
|
|
||||||
bundle_id = "{telegram_bundle_id}.SyncCore".format(
|
|
||||||
telegram_bundle_id = telegram_bundle_id,
|
|
||||||
),
|
|
||||||
families = [
|
|
||||||
"iphone",
|
|
||||||
"ipad",
|
|
||||||
],
|
|
||||||
infoplists = [
|
|
||||||
":SyncCoreInfoPlist",
|
|
||||||
":BuildNumberInfoPlist",
|
|
||||||
":VersionInfoPlist",
|
|
||||||
],
|
|
||||||
frameworks = [
|
|
||||||
":SwiftSignalKitFramework",
|
|
||||||
":PostboxFramework",
|
|
||||||
],
|
|
||||||
minimum_os_version = "9.0",
|
|
||||||
ipa_post_processor = strip_framework,
|
|
||||||
deps = [
|
|
||||||
"//submodules/SyncCore:SyncCore",
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
plist_fragment(
|
plist_fragment(
|
||||||
name = "TelegramCoreInfoPlist",
|
name = "TelegramCoreInfoPlist",
|
||||||
extension = "plist",
|
extension = "plist",
|
||||||
@ -824,7 +857,6 @@ ios_framework(
|
|||||||
":MtProtoKitFramework",
|
":MtProtoKitFramework",
|
||||||
":SwiftSignalKitFramework",
|
":SwiftSignalKitFramework",
|
||||||
":PostboxFramework",
|
":PostboxFramework",
|
||||||
":SyncCoreFramework",
|
|
||||||
],
|
],
|
||||||
minimum_os_version = "9.0",
|
minimum_os_version = "9.0",
|
||||||
ipa_post_processor = strip_framework,
|
ipa_post_processor = strip_framework,
|
||||||
@ -994,7 +1026,6 @@ ios_framework(
|
|||||||
":MtProtoKitFramework",
|
":MtProtoKitFramework",
|
||||||
":SwiftSignalKitFramework",
|
":SwiftSignalKitFramework",
|
||||||
":PostboxFramework",
|
":PostboxFramework",
|
||||||
":SyncCoreFramework",
|
|
||||||
":TelegramCoreFramework",
|
":TelegramCoreFramework",
|
||||||
":AsyncDisplayKitFramework",
|
":AsyncDisplayKitFramework",
|
||||||
":DisplayFramework",
|
":DisplayFramework",
|
||||||
@ -1246,7 +1277,6 @@ swift_library(
|
|||||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
||||||
"//submodules/Postbox:Postbox",
|
"//submodules/Postbox:Postbox",
|
||||||
"//submodules/TelegramCore:TelegramCore",
|
"//submodules/TelegramCore:TelegramCore",
|
||||||
"//submodules/SyncCore:SyncCore",
|
|
||||||
"//submodules/OpenSSLEncryptionProvider:OpenSSLEncryptionProvider",
|
"//submodules/OpenSSLEncryptionProvider:OpenSSLEncryptionProvider",
|
||||||
"//Telegram:GeneratedSources",
|
"//Telegram:GeneratedSources",
|
||||||
],
|
],
|
||||||
@ -1299,7 +1329,6 @@ ios_extension(
|
|||||||
frameworks = [
|
frameworks = [
|
||||||
":SwiftSignalKitFramework",
|
":SwiftSignalKitFramework",
|
||||||
":PostboxFramework",
|
":PostboxFramework",
|
||||||
":SyncCoreFramework",
|
|
||||||
":TelegramCoreFramework",
|
":TelegramCoreFramework",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
@ -1374,7 +1403,6 @@ swift_library(
|
|||||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
||||||
"//submodules/Postbox:Postbox",
|
"//submodules/Postbox:Postbox",
|
||||||
"//submodules/TelegramApi:TelegramApi",
|
"//submodules/TelegramApi:TelegramApi",
|
||||||
"//submodules/SyncCore:SyncCore",
|
|
||||||
"//submodules/TelegramCore:TelegramCore",
|
"//submodules/TelegramCore:TelegramCore",
|
||||||
"//submodules/BuildConfig:BuildConfig",
|
"//submodules/BuildConfig:BuildConfig",
|
||||||
"//submodules/OpenSSLEncryptionProvider:OpenSSLEncryptionProvider",
|
"//submodules/OpenSSLEncryptionProvider:OpenSSLEncryptionProvider",
|
||||||
@ -1429,7 +1457,6 @@ ios_extension(
|
|||||||
":SwiftSignalKitFramework",
|
":SwiftSignalKitFramework",
|
||||||
":PostboxFramework",
|
":PostboxFramework",
|
||||||
":TelegramCoreFramework",
|
":TelegramCoreFramework",
|
||||||
":SyncCoreFramework",
|
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -1692,6 +1719,8 @@ plist_fragment(
|
|||||||
<key>UIAppFonts</key>
|
<key>UIAppFonts</key>
|
||||||
<array>
|
<array>
|
||||||
<string>SFCompactRounded-Semibold.otf</string>
|
<string>SFCompactRounded-Semibold.otf</string>
|
||||||
|
<string>AremacFS-Regular.otf</string>
|
||||||
|
<string>AremacFS-Semibold.otf</string>
|
||||||
</array>
|
</array>
|
||||||
<key>UIBackgroundModes</key>
|
<key>UIBackgroundModes</key>
|
||||||
<array>
|
<array>
|
||||||
@ -1794,7 +1823,6 @@ ios_application(
|
|||||||
":MtProtoKitFramework",
|
":MtProtoKitFramework",
|
||||||
":SwiftSignalKitFramework",
|
":SwiftSignalKitFramework",
|
||||||
":PostboxFramework",
|
":PostboxFramework",
|
||||||
":SyncCoreFramework",
|
|
||||||
":TelegramCoreFramework",
|
":TelegramCoreFramework",
|
||||||
":AsyncDisplayKitFramework",
|
":AsyncDisplayKitFramework",
|
||||||
":DisplayFramework",
|
":DisplayFramework",
|
||||||
|
|||||||
@ -2,7 +2,6 @@ import Foundation
|
|||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import Contacts
|
import Contacts
|
||||||
import Intents
|
import Intents
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Intents
|
import Intents
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import Postbox
|
import Postbox
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import BuildConfig
|
import BuildConfig
|
||||||
|
|||||||
@ -2,7 +2,6 @@ import Foundation
|
|||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import Contacts
|
import Contacts
|
||||||
import Intents
|
import Intents
|
||||||
|
|
||||||
|
|||||||
@ -1 +0,0 @@
|
|||||||
|
|
||||||
@ -91,22 +91,31 @@
|
|||||||
"PUSH_MESSAGE_FWD" = "%1$@|forwarded you a message";
|
"PUSH_MESSAGE_FWD" = "%1$@|forwarded you a message";
|
||||||
"PUSH_MESSAGE_FWDS_1" = "%1$@|forwarded you a message";
|
"PUSH_MESSAGE_FWDS_1" = "%1$@|forwarded you a message";
|
||||||
"PUSH_MESSAGE_FWDS_any" = "%1$@|forwarded you %2$d messages";
|
"PUSH_MESSAGE_FWDS_any" = "%1$@|forwarded you %2$d messages";
|
||||||
|
"PUSH_MESSAGE_FWDS_TEXT_1" = "forwarded you a message";
|
||||||
|
"PUSH_MESSAGE_FWDS_TEXT_any" = "forwarded you %d messages";
|
||||||
"PUSH_MESSAGE_PHOTO" = "%1$@|sent you a photo";
|
"PUSH_MESSAGE_PHOTO" = "%1$@|sent you a photo";
|
||||||
"PUSH_MESSAGE_PHOTOS_1" = "%1$@|sent you a photo";
|
"PUSH_MESSAGE_PHOTOS_1" = "%1$@|sent you a photo";
|
||||||
"PUSH_MESSAGE_PHOTOS_any" = "%1$@|sent you %2$d photos";
|
"PUSH_MESSAGE_PHOTOS_any" = "%1$@|sent you %2$d photos";
|
||||||
|
"PUSH_MESSAGE_PHOTOS_TEXT_1" = "sent you a photo";
|
||||||
|
"PUSH_MESSAGE_PHOTOS_TEXT_any" = "sent you %d photos";
|
||||||
"PUSH_MESSAGE_VIDEO" = "%1$@|sent you a video";
|
"PUSH_MESSAGE_VIDEO" = "%1$@|sent you a video";
|
||||||
"PUSH_MESSAGE_VIDEOS_1" = "%1$@|sent you a video";
|
"PUSH_MESSAGE_VIDEOS_1" = "%1$@|sent you a video";
|
||||||
"PUSH_MESSAGE_VIDEOS_any" = "%1$@|sent you %2$d videos";
|
"PUSH_MESSAGE_VIDEOS_any" = "%1$@|sent you %2$d videos";
|
||||||
|
"PUSH_MESSAGE_VIDEOS_TEXT_1" = "sent you a video";
|
||||||
|
"PUSH_MESSAGE_VIDEOS_TEXT_any" = "sent you %d videos";
|
||||||
"PUSH_MESSAGE_ROUND" = "%1$@|sent you a video message";
|
"PUSH_MESSAGE_ROUND" = "%1$@|sent you a video message";
|
||||||
"PUSH_MESSAGE_ROUNDS_1" = "%1$@|sent you a video message";
|
"PUSH_MESSAGE_ROUNDS_1" = "%1$@|sent you a video message";
|
||||||
"PUSH_MESSAGE_ROUNDS_any" = "%1$@|sent you %2$d video messages";
|
"PUSH_MESSAGE_ROUNDS_any" = "%1$@|sent you %2$d video messages";
|
||||||
"PUSH_MESSAGE" = "%1$@|sent you a message";
|
"PUSH_MESSAGE" = "%1$@|sent you a message";
|
||||||
"PUSH_MESSAGES_1" = "%1$@|sent you a message";
|
"PUSH_MESSAGES_1" = "%1$@|sent you a message";
|
||||||
"PUSH_MESSAGES_any" = "%1$@|sent you %2$d messages";
|
"PUSH_MESSAGES_any" = "%1$@|sent you %2$d messages";
|
||||||
|
"PUSH_MESSAGES_TEXT_1" = "sent you a message";
|
||||||
|
"PUSH_MESSAGES_TEXT_any" = "sent you %2$d messages";
|
||||||
"PUSH_ALBUM" = "%1$@|sent you an album";
|
"PUSH_ALBUM" = "%1$@|sent you an album";
|
||||||
"PUSH_MESSAGE_FILES_1" = "%1$@|sent you a file";
|
"PUSH_MESSAGE_FILES_1" = "%1$@|sent you a file";
|
||||||
"PUSH_MESSAGE_FILES_any" = "%1$@|sent you %2$d files";
|
"PUSH_MESSAGE_FILES_any" = "%1$@|sent you %2$d files";
|
||||||
|
"PUSH_MESSAGE_FILES_TEXT_1" = "sent you a file";
|
||||||
|
"PUSH_MESSAGE_FILES_TEXT_any" = "sent you %d files";
|
||||||
|
|
||||||
"PUSH_CHANNEL_MESSAGE_TEXT" = "%1$@|%2$@";
|
"PUSH_CHANNEL_MESSAGE_TEXT" = "%1$@|%2$@";
|
||||||
"PUSH_CHANNEL_MESSAGE_NOTEXT" = "%1$@|posted a message";
|
"PUSH_CHANNEL_MESSAGE_NOTEXT" = "%1$@|posted a message";
|
||||||
@ -129,19 +138,26 @@
|
|||||||
"PUSH_CHANNEL_MESSAGE_PHOTO" = "%1$@|posted a photo";
|
"PUSH_CHANNEL_MESSAGE_PHOTO" = "%1$@|posted a photo";
|
||||||
"PUSH_CHANNEL_MESSAGE_PHOTOS_1" = "%1$@|posted a photo";
|
"PUSH_CHANNEL_MESSAGE_PHOTOS_1" = "%1$@|posted a photo";
|
||||||
"PUSH_CHANNEL_MESSAGE_PHOTOS_any" = "%1$@|posted %2$d photos";
|
"PUSH_CHANNEL_MESSAGE_PHOTOS_any" = "%1$@|posted %2$d photos";
|
||||||
|
"PUSH_CHANNEL_MESSAGE_PHOTOS_TEXT_1" = "posted a photo";
|
||||||
|
"PUSH_CHANNEL_MESSAGE_PHOTOS_TEXT_any" = "posted %d photos";
|
||||||
"PUSH_CHANNEL_MESSAGE_VIDEO" = "%1$@|posted a video";
|
"PUSH_CHANNEL_MESSAGE_VIDEO" = "%1$@|posted a video";
|
||||||
"PUSH_CHANNEL_MESSAGE_VIDEOS_1" = "%1$@|posted a video";
|
"PUSH_CHANNEL_MESSAGE_VIDEOS_1" = "%1$@|posted a video";
|
||||||
"PUSH_CHANNEL_MESSAGE_VIDEOS_any" = "%1$@|posted %2$d videos";
|
"PUSH_CHANNEL_MESSAGE_VIDEOS_any" = "%1$@|posted %2$d videos";
|
||||||
|
"PUSH_CHANNEL_MESSAGE_VIDEOS_TEXT_1" = "posted a video";
|
||||||
|
"PUSH_CHANNEL_MESSAGE_VIDEOS_TEXT_any" = "posted %d videos";
|
||||||
"PUSH_CHANNEL_MESSAGE_ROUND" = "%1$@|posted a video message";
|
"PUSH_CHANNEL_MESSAGE_ROUND" = "%1$@|posted a video message";
|
||||||
"PUSH_CHANNEL_MESSAGE_ROUNDS_1" = "%1$@|posted a video message";
|
"PUSH_CHANNEL_MESSAGE_ROUNDS_1" = "%1$@|posted a video message";
|
||||||
"PUSH_CHANNEL_MESSAGE_ROUNDS_any" = "%1$@|posted %2$d video messages";
|
"PUSH_CHANNEL_MESSAGE_ROUNDS_any" = "%1$@|posted %2$d video messages";
|
||||||
"PUSH_CHANNEL_MESSAGE" = "%1$@|posted a message";
|
"PUSH_CHANNEL_MESSAGE" = "%1$@|posted a message";
|
||||||
"PUSH_CHANNEL_MESSAGES_1" = "%1$@|posted a message";
|
"PUSH_CHANNEL_MESSAGES_1" = "%1$@|posted a message";
|
||||||
"PUSH_CHANNEL_MESSAGES_any" = "%1$@|posted %2$d messages";
|
"PUSH_CHANNEL_MESSAGES_any" = "%1$@|posted %2$d messages";
|
||||||
|
"PUSH_CHANNEL_MESSAGES_TEXT_1" = "posted a message";
|
||||||
|
"PUSH_CHANNEL_MESSAGES_TEXT_any" = "posted %d messages";
|
||||||
"PUSH_CHANNEL_ALBUM" = "%1$@|posted an album";
|
"PUSH_CHANNEL_ALBUM" = "%1$@|posted an album";
|
||||||
"PUSH_CHANNEL_MESSAGE_DOCS" = "%1$@|posted %2$d files";
|
|
||||||
"PUSH_CHANNEL_MESSAGE_DOCS_1" = "%1$@|posted a file";
|
"PUSH_CHANNEL_MESSAGE_DOCS_1" = "%1$@|posted a file";
|
||||||
"PUSH_CHANNEL_MESSAGE_DOCS_any" = "%1$@|posted %2$d files";
|
"PUSH_CHANNEL_MESSAGE_DOCS_any" = "%1$@|posted %2$d files";
|
||||||
|
"PUSH_CHANNEL_MESSAGE_DOCS_TEXT_1" = "posted a file";
|
||||||
|
"PUSH_CHANNEL_MESSAGE_DOCS_TEXT_any" = "posted %d files";
|
||||||
|
|
||||||
"PUSH_CHAT_MESSAGE_TEXT" = "%2$@|%1$@:%3$@";
|
"PUSH_CHAT_MESSAGE_TEXT" = "%2$@|%1$@:%3$@";
|
||||||
"PUSH_CHAT_MESSAGE_NOTEXT" = "%2$@|%1$@ sent a message to the group";
|
"PUSH_CHAT_MESSAGE_NOTEXT" = "%2$@|%1$@ sent a message to the group";
|
||||||
@ -171,21 +187,31 @@
|
|||||||
"PUSH_CHAT_MESSAGE_FWD" = "%2$@|%1$@ forwarded a message";
|
"PUSH_CHAT_MESSAGE_FWD" = "%2$@|%1$@ forwarded a message";
|
||||||
"PUSH_CHAT_MESSAGE_FWDS_1" = "%2$@|%1$@ forwarded a message";
|
"PUSH_CHAT_MESSAGE_FWDS_1" = "%2$@|%1$@ forwarded a message";
|
||||||
"PUSH_CHAT_MESSAGE_FWDS_any" = "%2$@|%1$@ forwarded %3$d messages";
|
"PUSH_CHAT_MESSAGE_FWDS_any" = "%2$@|%1$@ forwarded %3$d messages";
|
||||||
|
"PUSH_CHAT_MESSAGE_FWDS_TEXT_1" = "{author} forwarded a message";
|
||||||
|
"PUSH_CHAT_MESSAGE_FWDS_TEXT_any" = "{author} forwarded %d messages";
|
||||||
"PUSH_CHAT_MESSAGE_PHOTO" = "%2$@|%1$@ sent a photo";
|
"PUSH_CHAT_MESSAGE_PHOTO" = "%2$@|%1$@ sent a photo";
|
||||||
"PUSH_CHAT_MESSAGE_PHOTOS_1" = "%2$@|%1$@ sent a photo";
|
"PUSH_CHAT_MESSAGE_PHOTOS_1" = "%2$@|%1$@ sent a photo";
|
||||||
"PUSH_CHAT_MESSAGE_PHOTOS_any" = "%2$@|%1$@ sent %3$d photos";
|
"PUSH_CHAT_MESSAGE_PHOTOS_any" = "%2$@|%1$@ sent %3$d photos";
|
||||||
|
"PUSH_CHAT_MESSAGE_PHOTOS_TEXT_1" = "{author} sent a photo";
|
||||||
|
"PUSH_CHAT_MESSAGE_PHOTOS_TEXT_any" = "{author} sent %d photos";
|
||||||
"PUSH_CHAT_MESSAGE_VIDEO" = "%2$@|%1$@ sent a video";
|
"PUSH_CHAT_MESSAGE_VIDEO" = "%2$@|%1$@ sent a video";
|
||||||
"PUSH_CHAT_MESSAGE_VIDEOS_1" = "%2$@|%1$@ sent a video";
|
"PUSH_CHAT_MESSAGE_VIDEOS_1" = "%2$@|%1$@ sent a video";
|
||||||
"PUSH_CHAT_MESSAGE_VIDEOS_any" = "%2$@|%1$@ sent %3$d videos";
|
"PUSH_CHAT_MESSAGE_VIDEOS_any" = "%2$@|%1$@ sent %3$d videos";
|
||||||
|
"PUSH_CHAT_MESSAGE_VIDEOS_TEXT_1" = "{author} sent a video";
|
||||||
|
"PUSH_CHAT_MESSAGE_VIDEOS_TEXT_any" = "{text} sent %d videos";
|
||||||
"PUSH_CHAT_MESSAGE_ROUND" = "%2$@|%1$@ sent a video message";
|
"PUSH_CHAT_MESSAGE_ROUND" = "%2$@|%1$@ sent a video message";
|
||||||
"PUSH_CHAT_MESSAGE_ROUNDS_1" = "%2$@|%1$@ sent a video message";
|
"PUSH_CHAT_MESSAGE_ROUNDS_1" = "%2$@|%1$@ sent a video message";
|
||||||
"PUSH_CHAT_MESSAGE_ROUNDS_any" = "%2$@|%1$@ sent %3$d video messages";
|
"PUSH_CHAT_MESSAGE_ROUNDS_any" = "%2$@|%1$@ sent %3$d video messages";
|
||||||
"PUSH_CHAT_MESSAGE" = "%2$@|%1$@ sent a message";
|
"PUSH_CHAT_MESSAGE" = "%2$@|%1$@ sent a message";
|
||||||
"PUSH_CHAT_MESSAGES_1" = "%2$@|%1$@ sent a message";
|
"PUSH_CHAT_MESSAGES_1" = "%2$@|%1$@ sent a message";
|
||||||
"PUSH_CHAT_MESSAGES_any" = "%2$@|%1$@ sent %3$d messages";
|
"PUSH_CHAT_MESSAGES_any" = "%2$@|%1$@ sent %3$d messages";
|
||||||
|
"PUSH_CHAT_MESSAGES_TEXT_1" = "{author} sent a message";
|
||||||
|
"PUSH_CHAT_MESSAGES_TEXT_any" = "{author} sent %d messages";
|
||||||
"PUSH_CHAT_ALBUM" = "%2$@|%1$@ sent an album";
|
"PUSH_CHAT_ALBUM" = "%2$@|%1$@ sent an album";
|
||||||
"PUSH_CHAT_MESSAGE_DOCS_FIX1_1" = "%2$@|%1$@ sent a file";
|
"PUSH_CHAT_MESSAGE_DOCS_FIX1_1" = "%2$@|%1$@ sent a file";
|
||||||
"PUSH_CHAT_MESSAGE_DOCS_FIX1_any" = "%2$@|%1$@ sent %3$d files";
|
"PUSH_CHAT_MESSAGE_DOCS_FIX1_any" = "%2$@|%1$@ sent %3$d files";
|
||||||
|
"PUSH_CHAT_MESSAGE_DOCS_TEXT_1" = "{author} sent a file";
|
||||||
|
"PUSH_CHAT_MESSAGE_DOCS_TEXT_any" = "{author} sent %d files";
|
||||||
|
|
||||||
"PUSH_PINNED_TEXT" = "%1$@|pinned \"%2$@\" ";
|
"PUSH_PINNED_TEXT" = "%1$@|pinned \"%2$@\" ";
|
||||||
"PUSH_PINNED_NOTEXT" = "%1$@|pinned a message";
|
"PUSH_PINNED_NOTEXT" = "%1$@|pinned a message";
|
||||||
@ -3298,7 +3324,7 @@ Unused sets are archived when you add more.";
|
|||||||
"Passport.DeleteDocument" = "Delete Document";
|
"Passport.DeleteDocument" = "Delete Document";
|
||||||
"Passport.DeleteDocumentConfirmation" = "Are you sure you want to delete this document? All details will be lost.";
|
"Passport.DeleteDocumentConfirmation" = "Are you sure you want to delete this document? All details will be lost.";
|
||||||
|
|
||||||
"Passport.Scans" = "SCANS";
|
"Passport.ScansHeader" = "SCANS";
|
||||||
"Passport.Scans.Upload" = "Upload Scan";
|
"Passport.Scans.Upload" = "Upload Scan";
|
||||||
"Passport.Scans.UploadNew" = "Upload Additional Scan";
|
"Passport.Scans.UploadNew" = "Upload Additional Scan";
|
||||||
"Passport.Scans.ScanIndex" = "Scan %@";
|
"Passport.Scans.ScanIndex" = "Scan %@";
|
||||||
@ -6571,3 +6597,8 @@ Sorry for the inconvenience.";
|
|||||||
"TwoFactorRemember.Done.Title" = "Perfect!";
|
"TwoFactorRemember.Done.Title" = "Perfect!";
|
||||||
"TwoFactorRemember.Done.Text" = "You still remember your password.";
|
"TwoFactorRemember.Done.Text" = "You still remember your password.";
|
||||||
"TwoFactorRemember.Done.Action" = "Back to Settings";
|
"TwoFactorRemember.Done.Action" = "Back to Settings";
|
||||||
|
|
||||||
|
"VoiceChat.VideoPreviewFrontCamera" = "Front Camera";
|
||||||
|
"VoiceChat.VideoPreviewBackCamera" = "Back Camera";
|
||||||
|
"VoiceChat.VideoPreviewContinue" = "Continue";
|
||||||
|
"VoiceChat.VideoPreviewShareScreenInfo" = "Everything on your screen, including notifications, will be shared.";
|
||||||
|
|||||||
@ -1 +0,0 @@
|
|||||||
|
|
||||||
@ -1 +0,0 @@
|
|||||||
|
|
||||||
@ -1 +0,0 @@
|
|||||||
|
|
||||||
@ -1 +0,0 @@
|
|||||||
|
|
||||||
@ -1 +0,0 @@
|
|||||||
|
|
||||||
@ -12,7 +12,6 @@ import Intents
|
|||||||
import OpenSSLEncryptionProvider
|
import OpenSSLEncryptionProvider
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import Postbox
|
import Postbox
|
||||||
import SyncCore
|
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import OpenSSLEncryptionProvider
|
import OpenSSLEncryptionProvider
|
||||||
import WidgetItemsUtils
|
import WidgetItemsUtils
|
||||||
|
|||||||
@ -3,3 +3,7 @@ config_setting(
|
|||||||
name = "ios_sim_arm64",
|
name = "ios_sim_arm64",
|
||||||
values = {"cpu": "ios_sim_arm64"},
|
values = {"cpu": "ios_sim_arm64"},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
exports_files([
|
||||||
|
"GenerateStrings/GenerateStrings.py",
|
||||||
|
])
|
||||||
|
|||||||
660
build-system/GenerateStrings/GenerateStrings.py
Normal file
660
build-system/GenerateStrings/GenerateStrings.py
Normal file
@ -0,0 +1,660 @@
|
|||||||
|
#!/bin/pyton3
|
||||||
|
|
||||||
|
# Based on https://github.com/chrisballinger/python-localizable
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import sys
|
||||||
|
import re
|
||||||
|
import codecs
|
||||||
|
import struct
|
||||||
|
|
||||||
|
|
||||||
|
def _unescape_key(s):
|
||||||
|
return s.replace('\\\n', '')
|
||||||
|
|
||||||
|
|
||||||
|
def _unescape(s):
|
||||||
|
s = s.replace('\\\n', '')
|
||||||
|
return s.replace('\\"', '"').replace(r'\n', '\n').replace(r'\r', '\r')
|
||||||
|
|
||||||
|
|
||||||
|
def _get_content(filename: str):
|
||||||
|
if filename is None:
|
||||||
|
return None
|
||||||
|
return _get_content_from_file(filename, 'utf-8')
|
||||||
|
|
||||||
|
|
||||||
|
def _get_content_from_file(filename: str, encoding: str):
|
||||||
|
f = open(filename, 'rb')
|
||||||
|
try:
|
||||||
|
f = codecs.open(filename, 'r', encoding=encoding)
|
||||||
|
return f.read()
|
||||||
|
except IOError as e:
|
||||||
|
print("Error opening file %s with encoding %s: %s" % (filename, encoding, e.message))
|
||||||
|
except Exception as e:
|
||||||
|
print("Unhandled exception: %s" % e)
|
||||||
|
finally:
|
||||||
|
f.close()
|
||||||
|
|
||||||
|
|
||||||
|
def parse_strings(filename: str):
|
||||||
|
content = _get_content(filename=filename)
|
||||||
|
|
||||||
|
stringset = []
|
||||||
|
f = content
|
||||||
|
if f.startswith(u'\ufeff'):
|
||||||
|
f = f.lstrip(u'\ufeff')
|
||||||
|
# regex for finding all comments in a file
|
||||||
|
cp = r'(?:/\*(?P<comment>(?:[^*]|(?:\*+[^*/]))*\**)\*/)'
|
||||||
|
p = re.compile(r'(?:%s[ \t]*[\n]|[\r\n]|[\r])?(?P<line>(("(?P<key>[^"\\]*(?:\\.[^"\\]*)*)")|('
|
||||||
|
r'?P<property>\w+))\s*=\s*"(?P<value>[^"\\]*(?:\\.[^"\\]*)*)"\s*;)' % cp, re.DOTALL | re.U)
|
||||||
|
c = re.compile(r'//[^\n]*\n|/\*(?:.|[\r\n])*?\*/', re.U)
|
||||||
|
ws = re.compile(r'\s+', re.U)
|
||||||
|
end = 0
|
||||||
|
for i in p.finditer(f):
|
||||||
|
start = i.start('line')
|
||||||
|
end_ = i.end()
|
||||||
|
key = i.group('key')
|
||||||
|
if not key:
|
||||||
|
key = i.group('property')
|
||||||
|
value = i.group('value')
|
||||||
|
while end < start:
|
||||||
|
m = c.match(f, end, start) or ws.match(f, end, start)
|
||||||
|
if not m or m.start() != end:
|
||||||
|
print("Invalid syntax: %s" % f[end:start])
|
||||||
|
end = m.end()
|
||||||
|
end = end_
|
||||||
|
key = _unescape_key(key)
|
||||||
|
stringset.append({'key': key, 'value': _unescape(value)})
|
||||||
|
return stringset
|
||||||
|
|
||||||
|
|
||||||
|
class PositionalArgument:
|
||||||
|
def __init__(self, index: int, kind: str):
|
||||||
|
self.index = index
|
||||||
|
self.kind = kind
|
||||||
|
|
||||||
|
|
||||||
|
class Entry:
|
||||||
|
def __init__(self, name: str, is_pluralized: bool, positional_arguments: [PositionalArgument]):
|
||||||
|
self.name = name
|
||||||
|
self.is_pluralized = is_pluralized
|
||||||
|
self.positional_arguments = positional_arguments
|
||||||
|
|
||||||
|
|
||||||
|
def parse_positional_arguments(string: str) -> [PositionalArgument]:
|
||||||
|
result = list()
|
||||||
|
|
||||||
|
implicit_index = 0
|
||||||
|
argument = re.compile(r'%((\d)\$)?([@d])', re.U)
|
||||||
|
start_position = 0
|
||||||
|
while True:
|
||||||
|
m = argument.search(string, start_position)
|
||||||
|
if m is None:
|
||||||
|
break
|
||||||
|
index = m.group(2)
|
||||||
|
if index is None:
|
||||||
|
index = implicit_index
|
||||||
|
implicit_index += 1
|
||||||
|
else:
|
||||||
|
index = int(index)
|
||||||
|
kind = m.group(3)
|
||||||
|
result.append(PositionalArgument(index=index, kind=kind))
|
||||||
|
start_position = m.end(0)
|
||||||
|
|
||||||
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
def parse_entries(strings: [dict]) -> [Entry]:
|
||||||
|
entries = []
|
||||||
|
pluralized = re.compile(r'^(.*?)_(0|1|2|3_10|many|any)$', re.U)
|
||||||
|
processed_entries = set()
|
||||||
|
for string in strings:
|
||||||
|
key = string['key']
|
||||||
|
m = pluralized.match(key)
|
||||||
|
if m is not None:
|
||||||
|
raw_key = m.group(1)
|
||||||
|
|
||||||
|
if raw_key in processed_entries:
|
||||||
|
continue
|
||||||
|
processed_entries.add(raw_key)
|
||||||
|
|
||||||
|
entries.append(Entry(
|
||||||
|
name=raw_key,
|
||||||
|
is_pluralized=True,
|
||||||
|
positional_arguments=[]
|
||||||
|
))
|
||||||
|
else:
|
||||||
|
if key in processed_entries:
|
||||||
|
continue
|
||||||
|
processed_entries.add(key)
|
||||||
|
|
||||||
|
entries.append(Entry(
|
||||||
|
name=key,
|
||||||
|
is_pluralized=False,
|
||||||
|
positional_arguments=parse_positional_arguments(string['value'])
|
||||||
|
))
|
||||||
|
entries.sort(key=lambda x: x.name)
|
||||||
|
return entries
|
||||||
|
|
||||||
|
|
||||||
|
def write_string(file, string: str):
|
||||||
|
file.write((string + '\n').encode('utf-8'))
|
||||||
|
|
||||||
|
|
||||||
|
def write_bin_uint32(file, value: int):
|
||||||
|
file.write(struct.pack('I', value))
|
||||||
|
|
||||||
|
|
||||||
|
def write_bin_uint8(file, value: int):
|
||||||
|
file.write(struct.pack('B', value))
|
||||||
|
|
||||||
|
|
||||||
|
def write_bin_string(file, value: str):
|
||||||
|
file.write(value.encode('utf-8'))
|
||||||
|
|
||||||
|
|
||||||
|
class IndexCounter:
|
||||||
|
def __init__(self):
|
||||||
|
self.dictionary = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
||||||
|
self.filter_ids = {
|
||||||
|
'NO',
|
||||||
|
'YES',
|
||||||
|
}
|
||||||
|
self.max_index = len(self.dictionary) - 1
|
||||||
|
self.value = []
|
||||||
|
self.increment()
|
||||||
|
|
||||||
|
def increment(self):
|
||||||
|
index = 0
|
||||||
|
while True:
|
||||||
|
if len(self.value) == index:
|
||||||
|
for i in range(len(self.value)):
|
||||||
|
self.value[i] = 0
|
||||||
|
self.value.append(0)
|
||||||
|
break
|
||||||
|
if self.value[index] + 1 <= self.max_index:
|
||||||
|
if index != 0:
|
||||||
|
for i in range(index):
|
||||||
|
self.value[i] = 0
|
||||||
|
self.value[index] += 1
|
||||||
|
break
|
||||||
|
else:
|
||||||
|
index += 1
|
||||||
|
|
||||||
|
def get(self):
|
||||||
|
result = ''
|
||||||
|
for index in reversed(self.value):
|
||||||
|
result += self.dictionary[index]
|
||||||
|
return result
|
||||||
|
|
||||||
|
def get_next_valid_id(self) -> str:
|
||||||
|
while True:
|
||||||
|
result = self.get()
|
||||||
|
self.increment()
|
||||||
|
if result not in self.filter_ids:
|
||||||
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
def sanitize_entry_identifer(string: str) -> str:
|
||||||
|
return string.replace('.', '_')
|
||||||
|
|
||||||
|
|
||||||
|
def generate(header_path: str, implementation_path: str, data_path: str, entries: [Entry]):
|
||||||
|
print('Generating strings into:\n{}\n{}'.format(header_path, implementation_path))
|
||||||
|
with open(header_path, 'wb') as header_file, open(implementation_path, 'wb') as source_file,\
|
||||||
|
open(data_path, 'wb') as data_file:
|
||||||
|
|
||||||
|
formatted_accessors = ''
|
||||||
|
max_format_argument_count = 0
|
||||||
|
for entry in entries:
|
||||||
|
num_arguments = len(entry.positional_arguments)
|
||||||
|
if num_arguments > max_format_argument_count:
|
||||||
|
max_format_argument_count = num_arguments
|
||||||
|
if max_format_argument_count != 0:
|
||||||
|
for num_arguments in range(1, max_format_argument_count + 1):
|
||||||
|
arguments_string = ''
|
||||||
|
arguments_array = ''
|
||||||
|
for i in range(0, num_arguments):
|
||||||
|
arguments_string += ', id arg{}'.format(i)
|
||||||
|
if i != 0:
|
||||||
|
arguments_array += ', '
|
||||||
|
arguments_array += '[[NSString alloc] initWithFormat:@"%@", arg{}]'.format(i)
|
||||||
|
formatted_accessors += '''
|
||||||
|
static _FormattedString * _Nonnull getFormatted{num_arguments}(_PresentationStrings * _Nonnull strings,
|
||||||
|
uint32_t keyId{arguments_string}) {{
|
||||||
|
NSString *formatString = getSingle(strings, strings->_idToKey[@(keyId)]);
|
||||||
|
NSArray<_FormattedStringRange *> *argumentRanges = extractArgumentRanges(formatString);
|
||||||
|
return formatWithArgumentRanges(formatString, argumentRanges, @[{arguments_array}]);
|
||||||
|
}}
|
||||||
|
'''.format(num_arguments=num_arguments, arguments_string=arguments_string, arguments_array=arguments_array)
|
||||||
|
|
||||||
|
write_string(header_file, '''// Automatically-generated file, do not edit
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
@interface _FormattedStringRange : NSObject
|
||||||
|
|
||||||
|
@property (nonatomic, readonly) NSInteger index;
|
||||||
|
@property (nonatomic, readonly) NSRange range;
|
||||||
|
|
||||||
|
- (instancetype _Nonnull)initWithIndex:(NSInteger)index range:(NSRange)range;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
@interface _FormattedString : NSObject
|
||||||
|
|
||||||
|
@property (nonatomic, strong, readonly) NSString * _Nonnull string;
|
||||||
|
@property (nonatomic, strong, readonly) NSArray<_FormattedStringRange *> * _Nonnull ranges;
|
||||||
|
|
||||||
|
- (instancetype _Nonnull)initWithString:(NSString * _Nonnull)string
|
||||||
|
ranges:(NSArray<_FormattedStringRange *> * _Nonnull)ranges;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
@interface _PresentationStringsComponent : NSObject
|
||||||
|
|
||||||
|
@property (nonatomic, strong, readonly) NSString * _Nonnull languageCode;
|
||||||
|
@property (nonatomic, strong, readonly) NSString * _Nonnull localizedName;
|
||||||
|
@property (nonatomic, strong, readonly) NSString * _Nullable pluralizationRulesCode;
|
||||||
|
@property (nonatomic, strong, readonly) NSDictionary<NSString *, NSString *> * _Nonnull dict;
|
||||||
|
|
||||||
|
- (instancetype _Nonnull)initWithLanguageCode:(NSString * _Nonnull)languageCode
|
||||||
|
localizedName:(NSString * _Nonnull)localizedName
|
||||||
|
pluralizationRulesCode:(NSString * _Nullable)pluralizationRulesCode
|
||||||
|
dict:(NSDictionary<NSString *, NSString *> * _Nonnull)dict;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface _PresentationStrings : NSObject
|
||||||
|
|
||||||
|
@property (nonatomic, readonly) uint32_t lc;
|
||||||
|
@property (nonatomic, strong, readonly) _PresentationStringsComponent * _Nonnull primaryComponent;
|
||||||
|
@property (nonatomic, strong, readonly) _PresentationStringsComponent * _Nullable secondaryComponent;
|
||||||
|
@property (nonatomic, strong, readonly) NSString * _Nonnull baseLanguageCode;
|
||||||
|
@property (nonatomic, strong, readonly) NSString * _Nonnull groupingSeparator;
|
||||||
|
|
||||||
|
- (instancetype _Nonnull)initWithPrimaryComponent:(_PresentationStringsComponent * _Nonnull)primaryComponent
|
||||||
|
secondaryComponent:(_PresentationStringsComponent * _Nullable)secondaryComponent
|
||||||
|
groupingSeparator:(NSString * _Nullable)groupingSeparator;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
''')
|
||||||
|
|
||||||
|
write_string(source_file, '''// Automatically-generated file, do not edit
|
||||||
|
|
||||||
|
#import <PresentationStrings/PresentationStrings.h>
|
||||||
|
#import <NumberPluralizationForm/NumberPluralizationForm.h>
|
||||||
|
|
||||||
|
@implementation _FormattedStringRange
|
||||||
|
|
||||||
|
- (instancetype _Nonnull)initWithIndex:(NSInteger)index range:(NSRange)range {
|
||||||
|
self = [super init];
|
||||||
|
if (self != nil) {
|
||||||
|
_index = index;
|
||||||
|
_range = range;
|
||||||
|
}
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
@implementation _FormattedString
|
||||||
|
|
||||||
|
- (instancetype _Nonnull)initWithString:(NSString * _Nonnull)string
|
||||||
|
ranges:(NSArray<_FormattedStringRange *> * _Nonnull)ranges {
|
||||||
|
self = [super init];
|
||||||
|
if (self != nil) {
|
||||||
|
_string = string;
|
||||||
|
_ranges = ranges;
|
||||||
|
}
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation _PresentationStringsComponent
|
||||||
|
|
||||||
|
- (instancetype _Nonnull)initWithLanguageCode:(NSString * _Nonnull)languageCode
|
||||||
|
localizedName:(NSString * _Nonnull)localizedName
|
||||||
|
pluralizationRulesCode:(NSString * _Nullable)pluralizationRulesCode
|
||||||
|
dict:(NSDictionary<NSString *, NSString *> * _Nonnull)dict {
|
||||||
|
self = [super init];
|
||||||
|
if (self != nil) {
|
||||||
|
_languageCode = languageCode;
|
||||||
|
_localizedName = localizedName;
|
||||||
|
_pluralizationRulesCode = pluralizationRulesCode;
|
||||||
|
_dict = dict;
|
||||||
|
}
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface _PresentationStrings () {
|
||||||
|
@public
|
||||||
|
NSDictionary<NSNumber *, NSString *> *_idToKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
static NSArray<_FormattedStringRange *> * _Nonnull extractArgumentRanges(NSString * _Nonnull string) {
|
||||||
|
static NSRegularExpression *argumentRegex = nil;
|
||||||
|
static dispatch_once_t onceToken;
|
||||||
|
dispatch_once(&onceToken, ^{
|
||||||
|
argumentRegex = [NSRegularExpression regularExpressionWithPattern:@"%(((\\\\d+)\\\\$)?)([@df])"
|
||||||
|
options:0 error:nil];
|
||||||
|
});
|
||||||
|
|
||||||
|
NSMutableArray<_FormattedStringRange *> *result = [[NSMutableArray alloc] init];
|
||||||
|
NSArray<NSTextCheckingResult *> *matches = [argumentRegex matchesInString:string
|
||||||
|
options:0 range:NSMakeRange(0, string.length)];
|
||||||
|
int index = 0;
|
||||||
|
for (NSTextCheckingResult *match in matches) {
|
||||||
|
int currentIndex = index;
|
||||||
|
NSRange matchRange = [match rangeAtIndex:3];
|
||||||
|
if (matchRange.location != NSNotFound) {
|
||||||
|
currentIndex = [[string substringWithRange:matchRange] intValue] - 1;
|
||||||
|
}
|
||||||
|
[result addObject:[[_FormattedStringRange alloc] initWithIndex:currentIndex range:[match rangeAtIndex:0]]];
|
||||||
|
index += 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
static _FormattedString * _Nonnull formatWithArgumentRanges(
|
||||||
|
NSString * _Nonnull string,
|
||||||
|
NSArray<_FormattedStringRange *> * _Nonnull ranges,
|
||||||
|
NSArray<NSString *> * _Nonnull arguments
|
||||||
|
) {
|
||||||
|
NSMutableArray<_FormattedStringRange *> *resultingRanges = [[NSMutableArray alloc] init];
|
||||||
|
NSMutableString *result = [[NSMutableString alloc] init];
|
||||||
|
NSUInteger currentLocation = 0;
|
||||||
|
|
||||||
|
for (_FormattedStringRange *range in ranges) {
|
||||||
|
if (currentLocation < range.range.location) {
|
||||||
|
[result appendString:[string substringWithRange:
|
||||||
|
NSMakeRange(currentLocation, range.range.location - currentLocation)]];
|
||||||
|
}
|
||||||
|
[resultingRanges addObject:[[_FormattedStringRange alloc] initWithIndex:range.index
|
||||||
|
range:NSMakeRange(result.length, arguments[range.index].length)]];
|
||||||
|
[result appendString:arguments[range.index]];
|
||||||
|
currentLocation = range.range.location + range.range.length;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (currentLocation != string.length) {
|
||||||
|
[result appendString:[string substringWithRange:NSMakeRange(currentLocation, string.length - currentLocation)]];
|
||||||
|
}
|
||||||
|
|
||||||
|
return [[_FormattedString alloc] initWithString:result ranges:resultingRanges];
|
||||||
|
}
|
||||||
|
|
||||||
|
static NSString * _Nonnull getPluralizationSuffix(_PresentationStrings * _Nonnull strings, int32_t value) {
|
||||||
|
NumberPluralizationForm pluralizationForm = numberPluralizationForm(strings.lc, value);
|
||||||
|
switch (pluralizationForm) {
|
||||||
|
case NumberPluralizationFormZero: {
|
||||||
|
return @"_0";
|
||||||
|
}
|
||||||
|
case NumberPluralizationFormOne: {
|
||||||
|
return @"_1";
|
||||||
|
}
|
||||||
|
case NumberPluralizationFormTwo: {
|
||||||
|
return @"_2";
|
||||||
|
}
|
||||||
|
case NumberPluralizationFormFew: {
|
||||||
|
return @"_3_10";
|
||||||
|
}
|
||||||
|
case NumberPluralizationFormMany: {
|
||||||
|
return @"_many";
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
return @"_any";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static NSString * _Nonnull getSingle(_PresentationStrings * _Nonnull strings, NSString * _Nonnull key) {
|
||||||
|
NSString *result = strings.primaryComponent.dict[key];
|
||||||
|
if (!result) {
|
||||||
|
result = strings.secondaryComponent.dict[key];
|
||||||
|
}
|
||||||
|
if (!result) {
|
||||||
|
static NSDictionary<NSString *, NSString *> *fallbackDict = nil;
|
||||||
|
static dispatch_once_t onceToken;
|
||||||
|
dispatch_once(&onceToken, ^{
|
||||||
|
NSString *lprojPath = [[NSBundle mainBundle] pathForResource:@"en" ofType:@"lproj"];
|
||||||
|
if (!lprojPath) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
NSBundle *bundle = [NSBundle bundleWithPath:lprojPath];
|
||||||
|
if (!bundle) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
NSString *stringsPath = [bundle pathForResource:@"Localizable" ofType:@"strings"];
|
||||||
|
if (!stringsPath) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
fallbackDict = [NSDictionary dictionaryWithContentsOfURL:[NSURL fileURLWithPath:stringsPath]];
|
||||||
|
});
|
||||||
|
result = fallbackDict[key];
|
||||||
|
}
|
||||||
|
if (!result) {
|
||||||
|
result = key;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
static NSString * _Nonnull getSingleIndirect(_PresentationStrings * _Nonnull strings, uint32_t keyId) {
|
||||||
|
return getSingle(strings, strings->_idToKey[@(keyId)]);
|
||||||
|
}
|
||||||
|
|
||||||
|
static NSString * _Nonnull getPluralized(_PresentationStrings * _Nonnull strings, NSString * _Nonnull key,
|
||||||
|
int32_t value) {
|
||||||
|
NSString *parsedKey = [[NSString alloc] initWithFormat:@"%@%@", key, getPluralizationSuffix(strings, value)];
|
||||||
|
NSString *formatString = getSingle(strings, parsedKey);
|
||||||
|
NSString *stringValue = formatNumberWithGroupingSeparator(strings.groupingSeparator, value);
|
||||||
|
NSString *result = [[NSString alloc] initWithFormat:formatString, stringValue];
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
static NSString * _Nonnull getPluralizedIndirect(_PresentationStrings * _Nonnull strings, uint32_t keyId,
|
||||||
|
int32_t value) {
|
||||||
|
return getPluralized(strings, strings->_idToKey[@(keyId)], value);
|
||||||
|
}''' + formatted_accessors + '''
|
||||||
|
@implementation _PresentationStrings
|
||||||
|
|
||||||
|
- (instancetype _Nonnull)initWithPrimaryComponent:(_PresentationStringsComponent * _Nonnull)primaryComponent
|
||||||
|
secondaryComponent:(_PresentationStringsComponent * _Nullable)secondaryComponent
|
||||||
|
groupingSeparator:(NSString * _Nullable)groupingSeparator {
|
||||||
|
self = [super init];
|
||||||
|
if (self != nil) {
|
||||||
|
static NSDictionary<NSNumber *, NSString *> *idToKey = nil;
|
||||||
|
static dispatch_once_t onceToken;
|
||||||
|
dispatch_once(&onceToken, ^{
|
||||||
|
NSString *dataPath = [[NSBundle mainBundle] pathForResource:@"PresentationStrings" ofType:@"data"];
|
||||||
|
if (!dataPath) {
|
||||||
|
assert(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
NSData *data = [NSData dataWithContentsOfURL:[NSURL fileURLWithPath:dataPath]];
|
||||||
|
if (!data) {
|
||||||
|
assert(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (data.length < 4) {
|
||||||
|
assert(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
NSMutableDictionary<NSNumber *, NSString *> *result = [[NSMutableDictionary alloc] init];
|
||||||
|
|
||||||
|
uint32_t entryCount = 0;
|
||||||
|
[data getBytes:&entryCount range:NSMakeRange(0, 4)];
|
||||||
|
|
||||||
|
NSInteger offset = 4;
|
||||||
|
for (uint32_t i = 0; i < entryCount; i++) {
|
||||||
|
uint8_t stringLength = 0;
|
||||||
|
[data getBytes:&stringLength range:NSMakeRange(offset, 1)];
|
||||||
|
offset += 1;
|
||||||
|
|
||||||
|
NSData *stringData = [data subdataWithRange:NSMakeRange(offset, stringLength)];
|
||||||
|
offset += stringLength;
|
||||||
|
|
||||||
|
result[@(i)] = [[NSString alloc] initWithData:stringData encoding:NSUTF8StringEncoding];
|
||||||
|
}
|
||||||
|
idToKey = result;
|
||||||
|
});
|
||||||
|
_idToKey = idToKey;
|
||||||
|
|
||||||
|
_primaryComponent = primaryComponent;
|
||||||
|
_secondaryComponent = secondaryComponent;
|
||||||
|
_groupingSeparator = groupingSeparator;
|
||||||
|
|
||||||
|
if (secondaryComponent) {
|
||||||
|
_baseLanguageCode = secondaryComponent.languageCode;
|
||||||
|
} else {
|
||||||
|
_baseLanguageCode = primaryComponent.languageCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
NSString *languageCode = nil;
|
||||||
|
if (primaryComponent.pluralizationRulesCode) {
|
||||||
|
languageCode = primaryComponent.pluralizationRulesCode;
|
||||||
|
} else {
|
||||||
|
languageCode = primaryComponent.languageCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
NSString *rawCode = languageCode;
|
||||||
|
|
||||||
|
NSRange range = [languageCode rangeOfString:@"_"];
|
||||||
|
if (range.location != NSNotFound) {
|
||||||
|
rawCode = [rawCode substringWithRange:NSMakeRange(0, range.location)];
|
||||||
|
}
|
||||||
|
range = [languageCode rangeOfString:@"-"];
|
||||||
|
if (range.location != NSNotFound) {
|
||||||
|
rawCode = [rawCode substringWithRange:NSMakeRange(0, range.location)];
|
||||||
|
}
|
||||||
|
|
||||||
|
rawCode = [rawCode lowercaseString];
|
||||||
|
|
||||||
|
uint32_t lc = 0;
|
||||||
|
for (NSInteger i = 0; i < rawCode.length; i++) {
|
||||||
|
lc = (lc << 8) + (uint32_t)[rawCode characterAtIndex:i];
|
||||||
|
}
|
||||||
|
_lc = lc;
|
||||||
|
}
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
''')
|
||||||
|
|
||||||
|
counter = IndexCounter()
|
||||||
|
|
||||||
|
entry_keys = []
|
||||||
|
|
||||||
|
for entry in entries:
|
||||||
|
entry_id = '_L' + counter.get_next_valid_id()
|
||||||
|
|
||||||
|
entry_key_id = len(entry_keys)
|
||||||
|
entry_keys.append(entry.name)
|
||||||
|
|
||||||
|
write_string(source_file, '// {}'.format(entry.name))
|
||||||
|
|
||||||
|
function_arguments = ''
|
||||||
|
format_arguments_array = ''
|
||||||
|
if entry.is_pluralized:
|
||||||
|
function_return_spec = 'NSString * _Nonnull'
|
||||||
|
swift_spec = '_PresentationStrings.{}(self:_:)'.format(sanitize_entry_identifer(entry.name))
|
||||||
|
function_arguments = ', int32_t value'
|
||||||
|
elif len(entry.positional_arguments) != 0:
|
||||||
|
function_return_spec = '_FormattedString * _Nonnull'
|
||||||
|
positional_arguments_spec = ''
|
||||||
|
argument_index = -1
|
||||||
|
for argument in entry.positional_arguments:
|
||||||
|
argument_index += 1
|
||||||
|
format_arguments_array += ', '
|
||||||
|
if argument.kind == 'd':
|
||||||
|
function_arguments += ', NSInteger _{}'.format(argument_index)
|
||||||
|
format_arguments_array += '@(_{})'\
|
||||||
|
.format(argument_index)
|
||||||
|
elif argument.kind == '@':
|
||||||
|
function_arguments += ', NSString * _Nonnull _{}'.format(argument_index)
|
||||||
|
format_arguments_array += '_{}'.format(argument_index)
|
||||||
|
else:
|
||||||
|
raise Exception('Unsupported argument type {}'.format(argument.kind))
|
||||||
|
positional_arguments_spec += '_:'
|
||||||
|
swift_spec = '_PresentationStrings.{}(self:{})'.format(
|
||||||
|
sanitize_entry_identifer(entry.name), positional_arguments_spec)
|
||||||
|
else:
|
||||||
|
function_return_spec = 'NSString * _Nonnull'
|
||||||
|
swift_spec = 'getter:_PresentationStrings.{}(self:)'.format(sanitize_entry_identifer(entry.name))
|
||||||
|
|
||||||
|
function_spec = '{} {}'.format(function_return_spec, entry_id)
|
||||||
|
function_spec += '(_PresentationStrings * _Nonnull _self{})'.format(function_arguments)
|
||||||
|
|
||||||
|
write_string(header_file, '{function_spec} __attribute__((__swift_name__("{swift_spec}")));'.format(
|
||||||
|
function_spec=function_spec, swift_spec=swift_spec))
|
||||||
|
|
||||||
|
if entry.is_pluralized:
|
||||||
|
write_string(source_file, function_spec + ''' {{
|
||||||
|
return getPluralizedIndirect(_self, {entry_key_id}, value);
|
||||||
|
}}'''.format(key=entry.name, entry_key_id=entry_key_id))
|
||||||
|
elif len(entry.positional_arguments) != 0:
|
||||||
|
write_string(source_file, function_spec + ''' {{
|
||||||
|
return getFormatted{argument_count}(_self, {key_id}{arguments_array});
|
||||||
|
}}'''.format(key_id=entry_key_id, argument_count=len(entry.positional_arguments), arguments_array=format_arguments_array))
|
||||||
|
else:
|
||||||
|
write_string(source_file, function_spec + ''' {{
|
||||||
|
return getSingleIndirect(_self, {entry_key_id});
|
||||||
|
}}'''.format(key=entry.name, entry_key_id=entry_key_id))
|
||||||
|
|
||||||
|
write_bin_uint32(data_file, len(entry_keys))
|
||||||
|
for entry_key in entry_keys:
|
||||||
|
write_bin_uint8(data_file, len(entry_key))
|
||||||
|
write_bin_string(data_file, entry_key)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
parser = argparse.ArgumentParser(prog='GenerateStrings')
|
||||||
|
|
||||||
|
parser.add_argument(
|
||||||
|
'--source',
|
||||||
|
required=True,
|
||||||
|
help='Path to Localizable.strings',
|
||||||
|
metavar='path'
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
'--outImplementation',
|
||||||
|
required=True,
|
||||||
|
help='Path to PresentationStrings.m',
|
||||||
|
metavar='path'
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
'--outHeader',
|
||||||
|
required=True,
|
||||||
|
help='Path to PresentationStrings.h',
|
||||||
|
metavar='path'
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
'--outData',
|
||||||
|
required=True,
|
||||||
|
help='Path to PresentationStrings.data',
|
||||||
|
metavar='path'
|
||||||
|
)
|
||||||
|
|
||||||
|
if len(sys.argv) < 2:
|
||||||
|
parser.print_help()
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
parsed_strings = parse_strings(args.source)
|
||||||
|
all_entries = parse_entries(parsed_strings)
|
||||||
|
generate(header_path=args.outHeader, implementation_path=args.outImplementation, data_path=args.outData,
|
||||||
|
entries=all_entries)
|
||||||
@ -16,7 +16,6 @@ swift_library(
|
|||||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
||||||
"//submodules/Postbox:Postbox",
|
"//submodules/Postbox:Postbox",
|
||||||
"//submodules/TelegramCore:TelegramCore",
|
"//submodules/TelegramCore:TelegramCore",
|
||||||
"//submodules/SyncCore:SyncCore",
|
|
||||||
],
|
],
|
||||||
visibility = [
|
visibility = [
|
||||||
"//visibility:public",
|
"//visibility:public",
|
||||||
|
|||||||
@ -3,7 +3,6 @@ import UIKit
|
|||||||
import AsyncDisplayKit
|
import AsyncDisplayKit
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import TelegramPresentationData
|
import TelegramPresentationData
|
||||||
import TelegramUIPreferences
|
import TelegramUIPreferences
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
|
|||||||
@ -2,7 +2,6 @@ import Foundation
|
|||||||
import UIKit
|
import UIKit
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import TextFormat
|
import TextFormat
|
||||||
import AsyncDisplayKit
|
import AsyncDisplayKit
|
||||||
import Display
|
import Display
|
||||||
|
|||||||
@ -2,7 +2,6 @@ import Foundation
|
|||||||
import Contacts
|
import Contacts
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
|
|
||||||
public final class DeviceContactPhoneNumberData: Equatable {
|
public final class DeviceContactPhoneNumberData: Equatable {
|
||||||
public let label: String
|
public let label: String
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import TelegramUIPreferences
|
import TelegramUIPreferences
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramUIPreferences
|
import TelegramUIPreferences
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import TelegramUIPreferences
|
import TelegramUIPreferences
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import UIKit
|
import UIKit
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import Postbox
|
import Postbox
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import TelegramUIPreferences
|
import TelegramUIPreferences
|
||||||
|
|||||||
@ -18,10 +18,10 @@ public final class GalleryControllerActionInteraction {
|
|||||||
public let openHashtag: (String?, String) -> Void
|
public let openHashtag: (String?, String) -> Void
|
||||||
public let openBotCommand: (String) -> Void
|
public let openBotCommand: (String) -> Void
|
||||||
public let addContact: (String) -> Void
|
public let addContact: (String) -> Void
|
||||||
public let storeMediaPlaybackState: (MessageId, Double?) -> Void
|
public let storeMediaPlaybackState: (MessageId, Double?, Double) -> Void
|
||||||
public let editMedia: (MessageId, [UIView], @escaping () -> Void) -> Void
|
public let editMedia: (MessageId, [UIView], @escaping () -> Void) -> Void
|
||||||
|
|
||||||
public init(openUrl: @escaping (String, Bool) -> Void, openUrlIn: @escaping (String) -> Void, openPeerMention: @escaping (String) -> Void, openPeer: @escaping (PeerId) -> Void, openHashtag: @escaping (String?, String) -> Void, openBotCommand: @escaping (String) -> Void, addContact: @escaping (String) -> Void, storeMediaPlaybackState: @escaping (MessageId, Double?) -> Void, editMedia: @escaping (MessageId, [UIView], @escaping () -> Void) -> Void) {
|
public init(openUrl: @escaping (String, Bool) -> Void, openUrlIn: @escaping (String) -> Void, openPeerMention: @escaping (String) -> Void, openPeer: @escaping (PeerId) -> Void, openHashtag: @escaping (String?, String) -> Void, openBotCommand: @escaping (String) -> Void, addContact: @escaping (String) -> Void, storeMediaPlaybackState: @escaping (MessageId, Double?, Double) -> Void, editMedia: @escaping (MessageId, [UIView], @escaping () -> Void) -> Void) {
|
||||||
self.openUrl = openUrl
|
self.openUrl = openUrl
|
||||||
self.openUrlIn = openUrlIn
|
self.openUrlIn = openUrlIn
|
||||||
self.openPeerMention = openPeerMention
|
self.openPeerMention = openPeerMention
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
|
|
||||||
private let minimalStreamableSize: Int = 384 * 1024
|
private let minimalStreamableSize: Int = 384 * 1024
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import Postbox
|
import Postbox
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import UIKit
|
import UIKit
|
||||||
import AsyncDisplayKit
|
import AsyncDisplayKit
|
||||||
|
|||||||
@ -2,7 +2,6 @@ import Foundation
|
|||||||
import UIKit
|
import UIKit
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import Display
|
import Display
|
||||||
import AsyncDisplayKit
|
import AsyncDisplayKit
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import TelegramPresentationData
|
import TelegramPresentationData
|
||||||
|
|
||||||
public protocol PeersNearbyManager {
|
public protocol PeersNearbyManager {
|
||||||
|
|||||||
@ -3,7 +3,6 @@ import UIKit
|
|||||||
import AsyncDisplayKit
|
import AsyncDisplayKit
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import TelegramAudio
|
import TelegramAudio
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramUIPreferences
|
import TelegramUIPreferences
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
|
|
||||||
public func storedMessageFromSearchPeer(account: Account, peer: Peer) -> Signal<PeerId, NoError> {
|
public func storedMessageFromSearchPeer(account: Account, peer: Peer) -> Signal<PeerId, NoError> {
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import TelegramPresentationData
|
import TelegramPresentationData
|
||||||
|
|
||||||
public protocol ThemeUpdateManager: class {
|
public protocol ThemeUpdateManager: class {
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import AsyncDisplayKit
|
|||||||
import Postbox
|
import Postbox
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import Display
|
import Display
|
||||||
import TelegramAudio
|
import TelegramAudio
|
||||||
import UniversalMediaPlayer
|
import UniversalMediaPlayer
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import SyncCore
|
import TelegramCore
|
||||||
|
|
||||||
public struct VideoCallsConfiguration: Equatable {
|
public struct VideoCallsConfiguration: Equatable {
|
||||||
public enum VideoCallsSupport {
|
public enum VideoCallsSupport {
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import TelegramPresentationData
|
import TelegramPresentationData
|
||||||
|
|
||||||
public enum WallpaperUploadManagerStatus {
|
public enum WallpaperUploadManagerStatus {
|
||||||
|
|||||||
@ -10,7 +10,6 @@ swift_library(
|
|||||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
||||||
"//submodules/Postbox:Postbox",
|
"//submodules/Postbox:Postbox",
|
||||||
"//submodules/TelegramCore:TelegramCore",
|
"//submodules/TelegramCore:TelegramCore",
|
||||||
"//submodules/SyncCore:SyncCore",
|
|
||||||
"//submodules/AccountContext:AccountContext",
|
"//submodules/AccountContext:AccountContext",
|
||||||
"//submodules/TelegramUIPreferences:TelegramUIPreferences",
|
"//submodules/TelegramUIPreferences:TelegramUIPreferences",
|
||||||
],
|
],
|
||||||
|
|||||||
@ -2,7 +2,6 @@ import Foundation
|
|||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import TelegramUIPreferences
|
import TelegramUIPreferences
|
||||||
import AccountContext
|
import AccountContext
|
||||||
|
|
||||||
|
|||||||
@ -9,7 +9,6 @@ swift_library(
|
|||||||
deps = [
|
deps = [
|
||||||
"//submodules/Postbox:Postbox",
|
"//submodules/Postbox:Postbox",
|
||||||
"//submodules/TelegramCore:TelegramCore",
|
"//submodules/TelegramCore:TelegramCore",
|
||||||
"//submodules/SyncCore:SyncCore",
|
|
||||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
|
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
|
||||||
"//submodules/Display:Display",
|
"//submodules/Display:Display",
|
||||||
"//submodules/AvatarNode:AvatarNode",
|
"//submodules/AvatarNode:AvatarNode",
|
||||||
|
|||||||
@ -3,7 +3,6 @@ import UIKit
|
|||||||
import AsyncDisplayKit
|
import AsyncDisplayKit
|
||||||
import Display
|
import Display
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramPresentationData
|
import TelegramPresentationData
|
||||||
import AvatarNode
|
import AvatarNode
|
||||||
|
|||||||
@ -12,7 +12,6 @@ swift_library(
|
|||||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
||||||
"//submodules/Postbox:Postbox",
|
"//submodules/Postbox:Postbox",
|
||||||
"//submodules/TelegramCore:TelegramCore",
|
"//submodules/TelegramCore:TelegramCore",
|
||||||
"//submodules/SyncCore:SyncCore",
|
|
||||||
"//submodules/AccountContext:AccountContext",
|
"//submodules/AccountContext:AccountContext",
|
||||||
"//submodules/AvatarNode:AvatarNode",
|
"//submodules/AvatarNode:AvatarNode",
|
||||||
"//submodules/AudioBlob:AudioBlob",
|
"//submodules/AudioBlob:AudioBlob",
|
||||||
|
|||||||
@ -6,7 +6,6 @@ import AvatarNode
|
|||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import AccountContext
|
import AccountContext
|
||||||
import AudioBlob
|
import AudioBlob
|
||||||
|
|
||||||
|
|||||||
@ -10,7 +10,6 @@ swift_library(
|
|||||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
||||||
"//submodules/Postbox:Postbox",
|
"//submodules/Postbox:Postbox",
|
||||||
"//submodules/TelegramCore:TelegramCore",
|
"//submodules/TelegramCore:TelegramCore",
|
||||||
"//submodules/SyncCore:SyncCore",
|
|
||||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
|
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
|
||||||
"//submodules/Display:Display",
|
"//submodules/Display:Display",
|
||||||
"//submodules/YuvConversion:YuvConversion",
|
"//submodules/YuvConversion:YuvConversion",
|
||||||
|
|||||||
@ -12,7 +12,6 @@ swift_library(
|
|||||||
"//submodules/Display:Display",
|
"//submodules/Display:Display",
|
||||||
"//submodules/Postbox:Postbox",
|
"//submodules/Postbox:Postbox",
|
||||||
"//submodules/TelegramCore:TelegramCore",
|
"//submodules/TelegramCore:TelegramCore",
|
||||||
"//submodules/SyncCore:SyncCore",
|
|
||||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||||
"//submodules/AccountContext:AccountContext",
|
"//submodules/AccountContext:AccountContext",
|
||||||
"//submodules/TelegramUIPreferences:TelegramUIPreferences",
|
"//submodules/TelegramUIPreferences:TelegramUIPreferences",
|
||||||
|
|||||||
@ -5,7 +5,6 @@ import Display
|
|||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import TelegramPresentationData
|
import TelegramPresentationData
|
||||||
import ActivityIndicator
|
import ActivityIndicator
|
||||||
import AccountContext
|
import AccountContext
|
||||||
|
|||||||
@ -8,7 +8,6 @@ swift_library(
|
|||||||
]),
|
]),
|
||||||
deps = [
|
deps = [
|
||||||
"//submodules/TelegramCore:TelegramCore",
|
"//submodules/TelegramCore:TelegramCore",
|
||||||
"//submodules/SyncCore:SyncCore",
|
|
||||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
||||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
|
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
|
||||||
"//submodules/Display:Display",
|
"//submodules/Display:Display",
|
||||||
|
|||||||
@ -9,7 +9,6 @@ swift_library(
|
|||||||
deps = [
|
deps = [
|
||||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
|
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
|
||||||
"//submodules/TelegramCore:TelegramCore",
|
"//submodules/TelegramCore:TelegramCore",
|
||||||
"//submodules/SyncCore:SyncCore",
|
|
||||||
"//submodules/Display:Display",
|
"//submodules/Display:Display",
|
||||||
"//submodules/TextFormat:TextFormat",
|
"//submodules/TextFormat:TextFormat",
|
||||||
"//submodules/Markdown:Markdown",
|
"//submodules/Markdown:Markdown",
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import UIKit
|
import UIKit
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import Display
|
import Display
|
||||||
import TelegramPresentationData
|
import TelegramPresentationData
|
||||||
import TextFormat
|
import TextFormat
|
||||||
@ -30,13 +29,13 @@ public func authorizationNextOptionText(currentType: SentAuthorizationCodeType,
|
|||||||
return (NSAttributedString(string: strings.Login_CodeSentSms, font: Font.regular(16.0), textColor: primaryColor, paragraphAlignment: .center), false)
|
return (NSAttributedString(string: strings.Login_CodeSentSms, font: Font.regular(16.0), textColor: primaryColor, paragraphAlignment: .center), false)
|
||||||
} else {
|
} else {
|
||||||
let timeString = NSString(format: "%d:%.02d", Int(minutes), Int(seconds))
|
let timeString = NSString(format: "%d:%.02d", Int(minutes), Int(seconds))
|
||||||
return (NSAttributedString(string: strings.Login_WillSendSms(timeString as String).0, font: Font.regular(16.0), textColor: primaryColor, paragraphAlignment: .center), false)
|
return (NSAttributedString(string: strings.Login_WillSendSms(timeString as String).string, font: Font.regular(16.0), textColor: primaryColor, paragraphAlignment: .center), false)
|
||||||
}
|
}
|
||||||
case .call, .flashCall:
|
case .call, .flashCall:
|
||||||
if timeout <= 0 {
|
if timeout <= 0 {
|
||||||
return (NSAttributedString(string: strings.ChangePhoneNumberCode_Called, font: Font.regular(16.0), textColor: primaryColor, paragraphAlignment: .center), false)
|
return (NSAttributedString(string: strings.ChangePhoneNumberCode_Called, font: Font.regular(16.0), textColor: primaryColor, paragraphAlignment: .center), false)
|
||||||
} else {
|
} else {
|
||||||
return (NSAttributedString(string: String(format: strings.ChangePhoneNumberCode_CallTimer(String(format: "%d:%.2d", minutes, seconds)).0, minutes, seconds), font: Font.regular(16.0), textColor: primaryColor, paragraphAlignment: .center), false)
|
return (NSAttributedString(string: String(format: strings.ChangePhoneNumberCode_CallTimer(String(format: "%d:%.2d", minutes, seconds)).string, minutes, seconds), font: Font.regular(16.0), textColor: primaryColor, paragraphAlignment: .center), false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -10,7 +10,6 @@ swift_library(
|
|||||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
|
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
|
||||||
"//submodules/Display:Display",
|
"//submodules/Display:Display",
|
||||||
"//submodules/TelegramCore:TelegramCore",
|
"//submodules/TelegramCore:TelegramCore",
|
||||||
"//submodules/SyncCore:SyncCore",
|
|
||||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||||
"//submodules/AnimationUI:AnimationUI",
|
"//submodules/AnimationUI:AnimationUI",
|
||||||
"//submodules/AppBundle:AppBundle",
|
"//submodules/AppBundle:AppBundle",
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import AsyncDisplayKit
|
|||||||
import Postbox
|
import Postbox
|
||||||
import Display
|
import Display
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import TelegramPresentationData
|
import TelegramPresentationData
|
||||||
import AnimationUI
|
import AnimationUI
|
||||||
|
|||||||
@ -5,7 +5,6 @@ import Postbox
|
|||||||
import Display
|
import Display
|
||||||
import ImageIO
|
import ImageIO
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import TinyThumbnail
|
import TinyThumbnail
|
||||||
import FastBlur
|
import FastBlur
|
||||||
|
|
||||||
|
|||||||
@ -10,7 +10,6 @@ swift_library(
|
|||||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
||||||
"//submodules/Postbox:Postbox",
|
"//submodules/Postbox:Postbox",
|
||||||
"//submodules/TelegramCore:TelegramCore",
|
"//submodules/TelegramCore:TelegramCore",
|
||||||
"//submodules/SyncCore:SyncCore",
|
|
||||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||||
"//submodules/LocalAuth:LocalAuth",
|
"//submodules/LocalAuth:LocalAuth",
|
||||||
"//submodules/AccountContext:AccountContext",
|
"//submodules/AccountContext:AccountContext",
|
||||||
|
|||||||
@ -3,7 +3,6 @@ import UIKit
|
|||||||
import Display
|
import Display
|
||||||
import AsyncDisplayKit
|
import AsyncDisplayKit
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramPresentationData
|
import TelegramPresentationData
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import AsyncDisplayKit
|
|||||||
import Display
|
import Display
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import PassKit
|
import PassKit
|
||||||
import TelegramPresentationData
|
import TelegramPresentationData
|
||||||
@ -971,7 +970,7 @@ final class BotCheckoutControllerNode: ItemListControllerNode, PKPaymentAuthoriz
|
|||||||
let totalAmount = currentTotalPrice(paymentForm: self.paymentFormValue, validatedFormInfo: self.currentValidatedFormInfo, currentShippingOptionId: self.currentShippingOptionId, currentTip: self.currentTipAmount)
|
let totalAmount = currentTotalPrice(paymentForm: self.paymentFormValue, validatedFormInfo: self.currentValidatedFormInfo, currentShippingOptionId: self.currentShippingOptionId, currentTip: self.currentTipAmount)
|
||||||
let payString: String
|
let payString: String
|
||||||
if let paymentForm = self.paymentFormValue, totalAmount > 0 {
|
if let paymentForm = self.paymentFormValue, totalAmount > 0 {
|
||||||
payString = self.presentationData.strings.Checkout_PayPrice(formatCurrencyAmount(totalAmount, currency: paymentForm.invoice.currency)).0
|
payString = self.presentationData.strings.Checkout_PayPrice(formatCurrencyAmount(totalAmount, currency: paymentForm.invoice.currency)).string
|
||||||
} else {
|
} else {
|
||||||
payString = self.presentationData.strings.CheckoutInfo_Pay
|
payString = self.presentationData.strings.CheckoutInfo_Pay
|
||||||
}
|
}
|
||||||
@ -1324,12 +1323,12 @@ final class BotCheckoutControllerNode: ItemListControllerNode, PKPaymentAuthoriz
|
|||||||
let alertText: String
|
let alertText: String
|
||||||
if requiresBiometrics {
|
if requiresBiometrics {
|
||||||
if let biometricAuthentication = LocalAuth.biometricAuthentication, case .faceId = biometricAuthentication {
|
if let biometricAuthentication = LocalAuth.biometricAuthentication, case .faceId = biometricAuthentication {
|
||||||
alertText = strongSelf.presentationData.strings.Checkout_SavePasswordTimeoutAndFaceId(durationString).0
|
alertText = strongSelf.presentationData.strings.Checkout_SavePasswordTimeoutAndFaceId(durationString).string
|
||||||
} else {
|
} else {
|
||||||
alertText = strongSelf.presentationData.strings.Checkout_SavePasswordTimeoutAndTouchId(durationString).0
|
alertText = strongSelf.presentationData.strings.Checkout_SavePasswordTimeoutAndTouchId(durationString).string
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
alertText = strongSelf.presentationData.strings.Checkout_SavePasswordTimeout(durationString).0
|
alertText = strongSelf.presentationData.strings.Checkout_SavePasswordTimeout(durationString).string
|
||||||
}
|
}
|
||||||
|
|
||||||
strongSelf.present(textAlertController(context: strongSelf.context, title: nil, text: alertText, actions: [
|
strongSelf.present(textAlertController(context: strongSelf.context, title: nil, text: alertText, actions: [
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import Display
|
|||||||
import AsyncDisplayKit
|
import AsyncDisplayKit
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import TelegramPresentationData
|
import TelegramPresentationData
|
||||||
import ItemListUI
|
import ItemListUI
|
||||||
import PresentationDataUtils
|
import PresentationDataUtils
|
||||||
|
|||||||
@ -3,7 +3,6 @@ import UIKit
|
|||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import Display
|
import Display
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramPresentationData
|
import TelegramPresentationData
|
||||||
import ProgressNavigationButtonNode
|
import ProgressNavigationButtonNode
|
||||||
|
|||||||
@ -3,7 +3,6 @@ import UIKit
|
|||||||
import AsyncDisplayKit
|
import AsyncDisplayKit
|
||||||
import Display
|
import Display
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import Postbox
|
import Postbox
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import TelegramPresentationData
|
import TelegramPresentationData
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import AsyncDisplayKit
|
|||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import Display
|
import Display
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramPresentationData
|
import TelegramPresentationData
|
||||||
import ProgressNavigationButtonNode
|
import ProgressNavigationButtonNode
|
||||||
|
|||||||
@ -3,7 +3,6 @@ import UIKit
|
|||||||
import AsyncDisplayKit
|
import AsyncDisplayKit
|
||||||
import Display
|
import Display
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import Postbox
|
import Postbox
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import TelegramPresentationData
|
import TelegramPresentationData
|
||||||
|
|||||||
@ -3,7 +3,6 @@ import UIKit
|
|||||||
import AsyncDisplayKit
|
import AsyncDisplayKit
|
||||||
import Display
|
import Display
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import TelegramPresentationData
|
import TelegramPresentationData
|
||||||
import AccountContext
|
import AccountContext
|
||||||
@ -109,7 +108,7 @@ private final class BotCheckoutPasswordAlertContentNode: AlertContentNode {
|
|||||||
self.titleNode = titleNode
|
self.titleNode = titleNode
|
||||||
|
|
||||||
self.textNode = ASTextNode()
|
self.textNode = ASTextNode()
|
||||||
self.textNode.attributedText = NSAttributedString(string: strings.Checkout_PasswordEntry_Text(cardTitle).0, font: Font.regular(13.0), textColor: theme.actionSheet.primaryTextColor, paragraphAlignment: .center)
|
self.textNode.attributedText = NSAttributedString(string: strings.Checkout_PasswordEntry_Text(cardTitle).string, font: Font.regular(13.0), textColor: theme.actionSheet.primaryTextColor, paragraphAlignment: .center)
|
||||||
self.textNode.displaysAsynchronously = false
|
self.textNode.displaysAsynchronously = false
|
||||||
self.textNode.isUserInteractionEnabled = false
|
self.textNode.isUserInteractionEnabled = false
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import Display
|
|||||||
import AsyncDisplayKit
|
import AsyncDisplayKit
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import AccountContext
|
import AccountContext
|
||||||
import AppBundle
|
import AppBundle
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import Display
|
|||||||
import AsyncDisplayKit
|
import AsyncDisplayKit
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import AccountContext
|
import AccountContext
|
||||||
import TelegramStringFormatting
|
import TelegramStringFormatting
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,6 @@ import UIKit
|
|||||||
import Display
|
import Display
|
||||||
import AsyncDisplayKit
|
import AsyncDisplayKit
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramPresentationData
|
import TelegramPresentationData
|
||||||
|
|||||||
@ -3,7 +3,6 @@ import UIKit
|
|||||||
import Display
|
import Display
|
||||||
import AsyncDisplayKit
|
import AsyncDisplayKit
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramPresentationData
|
import TelegramPresentationData
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import AsyncDisplayKit
|
|||||||
import Display
|
import Display
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import TelegramPresentationData
|
import TelegramPresentationData
|
||||||
import ItemListUI
|
import ItemListUI
|
||||||
|
|||||||
@ -5,7 +5,6 @@ import AsyncDisplayKit
|
|||||||
import Display
|
import Display
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import TelegramPresentationData
|
import TelegramPresentationData
|
||||||
import AccountContext
|
import AccountContext
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,6 @@ swift_library(
|
|||||||
"//submodules/Display:Display",
|
"//submodules/Display:Display",
|
||||||
"//submodules/Postbox:Postbox",
|
"//submodules/Postbox:Postbox",
|
||||||
"//submodules/TelegramCore:TelegramCore",
|
"//submodules/TelegramCore:TelegramCore",
|
||||||
"//submodules/SyncCore:SyncCore",
|
|
||||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||||
"//submodules/TelegramUIPreferences:TelegramUIPreferences",
|
"//submodules/TelegramUIPreferences:TelegramUIPreferences",
|
||||||
"//submodules/AccountContext:AccountContext",
|
"//submodules/AccountContext:AccountContext",
|
||||||
|
|||||||
@ -5,7 +5,6 @@ import Postbox
|
|||||||
import Display
|
import Display
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import TelegramPresentationData
|
import TelegramPresentationData
|
||||||
import ItemListUI
|
import ItemListUI
|
||||||
import PresentationDataUtils
|
import PresentationDataUtils
|
||||||
@ -438,8 +437,8 @@ class CallListCallItemNode: ItemListRevealOptionsItemNode {
|
|||||||
statusAccessibilityString = isVideo ? (item.presentationData.strings.Call_VoiceOver_VideoCallOutgoing + ", " + item.presentationData.strings.Call_VoiceOver_VideoCallIncoming) : (item.presentationData.strings.Call_VoiceOver_VoiceCallOutgoing + ", " + item.presentationData.strings.Call_VoiceOver_VoiceCallIncoming)
|
statusAccessibilityString = isVideo ? (item.presentationData.strings.Call_VoiceOver_VideoCallOutgoing + ", " + item.presentationData.strings.Call_VoiceOver_VideoCallIncoming) : (item.presentationData.strings.Call_VoiceOver_VoiceCallOutgoing + ", " + item.presentationData.strings.Call_VoiceOver_VoiceCallIncoming)
|
||||||
} else if hasIncoming {
|
} else if hasIncoming {
|
||||||
if let callDuration = callDuration, callDuration != 0 {
|
if let callDuration = callDuration, callDuration != 0 {
|
||||||
statusAttributedString = NSAttributedString(string: item.presentationData.strings.Notification_CallTimeFormat(item.presentationData.strings.Notification_CallIncomingShort, callDurationString(strings: item.presentationData.strings, duration: callDuration)).0, font: statusFont, textColor: item.presentationData.theme.list.itemSecondaryTextColor)
|
statusAttributedString = NSAttributedString(string: item.presentationData.strings.Notification_CallTimeFormat(item.presentationData.strings.Notification_CallIncomingShort, callDurationString(strings: item.presentationData.strings, duration: callDuration)).string, font: statusFont, textColor: item.presentationData.theme.list.itemSecondaryTextColor)
|
||||||
statusAccessibilityString = item.presentationData.strings.Notification_CallTimeFormat(isVideo ? item.presentationData.strings.Call_VoiceOver_VideoCallIncoming : item.presentationData.strings.Call_VoiceOver_VoiceCallIncoming, callDurationString(strings: item.presentationData.strings, duration: callDuration)).0
|
statusAccessibilityString = item.presentationData.strings.Notification_CallTimeFormat(isVideo ? item.presentationData.strings.Call_VoiceOver_VideoCallIncoming : item.presentationData.strings.Call_VoiceOver_VoiceCallIncoming, callDurationString(strings: item.presentationData.strings, duration: callDuration)).string
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
statusAttributedString = NSAttributedString(string: item.presentationData.strings.Notification_CallIncomingShort, font: statusFont, textColor: item.presentationData.theme.list.itemSecondaryTextColor)
|
statusAttributedString = NSAttributedString(string: item.presentationData.strings.Notification_CallIncomingShort, font: statusFont, textColor: item.presentationData.theme.list.itemSecondaryTextColor)
|
||||||
@ -447,8 +446,8 @@ class CallListCallItemNode: ItemListRevealOptionsItemNode {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if let callDuration = callDuration, callDuration != 0 {
|
if let callDuration = callDuration, callDuration != 0 {
|
||||||
statusAttributedString = NSAttributedString(string: item.presentationData.strings.Notification_CallTimeFormat(item.presentationData.strings.Notification_CallOutgoingShort, callDurationString(strings: item.presentationData.strings, duration: callDuration)).0, font: statusFont, textColor: item.presentationData.theme.list.itemSecondaryTextColor)
|
statusAttributedString = NSAttributedString(string: item.presentationData.strings.Notification_CallTimeFormat(item.presentationData.strings.Notification_CallOutgoingShort, callDurationString(strings: item.presentationData.strings, duration: callDuration)).string, font: statusFont, textColor: item.presentationData.theme.list.itemSecondaryTextColor)
|
||||||
statusAccessibilityString = item.presentationData.strings.Notification_CallTimeFormat(isVideo ? item.presentationData.strings.Call_VoiceOver_VideoCallOutgoing : item.presentationData.strings.Call_VoiceOver_VoiceCallOutgoing, callDurationString(strings: item.presentationData.strings, duration: callDuration)).0
|
statusAccessibilityString = item.presentationData.strings.Notification_CallTimeFormat(isVideo ? item.presentationData.strings.Call_VoiceOver_VideoCallOutgoing : item.presentationData.strings.Call_VoiceOver_VoiceCallOutgoing, callDurationString(strings: item.presentationData.strings, duration: callDuration)).string
|
||||||
} else {
|
} else {
|
||||||
statusAttributedString = NSAttributedString(string: item.presentationData.strings.Notification_CallOutgoingShort, font: statusFont, textColor: item.presentationData.theme.list.itemSecondaryTextColor)
|
statusAttributedString = NSAttributedString(string: item.presentationData.strings.Notification_CallOutgoingShort, font: statusFont, textColor: item.presentationData.theme.list.itemSecondaryTextColor)
|
||||||
statusAccessibilityString = isVideo ? item.presentationData.strings.Call_VoiceOver_VideoCallOutgoing : item.presentationData.strings.Call_VoiceOver_VoiceCallOutgoing
|
statusAccessibilityString = isVideo ? item.presentationData.strings.Call_VoiceOver_VideoCallOutgoing : item.presentationData.strings.Call_VoiceOver_VoiceCallOutgoing
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import Display
|
|||||||
import AsyncDisplayKit
|
import AsyncDisplayKit
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import TelegramPresentationData
|
import TelegramPresentationData
|
||||||
import ItemListUI
|
import ItemListUI
|
||||||
@ -449,7 +448,7 @@ public final class CallListController: TelegramBaseController {
|
|||||||
if let cachedUserData = view.cachedData as? CachedUserData, cachedUserData.callsPrivate {
|
if let cachedUserData = view.cachedData as? CachedUserData, cachedUserData.callsPrivate {
|
||||||
let presentationData = strongSelf.context.sharedContext.currentPresentationData.with { $0 }
|
let presentationData = strongSelf.context.sharedContext.currentPresentationData.with { $0 }
|
||||||
|
|
||||||
strongSelf.present(textAlertController(context: strongSelf.context, title: presentationData.strings.Call_ConnectionErrorTitle, text: presentationData.strings.Call_PrivacyErrorMessage(peer.compactDisplayTitle).0, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_OK, action: {})]), in: .window(.root))
|
strongSelf.present(textAlertController(context: strongSelf.context, title: presentationData.strings.Call_ConnectionErrorTitle, text: presentationData.strings.Call_PrivacyErrorMessage(peer.compactDisplayTitle).string, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_OK, action: {})]), in: .window(.root))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import AsyncDisplayKit
|
|||||||
import Display
|
import Display
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import TelegramPresentationData
|
import TelegramPresentationData
|
||||||
import TelegramUIPreferences
|
import TelegramUIPreferences
|
||||||
@ -232,7 +231,7 @@ final class CallListControllerNode: ASDisplayNode {
|
|||||||
self.listNode = ListView()
|
self.listNode = ListView()
|
||||||
self.listNode.verticalScrollIndicatorColor = self.presentationData.theme.list.scrollIndicatorColor
|
self.listNode.verticalScrollIndicatorColor = self.presentationData.theme.list.scrollIndicatorColor
|
||||||
self.listNode.accessibilityPageScrolledString = { row, count in
|
self.listNode.accessibilityPageScrolledString = { row, count in
|
||||||
return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
|
return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
|
||||||
}
|
}
|
||||||
|
|
||||||
self.leftOverlayNode = ASDisplayNode()
|
self.leftOverlayNode = ASDisplayNode()
|
||||||
@ -338,7 +337,7 @@ final class CallListControllerNode: ASDisplayNode {
|
|||||||
let actionSheet = ActionSheetController(presentationData: strongSelf.presentationData)
|
let actionSheet = ActionSheetController(presentationData: strongSelf.presentationData)
|
||||||
var items: [ActionSheetItem] = []
|
var items: [ActionSheetItem] = []
|
||||||
|
|
||||||
items.append(ActionSheetButtonItem(title: strongSelf.presentationData.strings.Conversation_DeleteMessagesFor(peer.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder)).0, color: .destructive, action: { [weak actionSheet] in
|
items.append(ActionSheetButtonItem(title: strongSelf.presentationData.strings.Conversation_DeleteMessagesFor(peer.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder)).string, color: .destructive, action: { [weak actionSheet] in
|
||||||
actionSheet?.dismissAnimated()
|
actionSheet?.dismissAnimated()
|
||||||
guard let strongSelf = self else {
|
guard let strongSelf = self else {
|
||||||
return
|
return
|
||||||
|
|||||||
@ -5,7 +5,6 @@ import Postbox
|
|||||||
import Display
|
import Display
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import TelegramPresentationData
|
import TelegramPresentationData
|
||||||
import ItemListUI
|
import ItemListUI
|
||||||
import PresentationDataUtils
|
import PresentationDataUtils
|
||||||
|
|||||||
@ -2,7 +2,6 @@ import Foundation
|
|||||||
import UIKit
|
import UIKit
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import TelegramPresentationData
|
import TelegramPresentationData
|
||||||
import MergeLists
|
import MergeLists
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,6 @@ import Foundation
|
|||||||
import UIKit
|
import UIKit
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import Display
|
import Display
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,6 @@ import Foundation
|
|||||||
import UIKit
|
import UIKit
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import Display
|
import Display
|
||||||
import MergeLists
|
import MergeLists
|
||||||
|
|||||||
@ -10,7 +10,6 @@ swift_library(
|
|||||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
||||||
"//submodules/Postbox:Postbox",
|
"//submodules/Postbox:Postbox",
|
||||||
"//submodules/TelegramCore:TelegramCore",
|
"//submodules/TelegramCore:TelegramCore",
|
||||||
"//submodules/SyncCore:SyncCore",
|
|
||||||
],
|
],
|
||||||
visibility = [
|
visibility = [
|
||||||
"//visibility:public",
|
"//visibility:public",
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
|
|
||||||
public enum ChatHistoryImportTasks {
|
public enum ChatHistoryImportTasks {
|
||||||
|
|||||||
@ -12,7 +12,6 @@ swift_library(
|
|||||||
"//submodules/Display:Display",
|
"//submodules/Display:Display",
|
||||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||||
"//submodules/Postbox:Postbox",
|
"//submodules/Postbox:Postbox",
|
||||||
"//submodules/SyncCore:SyncCore",
|
|
||||||
"//submodules/TelegramCore:TelegramCore",
|
"//submodules/TelegramCore:TelegramCore",
|
||||||
"//submodules/AppBundle:AppBundle",
|
"//submodules/AppBundle:AppBundle",
|
||||||
"//third-party/ZipArchive:ZipArchive",
|
"//third-party/ZipArchive:ZipArchive",
|
||||||
|
|||||||
@ -2,7 +2,6 @@ import UIKit
|
|||||||
import AsyncDisplayKit
|
import AsyncDisplayKit
|
||||||
import Display
|
import Display
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramPresentationData
|
import TelegramPresentationData
|
||||||
|
|||||||
@ -12,7 +12,6 @@ swift_library(
|
|||||||
"//submodules/Display:Display",
|
"//submodules/Display:Display",
|
||||||
"//submodules/Postbox:Postbox",
|
"//submodules/Postbox:Postbox",
|
||||||
"//submodules/TelegramCore:TelegramCore",
|
"//submodules/TelegramCore:TelegramCore",
|
||||||
"//submodules/SyncCore:SyncCore",
|
|
||||||
"//submodules/TextFormat:TextFormat",
|
"//submodules/TextFormat:TextFormat",
|
||||||
"//submodules/AccountContext:AccountContext",
|
"//submodules/AccountContext:AccountContext",
|
||||||
],
|
],
|
||||||
|
|||||||
@ -2,7 +2,6 @@ import Foundation
|
|||||||
import UIKit
|
import UIKit
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import TextFormat
|
import TextFormat
|
||||||
import AccountContext
|
import AccountContext
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,6 @@ swift_library(
|
|||||||
"//submodules/Display:Display",
|
"//submodules/Display:Display",
|
||||||
"//submodules/Postbox:Postbox",
|
"//submodules/Postbox:Postbox",
|
||||||
"//submodules/TelegramCore:TelegramCore",
|
"//submodules/TelegramCore:TelegramCore",
|
||||||
"//submodules/SyncCore:SyncCore",
|
|
||||||
"//submodules/ListSectionHeaderNode:ListSectionHeaderNode",
|
"//submodules/ListSectionHeaderNode:ListSectionHeaderNode",
|
||||||
"//submodules/HorizontalPeerItem:HorizontalPeerItem",
|
"//submodules/HorizontalPeerItem:HorizontalPeerItem",
|
||||||
"//submodules/MergeLists:MergeLists",
|
"//submodules/MergeLists:MergeLists",
|
||||||
|
|||||||
@ -5,7 +5,6 @@ import Display
|
|||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import TelegramPresentationData
|
import TelegramPresentationData
|
||||||
import MergeLists
|
import MergeLists
|
||||||
import HorizontalPeerItem
|
import HorizontalPeerItem
|
||||||
@ -141,7 +140,7 @@ public final class ChatListSearchRecentPeersNode: ASDisplayNode {
|
|||||||
self.listView = ListView()
|
self.listView = ListView()
|
||||||
self.listView.transform = CATransform3DMakeRotation(-CGFloat.pi / 2.0, 0.0, 0.0, 1.0)
|
self.listView.transform = CATransform3DMakeRotation(-CGFloat.pi / 2.0, 0.0, 0.0, 1.0)
|
||||||
self.listView.accessibilityPageScrolledString = { row, count in
|
self.listView.accessibilityPageScrolledString = { row, count in
|
||||||
return strings.VoiceOver_ScrollStatus(row, count).0
|
return strings.VoiceOver_ScrollStatus(row, count).string
|
||||||
}
|
}
|
||||||
|
|
||||||
super.init()
|
super.init()
|
||||||
|
|||||||
@ -12,7 +12,6 @@ swift_library(
|
|||||||
"//submodules/Display:Display",
|
"//submodules/Display:Display",
|
||||||
"//submodules/Postbox:Postbox",
|
"//submodules/Postbox:Postbox",
|
||||||
"//submodules/TelegramCore:TelegramCore",
|
"//submodules/TelegramCore:TelegramCore",
|
||||||
"//submodules/SyncCore:SyncCore",
|
|
||||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||||
"//submodules/TelegramUIPreferences:TelegramUIPreferences",
|
"//submodules/TelegramUIPreferences:TelegramUIPreferences",
|
||||||
"//submodules/AccountContext:AccountContext",
|
"//submodules/AccountContext:AccountContext",
|
||||||
|
|||||||
@ -5,7 +5,6 @@ import ContextUI
|
|||||||
import AccountContext
|
import AccountContext
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import Display
|
import Display
|
||||||
import TelegramUIPreferences
|
import TelegramUIPreferences
|
||||||
import OverlayStatusController
|
import OverlayStatusController
|
||||||
|
|||||||
@ -5,7 +5,6 @@ import SwiftSignalKit
|
|||||||
import AsyncDisplayKit
|
import AsyncDisplayKit
|
||||||
import Display
|
import Display
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import TelegramPresentationData
|
import TelegramPresentationData
|
||||||
import TelegramUIPreferences
|
import TelegramUIPreferences
|
||||||
import TelegramBaseController
|
import TelegramBaseController
|
||||||
@ -2340,7 +2339,7 @@ public class ChatListControllerImpl: TelegramBaseController, ChatListController
|
|||||||
beginClear(.forLocalPeer)
|
beginClear(.forLocalPeer)
|
||||||
actionSheet?.dismissAnimated()
|
actionSheet?.dismissAnimated()
|
||||||
}))
|
}))
|
||||||
items.append(ActionSheetButtonItem(title: strongSelf.presentationData.strings.ChatList_DeleteForEveryone(mainPeer.compactDisplayTitle).0, color: .destructive, action: { [weak actionSheet] in
|
items.append(ActionSheetButtonItem(title: strongSelf.presentationData.strings.ChatList_DeleteForEveryone(mainPeer.compactDisplayTitle).string, color: .destructive, action: { [weak actionSheet] in
|
||||||
beginClear(.forEveryone)
|
beginClear(.forEveryone)
|
||||||
actionSheet?.dismissAnimated()
|
actionSheet?.dismissAnimated()
|
||||||
}))
|
}))
|
||||||
@ -2369,7 +2368,7 @@ public class ChatListControllerImpl: TelegramBaseController, ChatListController
|
|||||||
}
|
}
|
||||||
|
|
||||||
if chatPeer is TelegramSecretChat {
|
if chatPeer is TelegramSecretChat {
|
||||||
items.append(ActionSheetButtonItem(title: strongSelf.presentationData.strings.ChatList_DeleteForEveryone(mainPeer.compactDisplayTitle).0, color: .destructive, action: { [weak actionSheet] in
|
items.append(ActionSheetButtonItem(title: strongSelf.presentationData.strings.ChatList_DeleteForEveryone(mainPeer.compactDisplayTitle).string, color: .destructive, action: { [weak actionSheet] in
|
||||||
actionSheet?.dismissAnimated()
|
actionSheet?.dismissAnimated()
|
||||||
guard let strongSelf = self else {
|
guard let strongSelf = self else {
|
||||||
return
|
return
|
||||||
@ -2511,7 +2510,7 @@ public class ChatListControllerImpl: TelegramBaseController, ChatListController
|
|||||||
})
|
})
|
||||||
completion(true)
|
completion(true)
|
||||||
}))
|
}))
|
||||||
items.append(ActionSheetButtonItem(title: self.presentationData.strings.ChatList_DeleteForEveryone(mainPeer.compactDisplayTitle).0, color: .destructive, action: { [weak self, weak actionSheet] in
|
items.append(ActionSheetButtonItem(title: self.presentationData.strings.ChatList_DeleteForEveryone(mainPeer.compactDisplayTitle).string, color: .destructive, action: { [weak self, weak actionSheet] in
|
||||||
actionSheet?.dismissAnimated()
|
actionSheet?.dismissAnimated()
|
||||||
guard let strongSelf = self else {
|
guard let strongSelf = self else {
|
||||||
return
|
return
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import AsyncDisplayKit
|
|||||||
import Display
|
import Display
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import TelegramPresentationData
|
import TelegramPresentationData
|
||||||
import MergeLists
|
import MergeLists
|
||||||
@ -369,7 +368,7 @@ private final class ChatListContainerItemNode: ASDisplayNode {
|
|||||||
self.presentationData = presentationData
|
self.presentationData = presentationData
|
||||||
|
|
||||||
self.listNode.accessibilityPageScrolledString = { row, count in
|
self.listNode.accessibilityPageScrolledString = { row, count in
|
||||||
return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
|
return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
|
||||||
}
|
}
|
||||||
|
|
||||||
self.listNode.updateThemeAndStrings(theme: presentationData.theme, fontSize: presentationData.listsFontSize, strings: presentationData.strings, dateTimeFormat: presentationData.dateTimeFormat, nameSortOrder: presentationData.nameSortOrder, nameDisplayOrder: presentationData.nameDisplayOrder, disableAnimations: true)
|
self.listNode.updateThemeAndStrings(theme: presentationData.theme, fontSize: presentationData.listsFontSize, strings: presentationData.strings, dateTimeFormat: presentationData.dateTimeFormat, nameSortOrder: presentationData.nameSortOrder, nameDisplayOrder: presentationData.nameDisplayOrder, disableAnimations: true)
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import Display
|
|||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import TelegramPresentationData
|
import TelegramPresentationData
|
||||||
import PresentationDataUtils
|
import PresentationDataUtils
|
||||||
import ItemListUI
|
import ItemListUI
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import Display
|
|||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import TelegramPresentationData
|
import TelegramPresentationData
|
||||||
import TelegramUIPreferences
|
import TelegramUIPreferences
|
||||||
import ItemListUI
|
import ItemListUI
|
||||||
|
|||||||
@ -5,7 +5,6 @@ import AsyncDisplayKit
|
|||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import SyncCore
|
|
||||||
import TelegramPresentationData
|
import TelegramPresentationData
|
||||||
import ItemListUI
|
import ItemListUI
|
||||||
import TelegramUIPreferences
|
import TelegramUIPreferences
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user