diff --git a/.bazelrc b/.bazelrc
new file mode 100644
index 0000000000..1627a59000
--- /dev/null
+++ b/.bazelrc
@@ -0,0 +1,14 @@
+build --experimental_guard_against_concurrent_changes
+
+build --strategy=Genrule=local
+build --apple_platform_type=ios
+build --cxxopt='-std=c++14'
+build --copt='-w'
+build --swiftcopt='-Xcc'
+build --swiftcopt='-w'
+build --spawn_strategy=local
+build --strategy=SwiftCompile=local
+build --features=debug_prefix_map_pwd_is_dot
+build --features=swift.cacheable_swiftmodules
+build --features=swift.debug_prefix_map
+
diff --git a/.gitignore b/.gitignore
index 81a0b5a182..b0487bbc48 100644
--- a/.gitignore
+++ b/.gitignore
@@ -58,5 +58,9 @@ bazel-telegram-ios
bazel-telegram-ios/*
bazel-testlogs
bazel-testlogs/*
+*/*.swp
+*.swp
+build-input/data
build-input/data/*
+build-input/gen
build-input/gen/*
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d89926d6ad..33f3b39ca5 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -22,6 +22,10 @@ internal:
- bash buildbox/deploy-telegram.sh hockeyapp
environment:
name: internal
+ artifacts:
+ paths:
+ - build/artifacts/Telegram.DSYMs.zip
+ expire_in: 1 week
beta_testflight:
tags:
@@ -38,7 +42,7 @@ beta_testflight:
artifacts:
paths:
- build/artifacts
- expire_in: 1 week
+ expire_in: 3 weeks
deploy_beta_testflight:
tags:
diff --git a/.gitmodules b/.gitmodules
index c319a7c828..d416d6ad33 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,4 +1,19 @@
[submodule "submodules/rlottie/rlottie"]
path = submodules/rlottie/rlottie
-url=../rlottie.git
+ url=../rlottie.git
+[submodule "build-system/bazel-rules/rules_apple"]
+ path = build-system/bazel-rules/rules_apple
+ url=https://github.com/ali-fareed/rules_apple.git
+[submodule "build-system/bazel-rules/rules_swift"]
+ path = build-system/bazel-rules/rules_swift
+ url = https://github.com/bazelbuild/rules_swift.git
+[submodule "build-system/bazel-rules/apple_support"]
+ path = build-system/bazel-rules/apple_support
+ url = https://github.com/bazelbuild/apple_support.git
+[submodule "submodules/TgVoip/libtgvoip"]
+ path = submodules/TgVoip/libtgvoip
+ url = https://github.com/telegramdesktop/libtgvoip.git
+[submodule "build-system/tulsi"]
+ path = build-system/tulsi
+ url = https://github.com/ali-fareed/tulsi.git
diff --git a/Telegram-iOS/ar.lproj/Localizable.strings b/Config/BUILD
similarity index 100%
rename from Telegram-iOS/ar.lproj/Localizable.strings
rename to Config/BUILD
diff --git a/Config/buck_rule_macros.bzl b/Config/buck_rule_macros.bzl
index e597aa6ecd..0c101f023a 100644
--- a/Config/buck_rule_macros.bzl
+++ b/Config/buck_rule_macros.bzl
@@ -309,9 +309,9 @@ def glob_map(glob_results):
result[file_name] = path
return result
-def glob_sub_map(prefix, glob_specs):
+def glob_sub_map(prefix, glob_specs, exclude = []):
result = dict()
- for path in native.glob(glob_specs):
+ for path in native.glob(glob_specs, exclude = exclude):
if not path.startswith(prefix):
fail('\"%s\" does not start with \"%s\"' % (path, prefix))
file_key = path[len(prefix):]
diff --git a/Config/objc_module_provider.bzl b/Config/objc_module_provider.bzl
new file mode 100644
index 0000000000..a09f214a85
--- /dev/null
+++ b/Config/objc_module_provider.bzl
@@ -0,0 +1,31 @@
+
+def _impl(ctx):
+ output_dir = ctx.attr.name + "_ModuleHeaders"
+ dir = ctx.actions.declare_directory(output_dir)
+ files = []
+ files_command = ""
+ for file in ctx.files.headers:
+ outFile = ctx.actions.declare_file(output_dir + "/" + ctx.attr.module_name + "/" + file.basename)
+ files.append(outFile)
+ files_command = files_command + " && cp " + file.path + " " + outFile.path
+ ctx.actions.run_shell(
+ outputs = [dir] + files,
+ inputs = ctx.files.headers,
+ command = "mkdir -p " + dir.path + " " + files_command
+ )
+ return [
+ apple_common.new_objc_provider(
+ include_system = depset([dir.path]),
+ header = depset(files),
+ ),
+ ]
+
+objc_module = rule(
+ implementation = _impl,
+ attrs = {
+ "module_name": attr.string(mandatory = True),
+ "headers": attr.label_list(
+ allow_files = [".h"],
+ ),
+ },
+)
diff --git a/Makefile b/Makefile
index dc4224265b..a78940e107 100644
--- a/Makefile
+++ b/Makefile
@@ -2,8 +2,12 @@
include Utils.makefile
+APP_VERSION="5.16"
+CORE_COUNT=$(shell sysctl -n hw.logicalcpu)
+CORE_COUNT_MINUS_ONE=$(shell expr ${CORE_COUNT} \- 1)
+
BUCK_OPTIONS=\
- --config custom.appVersion="5.15.2" \
+ --config custom.appVersion="${APP_VERSION}" \
--config custom.developmentCodeSignIdentity="${DEVELOPMENT_CODE_SIGN_IDENTITY}" \
--config custom.distributionCodeSignIdentity="${DISTRIBUTION_CODE_SIGN_IDENTITY}" \
--config custom.developmentTeam="${DEVELOPMENT_TEAM}" \
@@ -39,11 +43,30 @@ BUCK_OPTIONS=\
--config custom.developmentProvisioningProfileWatchExtension="${DEVELOPMENT_PROVISIONING_PROFILE_WATCH_EXTENSION}" \
--config custom.distributionProvisioningProfileWatchExtension="${DISTRIBUTION_PROVISIONING_PROFILE_WATCH_EXTENSION}"
+BAZEL=$(shell which bazel)
+
+ifneq ($(BAZEL_CACHE_DIR),)
+ export BAZEL_CACHE_FLAGS=\
+ --disk_cache="${BAZEL_CACHE_DIR}"
+endif
+
+BAZEL_COMMON_FLAGS=\
+ --announce_rc \
+ --features=swift.use_global_module_cache \
+
+BAZEL_DEBUG_FLAGS=\
+ --features=swift.enable_batch_mode \
+ --swiftcopt=-j${CORE_COUNT_MINUS_ONE} \
+
+BAZEL_OPT_FLAGS=\
+ --swiftcopt=-whole-module-optimization \
+ --swiftcopt='-num-threads' --swiftcopt='16' \
+
build_arm64: check_env
$(BUCK) build \
- //:AppPackage#iphoneos-arm64 \
- //:Telegram#dwarf-and-dsym,iphoneos-arm64 \
+ //Telegram:AppPackage#iphoneos-arm64 \
+ //Telegram:Telegram#dwarf-and-dsym,iphoneos-arm64 \
//submodules/MtProtoKit:MtProtoKit#dwarf-and-dsym,shared,iphoneos-arm64 \
//submodules/MtProtoKit:MtProtoKit#shared,iphoneos-arm64 \
//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#dwarf-and-dsym,shared,iphoneos-arm64 \
@@ -62,18 +85,18 @@ build_arm64: check_env
//submodules/Display:Display#shared,iphoneos-arm64 \
//submodules/TelegramUI:TelegramUI#dwarf-and-dsym,shared,iphoneos-arm64 \
//submodules/TelegramUI:TelegramUI#shared,iphoneos-arm64 \
- //:WatchAppExtension#dwarf-and-dsym,watchos-arm64_32,watchos-armv7k \
- //:ShareExtension#dwarf-and-dsym,iphoneos-arm64 \
- //:WidgetExtension#dwarf-and-dsym,iphoneos-arm64 \
- //:NotificationContentExtension#dwarf-and-dsym,iphoneos-arm64 \
- //:NotificationServiceExtension#dwarf-and-dsym,iphoneos-arm64 \
- //:IntentsExtension#dwarf-and-dsym,iphoneos-arm64 \
+ //Telegram:WatchAppExtension#dwarf-and-dsym,watchos-arm64_32,watchos-armv7k \
+ //Telegram:ShareExtension#dwarf-and-dsym,iphoneos-arm64 \
+ //Telegram:WidgetExtension#dwarf-and-dsym,iphoneos-arm64 \
+ //Telegram:NotificationContentExtension#dwarf-and-dsym,iphoneos-arm64 \
+ //Telegram:NotificationServiceExtension#dwarf-and-dsym,iphoneos-arm64 \
+ //Telegram:IntentsExtension#dwarf-and-dsym,iphoneos-arm64 \
${BUCK_OPTIONS} ${BUCK_RELEASE_OPTIONS} ${BUCK_THREADS_OPTIONS} ${BUCK_CACHE_OPTIONS}
build_debug_arm64: check_env
$(BUCK) build \
- //:AppPackage#iphoneos-arm64 \
- //:Telegram#dwarf-and-dsym,iphoneos-arm64 \
+ //Telegram:AppPackage#iphoneos-arm64 \
+ //Telegram:Telegram#dwarf-and-dsym,iphoneos-arm64 \
//submodules/MtProtoKit:MtProtoKit#dwarf-and-dsym,shared,iphoneos-arm64 \
//submodules/MtProtoKit:MtProtoKit#shared,iphoneos-arm64 \
//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#dwarf-and-dsym,shared,iphoneos-arm64 \
@@ -92,12 +115,12 @@ build_debug_arm64: check_env
//submodules/Display:Display#shared,iphoneos-arm64 \
//submodules/TelegramUI:TelegramUI#dwarf-and-dsym,shared,iphoneos-arm64 \
//submodules/TelegramUI:TelegramUI#shared,iphoneos-arm64 \
- //:WatchAppExtension#dwarf-and-dsym,watchos-arm64_32,watchos-armv7k \
- //:ShareExtension#dwarf-and-dsym,iphoneos-arm64 \
- //:WidgetExtension#dwarf-and-dsym,iphoneos-arm64 \
- //:NotificationContentExtension#dwarf-and-dsym,iphoneos-arm64 \
- //:NotificationServiceExtension#dwarf-and-dsym,iphoneos-arm64 \
- //:IntentsExtension#dwarf-and-dsym,iphoneos-arm64 \
+ //Telegram:WatchAppExtension#dwarf-and-dsym,watchos-arm64_32,watchos-armv7k \
+ //Telegram:ShareExtension#dwarf-and-dsym,iphoneos-arm64 \
+ //Telegram:WidgetExtension#dwarf-and-dsym,iphoneos-arm64 \
+ //Telegram:NotificationContentExtension#dwarf-and-dsym,iphoneos-arm64 \
+ //Telegram:NotificationServiceExtension#dwarf-and-dsym,iphoneos-arm64 \
+ //Telegram:IntentsExtension#dwarf-and-dsym,iphoneos-arm64 \
${BUCK_OPTIONS} ${BUCK_DEBUG_OPTIONS} ${BUCK_THREADS_OPTIONS} ${BUCK_CACHE_OPTIONS}
build_wallet_debug_arm64: check_env
@@ -116,8 +139,8 @@ build_wallet_debug_arm64: check_env
build_debug_armv7: check_env
$(BUCK) build \
- //:AppPackage#iphoneos-armv7 \
- //:Telegram#dwarf-and-dsym,iphoneos-armv7 \
+ //Telegram:AppPackage#iphoneos-armv7 \
+ //Telegram:Telegram#dwarf-and-dsym,iphoneos-armv7 \
//submodules/MtProtoKit:MtProtoKit#dwarf-and-dsym,shared,iphoneos-armv7 \
//submodules/MtProtoKit:MtProtoKit#shared,iphoneos-armv7 \
//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#dwarf-and-dsym,shared,iphoneos-armv7 \
@@ -136,18 +159,18 @@ build_debug_armv7: check_env
//submodules/Display:Display#shared,iphoneos-armv7 \
//submodules/TelegramUI:TelegramUI#dwarf-and-dsym,shared,iphoneos-armv7 \
//submodules/TelegramUI:TelegramUI#shared,iphoneos-armv7 \
- //:WatchAppExtension#dwarf-and-dsym,watchos-armv7_32,watchos-armv7k \
- //:ShareExtension#dwarf-and-dsym,iphoneos-armv7 \
- //:WidgetExtension#dwarf-and-dsym,iphoneos-armv7 \
- //:NotificationContentExtension#dwarf-and-dsym,iphoneos-armv7 \
- //:NotificationServiceExtension#dwarf-and-dsym,iphoneos-armv7 \
- //:IntentsExtension#dwarf-and-dsym,iphoneos-armv7 \
+ //Telegram:WatchAppExtension#dwarf-and-dsym,watchos-armv7_32,watchos-armv7k \
+ //Telegram:ShareExtension#dwarf-and-dsym,iphoneos-armv7 \
+ //Telegram:WidgetExtension#dwarf-and-dsym,iphoneos-armv7 \
+ //Telegram:NotificationContentExtension#dwarf-and-dsym,iphoneos-armv7 \
+ //Telegram:NotificationServiceExtension#dwarf-and-dsym,iphoneos-armv7 \
+ //Telegram:IntentsExtension#dwarf-and-dsym,iphoneos-armv7 \
${BUCK_OPTIONS} ${BUCK_DEBUG_OPTIONS} ${BUCK_THREADS_OPTIONS} ${BUCK_CACHE_OPTIONS}
build: check_env
$(BUCK) build \
- //:AppPackage#iphoneos-arm64,iphoneos-armv7 \
- //:Telegram#dwarf-and-dsym,iphoneos-arm64,iphoneos-armv7 \
+ //Telegram:AppPackage#iphoneos-arm64,iphoneos-armv7 \
+ //Telegram:Telegram#dwarf-and-dsym,iphoneos-arm64,iphoneos-armv7 \
//submodules/MtProtoKit:MtProtoKit#dwarf-and-dsym,shared,iphoneos-arm64,iphoneos-armv7 \
//submodules/MtProtoKit:MtProtoKit#shared,iphoneos-arm64,iphoneos-armv7 \
//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#dwarf-and-dsym,shared,iphoneos-arm64,iphoneos-armv7 \
@@ -166,29 +189,29 @@ build: check_env
//submodules/Display:Display#shared,iphoneos-arm64,iphoneos-armv7 \
//submodules/TelegramUI:TelegramUI#dwarf-and-dsym,shared,iphoneos-arm64,iphoneos-armv7 \
//submodules/TelegramUI:TelegramUI#shared,iphoneos-arm64,iphoneos-armv7 \
- //:WatchAppExtension#dwarf-and-dsym,watchos-arm64_32,watchos-armv7k \
- //:ShareExtension#dwarf-and-dsym,iphoneos-arm64,iphoneos-armv7 \
- //:WidgetExtension#dwarf-and-dsym,iphoneos-arm64,iphoneos-armv7 \
- //:NotificationContentExtension#dwarf-and-dsym,iphoneos-arm64,iphoneos-armv7 \
- //:NotificationServiceExtension#dwarf-and-dsym,iphoneos-arm64,iphoneos-armv7 \
- //:IntentsExtension#dwarf-and-dsym,iphoneos-arm64,iphoneos-armv7 \
+ //Telegram:WatchAppExtension#dwarf-and-dsym,watchos-arm64_32,watchos-armv7k \
+ //Telegram:ShareExtension#dwarf-and-dsym,iphoneos-arm64,iphoneos-armv7 \
+ //Telegram:WidgetExtension#dwarf-and-dsym,iphoneos-arm64,iphoneos-armv7 \
+ //Telegram:NotificationContentExtension#dwarf-and-dsym,iphoneos-arm64,iphoneos-armv7 \
+ //Telegram:NotificationServiceExtension#dwarf-and-dsym,iphoneos-arm64,iphoneos-armv7 \
+ //Telegram:IntentsExtension#dwarf-and-dsym,iphoneos-arm64,iphoneos-armv7 \
${BUCK_OPTIONS} ${BUCK_RELEASE_OPTIONS} ${BUCK_THREADS_OPTIONS} ${BUCK_CACHE_OPTIONS}
package_arm64:
PACKAGE_DEVELOPMENT_TEAM="${DEVELOPMENT_TEAM}" \
PACKAGE_CODE_SIGN_IDENTITY="${DISTRIBUTION_CODE_SIGN_IDENTITY}" \
PACKAGE_PROVISIONING_PROFILE_APP="${DISTRIBUTION_PROVISIONING_PROFILE_APP}" \
- PACKAGE_ENTITLEMENTS_APP="${ENTITLEMENTS_APP}" \
+ PACKAGE_ENTITLEMENTS_APP="Telegram/${ENTITLEMENTS_APP}" \
PACKAGE_PROVISIONING_PROFILE_EXTENSION_Share="${DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_SHARE}" \
- PACKAGE_ENTITLEMENTS_EXTENSION_Share="${ENTITLEMENTS_EXTENSION_SHARE}" \
+ PACKAGE_ENTITLEMENTS_EXTENSION_Share="Telegram/${ENTITLEMENTS_EXTENSION_SHARE}" \
PACKAGE_PROVISIONING_PROFILE_EXTENSION_Widget="${DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_WIDGET}" \
- PACKAGE_ENTITLEMENTS_EXTENSION_Widget="${ENTITLEMENTS_EXTENSION_WIDGET}" \
+ PACKAGE_ENTITLEMENTS_EXTENSION_Widget="Telegram/${ENTITLEMENTS_EXTENSION_WIDGET}" \
PACKAGE_PROVISIONING_PROFILE_EXTENSION_NotificationService="${DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_NOTIFICATIONSERVICE}" \
- PACKAGE_ENTITLEMENTS_EXTENSION_NotificationService="${ENTITLEMENTS_EXTENSION_NOTIFICATIONSERVICE}" \
+ PACKAGE_ENTITLEMENTS_EXTENSION_NotificationService="Telegram/${ENTITLEMENTS_EXTENSION_NOTIFICATIONSERVICE}" \
PACKAGE_PROVISIONING_PROFILE_EXTENSION_NotificationContent="${DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_NOTIFICATIONCONTENT}" \
- PACKAGE_ENTITLEMENTS_EXTENSION_NotificationContent="${ENTITLEMENTS_EXTENSION_NOTIFICATIONCONTENT}" \
+ PACKAGE_ENTITLEMENTS_EXTENSION_NotificationContent="Telegram/${ENTITLEMENTS_EXTENSION_NOTIFICATIONCONTENT}" \
PACKAGE_PROVISIONING_PROFILE_EXTENSION_Intents="${DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_INTENTS}" \
- PACKAGE_ENTITLEMENTS_EXTENSION_Intents="${ENTITLEMENTS_EXTENSION_INTENTS}" \
+ PACKAGE_ENTITLEMENTS_EXTENSION_Intents="Telegram/${ENTITLEMENTS_EXTENSION_INTENTS}" \
PACKAGE_PROVISIONING_PROFILE_WATCH_APP="${DISTRIBUTION_PROVISIONING_PROFILE_WATCH_APP}" \
PACKAGE_PROVISIONING_PROFILE_WATCH_EXTENSION="${DISTRIBUTION_PROVISIONING_PROFILE_WATCH_EXTENSION}" \
PACKAGE_BUNDLE_ID="${BUNDLE_ID}" \
@@ -198,17 +221,17 @@ package_armv7:
PACKAGE_DEVELOPMENT_TEAM="${DEVELOPMENT_TEAM}" \
PACKAGE_CODE_SIGN_IDENTITY="${DISTRIBUTION_CODE_SIGN_IDENTITY}" \
PACKAGE_PROVISIONING_PROFILE_APP="${DISTRIBUTION_PROVISIONING_PROFILE_APP}" \
- PACKAGE_ENTITLEMENTS_APP="${ENTITLEMENTS_APP}" \
+ PACKAGE_ENTITLEMENTS_APP="Telegram/${ENTITLEMENTS_APP}" \
PACKAGE_PROVISIONING_PROFILE_EXTENSION_Share="${DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_SHARE}" \
- PACKAGE_ENTITLEMENTS_EXTENSION_Share="${ENTITLEMENTS_EXTENSION_SHARE}" \
+ PACKAGE_ENTITLEMENTS_EXTENSION_Share="Telegram/${ENTITLEMENTS_EXTENSION_SHARE}" \
PACKAGE_PROVISIONING_PROFILE_EXTENSION_Widget="${DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_WIDGET}" \
- PACKAGE_ENTITLEMENTS_EXTENSION_Widget="${ENTITLEMENTS_EXTENSION_WIDGET}" \
+ PACKAGE_ENTITLEMENTS_EXTENSION_Widget="Telegram/${ENTITLEMENTS_EXTENSION_WIDGET}" \
PACKAGE_PROVISIONING_PROFILE_EXTENSION_NotificationService="${DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_NOTIFICATIONSERVICE}" \
- PACKAGE_ENTITLEMENTS_EXTENSION_NotificationService="${ENTITLEMENTS_EXTENSION_NOTIFICATIONSERVICE}" \
+ PACKAGE_ENTITLEMENTS_EXTENSION_NotificationService="Telegram/${ENTITLEMENTS_EXTENSION_NOTIFICATIONSERVICE}" \
PACKAGE_PROVISIONING_PROFILE_EXTENSION_NotificationContent="${DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_NOTIFICATIONCONTENT}" \
- PACKAGE_ENTITLEMENTS_EXTENSION_NotificationContent="${ENTITLEMENTS_EXTENSION_NOTIFICATIONCONTENT}" \
+ PACKAGE_ENTITLEMENTS_EXTENSION_NotificationContent="Telegram/${ENTITLEMENTS_EXTENSION_NOTIFICATIONCONTENT}" \
PACKAGE_PROVISIONING_PROFILE_EXTENSION_Intents="${DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_INTENTS}" \
- PACKAGE_ENTITLEMENTS_EXTENSION_Intents="${ENTITLEMENTS_EXTENSION_INTENTS}" \
+ PACKAGE_ENTITLEMENTS_EXTENSION_Intents="Telegram/${ENTITLEMENTS_EXTENSION_INTENTS}" \
PACKAGE_PROVISIONING_PROFILE_WATCH_APP="${DISTRIBUTION_PROVISIONING_PROFILE_WATCH_APP}" \
PACKAGE_PROVISIONING_PROFILE_WATCH_EXTENSION="${DISTRIBUTION_PROVISIONING_PROFILE_WATCH_EXTENSION}" \
PACKAGE_BUNDLE_ID="${BUNDLE_ID}" \
@@ -218,17 +241,17 @@ package_debug_arm64:
PACKAGE_DEVELOPMENT_TEAM="${DEVELOPMENT_TEAM}" \
PACKAGE_CODE_SIGN_IDENTITY="${DEVELOPMENT_CODE_SIGN_IDENTITY}" \
PACKAGE_PROVISIONING_PROFILE_APP="${DEVELOPMENT_PROVISIONING_PROFILE_APP}" \
- PACKAGE_ENTITLEMENTS_APP="${ENTITLEMENTS_APP}" \
+ PACKAGE_ENTITLEMENTS_APP="Telegram/${ENTITLEMENTS_APP}" \
PACKAGE_PROVISIONING_PROFILE_EXTENSION_Share="${DEVELOPMENT_PROVISIONING_PROFILE_EXTENSION_SHARE}" \
- PACKAGE_ENTITLEMENTS_EXTENSION_Share="${ENTITLEMENTS_EXTENSION_SHARE}" \
+ PACKAGE_ENTITLEMENTS_EXTENSION_Share="Telegram/${ENTITLEMENTS_EXTENSION_SHARE}" \
PACKAGE_PROVISIONING_PROFILE_EXTENSION_Widget="${DEVELOPMENT_PROVISIONING_PROFILE_EXTENSION_WIDGET}" \
- PACKAGE_ENTITLEMENTS_EXTENSION_Widget="${ENTITLEMENTS_EXTENSION_WIDGET}" \
+ PACKAGE_ENTITLEMENTS_EXTENSION_Widget="Telegram/${ENTITLEMENTS_EXTENSION_WIDGET}" \
PACKAGE_PROVISIONING_PROFILE_EXTENSION_NotificationService="${DEVELOPMENT_PROVISIONING_PROFILE_EXTENSION_NOTIFICATIONSERVICE}" \
- PACKAGE_ENTITLEMENTS_EXTENSION_NotificationService="${ENTITLEMENTS_EXTENSION_NOTIFICATIONSERVICE}" \
+ PACKAGE_ENTITLEMENTS_EXTENSION_NotificationService="Telegram/${ENTITLEMENTS_EXTENSION_NOTIFICATIONSERVICE}" \
PACKAGE_PROVISIONING_PROFILE_EXTENSION_NotificationContent="${DEVELOPMENT_PROVISIONING_PROFILE_EXTENSION_NOTIFICATIONCONTENT}" \
- PACKAGE_ENTITLEMENTS_EXTENSION_NotificationContent="${ENTITLEMENTS_EXTENSION_NOTIFICATIONCONTENT}" \
+ PACKAGE_ENTITLEMENTS_EXTENSION_NotificationContent="Telegram/${ENTITLEMENTS_EXTENSION_NOTIFICATIONCONTENT}" \
PACKAGE_PROVISIONING_PROFILE_EXTENSION_Intents="${DEVELOPMENT_PROVISIONING_PROFILE_EXTENSION_INTENTS}" \
- PACKAGE_ENTITLEMENTS_EXTENSION_Intents="${ENTITLEMENTS_EXTENSION_INTENTS}" \
+ PACKAGE_ENTITLEMENTS_EXTENSION_Intents="Telegram/${ENTITLEMENTS_EXTENSION_INTENTS}" \
PACKAGE_PROVISIONING_PROFILE_WATCH_APP="${DEVELOPMENT_PROVISIONING_PROFILE_WATCH_APP}" \
PACKAGE_PROVISIONING_PROFILE_WATCH_EXTENSION="${DEVELOPMENT_PROVISIONING_PROFILE_WATCH_EXTENSION}" \
PACKAGE_BUNDLE_ID="${BUNDLE_ID}" \
@@ -240,17 +263,17 @@ package_debug_armv7:
PACKAGE_DEVELOPMENT_TEAM="${DEVELOPMENT_TEAM}" \
PACKAGE_CODE_SIGN_IDENTITY="${DEVELOPMENT_CODE_SIGN_IDENTITY}" \
PACKAGE_PROVISIONING_PROFILE_APP="${DEVELOPMENT_PROVISIONING_PROFILE_APP}" \
- PACKAGE_ENTITLEMENTS_APP="${ENTITLEMENTS_APP}" \
+ PACKAGE_ENTITLEMENTS_APP="Telegram/${ENTITLEMENTS_APP}" \
PACKAGE_PROVISIONING_PROFILE_EXTENSION_Share="${DEVELOPMENT_PROVISIONING_PROFILE_EXTENSION_SHARE}" \
- PACKAGE_ENTITLEMENTS_EXTENSION_Share="${ENTITLEMENTS_EXTENSION_SHARE}" \
+ PACKAGE_ENTITLEMENTS_EXTENSION_Share="Telegram/${ENTITLEMENTS_EXTENSION_SHARE}" \
PACKAGE_PROVISIONING_PROFILE_EXTENSION_Widget="${DEVELOPMENT_PROVISIONING_PROFILE_EXTENSION_WIDGET}" \
- PACKAGE_ENTITLEMENTS_EXTENSION_Widget="${ENTITLEMENTS_EXTENSION_WIDGET}" \
+ PACKAGE_ENTITLEMENTS_EXTENSION_Widget="Telegram/${ENTITLEMENTS_EXTENSION_WIDGET}" \
PACKAGE_PROVISIONING_PROFILE_EXTENSION_NotificationService="${DEVELOPMENT_PROVISIONING_PROFILE_EXTENSION_NOTIFICATIONSERVICE}" \
- PACKAGE_ENTITLEMENTS_EXTENSION_NotificationService="${ENTITLEMENTS_EXTENSION_NOTIFICATIONSERVICE}" \
+ PACKAGE_ENTITLEMENTS_EXTENSION_NotificationService="Telegram/${ENTITLEMENTS_EXTENSION_NOTIFICATIONSERVICE}" \
PACKAGE_PROVISIONING_PROFILE_EXTENSION_NotificationContent="${DEVELOPMENT_PROVISIONING_PROFILE_EXTENSION_NOTIFICATIONCONTENT}" \
- PACKAGE_ENTITLEMENTS_EXTENSION_NotificationContent="${ENTITLEMENTS_EXTENSION_NOTIFICATIONCONTENT}" \
+ PACKAGE_ENTITLEMENTS_EXTENSION_NotificationContent="Telegram/${ENTITLEMENTS_EXTENSION_NOTIFICATIONCONTENT}" \
PACKAGE_PROVISIONING_PROFILE_EXTENSION_Intents="${DEVELOPMENT_PROVISIONING_PROFILE_EXTENSION_INTENTS}" \
- PACKAGE_ENTITLEMENTS_EXTENSION_Intents="${ENTITLEMENTS_EXTENSION_INTENTS}" \
+ PACKAGE_ENTITLEMENTS_EXTENSION_Intents="Telegram/${ENTITLEMENTS_EXTENSION_INTENTS}" \
PACKAGE_PROVISIONING_PROFILE_WATCH_APP="${DEVELOPMENT_PROVISIONING_PROFILE_WATCH_APP}" \
PACKAGE_PROVISIONING_PROFILE_WATCH_EXTENSION="${DEVELOPMENT_PROVISIONING_PROFILE_WATCH_EXTENSION}" \
PACKAGE_BUNDLE_ID="${BUNDLE_ID}" \
@@ -262,17 +285,17 @@ package:
PACKAGE_DEVELOPMENT_TEAM="${DEVELOPMENT_TEAM}" \
PACKAGE_CODE_SIGN_IDENTITY="${DISTRIBUTION_CODE_SIGN_IDENTITY}" \
PACKAGE_PROVISIONING_PROFILE_APP="${DISTRIBUTION_PROVISIONING_PROFILE_APP}" \
- PACKAGE_ENTITLEMENTS_APP="${ENTITLEMENTS_APP}" \
+ PACKAGE_ENTITLEMENTS_APP="Telegram/${ENTITLEMENTS_APP}" \
PACKAGE_PROVISIONING_PROFILE_EXTENSION_Share="${DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_SHARE}" \
- PACKAGE_ENTITLEMENTS_EXTENSION_Share="${ENTITLEMENTS_EXTENSION_SHARE}" \
+ PACKAGE_ENTITLEMENTS_EXTENSION_Share="Telegram/${ENTITLEMENTS_EXTENSION_SHARE}" \
PACKAGE_PROVISIONING_PROFILE_EXTENSION_Widget="${DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_WIDGET}" \
- PACKAGE_ENTITLEMENTS_EXTENSION_Widget="${ENTITLEMENTS_EXTENSION_WIDGET}" \
+ PACKAGE_ENTITLEMENTS_EXTENSION_Widget="Telegram/${ENTITLEMENTS_EXTENSION_WIDGET}" \
PACKAGE_PROVISIONING_PROFILE_EXTENSION_NotificationService="${DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_NOTIFICATIONSERVICE}" \
- PACKAGE_ENTITLEMENTS_EXTENSION_NotificationService="${ENTITLEMENTS_EXTENSION_NOTIFICATIONSERVICE}" \
+ PACKAGE_ENTITLEMENTS_EXTENSION_NotificationService="Telegram/${ENTITLEMENTS_EXTENSION_NOTIFICATIONSERVICE}" \
PACKAGE_PROVISIONING_PROFILE_EXTENSION_NotificationContent="${DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_NOTIFICATIONCONTENT}" \
- PACKAGE_ENTITLEMENTS_EXTENSION_NotificationContent="${ENTITLEMENTS_EXTENSION_NOTIFICATIONCONTENT}" \
+ PACKAGE_ENTITLEMENTS_EXTENSION_NotificationContent="Telegram/${ENTITLEMENTS_EXTENSION_NOTIFICATIONCONTENT}" \
PACKAGE_PROVISIONING_PROFILE_EXTENSION_Intents="${DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_INTENTS}" \
- PACKAGE_ENTITLEMENTS_EXTENSION_Intents="${ENTITLEMENTS_EXTENSION_INTENTS}" \
+ PACKAGE_ENTITLEMENTS_EXTENSION_Intents="Telegram/${ENTITLEMENTS_EXTENSION_INTENTS}" \
PACKAGE_PROVISIONING_PROFILE_WATCH_APP="${DISTRIBUTION_PROVISIONING_PROFILE_WATCH_APP}" \
PACKAGE_PROVISIONING_PROFILE_WATCH_EXTENSION="${DISTRIBUTION_PROVISIONING_PROFILE_WATCH_EXTENSION}" \
PACKAGE_BUNDLE_ID="${BUNDLE_ID}" \
@@ -290,8 +313,8 @@ app_debug_armv7: build_debug_armv7 package_debug_armv7
build_buckdebug: check_env
BUCK_DEBUG_MODE=1 $(BUCK) build \
- //:AppPackage#iphoneos-arm64 \
- //:Telegram#dwarf-and-dsym,iphoneos-arm64 \
+ //Telegram:AppPackage#iphoneos-arm64 \
+ //Telegram:Telegram#dwarf-and-dsym,iphoneos-arm64 \
//submodules/MtProtoKit:MtProtoKit#dwarf-and-dsym,shared,iphoneos-arm64 \
//submodules/MtProtoKit:MtProtoKit#shared,iphoneos-arm64 \
//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#dwarf-and-dsym,shared,iphoneos-arm64 \
@@ -310,28 +333,18 @@ build_buckdebug: check_env
//submodules/Display:Display#shared,iphoneos-arm64 \
//submodules/TelegramUI:TelegramUI#dwarf-and-dsym,shared,iphoneos-arm64 \
//submodules/TelegramUI:TelegramUI#shared,iphoneos-arm64 \
- //:WatchAppExtension#dwarf-and-dsym,watchos-arm64_32,watchos-armv7k \
- //:ShareExtension#dwarf-and-dsym,iphoneos-arm64 \
- //:WidgetExtension#dwarf-and-dsym,iphoneos-arm64 \
- //:NotificationContentExtension#dwarf-and-dsym,iphoneos-arm64 \
- //:NotificationServiceExtension#dwarf-and-dsym,iphoneos-arm64 \
- //:IntentsExtension#dwarf-and-dsym,iphoneos-arm64 \
+ //Telegram:WatchAppExtension#dwarf-and-dsym,watchos-arm64_32,watchos-armv7k \
+ //Telegram:ShareExtension#dwarf-and-dsym,iphoneos-arm64 \
+ //Telegram:WidgetExtension#dwarf-and-dsym,iphoneos-arm64 \
+ //Telegram:NotificationContentExtension#dwarf-and-dsym,iphoneos-arm64 \
+ //Telegram:NotificationServiceExtension#dwarf-and-dsym,iphoneos-arm64 \
+ //Telegram:IntentsExtension#dwarf-and-dsym,iphoneos-arm64 \
--verbose 7 ${BUCK_OPTIONS} ${BUCK_DEBUG_OPTIONS}
-build_buckdebug_one: check_env
- BUCK_DEBUG_MODE=1 $(BUCK) build \
- //submodules/Postbox:Postbox#shared,iphoneos-arm64 \
- --verbose 7 ${BUCK_OPTIONS} ${BUCK_DEBUG_OPTIONS}
-
-build_verbose_one: check_env
- $(BUCK) build \
- //submodules/Postbox:Postbox#shared,iphoneos-arm64 \
- --verbose 7 ${BUCK_OPTIONS} ${BUCK_DEBUG_OPTIONS}
-
build_verbose: check_env
$(BUCK) build \
- //:AppPackage#iphoneos-arm64 \
- //:Telegram#dwarf-and-dsym,iphoneos-arm64 \
+ //Telegram:AppPackage#iphoneos-arm64 \
+ //Telegram:Telegram#dwarf-and-dsym,iphoneos-arm64 \
//submodules/MtProtoKit:MtProtoKit#dwarf-and-dsym,shared,iphoneos-arm64 \
//submodules/MtProtoKit:MtProtoKit#shared,iphoneos-arm64 \
//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#dwarf-and-dsym,shared,iphoneos-arm64 \
@@ -350,48 +363,66 @@ build_verbose: check_env
//submodules/Display:Display#shared,iphoneos-arm64 \
//submodules/TelegramUI:TelegramUI#dwarf-and-dsym,shared,iphoneos-arm64 \
//submodules/TelegramUI:TelegramUI#shared,iphoneos-arm64 \
- //:WatchAppExtension#dwarf-and-dsym,watchos-arm64_32,watchos-armv7k \
- //:ShareExtension#dwarf-and-dsym,iphoneos-arm64 \
- //:WidgetExtension#dwarf-and-dsym,iphoneos-arm64 \
- //:NotificationContentExtension#dwarf-and-dsym,iphoneos-arm64 \
- //:NotificationServiceExtension#dwarf-and-dsym,iphoneos-arm64 \
- //:IntentsExtension#dwarf-and-dsym,iphoneos-arm64 \
+ //Telegram:WatchAppExtension#dwarf-and-dsym,watchos-arm64_32,watchos-armv7k \
+ //Telegram:ShareExtension#dwarf-and-dsym,iphoneos-arm64 \
+ //Telegram:WidgetExtension#dwarf-and-dsym,iphoneos-arm64 \
+ //Telegram:NotificationContentExtension#dwarf-and-dsym,iphoneos-arm64 \
+ //Telegram:NotificationServiceExtension#dwarf-and-dsym,iphoneos-arm64 \
+ //Telegram:IntentsExtension#dwarf-and-dsym,iphoneos-arm64 \
--verbose 7 ${BUCK_OPTIONS} ${BUCK_THREADS_OPTIONS} ${BUCK_DEBUG_OPTIONS} ${BUCK_CACHE_OPTIONS}
deps: check_env
- $(BUCK) query "deps(//:AppPackage)" --dot \
+ $(BUCK) query "deps(//Telegram:AppPackage)" --dot \
${BUCK_OPTIONS} ${BUCK_DEBUG_OPTIONS}
-build_openssl: check_env
- $(BUCK) build \
- //submodules/openssl:openssl#iphoneos-arm64 \
- --verbose 7 ${BUCK_OPTIONS} ${BUCK_THREADS_OPTIONS} ${BUCK_DEBUG_OPTIONS}
-
-build_libphonenumber: check_env
- $(BUCK) build \
- //submodules/libphonenumber:libphonenumber#iphoneos-arm64 \
- ${BUCK_OPTIONS} ${BUCK_THREADS_OPTIONS} ${BUCK_DEBUG_OPTIONS}
-
-build_ton: check_env
- $(BUCK) build \
- //submodules/ton:ton#iphoneos-arm64 \
- --verbose 7 ${BUCK_OPTIONS} ${BUCK_THREADS_OPTIONS} ${BUCK_DEBUG_OPTIONS}
-
clean: kill_xcode
sh clean.sh
project: check_env kill_xcode
- $(BUCK) project //:workspace --config custom.mode=project ${BUCK_OPTIONS} ${BUCK_DEBUG_OPTIONS}
- open Telegram_Buck.xcworkspace
+ $(BUCK) project //Telegram:workspace --config custom.mode=project ${BUCK_OPTIONS} ${BUCK_DEBUG_OPTIONS}
+ open Telegram/Telegram_Buck.xcworkspace
-project_opt: check_env kill_xcode
- $(BUCK) project //:workspace --config custom.mode=project ${BUCK_OPTIONS} ${BUCK_RELEASE_OPTIONS}
- open Telegram_Buck.xcworkspace
+bazel_app_debug_arm64:
+ APP_VERSION="${APP_VERSION}" \
+ build-system/prepare-build.sh distribution
+ "${BAZEL}" build Telegram/Telegram ${BAZEL_CACHE_FLAGS} ${BAZEL_COMMON_FLAGS} ${BAZEL_DEBUG_FLAGS} \
+ -c dbg \
+ --ios_multi_cpus=arm64 \
+ --watchos_cpus=armv7k,arm64_32 \
+ --verbose_failures
-project_buckdebug: check_env kill_xcode
- BUCK_DEBUG_MODE=1 $(BUCK) project //:workspace --config custom.mode=project ${BUCK_OPTIONS} ${BUCK_DEBUG_OPTIONS}
- open Telegram_Buck.xcworkspace
+bazel_app_arm64:
+ APP_VERSION="${APP_VERSION}" \
+ BAZEL_CACHE_DIR="${BAZEL_CACHE_DIR}" \
+ build-system/prepare-build.sh distribution
+ "${BAZEL}" build Telegram/Telegram ${BAZEL_CACHE_FLAGS} ${BAZEL_COMMON_FLAGS} ${BAZEL_OPT_FLAGS} \
+ -c opt \
+ --ios_multi_cpus=arm64 \
+ --watchos_cpus=armv7k,arm64_32 \
+ --objc_enable_binary_stripping=true \
+ --features=dead_strip \
+ --apple_generate_dsym \
+ --output_groups=+dsyms \
+ --verbose_failures
+
+bazel_prepare_development_build:
+ APP_VERSION="${APP_VERSION}" \
+ BAZEL_CACHE_DIR="${BAZEL_CACHE_DIR}" \
+ build-system/prepare-build.sh development
+
+bazel_project: kill_xcode bazel_prepare_development_build
+ APP_VERSION="${APP_VERSION}" \
+ BAZEL_CACHE_DIR="${BAZEL_CACHE_DIR}" \
+ build-system/generate-xcode-project.sh
+
+bazel_soft_project: bazel_prepare_development_build
+ APP_VERSION="${APP_VERSION}" \
+ BAZEL_CACHE_DIR="${BAZEL_CACHE_DIR}" \
+ build-system/generate-xcode-project.sh
+
+bazel_opt_project: bazel_prepare_development_build
+ APP_VERSION="${APP_VERSION}" \
+ BAZEL_CACHE_DIR="${BAZEL_CACHE_DIR}" \
+ GENERATE_OPT_PROJECT=1 \
+ build-system/generate-xcode-project.sh
-temp_project: check_env kill_xcode
- $(BUCK) project //Temp:workspace --config custom.mode=project ${BUCK_OPTIONS} ${BUCK_DEBUG_OPTIONS}
- open Temp/Telegram_Buck.xcworkspace
diff --git a/Telegram-iOS UITests/Images/Bitmap1.png b/Telegram-iOS UITests/Images/Bitmap1.png
deleted file mode 100644
index f0dbe85f17..0000000000
Binary files a/Telegram-iOS UITests/Images/Bitmap1.png and /dev/null differ
diff --git a/Telegram-iOS UITests/Images/Bitmap10.png b/Telegram-iOS UITests/Images/Bitmap10.png
deleted file mode 100644
index ac46a069b7..0000000000
Binary files a/Telegram-iOS UITests/Images/Bitmap10.png and /dev/null differ
diff --git a/Telegram-iOS UITests/Images/Bitmap11.png b/Telegram-iOS UITests/Images/Bitmap11.png
deleted file mode 100644
index d64c41bae2..0000000000
Binary files a/Telegram-iOS UITests/Images/Bitmap11.png and /dev/null differ
diff --git a/Telegram-iOS UITests/Images/Bitmap12.png b/Telegram-iOS UITests/Images/Bitmap12.png
deleted file mode 100644
index 2f450cf3eb..0000000000
Binary files a/Telegram-iOS UITests/Images/Bitmap12.png and /dev/null differ
diff --git a/Telegram-iOS UITests/Images/Bitmap2.png b/Telegram-iOS UITests/Images/Bitmap2.png
deleted file mode 100644
index 149b4d88e5..0000000000
Binary files a/Telegram-iOS UITests/Images/Bitmap2.png and /dev/null differ
diff --git a/Telegram-iOS UITests/Images/Bitmap3.png b/Telegram-iOS UITests/Images/Bitmap3.png
deleted file mode 100644
index 66b3bef10f..0000000000
Binary files a/Telegram-iOS UITests/Images/Bitmap3.png and /dev/null differ
diff --git a/Telegram-iOS UITests/Images/Bitmap5.png b/Telegram-iOS UITests/Images/Bitmap5.png
deleted file mode 100644
index a053de0159..0000000000
Binary files a/Telegram-iOS UITests/Images/Bitmap5.png and /dev/null differ
diff --git a/Telegram-iOS UITests/Images/Bitmap6.png b/Telegram-iOS UITests/Images/Bitmap6.png
deleted file mode 100644
index 7f3854f431..0000000000
Binary files a/Telegram-iOS UITests/Images/Bitmap6.png and /dev/null differ
diff --git a/Telegram-iOS UITests/Images/Bitmap7.png b/Telegram-iOS UITests/Images/Bitmap7.png
deleted file mode 100644
index 346939bbd7..0000000000
Binary files a/Telegram-iOS UITests/Images/Bitmap7.png and /dev/null differ
diff --git a/Telegram-iOS UITests/Images/Bitmap8.png b/Telegram-iOS UITests/Images/Bitmap8.png
deleted file mode 100644
index 7a32f43fdb..0000000000
Binary files a/Telegram-iOS UITests/Images/Bitmap8.png and /dev/null differ
diff --git a/Telegram-iOS UITests/Images/Bitmap9.png b/Telegram-iOS UITests/Images/Bitmap9.png
deleted file mode 100644
index 07fa8d4aa5..0000000000
Binary files a/Telegram-iOS UITests/Images/Bitmap9.png and /dev/null differ
diff --git a/Telegram-iOS UITests/Info.plist b/Telegram-iOS UITests/Info.plist
deleted file mode 100644
index 469d7cc131..0000000000
--- a/Telegram-iOS UITests/Info.plist
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
- CFBundleDevelopmentRegion
- $(DEVELOPMENT_LANGUAGE)
- CFBundleExecutable
- $(EXECUTABLE_NAME)
- CFBundleIdentifier
- $(PRODUCT_BUNDLE_IDENTIFIER)
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- $(PRODUCT_NAME)
- CFBundlePackageType
- BNDL
- CFBundleShortVersionString
- 1.0
- CFBundleVersion
- 667
-
-
diff --git a/Telegram-iOS UITests/SnapshotHelper.swift b/Telegram-iOS UITests/SnapshotHelper.swift
deleted file mode 100644
index 3ba8f8cdfb..0000000000
--- a/Telegram-iOS UITests/SnapshotHelper.swift
+++ /dev/null
@@ -1,196 +0,0 @@
-//
-// SnapshotHelper.swift
-// Example
-//
-// Created by Felix Krause on 10/8/15.
-// Copyright © 2015 Felix Krause. All rights reserved.
-//
-
-// -----------------------------------------------------
-// IMPORTANT: When modifying this file, make sure to
-// increment the version number at the very
-// bottom of the file to notify users about
-// the new SnapshotHelper.swift
-// -----------------------------------------------------
-
-import Foundation
-import XCTest
-
-var deviceLanguage = ""
-var locale = ""
-
-@available(*, deprecated, message: "use setupSnapshot: instead")
-func setLanguage(_ app: XCUIApplication) {
- setupSnapshot(app)
-}
-
-func setupSnapshot(_ app: XCUIApplication) {
- Snapshot.setupSnapshot(app)
-}
-
-func snapshot(_ name: String, waitForLoadingIndicator: Bool = true) {
- Snapshot.snapshot(name, waitForLoadingIndicator: waitForLoadingIndicator)
-}
-
-enum SnapshotError: Error, CustomDebugStringConvertible {
- case cannotDetectUser
- case cannotFindHomeDirectory
- case cannotFindSimulatorHomeDirectory
- case cannotAccessSimulatorHomeDirectory(String)
-
- var debugDescription: String {
- switch self {
- case .cannotDetectUser:
- return "Couldn't find Snapshot configuration files - can't detect current user "
- case .cannotFindHomeDirectory:
- return "Couldn't find Snapshot configuration files - can't detect `Users` dir"
- case .cannotFindSimulatorHomeDirectory:
- return "Couldn't find simulator home location. Please, check SIMULATOR_HOST_HOME env variable."
- case .cannotAccessSimulatorHomeDirectory(let simulatorHostHome):
- return "Can't prepare environment. Simulator home location is inaccessible. Does \(simulatorHostHome) exist?"
- }
- }
-}
-
-open class Snapshot: NSObject {
- static var app: XCUIApplication!
- static var cacheDirectory: URL!
- static var screenshotsDirectory: URL? {
- return cacheDirectory.appendingPathComponent("screenshots", isDirectory: true)
- }
-
- open class func setupSnapshot(_ app: XCUIApplication) {
- do {
- let cacheDir = try pathPrefix()
- Snapshot.cacheDirectory = cacheDir
- print("cacheDir \(cacheDir)")
- Snapshot.app = app
- setLanguage(app)
- setLocale(app)
- setLaunchArguments(app)
- } catch let error {
- print(error)
- }
- }
-
- class func setLanguage(_ app: XCUIApplication) {
- let path = cacheDirectory.appendingPathComponent("language.txt")
-
- do {
- let trimCharacterSet = CharacterSet.whitespacesAndNewlines
- deviceLanguage = try String(contentsOf: path, encoding: .utf8).trimmingCharacters(in: trimCharacterSet)
- app.launchArguments += ["-AppleLanguages", "(\(deviceLanguage))"]
- } catch {
- print("Couldn't detect/set language...")
- }
- }
-
- class func setLocale(_ app: XCUIApplication) {
- let path = cacheDirectory.appendingPathComponent("locale.txt")
-
- do {
- let trimCharacterSet = CharacterSet.whitespacesAndNewlines
- locale = try String(contentsOf: path, encoding: .utf8).trimmingCharacters(in: trimCharacterSet)
- } catch {
- print("Couldn't detect/set locale...")
- }
- if locale.isEmpty {
- locale = Locale(identifier: deviceLanguage).identifier
- }
- app.launchArguments += ["-AppleLocale", "\"\(locale)\""]
- }
-
- class func setLaunchArguments(_ app: XCUIApplication) {
- let path = cacheDirectory.appendingPathComponent("snapshot-launch_arguments.txt")
- app.launchArguments += ["-FASTLANE_SNAPSHOT", "YES", "-ui_testing"]
-
- do {
- let launchArguments = try String(contentsOf: path, encoding: String.Encoding.utf8)
- let regex = try NSRegularExpression(pattern: "(\\\".+?\\\"|\\S+)", options: [])
- let matches = regex.matches(in: launchArguments, options: [], range: NSRange(location:0, length: launchArguments.count))
- let results = matches.map { result -> String in
- (launchArguments as NSString).substring(with: result.range)
- }
- app.launchArguments += results
- } catch {
- print("Couldn't detect/set launch_arguments...")
- }
- }
-
- open class func snapshot(_ name: String, waitForLoadingIndicator: Bool = true) {
- if waitForLoadingIndicator {
- waitForLoadingIndicatorToDisappear()
- }
-
- print("snapshot: \(name)") // more information about this, check out https://github.com/fastlane/fastlane/tree/master/snapshot#how-does-it-work
-
- sleep(1) // Waiting for the animation to be finished (kind of)
-
- #if os(OSX)
- XCUIApplication().typeKey(XCUIKeyboardKeySecondaryFn, modifierFlags: [])
- #else
- let screenshot = app.windows.firstMatch.screenshot()
- guard let simulator = ProcessInfo().environment["SIMULATOR_DEVICE_NAME"], let screenshotsDir = screenshotsDirectory else { return }
- let path = screenshotsDir.appendingPathComponent("\(simulator)-\(name).png")
- do {
- try screenshot.pngRepresentation.write(to: path)
- } catch let error {
- print("Problem writing screenshot: \(name) to \(path)")
- print(error)
- }
- #endif
- }
-
- class func waitForLoadingIndicatorToDisappear() {
- #if os(tvOS)
- return
- #endif
-
- let query = XCUIApplication().statusBars.children(matching: .other).element(boundBy: 1).children(matching: .other)
-
- while (0.. URL? {
- let homeDir: URL
- // on OSX config is stored in /Users//Library
- // and on iOS/tvOS/WatchOS it's in simulator's home dir
- #if os(OSX)
- guard let user = ProcessInfo().environment["USER"] else {
- throw SnapshotError.cannotDetectUser
- }
-
- guard let usersDir = FileManager.default.urls(for: .userDirectory, in: .localDomainMask).first else {
- throw SnapshotError.cannotFindHomeDirectory
- }
-
- homeDir = usersDir.appendingPathComponent(user)
- #else
- guard let simulatorHostHome = ProcessInfo().environment["SIMULATOR_HOST_HOME"] else {
- throw SnapshotError.cannotFindSimulatorHomeDirectory
- }
- guard let homeDirUrl = URL(string: simulatorHostHome) else {
- throw SnapshotError.cannotAccessSimulatorHomeDirectory(simulatorHostHome)
- }
- homeDir = URL(fileURLWithPath: homeDirUrl.path)
- #endif
- return homeDir.appendingPathComponent("Library/Caches/tools.fastlane")
- }
-}
-
-extension XCUIElement {
- var isLoadingIndicator: Bool {
- let whiteListedLoaders = ["GeofenceLocationTrackingOn", "StandardLocationTrackingOn"]
- if whiteListedLoaders.contains(self.identifier) {
- return false
- }
- return self.frame.size == CGSize(width: 10, height: 20)
- }
-}
-
-// Please don't remove the lines below
-// They are used to detect outdated configuration files
-// SnapshotHelperVersion [1.5]
diff --git a/Telegram-iOS UITests/Telegram_iOS_UITests.swift b/Telegram-iOS UITests/Telegram_iOS_UITests.swift
deleted file mode 100644
index 77877422c0..0000000000
--- a/Telegram-iOS UITests/Telegram_iOS_UITests.swift
+++ /dev/null
@@ -1,53 +0,0 @@
-import XCTest
-
-class Telegram_iOS_UITests: XCTestCase {
- var app: XCUIApplication!
-
- override func setUp() {
- super.setUp()
-
- self.continueAfterFailure = false
-
- self.app = XCUIApplication()
- let path = Bundle(for: type(of: self)).bundlePath
-
- self.app.launchEnvironment["snapshot-data-path"] = path
- setupSnapshot(app)
- }
-
- override func tearDown() {
- super.tearDown()
- }
-
- func testChatList() {
- self.app.launchArguments = ["snapshot:chat-list"]
- self.app.launch()
- XCTAssert(self.app.wait(for: .runningForeground, timeout: 10.0))
- snapshot("01ChatList")
- sleep(1)
- }
-
- func testSecretChat() {
- self.app.launchArguments = ["snapshot:secret-chat"]
- self.app.launch()
- XCTAssert(self.app.wait(for: .runningForeground, timeout: 10.0))
- snapshot("02SecretChat")
- sleep(1)
- }
-
- func testSettings() {
- self.app.launchArguments = ["snapshot:settings"]
- self.app.launch()
- XCTAssert(self.app.wait(for: .runningForeground, timeout: 10.0))
- snapshot("04Settings")
- sleep(1)
- }
-
- func testAppearanceSettings() {
- self.app.launchArguments = ["snapshot:appearance-settings"]
- self.app.launch()
- XCTAssert(self.app.wait(for: .runningForeground, timeout: 10.0))
- snapshot("05AppearanceSettings")
- sleep(1)
- }
-}
diff --git a/Telegram-iOSTests/Info.plist b/Telegram-iOSTests/Info.plist
deleted file mode 100644
index 4e002d9359..0000000000
--- a/Telegram-iOSTests/Info.plist
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
- CFBundleDevelopmentRegion
- en
- CFBundleExecutable
- $(EXECUTABLE_NAME)
- CFBundleIdentifier
- $(PRODUCT_BUNDLE_IDENTIFIER)
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- $(PRODUCT_NAME)
- CFBundlePackageType
- BNDL
- CFBundleShortVersionString
- 1.0
- CFBundleSignature
- ????
- CFBundleVersion
- 667
-
-
diff --git a/Telegram-iOSTests/ListViewTests.swift b/Telegram-iOSTests/ListViewTests.swift
deleted file mode 100644
index c5da8cd790..0000000000
--- a/Telegram-iOSTests/ListViewTests.swift
+++ /dev/null
@@ -1,29 +0,0 @@
-import XCTest
-import Display
-
-class ListViewTests: XCTestCase {
- var listView: ListView!
-
- override func setUp() {
- super.setUp()
-
- // Put setup code here. This method is called before the invocation of each test method in the class.
-
- // In UI tests it is usually best to stop immediately when a failure occurs.
- continueAfterFailure = false
- // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
- XCUIApplication().launch()
-
- // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
- }
-
- override func tearDown() {
- // Put teardown code here. This method is called after the invocation of each test method in the class.
- super.tearDown()
- }
-
- func testExample() {
- // Use recording to get started writing UI tests.
- // Use XCTAssert and related functions to verify your tests produce the correct results.
- }
-}
diff --git a/Telegram-iOSTests/Telegram_iOSTests.swift b/Telegram-iOSTests/Telegram_iOSTests.swift
deleted file mode 100644
index eb6bb07928..0000000000
--- a/Telegram-iOSTests/Telegram_iOSTests.swift
+++ /dev/null
@@ -1,36 +0,0 @@
-//
-// Telegram_iOSTests.swift
-// Telegram-iOSTests
-//
-// Created by Peter on 10/06/15.
-// Copyright (c) 2015 Telegram. All rights reserved.
-//
-
-import UIKit
-import XCTest
-
-class Telegram_iOSTests: XCTestCase {
-
- override func setUp() {
- super.setUp()
- // Put setup code here. This method is called before the invocation of each test method in the class.
- }
-
- override func tearDown() {
- // Put teardown code here. This method is called after the invocation of each test method in the class.
- super.tearDown()
- }
-
- func testExample() {
- // This is an example of a functional test case.
- XCTAssert(true, "Pass")
- }
-
- func testPerformanceExample() {
- // This is an example of a performance test case.
- self.measure {
- // Put the code you want to measure the time of here.
- }
- }
-
-}
diff --git a/Telegram/BUCK b/Telegram/BUCK
new file mode 100644
index 0000000000..ff2f315899
--- /dev/null
+++ b/Telegram/BUCK
@@ -0,0 +1,551 @@
+load("//Config:utils.bzl",
+ "library_configs",
+)
+
+load("//Config:configs.bzl",
+ "app_binary_configs",
+ "share_extension_configs",
+ "widget_extension_configs",
+ "notification_content_extension_configs",
+ "notification_service_extension_configs",
+ "intents_extension_configs",
+ "watch_extension_binary_configs",
+ "watch_binary_configs",
+ "info_plist_substitutions",
+ "app_info_plist_substitutions",
+ "share_extension_info_plist_substitutions",
+ "widget_extension_info_plist_substitutions",
+ "notification_content_extension_info_plist_substitutions",
+ "notification_service_extension_info_plist_substitutions",
+ "intents_extension_info_plist_substitutions",
+ "watch_extension_info_plist_substitutions",
+ "watch_info_plist_substitutions",
+ "DEVELOPMENT_LANGUAGE",
+)
+
+load("//Config:buck_rule_macros.bzl",
+ "apple_lib",
+ "framework_binary_dependencies",
+ "framework_bundle_dependencies",
+ "glob_map",
+ "glob_sub_map",
+ "merge_maps",
+)
+
+framework_dependencies = [
+ "//submodules/MtProtoKit:MtProtoKit",
+ "//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
+ "//submodules/Postbox:Postbox",
+ "//submodules/TelegramApi:TelegramApi",
+ "//submodules/SyncCore:SyncCore",
+ "//submodules/TelegramCore:TelegramCore",
+ "//submodules/AsyncDisplayKit:AsyncDisplayKit",
+ "//submodules/Display:Display",
+ "//submodules/TelegramUI:TelegramUI",
+]
+
+resource_dependencies = [
+ "//submodules/LegacyComponents:LegacyComponentsResources",
+ "//submodules/TelegramUI:TelegramUIAssets",
+ "//submodules/TelegramUI:TelegramUIResources",
+ #"//submodules/WalletUI:WalletUIAssets",
+ #"//submodules/WalletUI:WalletUIResources",
+ "//submodules/PasswordSetupUI:PasswordSetupUIResources",
+ "//submodules/PasswordSetupUI:PasswordSetupUIAssets",
+ "//submodules/OverlayStatusController:OverlayStatusControllerResources",
+ ":AppResources",
+ ":AppStringResources",
+ ":InfoPlistStringResources",
+ ":AppIntentVocabularyResources",
+ ":Icons",
+ ":AdditionalIcons",
+ ":LaunchScreen",
+]
+
+build_phase_scripts = [
+]
+
+apple_resource(
+ name = "AppResources",
+ files = glob([
+ "Telegram-iOS/Resources/**/*",
+ ], exclude = ["Telegram-iOS/Resources/**/.*"]),
+ visibility = ["PUBLIC"],
+)
+
+apple_resource(
+ name = "AppStringResources",
+ files = [],
+ variants = glob([
+ "Telegram-iOS/*.lproj/Localizable.strings",
+ ]),
+ visibility = ["PUBLIC"],
+)
+
+apple_resource(
+ name = "AppIntentVocabularyResources",
+ files = [],
+ variants = glob([
+ "Telegram-iOS/*.lproj/AppIntentVocabulary.plist",
+ ]),
+ visibility = ["PUBLIC"],
+)
+
+apple_resource(
+ name = "InfoPlistStringResources",
+ files = [],
+ variants = glob([
+ "Telegram-iOS/*.lproj/InfoPlist.strings",
+ ]),
+ visibility = ["PUBLIC"],
+)
+
+apple_asset_catalog(
+ name = "Icons",
+ dirs = [
+ "Telegram-iOS/Icons.xcassets",
+ "Telegram-iOS/AppIcons.xcassets",
+ ],
+ app_icon = "AppIconLLC",
+ visibility = ["PUBLIC"],
+)
+
+apple_resource(
+ name = "AdditionalIcons",
+ files = glob([
+ "Telegram-iOS/*.png",
+ ]),
+ visibility = ["PUBLIC"],
+)
+
+apple_resource(
+ name = "LaunchScreen",
+ files = [
+ "Telegram-iOS/Base.lproj/LaunchScreen.xib",
+ ],
+ visibility = ["PUBLIC"],
+)
+
+apple_library(
+ name = "AppLibrary",
+ visibility = [
+ "//...",
+ ],
+ configs = library_configs(),
+ swift_version = native.read_config("swift", "version"),
+ srcs = [
+ "Telegram-iOS/main.m",
+ "Telegram-iOS/Application.swift"
+ ],
+ deps = [
+ ]
+ + framework_binary_dependencies(framework_dependencies),
+)
+
+apple_binary(
+ name = "AppBinary",
+ visibility = [
+ "//...",
+ ],
+ configs = app_binary_configs(),
+ swift_version = native.read_config("swift", "version"),
+ srcs = [
+ "SupportFiles/Empty.swift",
+ ],
+ deps = [
+ ":AppLibrary",
+ ]
+ + resource_dependencies,
+)
+
+apple_bundle(
+ name = "Telegram",
+ visibility = [
+ "//Telegram:...",
+ ],
+ extension = "app",
+ binary = ":AppBinary",
+ product_name = "Telegram",
+ info_plist = "Telegram-iOS/Info.plist",
+ info_plist_substitutions = app_info_plist_substitutions(),
+ deps = [
+ ":ShareExtension",
+ ":WidgetExtension",
+ ":NotificationContentExtension",
+ ":NotificationServiceExtension",
+ ":IntentsExtension",
+ ":WatchApp#watch",
+ ]
+ + framework_bundle_dependencies(framework_dependencies),
+)
+
+# Share Extension
+
+apple_binary(
+ name = "ShareBinary",
+ srcs = glob([
+ "Share/**/*.swift",
+ ]),
+ configs = share_extension_configs(),
+ linker_flags = [
+ "-e",
+ "_NSExtensionMain",
+ "-Xlinker",
+ "-rpath",
+ "-Xlinker",
+ "/usr/lib/swift",
+ "-Xlinker",
+ "-rpath",
+ "-Xlinker",
+ "@executable_path/../../Frameworks",
+ ],
+ deps = [
+ "//submodules/TelegramUI:TelegramUI#shared",
+ ],
+ frameworks = [
+ "$SDKROOT/System/Library/Frameworks/UIKit.framework",
+ "$SDKROOT/System/Library/Frameworks/Foundation.framework",
+ ],
+)
+
+apple_bundle(
+ name = "ShareExtension",
+ binary = ":ShareBinary",
+ extension = "appex",
+ info_plist = "Share/Info.plist",
+ info_plist_substitutions = share_extension_info_plist_substitutions(),
+ deps = [
+ ],
+ xcode_product_type = "com.apple.product-type.app-extension",
+)
+
+# Widget
+
+apple_binary(
+ name = "WidgetBinary",
+ srcs = glob([
+ "Widget/**/*.swift",
+ ]),
+ configs = widget_extension_configs(),
+ swift_compiler_flags = [
+ "-application-extension",
+ ],
+ linker_flags = [
+ "-e",
+ "_NSExtensionMain",
+ "-Xlinker",
+ "-rpath",
+ "-Xlinker",
+ "/usr/lib/swift",
+ "-Xlinker",
+ "-rpath",
+ "-Xlinker",
+ "@executable_path/../../Frameworks",
+ ],
+ deps = [
+ "//submodules/BuildConfig:BuildConfig",
+ "//submodules/WidgetItems:WidgetItems",
+ "//submodules/AppLockState:AppLockState",
+ ],
+ frameworks = [
+ "$SDKROOT/System/Library/Frameworks/UIKit.framework",
+ "$SDKROOT/System/Library/Frameworks/Foundation.framework",
+ "$SDKROOT/System/Library/Frameworks/NotificationCenter.framework",
+ ],
+)
+
+apple_bundle(
+ name = "WidgetExtension",
+ binary = ":WidgetBinary",
+ extension = "appex",
+ info_plist = "Widget/Info.plist",
+ info_plist_substitutions = widget_extension_info_plist_substitutions(),
+ deps = [
+ ],
+ xcode_product_type = "com.apple.product-type.app-extension",
+)
+
+# Notification Content
+
+apple_binary(
+ name = "NotificationContentBinary",
+ srcs = glob([
+ "NotificationContent/**/*.swift",
+ ]),
+ configs = notification_content_extension_configs(),
+ swift_compiler_flags = [
+ "-application-extension",
+ ],
+ linker_flags = [
+ "-e",
+ "_NSExtensionMain",
+ "-Xlinker",
+ "-rpath",
+ "-Xlinker",
+ "/usr/lib/swift",
+ "-Xlinker",
+ "-rpath",
+ "-Xlinker",
+ "@executable_path/../../Frameworks",
+ ],
+ deps = [
+ "//submodules/TelegramUI:TelegramUI#shared",
+ ],
+ frameworks = [
+ "$SDKROOT/System/Library/Frameworks/UIKit.framework",
+ "$SDKROOT/System/Library/Frameworks/Foundation.framework",
+ "$SDKROOT/System/Library/Frameworks/UserNotificationsUI.framework",
+ ],
+)
+
+apple_bundle(
+ name = "NotificationContentExtension",
+ binary = ":NotificationContentBinary",
+ extension = "appex",
+ info_plist = "NotificationContent/Info.plist",
+ info_plist_substitutions = notification_content_extension_info_plist_substitutions(),
+ deps = [
+ ],
+ xcode_product_type = "com.apple.product-type.app-extension",
+)
+
+#Notification Service
+
+apple_binary(
+ name = "NotificationServiceBinary",
+ srcs = glob([
+ "NotificationService/**/*.m",
+ "NotificationService/**/*.swift",
+ ]),
+ headers = glob([
+ "NotificationService/**/*.h",
+ ]),
+ bridging_header = "NotificationService/NotificationService-Bridging-Header.h",
+ configs = notification_service_extension_configs(),
+ swift_compiler_flags = [
+ "-application-extension",
+ ],
+ linker_flags = [
+ "-e",
+ "_NSExtensionMain",
+ "-Xlinker",
+ "-rpath",
+ "-Xlinker",
+ "/usr/lib/swift",
+ "-Xlinker",
+ "-rpath",
+ "-Xlinker",
+ "@executable_path/../../Frameworks",
+ ],
+ deps = [
+ "//submodules/BuildConfig:BuildConfig",
+ "//submodules/MtProtoKit:MtProtoKit#shared",
+ "//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
+ "//submodules/EncryptionProvider:EncryptionProvider",
+ "//submodules/Database/ValueBox:ValueBox",
+ "//submodules/Database/PostboxDataTypes:PostboxDataTypes",
+ "//submodules/Database/MessageHistoryReadStateTable:MessageHistoryReadStateTable",
+ "//submodules/Database/MessageHistoryMetadataTable:MessageHistoryMetadataTable",
+ "//submodules/Database/PreferencesTable:PreferencesTable",
+ "//submodules/Database/PeerTable:PeerTable",
+ "//submodules/sqlcipher:sqlcipher",
+ "//submodules/AppLockState:AppLockState",
+ "//submodules/NotificationsPresentationData:NotificationsPresentationData",
+ ],
+ frameworks = [
+ "$SDKROOT/System/Library/Frameworks/Foundation.framework",
+ "$SDKROOT/System/Library/Frameworks/UserNotifications.framework",
+ ],
+)
+
+apple_bundle(
+ name = "NotificationServiceExtension",
+ binary = ":NotificationServiceBinary",
+ extension = "appex",
+ info_plist = "NotificationService/Info.plist",
+ info_plist_substitutions = notification_service_extension_info_plist_substitutions(),
+ deps = [
+ ],
+ xcode_product_type = "com.apple.product-type.app-extension",
+)
+
+# Intents
+
+apple_binary(
+ name = "IntentsBinary",
+ srcs = glob([
+ "SiriIntents/**/*.swift",
+ ]),
+ configs = intents_extension_configs(),
+ swift_compiler_flags = [
+ "-application-extension",
+ ],
+ linker_flags = [
+ "-e",
+ "_NSExtensionMain",
+ "-Xlinker",
+ "-rpath",
+ "-Xlinker",
+ "/usr/lib/swift",
+ "-Xlinker",
+ "-rpath",
+ "-Xlinker",
+ "@executable_path/../../Frameworks",
+ ],
+ deps = [
+ "//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit#shared",
+ "//submodules/Postbox:Postbox#shared",
+ "//submodules/TelegramApi:TelegramApi#shared",
+ "//submodules/SyncCore:SyncCore#shared",
+ "//submodules/TelegramCore:TelegramCore#shared",
+ "//submodules/BuildConfig:BuildConfig",
+ "//submodules/OpenSSLEncryptionProvider:OpenSSLEncryptionProvider",
+ "//submodules/AppLockState:AppLockState",
+ ],
+ frameworks = [
+ "$SDKROOT/System/Library/Frameworks/Foundation.framework",
+ "$SDKROOT/System/Library/Frameworks/Intents.framework",
+ "$SDKROOT/System/Library/Frameworks/Contacts.framework",
+ ],
+)
+
+apple_bundle(
+ name = "IntentsExtension",
+ binary = ":IntentsBinary",
+ extension = "appex",
+ info_plist = "SiriIntents/Info.plist",
+ info_plist_substitutions = intents_extension_info_plist_substitutions(),
+ deps = [
+ ],
+ xcode_product_type = "com.apple.product-type.app-extension",
+)
+
+# Watch
+
+apple_resource(
+ name = "WatchAppStringResources",
+ files = [],
+ variants = glob([
+ "Telegram-iOS/*.lproj/Localizable.strings",
+ ]),
+ visibility = ["PUBLIC"],
+)
+
+apple_resource(
+ name = "WatchAppExtensionResources",
+ files = glob([
+ "Watch/Extension/Resources/**/*",
+ ], exclude = ["Watch/Extension/Resources/**/.*"]),
+ visibility = ["PUBLIC"],
+)
+
+apple_binary(
+ name = "WatchAppExtensionBinary",
+ srcs = glob([
+ "Watch/Extension/**/*.m",
+ "Watch/SSignalKit/**/*.m",
+ "Watch/Bridge/**/*.m",
+ "Watch/WatchCommonWatch/**/*.m",
+ ]),
+ headers = merge_maps([
+ glob_map(glob([
+ "Watch/Extension/*.h",
+ "Watch/Bridge/*.h",
+ ])),
+ glob_sub_map("Watch/Extension/", glob([
+ "Watch/Extension/SSignalKit/*.h",
+ ])),
+ glob_sub_map("Watch/", glob([
+ "Watch/WatchCommonWatch/*.h",
+ ])),
+ ]),
+ compiler_flags = [
+ "-DTARGET_OS_WATCH=1",
+ ],
+ linker_flags = [
+ "-e",
+ "_WKExtensionMain",
+ "-lWKExtensionMainLegacy",
+ ],
+ configs = watch_extension_binary_configs(),
+ frameworks = [
+ "$SDKROOT/System/Library/Frameworks/UserNotifications.framework",
+ "$SDKROOT/System/Library/Frameworks/CoreLocation.framework",
+ "$SDKROOT/System/Library/Frameworks/CoreGraphics.framework",
+ ],
+ deps = [
+ ":WatchAppStringResources",
+ ":WatchAppExtensionResources",
+ ],
+)
+
+apple_bundle(
+ name = "WatchAppExtension",
+ binary = ":WatchAppExtensionBinary",
+ extension = "appex",
+ info_plist = "Watch/Extension/Info.plist",
+ info_plist_substitutions = watch_extension_info_plist_substitutions(),
+ xcode_product_type = "com.apple.product-type.watchkit2-extension",
+)
+
+apple_resource(
+ name = "WatchAppResources",
+ dirs = [],
+ files = glob(["Watch/Extension/Resources/*.png"])
+)
+
+apple_asset_catalog(
+ name = "WatchAppAssets",
+ dirs = [
+ "Watch/App/Assets.xcassets",
+ ],
+ app_icon = "AppIcon",
+ visibility = ["PUBLIC"],
+)
+
+apple_resource(
+ name = "WatchAppInterface",
+ files = [
+ "Watch/App/Base.lproj/Interface.storyboard",
+ ],
+ visibility = ["PUBLIC"],
+)
+
+apple_binary(
+ name = "WatchAppBinary",
+ configs = watch_binary_configs(),
+ deps = [
+ ":WatchAppResources",
+ ":WatchAppAssets",
+ ":WatchAppInterface",
+ ":WatchAppStringResources",
+ ],
+)
+
+apple_bundle(
+ name = "WatchApp",
+ binary = ":WatchAppBinary",
+ visibility = [
+ "//Telegram:...",
+ ],
+ extension = "app",
+ info_plist = "Watch/App/Info.plist",
+ info_plist_substitutions = watch_info_plist_substitutions(),
+ xcode_product_type = "com.apple.product-type.application.watchapp2",
+ deps = [
+ ":WatchAppExtension",
+ ],
+)
+
+# Package
+
+apple_package(
+ name = "AppPackage",
+ bundle = ":Telegram",
+)
+
+xcode_workspace_config(
+ name = "workspace",
+ workspace_name = "Telegram_Buck",
+ src_target = ":Telegram",
+)
diff --git a/Telegram/BUILD b/Telegram/BUILD
new file mode 100644
index 0000000000..d438aecce4
--- /dev/null
+++ b/Telegram/BUILD
@@ -0,0 +1,822 @@
+load("@build_bazel_rules_apple//apple:ios.bzl",
+ "ios_application",
+ "ios_extension",
+ "ios_framework",
+)
+
+load("@build_bazel_rules_apple//apple:watchos.bzl",
+ "watchos_application",
+ "watchos_extension",
+)
+
+load("@build_bazel_rules_apple//apple:versioning.bzl",
+ "apple_bundle_version",
+)
+
+load("@build_bazel_rules_swift//swift:swift.bzl",
+ "swift_library",
+)
+
+load("//build-system:plist_fragment.bzl",
+ "plist_fragment",
+)
+
+load(
+ "//build-input/data:variables.bzl",
+ "telegram_build_number",
+ "telegram_version",
+ "telegram_bundle_id",
+ "telegram_aps_environment",
+ "telegram_team_id",
+)
+
+config_setting(
+ name = "debug",
+ values = {
+ "compilation_mode": "dbg",
+ },
+)
+
+genrule(
+ name = "empty",
+ outs = ["empty.swift"],
+ cmd = "touch $(OUTS)",
+)
+
+swift_library(
+ name = "_LocalDebugOptions",
+ srcs = [":empty"],
+ copts = [
+ "-Xfrontend",
+ "-serialize-debugging-options",
+ ],
+ deps = [
+ "//submodules/AsyncDisplayKit:AsyncDisplayKit",
+ "//submodules/AppBundle:AppBundle",
+ "//submodules/ObjCRuntimeUtils:ObjCRuntimeUtils",
+ "//submodules/UIKitRuntimeUtils:UIKitRuntimeUtils",
+ "//submodules/Crc32:Crc32",
+ "//submodules/MurMurHash32:MurMurHash32",
+ "//submodules/StringTransliteration:StringTransliteration",
+ "//submodules/sqlcipher:sqlcipher",
+ "//submodules/NumberPluralizationForm:NumberPluralizationForm",
+ "//submodules/EncryptionProvider:EncryptionProvider",
+ "//submodules/MtProtoKit:MtProtoKit",
+ ],
+ module_name = "_LocalDebugOptions",
+ tags = ["no-remote"],
+ visibility = ["//visibility:public"],
+)
+
+debug_deps = select({
+ ":debug": [":_LocalDebugOptions"],
+ "//conditions:default": [],
+})
+
+filegroup(
+ name = "AppResources",
+ srcs = glob([
+ "Telegram-iOS/Resources/**/*",
+ ], exclude = ["Telegram-iOS/Resources/**/.*"]),
+)
+
+filegroup(
+ name = "AppStringResources",
+ srcs = glob([
+ "Telegram-iOS/*.lproj/Localizable.strings",
+ ], exclude = ["Telegram-iOS/*.lproj/**/.*"]),
+)
+
+filegroup(
+ name = "WatchAppStringResources",
+ srcs = glob([
+ "Telegram-iOS/*.lproj/Localizable.strings",
+ ], exclude = ["Telegram-iOS/*.lproj/**/.*"]),
+)
+
+filegroup(
+ name = "AppIntentVocabularyResources",
+ srcs = glob([
+ "Telegram-iOS/*.lproj/AppIntentVocabulary.plist",
+ ], exclude = ["Telegram-iOS/*.lproj/**/.*"]),
+)
+
+filegroup(
+ name = "InfoPlistStringResources",
+ srcs = glob([
+ "Telegram-iOS/*.lproj/InfoPlist.strings",
+ ], exclude = ["Telegram-iOS/*.lproj/**/.*"]),
+)
+
+filegroup(
+ name = "Icons",
+ srcs = glob([
+ "Telegram-iOS/Icons.xcassets/**/*",
+ ], exclude = ["Telegram-iOS/Icons.xcassets/**/.*"]),
+)
+
+filegroup(
+ name = "AppIcons",
+ srcs = glob([
+ "Telegram-iOS/AppIcons.xcassets/**/*",
+ ], exclude = ["Telegram-iOS/AppIcons.xcassets/**/.*"]),
+)
+
+filegroup(
+ name = "DefaultAppIcon",
+ srcs = glob([
+ "Telegram-iOS/DefaultAppIcon.xcassets/**/*",
+ ], exclude = ["Telegram-iOS/DefaultAppIcon.xcassets/**/.*"]),
+)
+
+filegroup(
+ name = "AdditionalIcons",
+ srcs = glob([
+ "Telegram-iOS/*.png",
+ ]),
+)
+
+filegroup(
+ name = "LaunchScreen",
+ srcs = glob([
+ "Telegram-iOS/Base.lproj/LaunchScreen.xib",
+ ]),
+)
+
+objc_library(
+ name = "Main",
+ srcs = [
+ "Telegram-iOS/main.m"
+ ],
+)
+
+swift_library(
+ name = "Lib",
+ srcs = glob([
+ "Telegram-iOS/Application.swift",
+ ]),
+ data = [
+ ":AppResources",
+ ":AppIntentVocabularyResources",
+ ":InfoPlistStringResources",
+ "//submodules/LegacyComponents:LegacyComponentsResources",
+ "//submodules/OverlayStatusController:OverlayStatusControllerResources",
+ "//submodules/PasswordSetupUI:PasswordSetupUIResources",
+ "//submodules/PasswordSetupUI:PasswordSetupUIAssets",
+ "//submodules/TelegramUI:TelegramUIResources",
+ "//submodules/TelegramUI:TelegramUIAssets",
+ "//submodules/WalletUI:WalletUIResources",
+ "//submodules/WalletUI:WalletUIAssets",
+ ],
+ deps = [
+ "//submodules/TelegramUI:TelegramUI",
+ ],
+)
+
+plist_fragment(
+ name = "AdditionalInfoPlist",
+ extension = "plist",
+ template =
+ """
+ CFBundleShortVersionString
+ {telegram_version}
+ CFBundleVersion
+ {telegram_build_number}
+ CFBundleURLTypes
+
+
+ CFBundleTypeRole
+ Viewer
+ CFBundleURLName
+ {telegram_bundle_id}
+ CFBundleURLSchemes
+
+ telegram
+
+
+
+ CFBundleTypeRole
+ Viewer
+ CFBundleURLName
+ {telegram_bundle_id}.ton
+ CFBundleURLSchemes
+
+ ton
+
+
+
+ CFBundleTypeRole
+ Viewer
+ CFBundleURLName
+ {telegram_bundle_id}.compatibility
+ CFBundleURLSchemes
+
+ tg
+
+
+
+ """.format(
+ telegram_version = telegram_version,
+ telegram_build_number = telegram_build_number,
+ telegram_bundle_id = telegram_bundle_id,
+ )
+)
+
+official_apple_pay_merchants = [
+ "merchant.ph.telegra.Telegraph",
+ "merchant.yandex.ph.telegra.Telegraph",
+ "merchant.sberbank.ph.telegra.Telegraph",
+ "merchant.sberbank.test.ph.telegra.Telegraph",
+ "merchant.privatbank.test.telergramios",
+ "merchant.privatbank.prod.telergram",
+ "merchant.telegram.tranzzo.test",
+]
+
+official_bundle_ids = [
+ "ph.telegra.Telegraph",
+ "org.telegram.Telegram-iOS",
+]
+
+apple_pay_merchants = official_apple_pay_merchants if telegram_bundle_id == "ph.telegra.Telegraph" else ""
+
+apple_pay_merchants_fragment = "" if apple_pay_merchants == "" else """
+com.apple.developer.in-app-payments
+
+""" + "\n".join([
+" {}".format(merchant_id) for merchant_id in apple_pay_merchants
+]) + "\n" + """
+
+"""
+
+official_unrestricted_voip_fragment = """
+com.apple.developer.pushkit.unrestricted-voip
+
+"""
+unrestricted_voip_fragment = official_unrestricted_voip_fragment if telegram_bundle_id in official_bundle_ids else ""
+
+telegram_entitlements_template = """
+ com.apple.developer.icloud-services
+
+ CloudKit
+ CloudDocuments
+
+ com.apple.developer.icloud-container-identifiers
+
+ iCloud.{telegram_bundle_id}
+
+ aps-environment
+ {telegram_aps_environment}
+ com.apple.developer.associated-domains
+
+ applinks:telegram.me
+ applinks:t.me
+
+ com.apple.developer.siri
+
+ com.apple.security.application-groups
+
+ group.{telegram_bundle_id}
+
+ application-identifier
+ {telegram_team_id}.{telegram_bundle_id}
+""" + apple_pay_merchants_fragment + unrestricted_voip_fragment
+
+plist_fragment(
+ name = "TelegramEntitlements",
+ extension = "entitlements",
+ template = telegram_entitlements_template.format(
+ telegram_bundle_id = telegram_bundle_id,
+ telegram_team_id = telegram_team_id,
+ telegram_aps_environment = telegram_aps_environment,
+ )
+)
+
+filegroup(
+ name = "TelegramWatchExtensionResources",
+ srcs = glob([
+ "Watch/Extension/Resources/**/*",
+ ], exclude = ["Watch/Extension/Resources/**/.*"]),
+)
+
+filegroup(
+ name = "TelegramWatchAppResources",
+ srcs = glob([
+ "Watch/Extension/Resources/**/*.png",
+ ], exclude = ["Watch/Extension/Resources/**/.*"]),
+)
+
+filegroup(
+ name = "TelegramWatchAppAssets",
+ srcs = glob([
+ "Watch/App/Assets.xcassets/**/*",
+ ], exclude = ["Watch/App/Assets.xcassets/**/.*"]),
+)
+
+filegroup(
+ name = "TelegramWatchAppInterface",
+ srcs = glob([
+ "Watch/App/Base.lproj/Interface.storyboard",
+ ]),
+)
+
+objc_library(
+ name = "TelegramWatchLib",
+ srcs = glob([
+ "Watch/Extension/**/*.m",
+ "Watch/SSignalKit/**/*.m",
+ "Watch/Bridge/**/*.m",
+ "Watch/WatchCommonWatch/**/*.m",
+ "Watch/Extension/**/*.h",
+ "Watch/SSignalKit/**/*.h",
+ "Watch/Bridge/**/*.h",
+ "Watch/WatchCommonWatch/**/*.h",
+ ]),
+ copts = [
+ "-DTARGET_OS_WATCH=1",
+ "-ITelegram/Watch",
+ "-ITelegram/Watch/Extension",
+ "-ITelegram/Watch/Bridge",
+ ],
+ sdk_frameworks = [
+ "WatchKit",
+ "WatchConnectivity",
+ "ClockKit",
+ "UserNotifications",
+ "CoreLocation",
+ "CoreGraphics",
+ ],
+)
+
+plist_fragment(
+ name = "VersionInfoPlist",
+ extension = "plist",
+ template =
+ """
+ CFBundleShortVersionString
+ {telegram_version}
+ CFBundleVersion
+ {telegram_build_number}
+ """.format(
+ telegram_version = telegram_version,
+ telegram_build_number = telegram_build_number,
+ )
+)
+
+plist_fragment(
+ name = "AppNameInfoPlist",
+ extension = "plist",
+ template =
+ """
+ CFBundleDisplayName
+ Telegram
+ """
+)
+
+plist_fragment(
+ name = "WatchExtensionNSExtensionInfoPlist",
+ extension = "plist",
+ template =
+ """
+ NSExtension
+
+ NSExtensionAttributes
+
+ WKAppBundleIdentifier
+ {telegram_bundle_id}.watchkitapp
+
+ NSExtensionPointIdentifier
+ com.apple.watchkit
+
+ """.format(
+ telegram_bundle_id = telegram_bundle_id,
+ )
+)
+
+plist_fragment(
+ name = "WatchAppCompanionInfoPlist",
+ extension = "plist",
+ template =
+ """
+ WKCompanionAppBundleIdentifier
+ {telegram_bundle_id}
+ """.format(
+ telegram_bundle_id = telegram_bundle_id,
+ )
+)
+
+plist_fragment(
+ name = "WatchExtensionInfoPlist",
+ extension = "plist",
+ template =
+ """
+ CFBundleDevelopmentRegion
+ en
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ {telegram_bundle_id}.watchkitapp.watchkitextension
+ CFBundleName
+ Telegram
+ CFBundlePackageType
+ XPC!
+ WKExtensionDelegateClassName
+ TGExtensionDelegate
+ """.format(
+ telegram_bundle_id = telegram_bundle_id,
+ )
+)
+
+plist_fragment(
+ name = "WatchAppInfoPlist",
+ extension = "plist",
+ template =
+ """
+ CFBundleDevelopmentRegion
+ en
+ CFBundleIdentifier
+ {telegram_bundle_id}.watchkitapp
+ CFBundleName
+ Telegram
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+
+ WKWatchKitApp
+
+ """.format(
+ telegram_bundle_id = telegram_bundle_id,
+ )
+)
+
+watchos_extension(
+ name = "TelegramWatchExtension",
+ bundle_id = "{telegram_bundle_id}.watchkitapp.watchkitextension".format(
+ telegram_bundle_id = telegram_bundle_id,
+ ),
+ bundle_name = "TelegramWatchExtension",
+ infoplists = [
+ ":WatchExtensionInfoPlist",
+ ":VersionInfoPlist",
+ ":AppNameInfoPlist",
+ ":WatchExtensionNSExtensionInfoPlist",
+ ],
+ minimum_os_version = "5.0",
+ provisioning_profile = "//build-input/data/provisioning-profiles:WatchExtension.mobileprovision",
+ resources = [
+ ":TelegramWatchExtensionResources",
+ ],
+ strings = [
+ ":WatchAppStringResources",
+ ],
+ deps = [
+ ":TelegramWatchLib",
+ ],
+)
+
+watchos_application(
+ name = "TelegramWatchApp",
+ #app_icons = ,
+ bundle_id = "{telegram_bundle_id}.watchkitapp".format(
+ telegram_bundle_id = telegram_bundle_id,
+ ),
+ bundle_name = "TelegramWatch",
+ extension = ":TelegramWatchExtension",
+ infoplists = [
+ ":WatchAppInfoPlist",
+ ":VersionInfoPlist",
+ ":AppNameInfoPlist",
+ ":WatchAppCompanionInfoPlist",
+ ],
+ minimum_os_version = "5.0",
+ provisioning_profile = "//build-input/data/provisioning-profiles:WatchApp.mobileprovision",
+ resources = [
+ ":TelegramWatchAppResources",
+ ":TelegramWatchAppAssets",
+ ],
+ storyboards = [
+ ":TelegramWatchAppInterface",
+ ],
+ strings = [
+ ],
+)
+
+swift_library(
+ name = "ShareExtensionLib",
+ module_name = "ShareExtensionLib",
+ srcs = glob([
+ "Share/**/*.swift",
+ ]),
+ deps = [
+ "//submodules/TelegramUI:TelegramUI"
+ ],
+)
+
+plist_fragment(
+ name = "TelegramUIInfoPlist",
+ extension = "plist",
+ template =
+ """
+ CFBundleIdentifier
+ {telegram_bundle_id}.TelegramUI
+ CFBundleVersion
+ {telegram_build_number}
+ CFBundleDevelopmentRegion
+ en
+ CFBundleName
+ TelegramUI
+ CFBundleShortVersionString
+ {telegram_version}
+ """.format(
+ telegram_bundle_id = telegram_bundle_id,
+ telegram_version = telegram_version,
+ telegram_build_number = telegram_build_number,
+ )
+)
+
+ios_framework(
+ name = "TelegramUIFramework",
+ bundle_id = "{telegram_bundle_id}.TelegramUI".format(
+ telegram_bundle_id = telegram_bundle_id,
+ ),
+ families = [
+ "iphone",
+ "ipad",
+ ],
+ infoplists = [
+ ":TelegramUIInfoPlist",
+ ],
+ minimum_os_version = "9.0",
+ deps = [
+ "//submodules/TelegramUI:TelegramUI",
+ ] + debug_deps,
+)
+
+plist_fragment(
+ name = "ShareInfoPlist",
+ extension = "plist",
+ template =
+ """
+ CFBundleDevelopmentRegion
+ en
+ CFBundleIdentifier
+ {telegram_bundle_id}.Share
+ CFBundleName
+ Telegram
+ CFBundlePackageType
+ XPC!
+ NSExtension
+
+ NSExtensionAttributes
+
+ IntentsSupported
+
+ INSendMessageIntent
+
+ NSExtensionActivationRule
+ SUBQUERY (
+ extensionItems,
+ $extensionItem,
+ SUBQUERY (
+ $extensionItem.attachments,
+ $attachment,
+ ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.file-url" ||
+ ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.movie" ||
+ ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.image" ||
+ ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.url" ||
+ ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.text" ||
+ ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.audio" ||
+ ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.data" ||
+ ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.vcard" ||
+ ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.apple.pkpass"
+ ).@count == $extensionItem.attachments.@count
+).@count > 0
+
+ NSExtensionPointIdentifier
+ com.apple.share-services
+ NSExtensionPrincipalClass
+ ShareRootController
+
+ """.format(
+ telegram_bundle_id = telegram_bundle_id,
+ )
+)
+
+ios_extension(
+ name = "ShareExtension",
+ bundle_id = "{telegram_bundle_id}.Share".format(
+ telegram_bundle_id = telegram_bundle_id,
+ ),
+ families = [
+ "iphone",
+ "ipad",
+ ],
+ infoplists = [
+ ":ShareInfoPlist",
+ ":VersionInfoPlist",
+ ":AppNameInfoPlist",
+ ],
+ minimum_os_version = "9.0",
+ provisioning_profile = "//build-input/data/provisioning-profiles:Share.mobileprovision",
+ deps = [":ShareExtensionLib"],
+ frameworks = [
+ ":TelegramUIFramework"
+ ],
+)
+
+plist_fragment(
+ name = "TelegramInfoPlist",
+ extension = "plist",
+ template =
+ """
+ BGTaskSchedulerPermittedIdentifiers
+
+ {telegram_bundle_id}.refresh
+
+ CFBundleAllowMixedLocalizations
+
+ CFBundleDevelopmentRegion
+ en
+ CFBundleDisplayName
+ Telegram
+ CFBundleIdentifier
+ {telegram_bundle_id}
+ CFBundleName
+ Telegram
+ ITSAppUsesNonExemptEncryption
+
+ LSApplicationQueriesSchemes
+
+ instagram
+ comgooglemaps-x-callback
+ foursquare
+ here-location
+ yandexmaps
+ yandexnavi
+ comgooglemaps
+ youtube
+ twitter
+ vk
+ waze
+ googlechrome
+ firefox
+ touch-http
+ yandexbrowser-open-url
+ vimeo
+ vine
+ coub
+ uber
+ citymapper
+ lyft
+ opera-http
+ firefox-focus
+ ddgQuickLink
+ moovit
+ alook
+ dgis
+ microsoft-edge-http
+ brave
+ onionhttp
+ ucbrowser
+ dolphin
+
+ LSRequiresIPhoneOS
+
+ NSAppTransportSecurity
+
+ NSAllowsArbitraryLoads
+
+
+ NSCameraUsageDescription
+ We need this so that you can take and share photos and videos.
+ NSContactsUsageDescription
+ Telegram stores your contacts heavily encrypted in the cloud to let you connect with your friends across all your devices.
+ NSFaceIDUsageDescription
+ You can use Face ID to unlock the app.
+ NSLocationAlwaysUsageDescription
+ When you send your location to your friends, Telegram needs access to show them a map. You also need this to send locations from an Apple Watch.
+ NSLocationWhenInUseUsageDescription
+ When you send your location to your friends, Telegram needs access to show them a map.
+ NSMicrophoneUsageDescription
+ We need this so that you can record and share voice messages and videos with sound.
+ NSMotionUsageDescription
+ When you send your location to your friends, Telegram needs access to show them a map.
+ NSPhotoLibraryAddUsageDescription
+ We need this so that you can share photos and videos from your photo library.
+ NSPhotoLibraryUsageDescription
+ We need this so that you can share photos and videos from your photo library.
+ NSSiriUsageDescription
+ You can use Siri to send messages.
+ NSUserActivityTypes
+
+ INSendMessageIntent
+ RemindAboutChatIntent
+
+ UIAppFonts
+
+ SFCompactRounded-Semibold.otf
+
+ UIBackgroundModes
+
+ audio
+ fetch
+ location
+ remote-notification
+ voip
+
+ UIDeviceFamily
+
+ 1
+ 2
+
+ UIFileSharingEnabled
+
+ UILaunchStoryboardName
+ LaunchScreen
+ UIRequiredDeviceCapabilities
+
+ armv7
+
+ UIRequiresPersistentWiFi
+
+ UIStatusBarStyle
+ UIStatusBarStyleDefault
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UIViewControllerBasedStatusBarAppearance
+
+ UIViewEdgeAntialiasing
+
+ UIViewGroupOpacity
+
+ UTImportedTypeDeclarations
+
+
+ UTTypeConformsTo
+
+ public.data
+
+ UTTypeDescription
+ Telegram iOS Color Theme File
+ UTTypeIconFiles
+
+ BlueIcon@3x.png
+
+ UTTypeIdentifier
+ org.telegram.Telegram-iOS.theme
+ UTTypeTagSpecification
+
+ public.filename-extension
+
+ tgios-theme
+
+
+
+
+ """.format(
+ telegram_bundle_id = telegram_bundle_id,
+ )
+)
+
+ios_application(
+ name = "Telegram",
+ bundle_id = "{telegram_bundle_id}".format(
+ telegram_bundle_id = telegram_bundle_id,
+ ),
+ families = ["iphone", "ipad"],
+ minimum_os_version = "9.0",
+ provisioning_profile = "//build-input/data/provisioning-profiles:Telegram.mobileprovision",
+ entitlements = ":TelegramEntitlements.entitlements",
+ infoplists = [
+ ":TelegramInfoPlist",
+ ":AdditionalInfoPlist",
+ ],
+ app_icons = [
+ ":DefaultAppIcon",
+ ],
+ frameworks = [
+ ":TelegramUIFramework",
+ ],
+ strings = [
+ ":AppStringResources",
+ ],
+ extensions = [
+ ":ShareExtension",
+ ],
+ watch_application = ":TelegramWatchApp",
+ deps = [
+ ":Main",
+ ":Lib",
+ ],
+)
diff --git a/NotificationContent/Info.plist b/Telegram/NotificationContent/Info.plist
similarity index 100%
rename from NotificationContent/Info.plist
rename to Telegram/NotificationContent/Info.plist
diff --git a/NotificationContent/NotificationContent-Bridging-Header.h b/Telegram/NotificationContent/NotificationContent-Bridging-Header.h
similarity index 100%
rename from NotificationContent/NotificationContent-Bridging-Header.h
rename to Telegram/NotificationContent/NotificationContent-Bridging-Header.h
diff --git a/NotificationContent/NotificationViewController.swift b/Telegram/NotificationContent/NotificationViewController.swift
similarity index 100%
rename from NotificationContent/NotificationViewController.swift
rename to Telegram/NotificationContent/NotificationViewController.swift
diff --git a/NotificationService/Api.h b/Telegram/NotificationService/Api.h
similarity index 100%
rename from NotificationService/Api.h
rename to Telegram/NotificationService/Api.h
diff --git a/NotificationService/Api.m b/Telegram/NotificationService/Api.m
similarity index 100%
rename from NotificationService/Api.m
rename to Telegram/NotificationService/Api.m
diff --git a/NotificationService/ApplicationSpecificSharedDataKeys.swift b/Telegram/NotificationService/ApplicationSpecificSharedDataKeys.swift
similarity index 100%
rename from NotificationService/ApplicationSpecificSharedDataKeys.swift
rename to Telegram/NotificationService/ApplicationSpecificSharedDataKeys.swift
diff --git a/NotificationService/Attachments.h b/Telegram/NotificationService/Attachments.h
similarity index 100%
rename from NotificationService/Attachments.h
rename to Telegram/NotificationService/Attachments.h
diff --git a/NotificationService/Attachments.m b/Telegram/NotificationService/Attachments.m
similarity index 90%
rename from NotificationService/Attachments.m
rename to Telegram/NotificationService/Attachments.m
index 29d498dc2d..28ae322de9 100644
--- a/NotificationService/Attachments.m
+++ b/Telegram/NotificationService/Attachments.m
@@ -1,10 +1,6 @@
#import "Attachments.h"
-#ifdef BUCK
#import
-#else
-#import
-#endif
#import "Api.h"
diff --git a/NotificationService/FetchImage.h b/Telegram/NotificationService/FetchImage.h
similarity index 100%
rename from NotificationService/FetchImage.h
rename to Telegram/NotificationService/FetchImage.h
diff --git a/NotificationService/FetchImage.m b/Telegram/NotificationService/FetchImage.m
similarity index 100%
rename from NotificationService/FetchImage.m
rename to Telegram/NotificationService/FetchImage.m
diff --git a/NotificationService/InAppNotificationSettings.swift b/Telegram/NotificationService/InAppNotificationSettings.swift
similarity index 100%
rename from NotificationService/InAppNotificationSettings.swift
rename to Telegram/NotificationService/InAppNotificationSettings.swift
diff --git a/NotificationService/Info.plist b/Telegram/NotificationService/Info.plist
similarity index 100%
rename from NotificationService/Info.plist
rename to Telegram/NotificationService/Info.plist
diff --git a/NotificationService/Namespaces.swift b/Telegram/NotificationService/Namespaces.swift
similarity index 100%
rename from NotificationService/Namespaces.swift
rename to Telegram/NotificationService/Namespaces.swift
diff --git a/NotificationService/NotificationService-Bridging-Header.h b/Telegram/NotificationService/NotificationService-Bridging-Header.h
similarity index 100%
rename from NotificationService/NotificationService-Bridging-Header.h
rename to Telegram/NotificationService/NotificationService-Bridging-Header.h
diff --git a/NotificationService/NotificationService.h b/Telegram/NotificationService/NotificationService.h
similarity index 100%
rename from NotificationService/NotificationService.h
rename to Telegram/NotificationService/NotificationService.h
diff --git a/NotificationService/NotificationService.m b/Telegram/NotificationService/NotificationService.m
similarity index 100%
rename from NotificationService/NotificationService.m
rename to Telegram/NotificationService/NotificationService.m
diff --git a/NotificationService/NotificationService.swift b/Telegram/NotificationService/NotificationService.swift
similarity index 100%
rename from NotificationService/NotificationService.swift
rename to Telegram/NotificationService/NotificationService.swift
diff --git a/NotificationService/Serialization.h b/Telegram/NotificationService/Serialization.h
similarity index 70%
rename from NotificationService/Serialization.h
rename to Telegram/NotificationService/Serialization.h
index d2beb976d6..1089c5a010 100644
--- a/NotificationService/Serialization.h
+++ b/Telegram/NotificationService/Serialization.h
@@ -1,10 +1,6 @@
#import
-#ifdef BUCK
#import
-#else
-#import
-#endif
NS_ASSUME_NONNULL_BEGIN
diff --git a/NotificationService/Serialization.m b/Telegram/NotificationService/Serialization.m
similarity index 100%
rename from NotificationService/Serialization.m
rename to Telegram/NotificationService/Serialization.m
diff --git a/NotificationService/StoredAccountInfos.h b/Telegram/NotificationService/StoredAccountInfos.h
similarity index 100%
rename from NotificationService/StoredAccountInfos.h
rename to Telegram/NotificationService/StoredAccountInfos.h
diff --git a/NotificationService/StoredAccountInfos.m b/Telegram/NotificationService/StoredAccountInfos.m
similarity index 99%
rename from NotificationService/StoredAccountInfos.m
rename to Telegram/NotificationService/StoredAccountInfos.m
index 4f60eac49b..424aa3aefc 100644
--- a/NotificationService/StoredAccountInfos.m
+++ b/Telegram/NotificationService/StoredAccountInfos.m
@@ -1,10 +1,6 @@
#import "StoredAccountInfos.h"
-#ifdef BUCK
#import
-#else
-#import
-#endif
#import
diff --git a/NotificationService/Sync.swift b/Telegram/NotificationService/Sync.swift
similarity index 100%
rename from NotificationService/Sync.swift
rename to Telegram/NotificationService/Sync.swift
diff --git a/NotificationService/TelegramChannel.swift b/Telegram/NotificationService/TelegramChannel.swift
similarity index 100%
rename from NotificationService/TelegramChannel.swift
rename to Telegram/NotificationService/TelegramChannel.swift
diff --git a/Share/Info.plist b/Telegram/Share/Info.plist
similarity index 100%
rename from Share/Info.plist
rename to Telegram/Share/Info.plist
diff --git a/Share/Share-Bridging-Header.h b/Telegram/Share/Share-Bridging-Header.h
similarity index 100%
rename from Share/Share-Bridging-Header.h
rename to Telegram/Share/Share-Bridging-Header.h
diff --git a/Share/ShareRootController.swift b/Telegram/Share/ShareRootController.swift
similarity index 100%
rename from Share/ShareRootController.swift
rename to Telegram/Share/ShareRootController.swift
diff --git a/Share/en.lproj/Localizable.strings b/Telegram/Share/en.lproj/Localizable.strings
similarity index 100%
rename from Share/en.lproj/Localizable.strings
rename to Telegram/Share/en.lproj/Localizable.strings
diff --git a/SiriIntents/Info.plist b/Telegram/SiriIntents/Info.plist
similarity index 100%
rename from SiriIntents/Info.plist
rename to Telegram/SiriIntents/Info.plist
diff --git a/SiriIntents/IntentContacts.swift b/Telegram/SiriIntents/IntentContacts.swift
similarity index 100%
rename from SiriIntents/IntentContacts.swift
rename to Telegram/SiriIntents/IntentContacts.swift
diff --git a/SiriIntents/IntentHandler.swift b/Telegram/SiriIntents/IntentHandler.swift
similarity index 100%
rename from SiriIntents/IntentHandler.swift
rename to Telegram/SiriIntents/IntentHandler.swift
diff --git a/SiriIntents/IntentMessages.swift b/Telegram/SiriIntents/IntentMessages.swift
similarity index 99%
rename from SiriIntents/IntentMessages.swift
rename to Telegram/SiriIntents/IntentMessages.swift
index f8add17d11..4de0ef0384 100644
--- a/SiriIntents/IntentMessages.swift
+++ b/Telegram/SiriIntents/IntentMessages.swift
@@ -37,7 +37,7 @@ func unreadMessages(account: Account) -> Signal<[INMessage], NoError> {
|> mapToSignal { view -> Signal<[INMessage], NoError> in
var signals: [Signal<[INMessage], NoError>] = []
for entry in view.0.entries {
- if case let .MessageEntry(index, _, readState, notificationSettings, _, _, _, _, _) = entry {
+ if case let .MessageEntry(index, _, readState, notificationSettings, _, _, _, _, _, _) = entry {
if index.messageIndex.id.peerId.namespace != Namespaces.Peer.CloudUser {
continue
}
diff --git a/SiriIntents/SiriIntents-Bridging-Header.h b/Telegram/SiriIntents/SiriIntents-Bridging-Header.h
similarity index 100%
rename from SiriIntents/SiriIntents-Bridging-Header.h
rename to Telegram/SiriIntents/SiriIntents-Bridging-Header.h
diff --git a/SupportFiles/Empty.swift b/Telegram/SupportFiles/Empty.swift
similarity index 100%
rename from SupportFiles/Empty.swift
rename to Telegram/SupportFiles/Empty.swift
diff --git a/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Contents.json b/Telegram/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Contents.json
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Contents.json
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Contents.json
diff --git a/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@120x120-1.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@120x120-1.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@120x120-1.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@120x120-1.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@120x120.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@120x120.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@120x120.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@120x120.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@152x152.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@152x152.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@152x152.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@152x152.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@167x167.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@167x167.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@167x167.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@167x167.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@180x180.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@180x180.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@180x180.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@180x180.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@20x20.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@20x20.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@20x20.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@20x20.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@29x29.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@29x29.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@29x29.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@29x29.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@40x40-1.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@40x40-1.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@40x40-1.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@40x40-1.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@40x40-2.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@40x40-2.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@40x40-2.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@40x40-2.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@40x40.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@40x40.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@40x40.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@40x40.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@58x58-2.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@58x58-2.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@58x58-2.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@58x58-2.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@58x58.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@58x58.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@58x58.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@58x58.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@60x60.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@60x60.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@60x60.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@60x60.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@76x76.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@76x76.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@76x76.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@76x76.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@80x80-1.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@80x80-1.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@80x80-1.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@80x80-1.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@80x80.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@80x80.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@80x80.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@80x80.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@87x87.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@87x87.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@87x87.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlackFilledIcon.appiconset/Icon4@87x87.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Contents.json b/Telegram/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Contents.json
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Contents.json
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Contents.json
diff --git a/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@120x120-1.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@120x120-1.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@120x120-1.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@120x120-1.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@120x120.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@120x120.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@120x120.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@120x120.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@152x152.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@152x152.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@152x152.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@152x152.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@167x167.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@167x167.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@167x167.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@167x167.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@180x180.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@180x180.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@180x180.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@180x180.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@20x20.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@20x20.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@20x20.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@20x20.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@29x29.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@29x29.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@29x29.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@29x29.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@40x40-1.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@40x40-1.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@40x40-1.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@40x40-1.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@40x40-2.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@40x40-2.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@40x40-2.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@40x40-2.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@40x40.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@40x40.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@40x40.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@40x40.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@58x58-1.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@58x58-1.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@58x58-1.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@58x58-1.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@58x58.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@58x58.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@58x58.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@58x58.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@60x60.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@60x60.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@60x60.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@60x60.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@76x76.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@76x76.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@76x76.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@76x76.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@80x80-1.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@80x80-1.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@80x80-1.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@80x80-1.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@80x80.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@80x80.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@80x80.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@80x80.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@87x87.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@87x87.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@87x87.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlackIcon.appiconset/Icon2@87x87.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Contents.json b/Telegram/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Contents.json
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Contents.json
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Contents.json
diff --git a/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@120x120-1.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@120x120-1.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@120x120-1.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@120x120-1.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@120x120.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@120x120.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@120x120.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@120x120.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@152x152.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@152x152.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@152x152.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@152x152.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@167x167.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@167x167.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@167x167.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@167x167.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@180x180.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@180x180.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@180x180.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@180x180.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@20x20.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@20x20.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@20x20.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@20x20.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@29x29.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@29x29.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@29x29.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@29x29.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@40x40-1.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@40x40-1.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@40x40-1.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@40x40-1.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@40x40-2.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@40x40-2.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@40x40-2.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@40x40-2.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@40x40.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@40x40.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@40x40.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@40x40.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@58x58-1.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@58x58-1.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@58x58-1.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@58x58-1.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@58x58.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@58x58.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@58x58.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@58x58.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@60x60.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@60x60.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@60x60.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@60x60.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@76x76.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@76x76.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@76x76.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@76x76.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@80x80-1.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@80x80-1.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@80x80-1.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@80x80-1.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@80x80.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@80x80.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@80x80.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@80x80.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@87x87.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@87x87.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@87x87.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlueFilledIcon.appiconset/Icon3@87x87.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Contents.json b/Telegram/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Contents.json
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Contents.json
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Contents.json
diff --git a/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@120x120-1.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@120x120-1.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@120x120-1.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@120x120-1.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@120x120.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@120x120.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@120x120.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@120x120.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@152x152.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@152x152.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@152x152.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@152x152.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@167x167.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@167x167.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@167x167.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@167x167.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@180x180.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@180x180.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@180x180.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@180x180.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@20x20.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@20x20.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@20x20.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@20x20.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@29x29.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@29x29.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@29x29.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@29x29.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@40x40-1.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@40x40-1.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@40x40-1.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@40x40-1.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@40x40-2.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@40x40-2.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@40x40-2.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@40x40-2.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@40x40.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@40x40.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@40x40.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@40x40.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@58x58-1.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@58x58-1.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@58x58-1.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@58x58-1.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@58x58.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@58x58.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@58x58.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@58x58.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@60x60.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@60x60.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@60x60.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@60x60.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@76x76.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@76x76.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@76x76.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@76x76.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@80x80-1.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@80x80-1.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@80x80-1.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@80x80-1.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@80x80.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@80x80.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@80x80.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@80x80.png
diff --git a/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@87x87.png b/Telegram/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@87x87.png
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@87x87.png
rename to Telegram/Telegram-iOS/AppIcons.xcassets/BlueIcon.appiconset/Icon1@87x87.png
diff --git a/Telegram-iOS/AppIcons.xcassets/Contents.json b/Telegram/Telegram-iOS/AppIcons.xcassets/Contents.json
similarity index 100%
rename from Telegram-iOS/AppIcons.xcassets/Contents.json
rename to Telegram/Telegram-iOS/AppIcons.xcassets/Contents.json
diff --git a/Telegram-iOS/Application.swift b/Telegram/Telegram-iOS/Application.swift
similarity index 100%
rename from Telegram-iOS/Application.swift
rename to Telegram/Telegram-iOS/Application.swift
diff --git a/Telegram-iOS/Base.lproj/LaunchScreen.xib b/Telegram/Telegram-iOS/Base.lproj/LaunchScreen.xib
similarity index 100%
rename from Telegram-iOS/Base.lproj/LaunchScreen.xib
rename to Telegram/Telegram-iOS/Base.lproj/LaunchScreen.xib
diff --git a/Telegram-iOS/BlackClassicIcon@2x.png b/Telegram/Telegram-iOS/BlackClassicIcon@2x.png
similarity index 100%
rename from Telegram-iOS/BlackClassicIcon@2x.png
rename to Telegram/Telegram-iOS/BlackClassicIcon@2x.png
diff --git a/Telegram-iOS/BlackClassicIcon@3x.png b/Telegram/Telegram-iOS/BlackClassicIcon@3x.png
similarity index 100%
rename from Telegram-iOS/BlackClassicIcon@3x.png
rename to Telegram/Telegram-iOS/BlackClassicIcon@3x.png
diff --git a/Telegram-iOS/BlackClassicIconIpad.png b/Telegram/Telegram-iOS/BlackClassicIconIpad.png
similarity index 100%
rename from Telegram-iOS/BlackClassicIconIpad.png
rename to Telegram/Telegram-iOS/BlackClassicIconIpad.png
diff --git a/Telegram-iOS/BlackClassicIconIpad@2x.png b/Telegram/Telegram-iOS/BlackClassicIconIpad@2x.png
similarity index 100%
rename from Telegram-iOS/BlackClassicIconIpad@2x.png
rename to Telegram/Telegram-iOS/BlackClassicIconIpad@2x.png
diff --git a/Telegram-iOS/BlackClassicIconLargeIpad@2x.png b/Telegram/Telegram-iOS/BlackClassicIconLargeIpad@2x.png
similarity index 100%
rename from Telegram-iOS/BlackClassicIconLargeIpad@2x.png
rename to Telegram/Telegram-iOS/BlackClassicIconLargeIpad@2x.png
diff --git a/Telegram-iOS/BlackClassicNotificationIcon.png b/Telegram/Telegram-iOS/BlackClassicNotificationIcon.png
similarity index 100%
rename from Telegram-iOS/BlackClassicNotificationIcon.png
rename to Telegram/Telegram-iOS/BlackClassicNotificationIcon.png
diff --git a/Telegram-iOS/BlackClassicNotificationIcon@2x.png b/Telegram/Telegram-iOS/BlackClassicNotificationIcon@2x.png
similarity index 100%
rename from Telegram-iOS/BlackClassicNotificationIcon@2x.png
rename to Telegram/Telegram-iOS/BlackClassicNotificationIcon@2x.png
diff --git a/Telegram-iOS/BlackClassicNotificationIcon@3x.png b/Telegram/Telegram-iOS/BlackClassicNotificationIcon@3x.png
similarity index 100%
rename from Telegram-iOS/BlackClassicNotificationIcon@3x.png
rename to Telegram/Telegram-iOS/BlackClassicNotificationIcon@3x.png
diff --git a/Telegram-iOS/BlackFilledIcon@2x.png b/Telegram/Telegram-iOS/BlackFilledIcon@2x.png
similarity index 100%
rename from Telegram-iOS/BlackFilledIcon@2x.png
rename to Telegram/Telegram-iOS/BlackFilledIcon@2x.png
diff --git a/Telegram-iOS/BlackFilledIcon@3x.png b/Telegram/Telegram-iOS/BlackFilledIcon@3x.png
similarity index 100%
rename from Telegram-iOS/BlackFilledIcon@3x.png
rename to Telegram/Telegram-iOS/BlackFilledIcon@3x.png
diff --git a/Telegram-iOS/BlackFilledIconIpad.png b/Telegram/Telegram-iOS/BlackFilledIconIpad.png
similarity index 100%
rename from Telegram-iOS/BlackFilledIconIpad.png
rename to Telegram/Telegram-iOS/BlackFilledIconIpad.png
diff --git a/Telegram-iOS/BlackFilledIconIpad@2x.png b/Telegram/Telegram-iOS/BlackFilledIconIpad@2x.png
similarity index 100%
rename from Telegram-iOS/BlackFilledIconIpad@2x.png
rename to Telegram/Telegram-iOS/BlackFilledIconIpad@2x.png
diff --git a/Telegram-iOS/BlackFilledIconLargeIpad@2x.png b/Telegram/Telegram-iOS/BlackFilledIconLargeIpad@2x.png
similarity index 100%
rename from Telegram-iOS/BlackFilledIconLargeIpad@2x.png
rename to Telegram/Telegram-iOS/BlackFilledIconLargeIpad@2x.png
diff --git a/Telegram-iOS/BlackIcon@2x.png b/Telegram/Telegram-iOS/BlackIcon@2x.png
similarity index 100%
rename from Telegram-iOS/BlackIcon@2x.png
rename to Telegram/Telegram-iOS/BlackIcon@2x.png
diff --git a/Telegram-iOS/BlackIcon@3x.png b/Telegram/Telegram-iOS/BlackIcon@3x.png
similarity index 100%
rename from Telegram-iOS/BlackIcon@3x.png
rename to Telegram/Telegram-iOS/BlackIcon@3x.png
diff --git a/Telegram-iOS/BlackIconIpad.png b/Telegram/Telegram-iOS/BlackIconIpad.png
similarity index 100%
rename from Telegram-iOS/BlackIconIpad.png
rename to Telegram/Telegram-iOS/BlackIconIpad.png
diff --git a/Telegram-iOS/BlackIconIpad@2x.png b/Telegram/Telegram-iOS/BlackIconIpad@2x.png
similarity index 100%
rename from Telegram-iOS/BlackIconIpad@2x.png
rename to Telegram/Telegram-iOS/BlackIconIpad@2x.png
diff --git a/Telegram-iOS/BlackIconLargeIpad@2x.png b/Telegram/Telegram-iOS/BlackIconLargeIpad@2x.png
similarity index 100%
rename from Telegram-iOS/BlackIconLargeIpad@2x.png
rename to Telegram/Telegram-iOS/BlackIconLargeIpad@2x.png
diff --git a/Telegram-iOS/BlackNotificationIcon.png b/Telegram/Telegram-iOS/BlackNotificationIcon.png
similarity index 100%
rename from Telegram-iOS/BlackNotificationIcon.png
rename to Telegram/Telegram-iOS/BlackNotificationIcon.png
diff --git a/Telegram-iOS/BlackNotificationIcon@2x.png b/Telegram/Telegram-iOS/BlackNotificationIcon@2x.png
similarity index 100%
rename from Telegram-iOS/BlackNotificationIcon@2x.png
rename to Telegram/Telegram-iOS/BlackNotificationIcon@2x.png
diff --git a/Telegram-iOS/BlackNotificationIcon@3x.png b/Telegram/Telegram-iOS/BlackNotificationIcon@3x.png
similarity index 100%
rename from Telegram-iOS/BlackNotificationIcon@3x.png
rename to Telegram/Telegram-iOS/BlackNotificationIcon@3x.png
diff --git a/Telegram-iOS/BlueClassicIcon@2x.png b/Telegram/Telegram-iOS/BlueClassicIcon@2x.png
similarity index 100%
rename from Telegram-iOS/BlueClassicIcon@2x.png
rename to Telegram/Telegram-iOS/BlueClassicIcon@2x.png
diff --git a/Telegram-iOS/BlueClassicIcon@3x.png b/Telegram/Telegram-iOS/BlueClassicIcon@3x.png
similarity index 100%
rename from Telegram-iOS/BlueClassicIcon@3x.png
rename to Telegram/Telegram-iOS/BlueClassicIcon@3x.png
diff --git a/Telegram-iOS/BlueClassicIconIpad.png b/Telegram/Telegram-iOS/BlueClassicIconIpad.png
similarity index 100%
rename from Telegram-iOS/BlueClassicIconIpad.png
rename to Telegram/Telegram-iOS/BlueClassicIconIpad.png
diff --git a/Telegram-iOS/BlueClassicIconIpad@2x.png b/Telegram/Telegram-iOS/BlueClassicIconIpad@2x.png
similarity index 100%
rename from Telegram-iOS/BlueClassicIconIpad@2x.png
rename to Telegram/Telegram-iOS/BlueClassicIconIpad@2x.png
diff --git a/Telegram-iOS/BlueClassicIconLargeIpad@2x.png b/Telegram/Telegram-iOS/BlueClassicIconLargeIpad@2x.png
similarity index 100%
rename from Telegram-iOS/BlueClassicIconLargeIpad@2x.png
rename to Telegram/Telegram-iOS/BlueClassicIconLargeIpad@2x.png
diff --git a/Telegram-iOS/BlueClassicNotificationIcon.png b/Telegram/Telegram-iOS/BlueClassicNotificationIcon.png
similarity index 100%
rename from Telegram-iOS/BlueClassicNotificationIcon.png
rename to Telegram/Telegram-iOS/BlueClassicNotificationIcon.png
diff --git a/Telegram-iOS/BlueClassicNotificationIcon@2x.png b/Telegram/Telegram-iOS/BlueClassicNotificationIcon@2x.png
similarity index 100%
rename from Telegram-iOS/BlueClassicNotificationIcon@2x.png
rename to Telegram/Telegram-iOS/BlueClassicNotificationIcon@2x.png
diff --git a/Telegram-iOS/BlueClassicNotificationIcon@3x.png b/Telegram/Telegram-iOS/BlueClassicNotificationIcon@3x.png
similarity index 100%
rename from Telegram-iOS/BlueClassicNotificationIcon@3x.png
rename to Telegram/Telegram-iOS/BlueClassicNotificationIcon@3x.png
diff --git a/Telegram-iOS/BlueFilledIcon@2x.png b/Telegram/Telegram-iOS/BlueFilledIcon@2x.png
similarity index 100%
rename from Telegram-iOS/BlueFilledIcon@2x.png
rename to Telegram/Telegram-iOS/BlueFilledIcon@2x.png
diff --git a/Telegram-iOS/BlueFilledIcon@3x.png b/Telegram/Telegram-iOS/BlueFilledIcon@3x.png
similarity index 100%
rename from Telegram-iOS/BlueFilledIcon@3x.png
rename to Telegram/Telegram-iOS/BlueFilledIcon@3x.png
diff --git a/Telegram-iOS/BlueFilledIconIpad.png b/Telegram/Telegram-iOS/BlueFilledIconIpad.png
similarity index 100%
rename from Telegram-iOS/BlueFilledIconIpad.png
rename to Telegram/Telegram-iOS/BlueFilledIconIpad.png
diff --git a/Telegram-iOS/BlueFilledIconIpad@2x.png b/Telegram/Telegram-iOS/BlueFilledIconIpad@2x.png
similarity index 100%
rename from Telegram-iOS/BlueFilledIconIpad@2x.png
rename to Telegram/Telegram-iOS/BlueFilledIconIpad@2x.png
diff --git a/Telegram-iOS/BlueFilledIconLargeIpad@2x.png b/Telegram/Telegram-iOS/BlueFilledIconLargeIpad@2x.png
similarity index 100%
rename from Telegram-iOS/BlueFilledIconLargeIpad@2x.png
rename to Telegram/Telegram-iOS/BlueFilledIconLargeIpad@2x.png
diff --git a/Telegram-iOS/BlueIcon@2x.png b/Telegram/Telegram-iOS/BlueIcon@2x.png
similarity index 100%
rename from Telegram-iOS/BlueIcon@2x.png
rename to Telegram/Telegram-iOS/BlueIcon@2x.png
diff --git a/Telegram-iOS/BlueIcon@3x.png b/Telegram/Telegram-iOS/BlueIcon@3x.png
similarity index 100%
rename from Telegram-iOS/BlueIcon@3x.png
rename to Telegram/Telegram-iOS/BlueIcon@3x.png
diff --git a/Telegram-iOS/BlueIconIpad.png b/Telegram/Telegram-iOS/BlueIconIpad.png
similarity index 100%
rename from Telegram-iOS/BlueIconIpad.png
rename to Telegram/Telegram-iOS/BlueIconIpad.png
diff --git a/Telegram-iOS/BlueIconIpad@2x.png b/Telegram/Telegram-iOS/BlueIconIpad@2x.png
similarity index 100%
rename from Telegram-iOS/BlueIconIpad@2x.png
rename to Telegram/Telegram-iOS/BlueIconIpad@2x.png
diff --git a/Telegram-iOS/BlueIconLargeIpad@2x.png b/Telegram/Telegram-iOS/BlueIconLargeIpad@2x.png
similarity index 100%
rename from Telegram-iOS/BlueIconLargeIpad@2x.png
rename to Telegram/Telegram-iOS/BlueIconLargeIpad@2x.png
diff --git a/Telegram-iOS/BlueNotificationIcon.png b/Telegram/Telegram-iOS/BlueNotificationIcon.png
similarity index 100%
rename from Telegram-iOS/BlueNotificationIcon.png
rename to Telegram/Telegram-iOS/BlueNotificationIcon.png
diff --git a/Telegram-iOS/BlueNotificationIcon@2x.png b/Telegram/Telegram-iOS/BlueNotificationIcon@2x.png
similarity index 100%
rename from Telegram-iOS/BlueNotificationIcon@2x.png
rename to Telegram/Telegram-iOS/BlueNotificationIcon@2x.png
diff --git a/Telegram-iOS/BlueNotificationIcon@3x.png b/Telegram/Telegram-iOS/BlueNotificationIcon@3x.png
similarity index 100%
rename from Telegram-iOS/BlueNotificationIcon@3x.png
rename to Telegram/Telegram-iOS/BlueNotificationIcon@3x.png
diff --git a/Telegram-iOS/Config-AppStoreLLC.xcconfig b/Telegram/Telegram-iOS/Config-AppStoreLLC.xcconfig
similarity index 100%
rename from Telegram-iOS/Config-AppStoreLLC.xcconfig
rename to Telegram/Telegram-iOS/Config-AppStoreLLC.xcconfig
diff --git a/Telegram-iOS/Config-Fork.xcconfig b/Telegram/Telegram-iOS/Config-Fork.xcconfig
similarity index 100%
rename from Telegram-iOS/Config-Fork.xcconfig
rename to Telegram/Telegram-iOS/Config-Fork.xcconfig
diff --git a/Telegram-iOS/Config-Hockeyapp-Internal.xcconfig b/Telegram/Telegram-iOS/Config-Hockeyapp-Internal.xcconfig
similarity index 100%
rename from Telegram-iOS/Config-Hockeyapp-Internal.xcconfig
rename to Telegram/Telegram-iOS/Config-Hockeyapp-Internal.xcconfig
diff --git a/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIcon@2x-1.png b/Telegram/Telegram-iOS/DefaultAppIcon.xcassets/AppIconLLC.appiconset/BlueIcon@2x-1.png
similarity index 100%
rename from Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIcon@2x-1.png
rename to Telegram/Telegram-iOS/DefaultAppIcon.xcassets/AppIconLLC.appiconset/BlueIcon@2x-1.png
diff --git a/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIcon@2x.png b/Telegram/Telegram-iOS/DefaultAppIcon.xcassets/AppIconLLC.appiconset/BlueIcon@2x.png
similarity index 100%
rename from Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIcon@2x.png
rename to Telegram/Telegram-iOS/DefaultAppIcon.xcassets/AppIconLLC.appiconset/BlueIcon@2x.png
diff --git a/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIcon@3x.png b/Telegram/Telegram-iOS/DefaultAppIcon.xcassets/AppIconLLC.appiconset/BlueIcon@3x.png
similarity index 100%
rename from Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIcon@3x.png
rename to Telegram/Telegram-iOS/DefaultAppIcon.xcassets/AppIconLLC.appiconset/BlueIcon@3x.png
diff --git a/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIconIpad.png b/Telegram/Telegram-iOS/DefaultAppIcon.xcassets/AppIconLLC.appiconset/BlueIconIpad.png
similarity index 100%
rename from Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIconIpad.png
rename to Telegram/Telegram-iOS/DefaultAppIcon.xcassets/AppIconLLC.appiconset/BlueIconIpad.png
diff --git a/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIconIpad@2x.png b/Telegram/Telegram-iOS/DefaultAppIcon.xcassets/AppIconLLC.appiconset/BlueIconIpad@2x.png
similarity index 100%
rename from Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIconIpad@2x.png
rename to Telegram/Telegram-iOS/DefaultAppIcon.xcassets/AppIconLLC.appiconset/BlueIconIpad@2x.png
diff --git a/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIconLargeIpad@2x.png b/Telegram/Telegram-iOS/DefaultAppIcon.xcassets/AppIconLLC.appiconset/BlueIconLargeIpad@2x.png
similarity index 100%
rename from Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIconLargeIpad@2x.png
rename to Telegram/Telegram-iOS/DefaultAppIcon.xcassets/AppIconLLC.appiconset/BlueIconLargeIpad@2x.png
diff --git a/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueNotificationIcon.png b/Telegram/Telegram-iOS/DefaultAppIcon.xcassets/AppIconLLC.appiconset/BlueNotificationIcon.png
similarity index 100%
rename from Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueNotificationIcon.png
rename to Telegram/Telegram-iOS/DefaultAppIcon.xcassets/AppIconLLC.appiconset/BlueNotificationIcon.png
diff --git a/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueNotificationIcon@2x-1.png b/Telegram/Telegram-iOS/DefaultAppIcon.xcassets/AppIconLLC.appiconset/BlueNotificationIcon@2x-1.png
similarity index 100%
rename from Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueNotificationIcon@2x-1.png
rename to Telegram/Telegram-iOS/DefaultAppIcon.xcassets/AppIconLLC.appiconset/BlueNotificationIcon@2x-1.png
diff --git a/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueNotificationIcon@2x.png b/Telegram/Telegram-iOS/DefaultAppIcon.xcassets/AppIconLLC.appiconset/BlueNotificationIcon@2x.png
similarity index 100%
rename from Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueNotificationIcon@2x.png
rename to Telegram/Telegram-iOS/DefaultAppIcon.xcassets/AppIconLLC.appiconset/BlueNotificationIcon@2x.png
diff --git a/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueNotificationIcon@3x.png b/Telegram/Telegram-iOS/DefaultAppIcon.xcassets/AppIconLLC.appiconset/BlueNotificationIcon@3x.png
similarity index 100%
rename from Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueNotificationIcon@3x.png
rename to Telegram/Telegram-iOS/DefaultAppIcon.xcassets/AppIconLLC.appiconset/BlueNotificationIcon@3x.png
diff --git a/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Contents.json b/Telegram/Telegram-iOS/DefaultAppIcon.xcassets/AppIconLLC.appiconset/Contents.json
similarity index 100%
rename from Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Contents.json
rename to Telegram/Telegram-iOS/DefaultAppIcon.xcassets/AppIconLLC.appiconset/Contents.json
diff --git a/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple-iTunesArtwork.png b/Telegram/Telegram-iOS/DefaultAppIcon.xcassets/AppIconLLC.appiconset/Simple-iTunesArtwork.png
similarity index 100%
rename from Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple-iTunesArtwork.png
rename to Telegram/Telegram-iOS/DefaultAppIcon.xcassets/AppIconLLC.appiconset/Simple-iTunesArtwork.png
diff --git a/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@29x29.png b/Telegram/Telegram-iOS/DefaultAppIcon.xcassets/AppIconLLC.appiconset/Simple@29x29.png
similarity index 100%
rename from Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@29x29.png
rename to Telegram/Telegram-iOS/DefaultAppIcon.xcassets/AppIconLLC.appiconset/Simple@29x29.png
diff --git a/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@40x40-1.png b/Telegram/Telegram-iOS/DefaultAppIcon.xcassets/AppIconLLC.appiconset/Simple@40x40-1.png
similarity index 100%
rename from Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@40x40-1.png
rename to Telegram/Telegram-iOS/DefaultAppIcon.xcassets/AppIconLLC.appiconset/Simple@40x40-1.png
diff --git a/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@58x58-1.png b/Telegram/Telegram-iOS/DefaultAppIcon.xcassets/AppIconLLC.appiconset/Simple@58x58-1.png
similarity index 100%
rename from Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@58x58-1.png
rename to Telegram/Telegram-iOS/DefaultAppIcon.xcassets/AppIconLLC.appiconset/Simple@58x58-1.png
diff --git a/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@58x58.png b/Telegram/Telegram-iOS/DefaultAppIcon.xcassets/AppIconLLC.appiconset/Simple@58x58.png
similarity index 100%
rename from Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@58x58.png
rename to Telegram/Telegram-iOS/DefaultAppIcon.xcassets/AppIconLLC.appiconset/Simple@58x58.png
diff --git a/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@80x80-1.png b/Telegram/Telegram-iOS/DefaultAppIcon.xcassets/AppIconLLC.appiconset/Simple@80x80-1.png
similarity index 100%
rename from Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@80x80-1.png
rename to Telegram/Telegram-iOS/DefaultAppIcon.xcassets/AppIconLLC.appiconset/Simple@80x80-1.png
diff --git a/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@80x80.png b/Telegram/Telegram-iOS/DefaultAppIcon.xcassets/AppIconLLC.appiconset/Simple@80x80.png
similarity index 100%
rename from Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@80x80.png
rename to Telegram/Telegram-iOS/DefaultAppIcon.xcassets/AppIconLLC.appiconset/Simple@80x80.png
diff --git a/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@87x87.png b/Telegram/Telegram-iOS/DefaultAppIcon.xcassets/AppIconLLC.appiconset/Simple@87x87.png
similarity index 100%
rename from Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@87x87.png
rename to Telegram/Telegram-iOS/DefaultAppIcon.xcassets/AppIconLLC.appiconset/Simple@87x87.png
diff --git a/Telegram-iOS/Icons.xcassets/Contents.json b/Telegram/Telegram-iOS/DefaultAppIcon.xcassets/Contents.json
similarity index 100%
rename from Telegram-iOS/Icons.xcassets/Contents.json
rename to Telegram/Telegram-iOS/DefaultAppIcon.xcassets/Contents.json
diff --git a/Telegram-iOS/Icons.xcassets/AppIcon.appiconset/Contents.json b/Telegram/Telegram-iOS/Icons.xcassets/AppIcon.appiconset/Contents.json
similarity index 100%
rename from Telegram-iOS/Icons.xcassets/AppIcon.appiconset/Contents.json
rename to Telegram/Telegram-iOS/Icons.xcassets/AppIcon.appiconset/Contents.json
diff --git a/Telegram-iOS/Icons.xcassets/AppIcon.appiconset/icon@1024px.png b/Telegram/Telegram-iOS/Icons.xcassets/AppIcon.appiconset/icon@1024px.png
similarity index 100%
rename from Telegram-iOS/Icons.xcassets/AppIcon.appiconset/icon@1024px.png
rename to Telegram/Telegram-iOS/Icons.xcassets/AppIcon.appiconset/icon@1024px.png
diff --git a/Telegram-iOS/Icons.xcassets/AppIcon.appiconset/icon@120px.png b/Telegram/Telegram-iOS/Icons.xcassets/AppIcon.appiconset/icon@120px.png
similarity index 100%
rename from Telegram-iOS/Icons.xcassets/AppIcon.appiconset/icon@120px.png
rename to Telegram/Telegram-iOS/Icons.xcassets/AppIcon.appiconset/icon@120px.png
diff --git a/Telegram-iOS/Icons.xcassets/AppIcon.appiconset/icon@152px.png b/Telegram/Telegram-iOS/Icons.xcassets/AppIcon.appiconset/icon@152px.png
similarity index 100%
rename from Telegram-iOS/Icons.xcassets/AppIcon.appiconset/icon@152px.png
rename to Telegram/Telegram-iOS/Icons.xcassets/AppIcon.appiconset/icon@152px.png
diff --git a/Telegram-iOS/Icons.xcassets/AppIcon.appiconset/icon@167px.png b/Telegram/Telegram-iOS/Icons.xcassets/AppIcon.appiconset/icon@167px.png
similarity index 100%
rename from Telegram-iOS/Icons.xcassets/AppIcon.appiconset/icon@167px.png
rename to Telegram/Telegram-iOS/Icons.xcassets/AppIcon.appiconset/icon@167px.png
diff --git a/Telegram-iOS/Icons.xcassets/AppIcon.appiconset/icon@180px.png b/Telegram/Telegram-iOS/Icons.xcassets/AppIcon.appiconset/icon@180px.png
similarity index 100%
rename from Telegram-iOS/Icons.xcassets/AppIcon.appiconset/icon@180px.png
rename to Telegram/Telegram-iOS/Icons.xcassets/AppIcon.appiconset/icon@180px.png
diff --git a/Telegram-iOS/Icons.xcassets/AppIcon.appiconset/icon@76px.png b/Telegram/Telegram-iOS/Icons.xcassets/AppIcon.appiconset/icon@76px.png
similarity index 100%
rename from Telegram-iOS/Icons.xcassets/AppIcon.appiconset/icon@76px.png
rename to Telegram/Telegram-iOS/Icons.xcassets/AppIcon.appiconset/icon@76px.png
diff --git a/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIcon@2x-1.png b/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIcon@2x-1.png
new file mode 100644
index 0000000000..dd360d8f50
Binary files /dev/null and b/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIcon@2x-1.png differ
diff --git a/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIcon@2x.png b/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIcon@2x.png
new file mode 100644
index 0000000000..2e502e7dab
Binary files /dev/null and b/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIcon@2x.png differ
diff --git a/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIcon@3x.png b/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIcon@3x.png
new file mode 100644
index 0000000000..c47aeed4b1
Binary files /dev/null and b/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIcon@3x.png differ
diff --git a/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIconIpad.png b/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIconIpad.png
new file mode 100644
index 0000000000..5eaf0bab23
Binary files /dev/null and b/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIconIpad.png differ
diff --git a/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIconIpad@2x.png b/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIconIpad@2x.png
new file mode 100644
index 0000000000..6d9e7ab98c
Binary files /dev/null and b/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIconIpad@2x.png differ
diff --git a/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIconLargeIpad@2x.png b/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIconLargeIpad@2x.png
new file mode 100644
index 0000000000..9bf363744d
Binary files /dev/null and b/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueIconLargeIpad@2x.png differ
diff --git a/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueNotificationIcon.png b/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueNotificationIcon.png
new file mode 100644
index 0000000000..dc5916282e
Binary files /dev/null and b/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueNotificationIcon.png differ
diff --git a/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueNotificationIcon@2x-1.png b/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueNotificationIcon@2x-1.png
new file mode 100644
index 0000000000..0898af42d9
Binary files /dev/null and b/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueNotificationIcon@2x-1.png differ
diff --git a/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueNotificationIcon@2x.png b/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueNotificationIcon@2x.png
new file mode 100644
index 0000000000..0898af42d9
Binary files /dev/null and b/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueNotificationIcon@2x.png differ
diff --git a/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueNotificationIcon@3x.png b/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueNotificationIcon@3x.png
new file mode 100644
index 0000000000..f7725e9914
Binary files /dev/null and b/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/BlueNotificationIcon@3x.png differ
diff --git a/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Contents.json b/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Contents.json
new file mode 100644
index 0000000000..00dd28927f
--- /dev/null
+++ b/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Contents.json
@@ -0,0 +1,119 @@
+{
+ "images" : [
+ {
+ "size" : "20x20",
+ "idiom" : "iphone",
+ "filename" : "BlueNotificationIcon@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "iphone",
+ "filename" : "BlueNotificationIcon@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Simple@58x58.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Simple@87x87.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "iphone",
+ "filename" : "Simple@80x80.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "iphone",
+ "filename" : "BlueIcon@2x-1.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "60x60",
+ "idiom" : "iphone",
+ "filename" : "BlueIcon@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "60x60",
+ "idiom" : "iphone",
+ "filename" : "BlueIcon@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "ipad",
+ "filename" : "BlueNotificationIcon.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "ipad",
+ "filename" : "BlueNotificationIcon@2x-1.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "ipad",
+ "filename" : "Simple@29x29.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "ipad",
+ "filename" : "Simple@58x58-1.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "ipad",
+ "filename" : "Simple@40x40-1.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "ipad",
+ "filename" : "Simple@80x80-1.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "76x76",
+ "idiom" : "ipad",
+ "filename" : "BlueIconIpad.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "76x76",
+ "idiom" : "ipad",
+ "filename" : "BlueIconIpad@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "83.5x83.5",
+ "idiom" : "ipad",
+ "filename" : "BlueIconLargeIpad@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "1024x1024",
+ "idiom" : "ios-marketing",
+ "filename" : "Simple-iTunesArtwork.png",
+ "scale" : "1x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ },
+ "properties" : {
+ "pre-rendered" : true
+ }
+}
\ No newline at end of file
diff --git a/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple-iTunesArtwork.png b/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple-iTunesArtwork.png
new file mode 100644
index 0000000000..f00a2857f0
Binary files /dev/null and b/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple-iTunesArtwork.png differ
diff --git a/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@29x29.png b/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@29x29.png
new file mode 100644
index 0000000000..90d7b67bc0
Binary files /dev/null and b/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@29x29.png differ
diff --git a/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@40x40-1.png b/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@40x40-1.png
new file mode 100644
index 0000000000..a79cb5dcdc
Binary files /dev/null and b/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@40x40-1.png differ
diff --git a/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@58x58-1.png b/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@58x58-1.png
new file mode 100644
index 0000000000..aa6a4a442e
Binary files /dev/null and b/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@58x58-1.png differ
diff --git a/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@58x58.png b/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@58x58.png
new file mode 100644
index 0000000000..aa6a4a442e
Binary files /dev/null and b/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@58x58.png differ
diff --git a/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@80x80-1.png b/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@80x80-1.png
new file mode 100644
index 0000000000..385bc474b2
Binary files /dev/null and b/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@80x80-1.png differ
diff --git a/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@80x80.png b/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@80x80.png
new file mode 100644
index 0000000000..385bc474b2
Binary files /dev/null and b/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@80x80.png differ
diff --git a/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@87x87.png b/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@87x87.png
new file mode 100644
index 0000000000..c0a9ce9319
Binary files /dev/null and b/Telegram/Telegram-iOS/Icons.xcassets/AppIconLLC.appiconset/Simple@87x87.png differ
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/Contents.json b/Telegram/Telegram-iOS/Icons.xcassets/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/Contents.json
rename to Telegram/Telegram-iOS/Icons.xcassets/Contents.json
diff --git a/Telegram-iOS/Icons.xcassets/Shortcuts/Account.imageset/Contents.json b/Telegram/Telegram-iOS/Icons.xcassets/Shortcuts/Account.imageset/Contents.json
similarity index 100%
rename from Telegram-iOS/Icons.xcassets/Shortcuts/Account.imageset/Contents.json
rename to Telegram/Telegram-iOS/Icons.xcassets/Shortcuts/Account.imageset/Contents.json
diff --git a/Telegram-iOS/Icons.xcassets/Shortcuts/Account.imageset/ic_lt_user.pdf b/Telegram/Telegram-iOS/Icons.xcassets/Shortcuts/Account.imageset/ic_lt_user.pdf
similarity index 100%
rename from Telegram-iOS/Icons.xcassets/Shortcuts/Account.imageset/ic_lt_user.pdf
rename to Telegram/Telegram-iOS/Icons.xcassets/Shortcuts/Account.imageset/ic_lt_user.pdf
diff --git a/Telegram-iOS/Icons.xcassets/Shortcuts/Camera.imageset/Contents.json b/Telegram/Telegram-iOS/Icons.xcassets/Shortcuts/Camera.imageset/Contents.json
similarity index 100%
rename from Telegram-iOS/Icons.xcassets/Shortcuts/Camera.imageset/Contents.json
rename to Telegram/Telegram-iOS/Icons.xcassets/Shortcuts/Camera.imageset/Contents.json
diff --git a/Telegram-iOS/Icons.xcassets/Shortcuts/Camera.imageset/ic_camera.pdf b/Telegram/Telegram-iOS/Icons.xcassets/Shortcuts/Camera.imageset/ic_camera.pdf
similarity index 100%
rename from Telegram-iOS/Icons.xcassets/Shortcuts/Camera.imageset/ic_camera.pdf
rename to Telegram/Telegram-iOS/Icons.xcassets/Shortcuts/Camera.imageset/ic_camera.pdf
diff --git a/Telegram-iOS/Icons.xcassets/Shortcuts/Contents.json b/Telegram/Telegram-iOS/Icons.xcassets/Shortcuts/Contents.json
similarity index 100%
rename from Telegram-iOS/Icons.xcassets/Shortcuts/Contents.json
rename to Telegram/Telegram-iOS/Icons.xcassets/Shortcuts/Contents.json
diff --git a/Telegram-iOS/Icons.xcassets/Shortcuts/SavedMessages.imageset/Contents.json b/Telegram/Telegram-iOS/Icons.xcassets/Shortcuts/SavedMessages.imageset/Contents.json
similarity index 100%
rename from Telegram-iOS/Icons.xcassets/Shortcuts/SavedMessages.imageset/Contents.json
rename to Telegram/Telegram-iOS/Icons.xcassets/Shortcuts/SavedMessages.imageset/Contents.json
diff --git a/Telegram-iOS/Icons.xcassets/Shortcuts/SavedMessages.imageset/ic_savedmessages.pdf b/Telegram/Telegram-iOS/Icons.xcassets/Shortcuts/SavedMessages.imageset/ic_savedmessages.pdf
similarity index 100%
rename from Telegram-iOS/Icons.xcassets/Shortcuts/SavedMessages.imageset/ic_savedmessages.pdf
rename to Telegram/Telegram-iOS/Icons.xcassets/Shortcuts/SavedMessages.imageset/ic_savedmessages.pdf
diff --git a/Telegram-iOS/Info.plist b/Telegram/Telegram-iOS/Info.plist
similarity index 100%
rename from Telegram-iOS/Info.plist
rename to Telegram/Telegram-iOS/Info.plist
diff --git a/Telegram/Telegram-iOS/InfoBazel.plist b/Telegram/Telegram-iOS/InfoBazel.plist
new file mode 100644
index 0000000000..e7ca119cd8
--- /dev/null
+++ b/Telegram/Telegram-iOS/InfoBazel.plist
@@ -0,0 +1,207 @@
+
+
+
+
+ BGTaskSchedulerPermittedIdentifiers
+
+ $(PRODUCT_BUNDLE_IDENTIFIER).refresh
+
+ CFBundleAllowMixedLocalizations
+
+ CFBundleDevelopmentRegion
+ en
+ CFBundleDisplayName
+ ${APP_NAME}
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ $(PRODUCT_NAME)
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ $(PRODUCT_BUNDLE_SHORT_VERSION)
+ CFBundleSignature
+ ????
+ CFBundleURLTypes
+
+
+ CFBundleTypeRole
+ Viewer
+ CFBundleURLName
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleURLSchemes
+
+ telegram
+
+
+
+ CFBundleTypeRole
+ Viewer
+ CFBundleURLName
+ $(PRODUCT_BUNDLE_IDENTIFIER).compatibility
+ CFBundleURLSchemes
+
+ tg
+ $(APP_SPECIFIC_URL_SCHEME)
+
+
+
+ CFBundleTypeRole
+ Viewer
+ CFBundleURLName
+ $(PRODUCT_BUNDLE_IDENTIFIER).ton
+ CFBundleURLSchemes
+
+ ton
+
+
+
+ CFBundleVersion
+ ${BUILD_NUMBER}
+ ITSAppUsesNonExemptEncryption
+
+ LSApplicationQueriesSchemes
+
+ instagram
+ comgooglemaps-x-callback
+ foursquare
+ here-location
+ yandexmaps
+ yandexnavi
+ comgooglemaps
+ youtube
+ twitter
+ vk
+ waze
+ googlechrome
+ firefox
+ touch-http
+ yandexbrowser-open-url
+ vimeo
+ vine
+ coub
+ uber
+ citymapper
+ lyft
+ opera-http
+ firefox-focus
+ ddgQuickLink
+ moovit
+ alook
+ dgis
+ microsoft-edge-http
+ brave
+ onionhttp
+ ucbrowser
+ dolphin
+
+ LSRequiresIPhoneOS
+
+ NSAppTransportSecurity
+
+ NSAllowsArbitraryLoads
+
+
+ NSCameraUsageDescription
+ We need this so that you can take and share photos and videos.
+ NSContactsUsageDescription
+ Telegram stores your contacts heavily encrypted in the cloud to let you connect with your friends across all your devices.
+ NSFaceIDUsageDescription
+ You can use Face ID to unlock the app.
+ NSLocationAlwaysUsageDescription
+ When you send your location to your friends, Telegram needs access to show them a map. You also need this to send locations from an Apple Watch.
+ NSLocationWhenInUseUsageDescription
+ When you send your location to your friends, Telegram needs access to show them a map.
+ NSMicrophoneUsageDescription
+ We need this so that you can record and share voice messages and videos with sound.
+ NSMotionUsageDescription
+ When you send your location to your friends, Telegram needs access to show them a map.
+ NSPhotoLibraryAddUsageDescription
+ We need this so that you can share photos and videos from your photo library.
+ NSPhotoLibraryUsageDescription
+ We need this so that you can share photos and videos from your photo library.
+ NSSiriUsageDescription
+ You can use Siri to send messages.
+ NSUserActivityTypes
+
+ INSendMessageIntent
+ RemindAboutChatIntent
+
+ UIAppFonts
+
+ SFCompactRounded-Semibold.otf
+
+ UIBackgroundModes
+
+ audio
+ fetch
+ location
+ remote-notification
+ voip
+
+ UIDeviceFamily
+
+ 1
+ 2
+
+ UIFileSharingEnabled
+
+ UILaunchStoryboardName
+ LaunchScreen
+ UIRequiredDeviceCapabilities
+
+ armv7
+
+ UIRequiresPersistentWiFi
+
+ UIStatusBarStyle
+ UIStatusBarStyleDefault
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UIViewControllerBasedStatusBarAppearance
+
+ UIViewEdgeAntialiasing
+
+ UIViewGroupOpacity
+
+ UTImportedTypeDeclarations
+
+
+ UTTypeConformsTo
+
+ public.data
+
+ UTTypeDescription
+ Telegram iOS Color Theme File
+ UTTypeIconFiles
+
+ BlueIcon@3x.png
+
+ UTTypeIdentifier
+ org.telegram.Telegram-iOS.theme
+ UTTypeTagSpecification
+
+ public.filename-extension
+
+ tgios-theme
+
+
+
+
+
+
diff --git a/Telegram-iOS/Resources/Compass.tgs b/Telegram/Telegram-iOS/Resources/Compass.tgs
similarity index 100%
rename from Telegram-iOS/Resources/Compass.tgs
rename to Telegram/Telegram-iOS/Resources/Compass.tgs
diff --git a/Telegram-iOS/Resources/Dice_Rolling.tgs b/Telegram/Telegram-iOS/Resources/Dice_Rolling.tgs
similarity index 100%
rename from Telegram-iOS/Resources/Dice_Rolling.tgs
rename to Telegram/Telegram-iOS/Resources/Dice_Rolling.tgs
diff --git a/Telegram-iOS/Resources/NavigationBackArrowLight@2x.png b/Telegram/Telegram-iOS/Resources/NavigationBackArrowLight@2x.png
similarity index 100%
rename from Telegram-iOS/Resources/NavigationBackArrowLight@2x.png
rename to Telegram/Telegram-iOS/Resources/NavigationBackArrowLight@2x.png
diff --git a/Telegram-iOS/Resources/NavigationShadow@2x.png b/Telegram/Telegram-iOS/Resources/NavigationShadow@2x.png
similarity index 100%
rename from Telegram-iOS/Resources/NavigationShadow@2x.png
rename to Telegram/Telegram-iOS/Resources/NavigationShadow@2x.png
diff --git a/Telegram-iOS/Resources/PhotoEditor/PhotoEditorCaption@2x.png b/Telegram/Telegram-iOS/Resources/PhotoEditor/PhotoEditorCaption@2x.png
similarity index 100%
rename from Telegram-iOS/Resources/PhotoEditor/PhotoEditorCaption@2x.png
rename to Telegram/Telegram-iOS/Resources/PhotoEditor/PhotoEditorCaption@2x.png
diff --git a/Telegram-iOS/Resources/PhotoEditor/PhotoEditorCaption@3x.png b/Telegram/Telegram-iOS/Resources/PhotoEditor/PhotoEditorCaption@3x.png
similarity index 100%
rename from Telegram-iOS/Resources/PhotoEditor/PhotoEditorCaption@3x.png
rename to Telegram/Telegram-iOS/Resources/PhotoEditor/PhotoEditorCaption@3x.png
diff --git a/Telegram-iOS/Resources/PhotoEditor/PhotoEditorMute@2x.png b/Telegram/Telegram-iOS/Resources/PhotoEditor/PhotoEditorMute@2x.png
similarity index 100%
rename from Telegram-iOS/Resources/PhotoEditor/PhotoEditorMute@2x.png
rename to Telegram/Telegram-iOS/Resources/PhotoEditor/PhotoEditorMute@2x.png
diff --git a/Telegram-iOS/Resources/PhotoEditor/PhotoEditorMuteActive@2x.png b/Telegram/Telegram-iOS/Resources/PhotoEditor/PhotoEditorMuteActive@2x.png
similarity index 100%
rename from Telegram-iOS/Resources/PhotoEditor/PhotoEditorMuteActive@2x.png
rename to Telegram/Telegram-iOS/Resources/PhotoEditor/PhotoEditorMuteActive@2x.png
diff --git a/Telegram-iOS/Resources/begin_record.caf b/Telegram/Telegram-iOS/Resources/begin_record.caf
similarity index 100%
rename from Telegram-iOS/Resources/begin_record.caf
rename to Telegram/Telegram-iOS/Resources/begin_record.caf
diff --git a/Telegram-iOS/Resources/intro/fast_arrow@2x.png b/Telegram/Telegram-iOS/Resources/intro/fast_arrow@2x.png
similarity index 100%
rename from Telegram-iOS/Resources/intro/fast_arrow@2x.png
rename to Telegram/Telegram-iOS/Resources/intro/fast_arrow@2x.png
diff --git a/Telegram-iOS/Resources/intro/fast_arrow_shadow@2x.png b/Telegram/Telegram-iOS/Resources/intro/fast_arrow_shadow@2x.png
similarity index 100%
rename from Telegram-iOS/Resources/intro/fast_arrow_shadow@2x.png
rename to Telegram/Telegram-iOS/Resources/intro/fast_arrow_shadow@2x.png
diff --git a/Telegram-iOS/Resources/intro/fast_body@2x.png b/Telegram/Telegram-iOS/Resources/intro/fast_body@2x.png
similarity index 100%
rename from Telegram-iOS/Resources/intro/fast_body@2x.png
rename to Telegram/Telegram-iOS/Resources/intro/fast_body@2x.png
diff --git a/Telegram-iOS/Resources/intro/fast_spiral@2x.png b/Telegram/Telegram-iOS/Resources/intro/fast_spiral@2x.png
similarity index 100%
rename from Telegram-iOS/Resources/intro/fast_spiral@2x.png
rename to Telegram/Telegram-iOS/Resources/intro/fast_spiral@2x.png
diff --git a/Telegram-iOS/Resources/intro/ic_bubble@2x.png b/Telegram/Telegram-iOS/Resources/intro/ic_bubble@2x.png
similarity index 100%
rename from Telegram-iOS/Resources/intro/ic_bubble@2x.png
rename to Telegram/Telegram-iOS/Resources/intro/ic_bubble@2x.png
diff --git a/Telegram-iOS/Resources/intro/ic_bubble_dot@2x.png b/Telegram/Telegram-iOS/Resources/intro/ic_bubble_dot@2x.png
similarity index 100%
rename from Telegram-iOS/Resources/intro/ic_bubble_dot@2x.png
rename to Telegram/Telegram-iOS/Resources/intro/ic_bubble_dot@2x.png
diff --git a/Telegram-iOS/Resources/intro/ic_cam@2x.png b/Telegram/Telegram-iOS/Resources/intro/ic_cam@2x.png
similarity index 100%
rename from Telegram-iOS/Resources/intro/ic_cam@2x.png
rename to Telegram/Telegram-iOS/Resources/intro/ic_cam@2x.png
diff --git a/Telegram-iOS/Resources/intro/ic_cam_lens@2x.png b/Telegram/Telegram-iOS/Resources/intro/ic_cam_lens@2x.png
similarity index 100%
rename from Telegram-iOS/Resources/intro/ic_cam_lens@2x.png
rename to Telegram/Telegram-iOS/Resources/intro/ic_cam_lens@2x.png
diff --git a/Telegram-iOS/Resources/intro/ic_pencil@2x.png b/Telegram/Telegram-iOS/Resources/intro/ic_pencil@2x.png
similarity index 100%
rename from Telegram-iOS/Resources/intro/ic_pencil@2x.png
rename to Telegram/Telegram-iOS/Resources/intro/ic_pencil@2x.png
diff --git a/Telegram-iOS/Resources/intro/ic_pin@2x.png b/Telegram/Telegram-iOS/Resources/intro/ic_pin@2x.png
similarity index 100%
rename from Telegram-iOS/Resources/intro/ic_pin@2x.png
rename to Telegram/Telegram-iOS/Resources/intro/ic_pin@2x.png
diff --git a/Telegram-iOS/Resources/intro/ic_smile@2x.png b/Telegram/Telegram-iOS/Resources/intro/ic_smile@2x.png
similarity index 100%
rename from Telegram-iOS/Resources/intro/ic_smile@2x.png
rename to Telegram/Telegram-iOS/Resources/intro/ic_smile@2x.png
diff --git a/Telegram-iOS/Resources/intro/ic_smile_eye@2x.png b/Telegram/Telegram-iOS/Resources/intro/ic_smile_eye@2x.png
similarity index 100%
rename from Telegram-iOS/Resources/intro/ic_smile_eye@2x.png
rename to Telegram/Telegram-iOS/Resources/intro/ic_smile_eye@2x.png
diff --git a/Telegram-iOS/Resources/intro/ic_videocam@2x.png b/Telegram/Telegram-iOS/Resources/intro/ic_videocam@2x.png
similarity index 100%
rename from Telegram-iOS/Resources/intro/ic_videocam@2x.png
rename to Telegram/Telegram-iOS/Resources/intro/ic_videocam@2x.png
diff --git a/Telegram-iOS/Resources/intro/knot_down@2x.png b/Telegram/Telegram-iOS/Resources/intro/knot_down@2x.png
similarity index 100%
rename from Telegram-iOS/Resources/intro/knot_down@2x.png
rename to Telegram/Telegram-iOS/Resources/intro/knot_down@2x.png
diff --git a/Telegram-iOS/Resources/intro/knot_up1@2x.png b/Telegram/Telegram-iOS/Resources/intro/knot_up1@2x.png
similarity index 100%
rename from Telegram-iOS/Resources/intro/knot_up1@2x.png
rename to Telegram/Telegram-iOS/Resources/intro/knot_up1@2x.png
diff --git a/Telegram-iOS/Resources/intro/powerful_infinity@2x.png b/Telegram/Telegram-iOS/Resources/intro/powerful_infinity@2x.png
similarity index 100%
rename from Telegram-iOS/Resources/intro/powerful_infinity@2x.png
rename to Telegram/Telegram-iOS/Resources/intro/powerful_infinity@2x.png
diff --git a/Telegram-iOS/Resources/intro/powerful_infinity_white@2x.png b/Telegram/Telegram-iOS/Resources/intro/powerful_infinity_white@2x.png
similarity index 100%
rename from Telegram-iOS/Resources/intro/powerful_infinity_white@2x.png
rename to Telegram/Telegram-iOS/Resources/intro/powerful_infinity_white@2x.png
diff --git a/Telegram-iOS/Resources/intro/powerful_mask@2x.png b/Telegram/Telegram-iOS/Resources/intro/powerful_mask@2x.png
similarity index 100%
rename from Telegram-iOS/Resources/intro/powerful_mask@2x.png
rename to Telegram/Telegram-iOS/Resources/intro/powerful_mask@2x.png
diff --git a/Telegram-iOS/Resources/intro/powerful_star@2x.png b/Telegram/Telegram-iOS/Resources/intro/powerful_star@2x.png
similarity index 100%
rename from Telegram-iOS/Resources/intro/powerful_star@2x.png
rename to Telegram/Telegram-iOS/Resources/intro/powerful_star@2x.png
diff --git a/Telegram-iOS/Resources/intro/private_door@2x.png b/Telegram/Telegram-iOS/Resources/intro/private_door@2x.png
similarity index 100%
rename from Telegram-iOS/Resources/intro/private_door@2x.png
rename to Telegram/Telegram-iOS/Resources/intro/private_door@2x.png
diff --git a/Telegram-iOS/Resources/intro/private_screw@2x.png b/Telegram/Telegram-iOS/Resources/intro/private_screw@2x.png
similarity index 100%
rename from Telegram-iOS/Resources/intro/private_screw@2x.png
rename to Telegram/Telegram-iOS/Resources/intro/private_screw@2x.png
diff --git a/Telegram-iOS/Resources/intro/start_arrow@2x.png b/Telegram/Telegram-iOS/Resources/intro/start_arrow@2x.png
similarity index 100%
rename from Telegram-iOS/Resources/intro/start_arrow@2x.png
rename to Telegram/Telegram-iOS/Resources/intro/start_arrow@2x.png
diff --git a/Telegram-iOS/Resources/intro/start_arrow_ipad.png b/Telegram/Telegram-iOS/Resources/intro/start_arrow_ipad.png
similarity index 100%
rename from Telegram-iOS/Resources/intro/start_arrow_ipad.png
rename to Telegram/Telegram-iOS/Resources/intro/start_arrow_ipad.png
diff --git a/Telegram-iOS/Resources/intro/start_arrow_ipad@2x.png b/Telegram/Telegram-iOS/Resources/intro/start_arrow_ipad@2x.png
similarity index 100%
rename from Telegram-iOS/Resources/intro/start_arrow_ipad@2x.png
rename to Telegram/Telegram-iOS/Resources/intro/start_arrow_ipad@2x.png
diff --git a/Telegram-iOS/Resources/intro/telegram_plane1@2x.png b/Telegram/Telegram-iOS/Resources/intro/telegram_plane1@2x.png
similarity index 100%
rename from Telegram-iOS/Resources/intro/telegram_plane1@2x.png
rename to Telegram/Telegram-iOS/Resources/intro/telegram_plane1@2x.png
diff --git a/Telegram-iOS/Resources/intro/telegram_sphere@2x.png b/Telegram/Telegram-iOS/Resources/intro/telegram_sphere@2x.png
similarity index 100%
rename from Telegram-iOS/Resources/intro/telegram_sphere@2x.png
rename to Telegram/Telegram-iOS/Resources/intro/telegram_sphere@2x.png
diff --git a/Telegram-iOS/Resources/notifications/0.m4a b/Telegram/Telegram-iOS/Resources/notifications/0.m4a
similarity index 100%
rename from Telegram-iOS/Resources/notifications/0.m4a
rename to Telegram/Telegram-iOS/Resources/notifications/0.m4a
diff --git a/Telegram-iOS/Resources/notifications/1.m4a b/Telegram/Telegram-iOS/Resources/notifications/1.m4a
similarity index 100%
rename from Telegram-iOS/Resources/notifications/1.m4a
rename to Telegram/Telegram-iOS/Resources/notifications/1.m4a
diff --git a/Telegram-iOS/Resources/notifications/100.m4a b/Telegram/Telegram-iOS/Resources/notifications/100.m4a
similarity index 100%
rename from Telegram-iOS/Resources/notifications/100.m4a
rename to Telegram/Telegram-iOS/Resources/notifications/100.m4a
diff --git a/Telegram-iOS/Resources/notifications/101.m4a b/Telegram/Telegram-iOS/Resources/notifications/101.m4a
similarity index 100%
rename from Telegram-iOS/Resources/notifications/101.m4a
rename to Telegram/Telegram-iOS/Resources/notifications/101.m4a
diff --git a/Telegram-iOS/Resources/notifications/102.m4a b/Telegram/Telegram-iOS/Resources/notifications/102.m4a
similarity index 100%
rename from Telegram-iOS/Resources/notifications/102.m4a
rename to Telegram/Telegram-iOS/Resources/notifications/102.m4a
diff --git a/Telegram-iOS/Resources/notifications/103.m4a b/Telegram/Telegram-iOS/Resources/notifications/103.m4a
similarity index 100%
rename from Telegram-iOS/Resources/notifications/103.m4a
rename to Telegram/Telegram-iOS/Resources/notifications/103.m4a
diff --git a/Telegram-iOS/Resources/notifications/104.m4a b/Telegram/Telegram-iOS/Resources/notifications/104.m4a
similarity index 100%
rename from Telegram-iOS/Resources/notifications/104.m4a
rename to Telegram/Telegram-iOS/Resources/notifications/104.m4a
diff --git a/Telegram-iOS/Resources/notifications/105.m4a b/Telegram/Telegram-iOS/Resources/notifications/105.m4a
similarity index 100%
rename from Telegram-iOS/Resources/notifications/105.m4a
rename to Telegram/Telegram-iOS/Resources/notifications/105.m4a
diff --git a/Telegram-iOS/Resources/notifications/106.m4a b/Telegram/Telegram-iOS/Resources/notifications/106.m4a
similarity index 100%
rename from Telegram-iOS/Resources/notifications/106.m4a
rename to Telegram/Telegram-iOS/Resources/notifications/106.m4a
diff --git a/Telegram-iOS/Resources/notifications/107.m4a b/Telegram/Telegram-iOS/Resources/notifications/107.m4a
similarity index 100%
rename from Telegram-iOS/Resources/notifications/107.m4a
rename to Telegram/Telegram-iOS/Resources/notifications/107.m4a
diff --git a/Telegram-iOS/Resources/notifications/108.m4a b/Telegram/Telegram-iOS/Resources/notifications/108.m4a
similarity index 100%
rename from Telegram-iOS/Resources/notifications/108.m4a
rename to Telegram/Telegram-iOS/Resources/notifications/108.m4a
diff --git a/Telegram-iOS/Resources/notifications/109.m4a b/Telegram/Telegram-iOS/Resources/notifications/109.m4a
similarity index 100%
rename from Telegram-iOS/Resources/notifications/109.m4a
rename to Telegram/Telegram-iOS/Resources/notifications/109.m4a
diff --git a/Telegram-iOS/Resources/notifications/110.m4a b/Telegram/Telegram-iOS/Resources/notifications/110.m4a
similarity index 100%
rename from Telegram-iOS/Resources/notifications/110.m4a
rename to Telegram/Telegram-iOS/Resources/notifications/110.m4a
diff --git a/Telegram-iOS/Resources/notifications/111.m4a b/Telegram/Telegram-iOS/Resources/notifications/111.m4a
similarity index 100%
rename from Telegram-iOS/Resources/notifications/111.m4a
rename to Telegram/Telegram-iOS/Resources/notifications/111.m4a
diff --git a/Telegram-iOS/Resources/notifications/2.m4a b/Telegram/Telegram-iOS/Resources/notifications/2.m4a
similarity index 100%
rename from Telegram-iOS/Resources/notifications/2.m4a
rename to Telegram/Telegram-iOS/Resources/notifications/2.m4a
diff --git a/Telegram-iOS/Resources/notifications/3.m4a b/Telegram/Telegram-iOS/Resources/notifications/3.m4a
similarity index 100%
rename from Telegram-iOS/Resources/notifications/3.m4a
rename to Telegram/Telegram-iOS/Resources/notifications/3.m4a
diff --git a/Telegram-iOS/Resources/notifications/4.m4a b/Telegram/Telegram-iOS/Resources/notifications/4.m4a
similarity index 100%
rename from Telegram-iOS/Resources/notifications/4.m4a
rename to Telegram/Telegram-iOS/Resources/notifications/4.m4a
diff --git a/Telegram-iOS/Resources/notifications/5.m4a b/Telegram/Telegram-iOS/Resources/notifications/5.m4a
similarity index 100%
rename from Telegram-iOS/Resources/notifications/5.m4a
rename to Telegram/Telegram-iOS/Resources/notifications/5.m4a
diff --git a/Telegram-iOS/Resources/notifications/6.m4a b/Telegram/Telegram-iOS/Resources/notifications/6.m4a
similarity index 100%
rename from Telegram-iOS/Resources/notifications/6.m4a
rename to Telegram/Telegram-iOS/Resources/notifications/6.m4a
diff --git a/Telegram-iOS/Resources/notifications/7.m4a b/Telegram/Telegram-iOS/Resources/notifications/7.m4a
similarity index 100%
rename from Telegram-iOS/Resources/notifications/7.m4a
rename to Telegram/Telegram-iOS/Resources/notifications/7.m4a
diff --git a/Telegram-iOS/Resources/notifications/8.m4a b/Telegram/Telegram-iOS/Resources/notifications/8.m4a
similarity index 100%
rename from Telegram-iOS/Resources/notifications/8.m4a
rename to Telegram/Telegram-iOS/Resources/notifications/8.m4a
diff --git a/Telegram-iOS/Resources/notifications/9.m4a b/Telegram/Telegram-iOS/Resources/notifications/9.m4a
similarity index 100%
rename from Telegram-iOS/Resources/notifications/9.m4a
rename to Telegram/Telegram-iOS/Resources/notifications/9.m4a
diff --git a/Telegram-iOS/Resources/voip_busy.caf b/Telegram/Telegram-iOS/Resources/voip_busy.caf
similarity index 100%
rename from Telegram-iOS/Resources/voip_busy.caf
rename to Telegram/Telegram-iOS/Resources/voip_busy.caf
diff --git a/Telegram-iOS/Resources/voip_connecting.mp3 b/Telegram/Telegram-iOS/Resources/voip_connecting.mp3
similarity index 100%
rename from Telegram-iOS/Resources/voip_connecting.mp3
rename to Telegram/Telegram-iOS/Resources/voip_connecting.mp3
diff --git a/Telegram-iOS/Resources/voip_end.caf b/Telegram/Telegram-iOS/Resources/voip_end.caf
similarity index 100%
rename from Telegram-iOS/Resources/voip_end.caf
rename to Telegram/Telegram-iOS/Resources/voip_end.caf
diff --git a/Telegram-iOS/Resources/voip_fail.caf b/Telegram/Telegram-iOS/Resources/voip_fail.caf
similarity index 100%
rename from Telegram-iOS/Resources/voip_fail.caf
rename to Telegram/Telegram-iOS/Resources/voip_fail.caf
diff --git a/Telegram-iOS/Resources/voip_ringback.caf b/Telegram/Telegram-iOS/Resources/voip_ringback.caf
similarity index 100%
rename from Telegram-iOS/Resources/voip_ringback.caf
rename to Telegram/Telegram-iOS/Resources/voip_ringback.caf
diff --git a/Telegram-iOS/Telegram-Bridging-Header.h b/Telegram/Telegram-iOS/Telegram-Bridging-Header.h
similarity index 100%
rename from Telegram-iOS/Telegram-Bridging-Header.h
rename to Telegram/Telegram-iOS/Telegram-Bridging-Header.h
diff --git a/Telegram-iOS/WhiteFilledIcon@2x.png b/Telegram/Telegram-iOS/WhiteFilledIcon@2x.png
similarity index 100%
rename from Telegram-iOS/WhiteFilledIcon@2x.png
rename to Telegram/Telegram-iOS/WhiteFilledIcon@2x.png
diff --git a/Telegram-iOS/WhiteFilledIcon@3x.png b/Telegram/Telegram-iOS/WhiteFilledIcon@3x.png
similarity index 100%
rename from Telegram-iOS/WhiteFilledIcon@3x.png
rename to Telegram/Telegram-iOS/WhiteFilledIcon@3x.png
diff --git a/Telegram-iOS/ar.lproj/AppIntentVocabulary.plist b/Telegram/Telegram-iOS/ar.lproj/AppIntentVocabulary.plist
similarity index 100%
rename from Telegram-iOS/ar.lproj/AppIntentVocabulary.plist
rename to Telegram/Telegram-iOS/ar.lproj/AppIntentVocabulary.plist
diff --git a/Telegram-iOS/ar.lproj/InfoPlist.strings b/Telegram/Telegram-iOS/ar.lproj/InfoPlist.strings
similarity index 100%
rename from Telegram-iOS/ar.lproj/InfoPlist.strings
rename to Telegram/Telegram-iOS/ar.lproj/InfoPlist.strings
diff --git a/Telegram-iOS/de.lproj/Localizable.strings b/Telegram/Telegram-iOS/ar.lproj/Localizable.strings
similarity index 100%
rename from Telegram-iOS/de.lproj/Localizable.strings
rename to Telegram/Telegram-iOS/ar.lproj/Localizable.strings
diff --git a/Telegram-iOS/ca.lproj/AppIntentVocabulary.plist b/Telegram/Telegram-iOS/ca.lproj/AppIntentVocabulary.plist
similarity index 100%
rename from Telegram-iOS/ca.lproj/AppIntentVocabulary.plist
rename to Telegram/Telegram-iOS/ca.lproj/AppIntentVocabulary.plist
diff --git a/Telegram-iOS/ca.lproj/InfoPlist.strings b/Telegram/Telegram-iOS/ca.lproj/InfoPlist.strings
similarity index 100%
rename from Telegram-iOS/ca.lproj/InfoPlist.strings
rename to Telegram/Telegram-iOS/ca.lproj/InfoPlist.strings
diff --git a/Telegram-iOS/ca.lproj/Localizable.strings b/Telegram/Telegram-iOS/ca.lproj/Localizable.strings
similarity index 100%
rename from Telegram-iOS/ca.lproj/Localizable.strings
rename to Telegram/Telegram-iOS/ca.lproj/Localizable.strings
diff --git a/Telegram-iOS/de.lproj/AppIntentVocabulary.plist b/Telegram/Telegram-iOS/de.lproj/AppIntentVocabulary.plist
similarity index 100%
rename from Telegram-iOS/de.lproj/AppIntentVocabulary.plist
rename to Telegram/Telegram-iOS/de.lproj/AppIntentVocabulary.plist
diff --git a/Telegram-iOS/de.lproj/InfoPlist.strings b/Telegram/Telegram-iOS/de.lproj/InfoPlist.strings
similarity index 100%
rename from Telegram-iOS/de.lproj/InfoPlist.strings
rename to Telegram/Telegram-iOS/de.lproj/InfoPlist.strings
diff --git a/Telegram-iOS/es.lproj/Localizable.strings b/Telegram/Telegram-iOS/de.lproj/Localizable.strings
similarity index 100%
rename from Telegram-iOS/es.lproj/Localizable.strings
rename to Telegram/Telegram-iOS/de.lproj/Localizable.strings
diff --git a/Telegram-iOS/en.lproj/AppIntentVocabulary.plist b/Telegram/Telegram-iOS/en.lproj/AppIntentVocabulary.plist
similarity index 100%
rename from Telegram-iOS/en.lproj/AppIntentVocabulary.plist
rename to Telegram/Telegram-iOS/en.lproj/AppIntentVocabulary.plist
diff --git a/Telegram-iOS/en.lproj/InfoPlist.strings b/Telegram/Telegram-iOS/en.lproj/InfoPlist.strings
similarity index 100%
rename from Telegram-iOS/en.lproj/InfoPlist.strings
rename to Telegram/Telegram-iOS/en.lproj/InfoPlist.strings
diff --git a/Telegram-iOS/en.lproj/Localizable.strings b/Telegram/Telegram-iOS/en.lproj/Localizable.strings
similarity index 99%
rename from Telegram-iOS/en.lproj/Localizable.strings
rename to Telegram/Telegram-iOS/en.lproj/Localizable.strings
index 710bcd7c41..f2c0148559 100644
--- a/Telegram-iOS/en.lproj/Localizable.strings
+++ b/Telegram/Telegram-iOS/en.lproj/Localizable.strings
@@ -4858,6 +4858,7 @@ Any member of this group will be able to see messages in the channel.";
"Wallet.Send.OwnAddressAlertProceed" = "Proceed";
"Wallet.Send.TransactionInProgress" = "Please wait until the current transaction is completed.";
"Wallet.Send.SyncInProgress" = "Please wait while the wallet finishes syncing with the TON Blockchain.";
+"Wallet.Send.EncryptComment" = "Encrypt Text";
"Wallet.Settings.Title" = "Settings";
"Wallet.Settings.Configuration" = "Server Settings";
"Wallet.Settings.ConfigurationInfo" = "Advanced Settings";
@@ -5351,7 +5352,9 @@ Any member of this group will be able to see messages in the channel.";
"ChatList.EmptyChatFilterList" = "No chats currently\nmatch this filter.";
"ChatList.EmptyChatListNewMessage" = "New Message";
-"ChatList.EmptyChatListEditFilter" = "Edit Filter";
+"ChatList.EmptyChatListEditFilter" = "Edit Folder";
+
+"ChatListFilter.AddChatsTitle" = "Add Chats";
"Stats.Overview" = "OVERVIEW";
"Stats.Followers" = "Followers";
diff --git a/Telegram-iOS/es.lproj/AppIntentVocabulary.plist b/Telegram/Telegram-iOS/es.lproj/AppIntentVocabulary.plist
similarity index 100%
rename from Telegram-iOS/es.lproj/AppIntentVocabulary.plist
rename to Telegram/Telegram-iOS/es.lproj/AppIntentVocabulary.plist
diff --git a/Telegram-iOS/es.lproj/InfoPlist.strings b/Telegram/Telegram-iOS/es.lproj/InfoPlist.strings
similarity index 100%
rename from Telegram-iOS/es.lproj/InfoPlist.strings
rename to Telegram/Telegram-iOS/es.lproj/InfoPlist.strings
diff --git a/Telegram-iOS/it.lproj/Localizable.strings b/Telegram/Telegram-iOS/es.lproj/Localizable.strings
similarity index 100%
rename from Telegram-iOS/it.lproj/Localizable.strings
rename to Telegram/Telegram-iOS/es.lproj/Localizable.strings
diff --git a/Telegram-iOS/fr.lproj/AppIntentVocabulary.plist b/Telegram/Telegram-iOS/fr.lproj/AppIntentVocabulary.plist
similarity index 100%
rename from Telegram-iOS/fr.lproj/AppIntentVocabulary.plist
rename to Telegram/Telegram-iOS/fr.lproj/AppIntentVocabulary.plist
diff --git a/Telegram-iOS/fr.lproj/InfoPlist.strings b/Telegram/Telegram-iOS/fr.lproj/InfoPlist.strings
similarity index 100%
rename from Telegram-iOS/fr.lproj/InfoPlist.strings
rename to Telegram/Telegram-iOS/fr.lproj/InfoPlist.strings
diff --git a/Telegram-iOS/fr.lproj/Localizable.strings b/Telegram/Telegram-iOS/fr.lproj/Localizable.strings
similarity index 100%
rename from Telegram-iOS/fr.lproj/Localizable.strings
rename to Telegram/Telegram-iOS/fr.lproj/Localizable.strings
diff --git a/Telegram-iOS/id.lproj/AppIntentVocabulary.plist b/Telegram/Telegram-iOS/id.lproj/AppIntentVocabulary.plist
similarity index 100%
rename from Telegram-iOS/id.lproj/AppIntentVocabulary.plist
rename to Telegram/Telegram-iOS/id.lproj/AppIntentVocabulary.plist
diff --git a/Telegram-iOS/id.lproj/InfoPlist.strings b/Telegram/Telegram-iOS/id.lproj/InfoPlist.strings
similarity index 100%
rename from Telegram-iOS/id.lproj/InfoPlist.strings
rename to Telegram/Telegram-iOS/id.lproj/InfoPlist.strings
diff --git a/Telegram-iOS/id.lproj/Localizable.strings b/Telegram/Telegram-iOS/id.lproj/Localizable.strings
similarity index 100%
rename from Telegram-iOS/id.lproj/Localizable.strings
rename to Telegram/Telegram-iOS/id.lproj/Localizable.strings
diff --git a/Telegram-iOS/it.lproj/AppIntentVocabulary.plist b/Telegram/Telegram-iOS/it.lproj/AppIntentVocabulary.plist
similarity index 100%
rename from Telegram-iOS/it.lproj/AppIntentVocabulary.plist
rename to Telegram/Telegram-iOS/it.lproj/AppIntentVocabulary.plist
diff --git a/Telegram-iOS/it.lproj/InfoPlist.strings b/Telegram/Telegram-iOS/it.lproj/InfoPlist.strings
similarity index 100%
rename from Telegram-iOS/it.lproj/InfoPlist.strings
rename to Telegram/Telegram-iOS/it.lproj/InfoPlist.strings
diff --git a/Telegram-iOS/ko.lproj/Localizable.strings b/Telegram/Telegram-iOS/it.lproj/Localizable.strings
similarity index 100%
rename from Telegram-iOS/ko.lproj/Localizable.strings
rename to Telegram/Telegram-iOS/it.lproj/Localizable.strings
diff --git a/Telegram-iOS/ko.lproj/AppIntentVocabulary.plist b/Telegram/Telegram-iOS/ko.lproj/AppIntentVocabulary.plist
similarity index 100%
rename from Telegram-iOS/ko.lproj/AppIntentVocabulary.plist
rename to Telegram/Telegram-iOS/ko.lproj/AppIntentVocabulary.plist
diff --git a/Telegram-iOS/ko.lproj/InfoPlist.strings b/Telegram/Telegram-iOS/ko.lproj/InfoPlist.strings
similarity index 100%
rename from Telegram-iOS/ko.lproj/InfoPlist.strings
rename to Telegram/Telegram-iOS/ko.lproj/InfoPlist.strings
diff --git a/Telegram-iOS/nl.lproj/Localizable.strings b/Telegram/Telegram-iOS/ko.lproj/Localizable.strings
similarity index 100%
rename from Telegram-iOS/nl.lproj/Localizable.strings
rename to Telegram/Telegram-iOS/ko.lproj/Localizable.strings
diff --git a/Telegram-iOS/main.m b/Telegram/Telegram-iOS/main.m
similarity index 100%
rename from Telegram-iOS/main.m
rename to Telegram/Telegram-iOS/main.m
diff --git a/Telegram-iOS/ms.lproj/AppIntentVocabulary.plist b/Telegram/Telegram-iOS/ms.lproj/AppIntentVocabulary.plist
similarity index 100%
rename from Telegram-iOS/ms.lproj/AppIntentVocabulary.plist
rename to Telegram/Telegram-iOS/ms.lproj/AppIntentVocabulary.plist
diff --git a/Telegram-iOS/ms.lproj/InfoPlist.strings b/Telegram/Telegram-iOS/ms.lproj/InfoPlist.strings
similarity index 100%
rename from Telegram-iOS/ms.lproj/InfoPlist.strings
rename to Telegram/Telegram-iOS/ms.lproj/InfoPlist.strings
diff --git a/Telegram-iOS/ms.lproj/Localizable.strings b/Telegram/Telegram-iOS/ms.lproj/Localizable.strings
similarity index 100%
rename from Telegram-iOS/ms.lproj/Localizable.strings
rename to Telegram/Telegram-iOS/ms.lproj/Localizable.strings
diff --git a/Telegram-iOS/nl.lproj/AppIntentVocabulary.plist b/Telegram/Telegram-iOS/nl.lproj/AppIntentVocabulary.plist
similarity index 100%
rename from Telegram-iOS/nl.lproj/AppIntentVocabulary.plist
rename to Telegram/Telegram-iOS/nl.lproj/AppIntentVocabulary.plist
diff --git a/Telegram-iOS/nl.lproj/InfoPlist.strings b/Telegram/Telegram-iOS/nl.lproj/InfoPlist.strings
similarity index 100%
rename from Telegram-iOS/nl.lproj/InfoPlist.strings
rename to Telegram/Telegram-iOS/nl.lproj/InfoPlist.strings
diff --git a/Telegram-iOS/pt.lproj/Localizable.strings b/Telegram/Telegram-iOS/nl.lproj/Localizable.strings
similarity index 100%
rename from Telegram-iOS/pt.lproj/Localizable.strings
rename to Telegram/Telegram-iOS/nl.lproj/Localizable.strings
diff --git a/Telegram-iOS/pt.lproj/AppIntentVocabulary.plist b/Telegram/Telegram-iOS/pt.lproj/AppIntentVocabulary.plist
similarity index 100%
rename from Telegram-iOS/pt.lproj/AppIntentVocabulary.plist
rename to Telegram/Telegram-iOS/pt.lproj/AppIntentVocabulary.plist
diff --git a/Telegram-iOS/pt.lproj/InfoPlist.strings b/Telegram/Telegram-iOS/pt.lproj/InfoPlist.strings
similarity index 100%
rename from Telegram-iOS/pt.lproj/InfoPlist.strings
rename to Telegram/Telegram-iOS/pt.lproj/InfoPlist.strings
diff --git a/Telegram-iOS/ru.lproj/Localizable.strings b/Telegram/Telegram-iOS/pt.lproj/Localizable.strings
similarity index 100%
rename from Telegram-iOS/ru.lproj/Localizable.strings
rename to Telegram/Telegram-iOS/pt.lproj/Localizable.strings
diff --git a/Telegram-iOS/ru.lproj/AppIntentVocabulary.plist b/Telegram/Telegram-iOS/ru.lproj/AppIntentVocabulary.plist
similarity index 100%
rename from Telegram-iOS/ru.lproj/AppIntentVocabulary.plist
rename to Telegram/Telegram-iOS/ru.lproj/AppIntentVocabulary.plist
diff --git a/Telegram-iOS/ru.lproj/InfoPlist.strings b/Telegram/Telegram-iOS/ru.lproj/InfoPlist.strings
similarity index 100%
rename from Telegram-iOS/ru.lproj/InfoPlist.strings
rename to Telegram/Telegram-iOS/ru.lproj/InfoPlist.strings
diff --git a/submodules/Display/Display/UniversalMasterController.swift b/Telegram/Telegram-iOS/ru.lproj/Localizable.strings
similarity index 100%
rename from submodules/Display/Display/UniversalMasterController.swift
rename to Telegram/Telegram-iOS/ru.lproj/Localizable.strings
diff --git a/Telegram-iOS/tr.lproj/AppIntentVocabulary.plist b/Telegram/Telegram-iOS/tr.lproj/AppIntentVocabulary.plist
similarity index 100%
rename from Telegram-iOS/tr.lproj/AppIntentVocabulary.plist
rename to Telegram/Telegram-iOS/tr.lproj/AppIntentVocabulary.plist
diff --git a/Telegram-iOS/tr.lproj/InfoPlist.strings b/Telegram/Telegram-iOS/tr.lproj/InfoPlist.strings
similarity index 100%
rename from Telegram-iOS/tr.lproj/InfoPlist.strings
rename to Telegram/Telegram-iOS/tr.lproj/InfoPlist.strings
diff --git a/Telegram-iOS/tr.lproj/Localizable.strings b/Telegram/Telegram-iOS/tr.lproj/Localizable.strings
similarity index 100%
rename from Telegram-iOS/tr.lproj/Localizable.strings
rename to Telegram/Telegram-iOS/tr.lproj/Localizable.strings
diff --git a/Telegram-iOS/uk.lproj/AppIntentVocabulary.plist b/Telegram/Telegram-iOS/uk.lproj/AppIntentVocabulary.plist
similarity index 100%
rename from Telegram-iOS/uk.lproj/AppIntentVocabulary.plist
rename to Telegram/Telegram-iOS/uk.lproj/AppIntentVocabulary.plist
diff --git a/Telegram-iOS/uk.lproj/InfoPlist.strings b/Telegram/Telegram-iOS/uk.lproj/InfoPlist.strings
similarity index 100%
rename from Telegram-iOS/uk.lproj/InfoPlist.strings
rename to Telegram/Telegram-iOS/uk.lproj/InfoPlist.strings
diff --git a/Telegram-iOS/uk.lproj/Localizable.strings b/Telegram/Telegram-iOS/uk.lproj/Localizable.strings
similarity index 100%
rename from Telegram-iOS/uk.lproj/Localizable.strings
rename to Telegram/Telegram-iOS/uk.lproj/Localizable.strings
diff --git a/Watch/App/Assets.xcassets/AppIcon.appiconset/Contents.json b/Telegram/Watch/App/Assets.xcassets/AppIcon.appiconset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/AppIcon.appiconset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/AppIcon.appiconset/Contents.json
diff --git a/Watch/App/Assets.xcassets/AppIcon.appiconset/Simple-iTunesArtwork.png b/Telegram/Watch/App/Assets.xcassets/AppIcon.appiconset/Simple-iTunesArtwork.png
similarity index 100%
rename from Watch/App/Assets.xcassets/AppIcon.appiconset/Simple-iTunesArtwork.png
rename to Telegram/Watch/App/Assets.xcassets/AppIcon.appiconset/Simple-iTunesArtwork.png
diff --git a/Watch/App/Assets.xcassets/AppIcon.appiconset/Simple@58x58.png b/Telegram/Watch/App/Assets.xcassets/AppIcon.appiconset/Simple@58x58.png
similarity index 100%
rename from Watch/App/Assets.xcassets/AppIcon.appiconset/Simple@58x58.png
rename to Telegram/Watch/App/Assets.xcassets/AppIcon.appiconset/Simple@58x58.png
diff --git a/Watch/App/Assets.xcassets/AppIcon.appiconset/Simple@80x80.png b/Telegram/Watch/App/Assets.xcassets/AppIcon.appiconset/Simple@80x80.png
similarity index 100%
rename from Watch/App/Assets.xcassets/AppIcon.appiconset/Simple@80x80.png
rename to Telegram/Watch/App/Assets.xcassets/AppIcon.appiconset/Simple@80x80.png
diff --git a/Watch/App/Assets.xcassets/AppIcon.appiconset/Simple@87x87.png b/Telegram/Watch/App/Assets.xcassets/AppIcon.appiconset/Simple@87x87.png
similarity index 100%
rename from Watch/App/Assets.xcassets/AppIcon.appiconset/Simple@87x87.png
rename to Telegram/Watch/App/Assets.xcassets/AppIcon.appiconset/Simple@87x87.png
diff --git a/Watch/App/Assets.xcassets/AppIcon.appiconset/Watch100@2x.png b/Telegram/Watch/App/Assets.xcassets/AppIcon.appiconset/Watch100@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/AppIcon.appiconset/Watch100@2x.png
rename to Telegram/Watch/App/Assets.xcassets/AppIcon.appiconset/Watch100@2x.png
diff --git a/Watch/App/Assets.xcassets/AppIcon.appiconset/Watch172@2x.png b/Telegram/Watch/App/Assets.xcassets/AppIcon.appiconset/Watch172@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/AppIcon.appiconset/Watch172@2x.png
rename to Telegram/Watch/App/Assets.xcassets/AppIcon.appiconset/Watch172@2x.png
diff --git a/Watch/App/Assets.xcassets/AppIcon.appiconset/Watch196@2x.png b/Telegram/Watch/App/Assets.xcassets/AppIcon.appiconset/Watch196@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/AppIcon.appiconset/Watch196@2x.png
rename to Telegram/Watch/App/Assets.xcassets/AppIcon.appiconset/Watch196@2x.png
diff --git a/Watch/App/Assets.xcassets/AppIcon.appiconset/Watch216@2x.png b/Telegram/Watch/App/Assets.xcassets/AppIcon.appiconset/Watch216@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/AppIcon.appiconset/Watch216@2x.png
rename to Telegram/Watch/App/Assets.xcassets/AppIcon.appiconset/Watch216@2x.png
diff --git a/Watch/App/Assets.xcassets/AppIcon.appiconset/Watch48@2x.png b/Telegram/Watch/App/Assets.xcassets/AppIcon.appiconset/Watch48@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/AppIcon.appiconset/Watch48@2x.png
rename to Telegram/Watch/App/Assets.xcassets/AppIcon.appiconset/Watch48@2x.png
diff --git a/Watch/App/Assets.xcassets/AppIcon.appiconset/Watch55@2x.png b/Telegram/Watch/App/Assets.xcassets/AppIcon.appiconset/Watch55@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/AppIcon.appiconset/Watch55@2x.png
rename to Telegram/Watch/App/Assets.xcassets/AppIcon.appiconset/Watch55@2x.png
diff --git a/Watch/App/Assets.xcassets/AppIcon.appiconset/Watch88@2x.png b/Telegram/Watch/App/Assets.xcassets/AppIcon.appiconset/Watch88@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/AppIcon.appiconset/Watch88@2x.png
rename to Telegram/Watch/App/Assets.xcassets/AppIcon.appiconset/Watch88@2x.png
diff --git a/Watch/App/Assets.xcassets/BotCommandIcon.imageset/BotCommandIcon@2x.png b/Telegram/Watch/App/Assets.xcassets/BotCommandIcon.imageset/BotCommandIcon@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BotCommandIcon.imageset/BotCommandIcon@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BotCommandIcon.imageset/BotCommandIcon@2x.png
diff --git a/Watch/App/Assets.xcassets/BotCommandIcon.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BotCommandIcon.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BotCommandIcon.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BotCommandIcon.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BotKeyboardIcon.imageset/BotKeyboardIcon@2x.png b/Telegram/Watch/App/Assets.xcassets/BotKeyboardIcon.imageset/BotKeyboardIcon@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BotKeyboardIcon.imageset/BotKeyboardIcon@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BotKeyboardIcon.imageset/BotKeyboardIcon@2x.png
diff --git a/Watch/App/Assets.xcassets/BotKeyboardIcon.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BotKeyboardIcon.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BotKeyboardIcon.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BotKeyboardIcon.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleNotification.imageset/BubbleNotification@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleNotification.imageset/BubbleNotification@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleNotification.imageset/BubbleNotification@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleNotification.imageset/BubbleNotification@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleNotification.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleNotification.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleNotification.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleNotification.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner0.imageset/BubbleSpinner0@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner0.imageset/BubbleSpinner0@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner0.imageset/BubbleSpinner0@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner0.imageset/BubbleSpinner0@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner0.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner0.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner0.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner0.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner1.imageset/BubbleSpinner1@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner1.imageset/BubbleSpinner1@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner1.imageset/BubbleSpinner1@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner1.imageset/BubbleSpinner1@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner1.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner1.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner1.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner1.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner10.imageset/BubbleSpinner10@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner10.imageset/BubbleSpinner10@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner10.imageset/BubbleSpinner10@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner10.imageset/BubbleSpinner10@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner10.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner10.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner10.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner10.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner11.imageset/BubbleSpinner11@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner11.imageset/BubbleSpinner11@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner11.imageset/BubbleSpinner11@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner11.imageset/BubbleSpinner11@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner11.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner11.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner11.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner11.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner12.imageset/BubbleSpinner12@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner12.imageset/BubbleSpinner12@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner12.imageset/BubbleSpinner12@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner12.imageset/BubbleSpinner12@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner12.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner12.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner12.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner12.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner13.imageset/BubbleSpinner13@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner13.imageset/BubbleSpinner13@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner13.imageset/BubbleSpinner13@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner13.imageset/BubbleSpinner13@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner13.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner13.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner13.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner13.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner14.imageset/BubbleSpinner14@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner14.imageset/BubbleSpinner14@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner14.imageset/BubbleSpinner14@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner14.imageset/BubbleSpinner14@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner14.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner14.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner14.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner14.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner15.imageset/BubbleSpinner15@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner15.imageset/BubbleSpinner15@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner15.imageset/BubbleSpinner15@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner15.imageset/BubbleSpinner15@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner15.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner15.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner15.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner15.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner16.imageset/BubbleSpinner16@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner16.imageset/BubbleSpinner16@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner16.imageset/BubbleSpinner16@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner16.imageset/BubbleSpinner16@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner16.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner16.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner16.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner16.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner17.imageset/BubbleSpinner17@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner17.imageset/BubbleSpinner17@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner17.imageset/BubbleSpinner17@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner17.imageset/BubbleSpinner17@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner17.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner17.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner17.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner17.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner18.imageset/BubbleSpinner18@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner18.imageset/BubbleSpinner18@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner18.imageset/BubbleSpinner18@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner18.imageset/BubbleSpinner18@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner18.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner18.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner18.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner18.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner19.imageset/BubbleSpinner19@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner19.imageset/BubbleSpinner19@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner19.imageset/BubbleSpinner19@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner19.imageset/BubbleSpinner19@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner19.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner19.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner19.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner19.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner2.imageset/BubbleSpinner2@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner2.imageset/BubbleSpinner2@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner2.imageset/BubbleSpinner2@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner2.imageset/BubbleSpinner2@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner2.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner2.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner2.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner2.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner20.imageset/BubbleSpinner20@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner20.imageset/BubbleSpinner20@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner20.imageset/BubbleSpinner20@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner20.imageset/BubbleSpinner20@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner20.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner20.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner20.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner20.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner21.imageset/BubbleSpinner21@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner21.imageset/BubbleSpinner21@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner21.imageset/BubbleSpinner21@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner21.imageset/BubbleSpinner21@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner21.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner21.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner21.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner21.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner22.imageset/BubbleSpinner22@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner22.imageset/BubbleSpinner22@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner22.imageset/BubbleSpinner22@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner22.imageset/BubbleSpinner22@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner22.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner22.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner22.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner22.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner23.imageset/BubbleSpinner23@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner23.imageset/BubbleSpinner23@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner23.imageset/BubbleSpinner23@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner23.imageset/BubbleSpinner23@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner23.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner23.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner23.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner23.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner24.imageset/BubbleSpinner24@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner24.imageset/BubbleSpinner24@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner24.imageset/BubbleSpinner24@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner24.imageset/BubbleSpinner24@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner24.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner24.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner24.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner24.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner25.imageset/BubbleSpinner25@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner25.imageset/BubbleSpinner25@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner25.imageset/BubbleSpinner25@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner25.imageset/BubbleSpinner25@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner25.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner25.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner25.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner25.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner26.imageset/BubbleSpinner26@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner26.imageset/BubbleSpinner26@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner26.imageset/BubbleSpinner26@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner26.imageset/BubbleSpinner26@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner26.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner26.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner26.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner26.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner27.imageset/BubbleSpinner27@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner27.imageset/BubbleSpinner27@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner27.imageset/BubbleSpinner27@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner27.imageset/BubbleSpinner27@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner27.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner27.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner27.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner27.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner28.imageset/BubbleSpinner28@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner28.imageset/BubbleSpinner28@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner28.imageset/BubbleSpinner28@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner28.imageset/BubbleSpinner28@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner28.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner28.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner28.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner28.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner29.imageset/BubbleSpinner29@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner29.imageset/BubbleSpinner29@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner29.imageset/BubbleSpinner29@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner29.imageset/BubbleSpinner29@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner29.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner29.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner29.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner29.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner3.imageset/BubbleSpinner3@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner3.imageset/BubbleSpinner3@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner3.imageset/BubbleSpinner3@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner3.imageset/BubbleSpinner3@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner3.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner3.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner3.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner3.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner30.imageset/BubbleSpinner30@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner30.imageset/BubbleSpinner30@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner30.imageset/BubbleSpinner30@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner30.imageset/BubbleSpinner30@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner30.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner30.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner30.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner30.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner31.imageset/BubbleSpinner31@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner31.imageset/BubbleSpinner31@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner31.imageset/BubbleSpinner31@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner31.imageset/BubbleSpinner31@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner31.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner31.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner31.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner31.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner32.imageset/BubbleSpinner32@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner32.imageset/BubbleSpinner32@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner32.imageset/BubbleSpinner32@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner32.imageset/BubbleSpinner32@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner32.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner32.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner32.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner32.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner33.imageset/BubbleSpinner33@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner33.imageset/BubbleSpinner33@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner33.imageset/BubbleSpinner33@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner33.imageset/BubbleSpinner33@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner33.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner33.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner33.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner33.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner34.imageset/BubbleSpinner34@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner34.imageset/BubbleSpinner34@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner34.imageset/BubbleSpinner34@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner34.imageset/BubbleSpinner34@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner34.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner34.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner34.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner34.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner35.imageset/BubbleSpinner35@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner35.imageset/BubbleSpinner35@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner35.imageset/BubbleSpinner35@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner35.imageset/BubbleSpinner35@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner35.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner35.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner35.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner35.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner36.imageset/BubbleSpinner36@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner36.imageset/BubbleSpinner36@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner36.imageset/BubbleSpinner36@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner36.imageset/BubbleSpinner36@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner36.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner36.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner36.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner36.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner37.imageset/BubbleSpinner37@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner37.imageset/BubbleSpinner37@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner37.imageset/BubbleSpinner37@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner37.imageset/BubbleSpinner37@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner37.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner37.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner37.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner37.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner38.imageset/BubbleSpinner38@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner38.imageset/BubbleSpinner38@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner38.imageset/BubbleSpinner38@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner38.imageset/BubbleSpinner38@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner38.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner38.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner38.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner38.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner4.imageset/BubbleSpinner4@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner4.imageset/BubbleSpinner4@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner4.imageset/BubbleSpinner4@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner4.imageset/BubbleSpinner4@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner4.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner4.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner4.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner4.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner5.imageset/BubbleSpinner5@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner5.imageset/BubbleSpinner5@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner5.imageset/BubbleSpinner5@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner5.imageset/BubbleSpinner5@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner5.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner5.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner5.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner5.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner6.imageset/BubbleSpinner6@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner6.imageset/BubbleSpinner6@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner6.imageset/BubbleSpinner6@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner6.imageset/BubbleSpinner6@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner6.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner6.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner6.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner6.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner7.imageset/BubbleSpinner7@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner7.imageset/BubbleSpinner7@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner7.imageset/BubbleSpinner7@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner7.imageset/BubbleSpinner7@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner7.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner7.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner7.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner7.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner8.imageset/BubbleSpinner8@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner8.imageset/BubbleSpinner8@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner8.imageset/BubbleSpinner8@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner8.imageset/BubbleSpinner8@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner8.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner8.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner8.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner8.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner9.imageset/BubbleSpinner9@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner9.imageset/BubbleSpinner9@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner9.imageset/BubbleSpinner9@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner9.imageset/BubbleSpinner9@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner9.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner9.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner9.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/BubbleSpinner9.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinner/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinner/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming0.imageset/BubbleSpinnerIncoming0@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming0.imageset/BubbleSpinnerIncoming0@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming0.imageset/BubbleSpinnerIncoming0@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming0.imageset/BubbleSpinnerIncoming0@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming0.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming0.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming0.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming0.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming1.imageset/BubbleSpinnerIncoming1@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming1.imageset/BubbleSpinnerIncoming1@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming1.imageset/BubbleSpinnerIncoming1@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming1.imageset/BubbleSpinnerIncoming1@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming1.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming1.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming1.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming1.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming10.imageset/BubbleSpinnerIncoming10@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming10.imageset/BubbleSpinnerIncoming10@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming10.imageset/BubbleSpinnerIncoming10@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming10.imageset/BubbleSpinnerIncoming10@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming10.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming10.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming10.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming10.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming11.imageset/BubbleSpinnerIncoming11@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming11.imageset/BubbleSpinnerIncoming11@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming11.imageset/BubbleSpinnerIncoming11@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming11.imageset/BubbleSpinnerIncoming11@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming11.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming11.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming11.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming11.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming12.imageset/BubbleSpinnerIncoming12@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming12.imageset/BubbleSpinnerIncoming12@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming12.imageset/BubbleSpinnerIncoming12@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming12.imageset/BubbleSpinnerIncoming12@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming12.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming12.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming12.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming12.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming13.imageset/BubbleSpinnerIncoming13@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming13.imageset/BubbleSpinnerIncoming13@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming13.imageset/BubbleSpinnerIncoming13@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming13.imageset/BubbleSpinnerIncoming13@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming13.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming13.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming13.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming13.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming14.imageset/BubbleSpinnerIncoming14@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming14.imageset/BubbleSpinnerIncoming14@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming14.imageset/BubbleSpinnerIncoming14@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming14.imageset/BubbleSpinnerIncoming14@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming14.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming14.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming14.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming14.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming15.imageset/BubbleSpinnerIncoming15@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming15.imageset/BubbleSpinnerIncoming15@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming15.imageset/BubbleSpinnerIncoming15@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming15.imageset/BubbleSpinnerIncoming15@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming15.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming15.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming15.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming15.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming16.imageset/BubbleSpinnerIncoming16@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming16.imageset/BubbleSpinnerIncoming16@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming16.imageset/BubbleSpinnerIncoming16@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming16.imageset/BubbleSpinnerIncoming16@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming16.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming16.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming16.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming16.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming17.imageset/BubbleSpinnerIncoming17@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming17.imageset/BubbleSpinnerIncoming17@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming17.imageset/BubbleSpinnerIncoming17@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming17.imageset/BubbleSpinnerIncoming17@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming17.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming17.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming17.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming17.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming18.imageset/BubbleSpinnerIncoming18@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming18.imageset/BubbleSpinnerIncoming18@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming18.imageset/BubbleSpinnerIncoming18@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming18.imageset/BubbleSpinnerIncoming18@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming18.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming18.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming18.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming18.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming19.imageset/BubbleSpinnerIncoming19@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming19.imageset/BubbleSpinnerIncoming19@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming19.imageset/BubbleSpinnerIncoming19@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming19.imageset/BubbleSpinnerIncoming19@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming19.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming19.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming19.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming19.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming2.imageset/BubbleSpinnerIncoming2@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming2.imageset/BubbleSpinnerIncoming2@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming2.imageset/BubbleSpinnerIncoming2@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming2.imageset/BubbleSpinnerIncoming2@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming2.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming2.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming2.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming2.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming20.imageset/BubbleSpinnerIncoming20@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming20.imageset/BubbleSpinnerIncoming20@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming20.imageset/BubbleSpinnerIncoming20@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming20.imageset/BubbleSpinnerIncoming20@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming20.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming20.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming20.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming20.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming21.imageset/BubbleSpinnerIncoming21@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming21.imageset/BubbleSpinnerIncoming21@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming21.imageset/BubbleSpinnerIncoming21@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming21.imageset/BubbleSpinnerIncoming21@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming21.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming21.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming21.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming21.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming22.imageset/BubbleSpinnerIncoming22@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming22.imageset/BubbleSpinnerIncoming22@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming22.imageset/BubbleSpinnerIncoming22@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming22.imageset/BubbleSpinnerIncoming22@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming22.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming22.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming22.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming22.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming23.imageset/BubbleSpinnerIncoming23@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming23.imageset/BubbleSpinnerIncoming23@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming23.imageset/BubbleSpinnerIncoming23@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming23.imageset/BubbleSpinnerIncoming23@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming23.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming23.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming23.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming23.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming24.imageset/BubbleSpinnerIncoming24@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming24.imageset/BubbleSpinnerIncoming24@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming24.imageset/BubbleSpinnerIncoming24@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming24.imageset/BubbleSpinnerIncoming24@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming24.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming24.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming24.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming24.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming25.imageset/BubbleSpinnerIncoming25@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming25.imageset/BubbleSpinnerIncoming25@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming25.imageset/BubbleSpinnerIncoming25@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming25.imageset/BubbleSpinnerIncoming25@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming25.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming25.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming25.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming25.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming26.imageset/BubbleSpinnerIncoming26@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming26.imageset/BubbleSpinnerIncoming26@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming26.imageset/BubbleSpinnerIncoming26@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming26.imageset/BubbleSpinnerIncoming26@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming26.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming26.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming26.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming26.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming27.imageset/BubbleSpinnerIncoming27@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming27.imageset/BubbleSpinnerIncoming27@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming27.imageset/BubbleSpinnerIncoming27@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming27.imageset/BubbleSpinnerIncoming27@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming27.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming27.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming27.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming27.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming28.imageset/BubbleSpinnerIncoming28@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming28.imageset/BubbleSpinnerIncoming28@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming28.imageset/BubbleSpinnerIncoming28@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming28.imageset/BubbleSpinnerIncoming28@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming28.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming28.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming28.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming28.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming29.imageset/BubbleSpinnerIncoming29@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming29.imageset/BubbleSpinnerIncoming29@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming29.imageset/BubbleSpinnerIncoming29@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming29.imageset/BubbleSpinnerIncoming29@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming29.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming29.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming29.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming29.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming3.imageset/BubbleSpinnerIncoming3@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming3.imageset/BubbleSpinnerIncoming3@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming3.imageset/BubbleSpinnerIncoming3@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming3.imageset/BubbleSpinnerIncoming3@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming3.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming3.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming3.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming3.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming30.imageset/BubbleSpinnerIncoming30@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming30.imageset/BubbleSpinnerIncoming30@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming30.imageset/BubbleSpinnerIncoming30@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming30.imageset/BubbleSpinnerIncoming30@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming30.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming30.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming30.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming30.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming31.imageset/BubbleSpinnerIncoming31@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming31.imageset/BubbleSpinnerIncoming31@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming31.imageset/BubbleSpinnerIncoming31@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming31.imageset/BubbleSpinnerIncoming31@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming31.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming31.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming31.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming31.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming32.imageset/BubbleSpinnerIncoming32@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming32.imageset/BubbleSpinnerIncoming32@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming32.imageset/BubbleSpinnerIncoming32@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming32.imageset/BubbleSpinnerIncoming32@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming32.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming32.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming32.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming32.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming33.imageset/BubbleSpinnerIncoming33@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming33.imageset/BubbleSpinnerIncoming33@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming33.imageset/BubbleSpinnerIncoming33@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming33.imageset/BubbleSpinnerIncoming33@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming33.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming33.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming33.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming33.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming34.imageset/BubbleSpinnerIncoming34@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming34.imageset/BubbleSpinnerIncoming34@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming34.imageset/BubbleSpinnerIncoming34@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming34.imageset/BubbleSpinnerIncoming34@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming34.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming34.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming34.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming34.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming35.imageset/BubbleSpinnerIncoming35@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming35.imageset/BubbleSpinnerIncoming35@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming35.imageset/BubbleSpinnerIncoming35@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming35.imageset/BubbleSpinnerIncoming35@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming35.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming35.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming35.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming35.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming36.imageset/BubbleSpinnerIncoming36@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming36.imageset/BubbleSpinnerIncoming36@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming36.imageset/BubbleSpinnerIncoming36@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming36.imageset/BubbleSpinnerIncoming36@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming36.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming36.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming36.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming36.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming37.imageset/BubbleSpinnerIncoming37@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming37.imageset/BubbleSpinnerIncoming37@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming37.imageset/BubbleSpinnerIncoming37@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming37.imageset/BubbleSpinnerIncoming37@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming37.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming37.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming37.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming37.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming38.imageset/BubbleSpinnerIncoming38@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming38.imageset/BubbleSpinnerIncoming38@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming38.imageset/BubbleSpinnerIncoming38@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming38.imageset/BubbleSpinnerIncoming38@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming38.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming38.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming38.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming38.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming4.imageset/BubbleSpinnerIncoming4@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming4.imageset/BubbleSpinnerIncoming4@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming4.imageset/BubbleSpinnerIncoming4@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming4.imageset/BubbleSpinnerIncoming4@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming4.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming4.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming4.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming4.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming5.imageset/BubbleSpinnerIncoming5@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming5.imageset/BubbleSpinnerIncoming5@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming5.imageset/BubbleSpinnerIncoming5@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming5.imageset/BubbleSpinnerIncoming5@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming5.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming5.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming5.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming5.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming6.imageset/BubbleSpinnerIncoming6@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming6.imageset/BubbleSpinnerIncoming6@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming6.imageset/BubbleSpinnerIncoming6@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming6.imageset/BubbleSpinnerIncoming6@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming6.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming6.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming6.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming6.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming7.imageset/BubbleSpinnerIncoming7@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming7.imageset/BubbleSpinnerIncoming7@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming7.imageset/BubbleSpinnerIncoming7@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming7.imageset/BubbleSpinnerIncoming7@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming7.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming7.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming7.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming7.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming8.imageset/BubbleSpinnerIncoming8@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming8.imageset/BubbleSpinnerIncoming8@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming8.imageset/BubbleSpinnerIncoming8@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming8.imageset/BubbleSpinnerIncoming8@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming8.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming8.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming8.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming8.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming9.imageset/BubbleSpinnerIncoming9@2x.png b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming9.imageset/BubbleSpinnerIncoming9@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming9.imageset/BubbleSpinnerIncoming9@2x.png
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming9.imageset/BubbleSpinnerIncoming9@2x.png
diff --git a/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming9.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming9.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming9.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/BubbleSpinnerIncoming9.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Contents.json b/Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/BubbleSpinnerIncoming/Contents.json
diff --git a/Watch/App/Assets.xcassets/ChatBubbleChannel.imageset/BubbleChannel@2x.png b/Telegram/Watch/App/Assets.xcassets/ChatBubbleChannel.imageset/BubbleChannel@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/ChatBubbleChannel.imageset/BubbleChannel@2x.png
rename to Telegram/Watch/App/Assets.xcassets/ChatBubbleChannel.imageset/BubbleChannel@2x.png
diff --git a/Watch/App/Assets.xcassets/ChatBubbleChannel.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/ChatBubbleChannel.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/ChatBubbleChannel.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/ChatBubbleChannel.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/ChatBubbleIncoming.imageset/BubbleIncoming@2x.png b/Telegram/Watch/App/Assets.xcassets/ChatBubbleIncoming.imageset/BubbleIncoming@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/ChatBubbleIncoming.imageset/BubbleIncoming@2x.png
rename to Telegram/Watch/App/Assets.xcassets/ChatBubbleIncoming.imageset/BubbleIncoming@2x.png
diff --git a/Watch/App/Assets.xcassets/ChatBubbleIncoming.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/ChatBubbleIncoming.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/ChatBubbleIncoming.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/ChatBubbleIncoming.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/ChatBubbleOutgoing.imageset/BubbleOutgoing@2x.png b/Telegram/Watch/App/Assets.xcassets/ChatBubbleOutgoing.imageset/BubbleOutgoing@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/ChatBubbleOutgoing.imageset/BubbleOutgoing@2x.png
rename to Telegram/Watch/App/Assets.xcassets/ChatBubbleOutgoing.imageset/BubbleOutgoing@2x.png
diff --git a/Watch/App/Assets.xcassets/ChatBubbleOutgoing.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/ChatBubbleOutgoing.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/ChatBubbleOutgoing.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/ChatBubbleOutgoing.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Complication.complicationset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Complication.complicationset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Complication.complicationset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Complication.complicationset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Complication.complicationset/Extra Large.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Complication.complicationset/Extra Large.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Complication.complicationset/Extra Large.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Complication.complicationset/Extra Large.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Complication.complicationset/Graphic Bezel.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Complication.complicationset/Graphic Bezel.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Complication.complicationset/Graphic Bezel.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Complication.complicationset/Graphic Bezel.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Complication.complicationset/Graphic Circular.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Complication.complicationset/Graphic Circular.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Complication.complicationset/Graphic Circular.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Complication.complicationset/Graphic Circular.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Complication.complicationset/Graphic Corner.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Complication.complicationset/Graphic Corner.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Complication.complicationset/Graphic Corner.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Complication.complicationset/Graphic Corner.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Complication.complicationset/Graphic Large Rectangular.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Complication.complicationset/Graphic Large Rectangular.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Complication.complicationset/Graphic Large Rectangular.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Complication.complicationset/Graphic Large Rectangular.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Compose.imageset/Compose@2x.png b/Telegram/Watch/App/Assets.xcassets/Compose.imageset/Compose@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/Compose.imageset/Compose@2x.png
rename to Telegram/Watch/App/Assets.xcassets/Compose.imageset/Compose@2x.png
diff --git a/Watch/App/Assets.xcassets/Compose.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Compose.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Compose.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Compose.imageset/Contents.json
diff --git a/Telegram/Watch/App/Assets.xcassets/Contents.json b/Telegram/Watch/App/Assets.xcassets/Contents.json
new file mode 100644
index 0000000000..da4a164c91
--- /dev/null
+++ b/Telegram/Watch/App/Assets.xcassets/Contents.json
@@ -0,0 +1,6 @@
+{
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/Watch/App/Assets.xcassets/File.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/File.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/File.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/File.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/File.imageset/File@2x.png b/Telegram/Watch/App/Assets.xcassets/File.imageset/File@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/File.imageset/File@2x.png
rename to Telegram/Watch/App/Assets.xcassets/File.imageset/File@2x.png
diff --git a/Watch/App/Assets.xcassets/LocationIcon.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/LocationIcon.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/LocationIcon.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/LocationIcon.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/LocationIcon.imageset/LocationIcon@2x.png b/Telegram/Watch/App/Assets.xcassets/LocationIcon.imageset/LocationIcon@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/LocationIcon.imageset/LocationIcon@2x.png
rename to Telegram/Watch/App/Assets.xcassets/LocationIcon.imageset/LocationIcon@2x.png
diff --git a/Watch/App/Assets.xcassets/LoginIcon.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/LoginIcon.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/LoginIcon.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/LoginIcon.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/LoginIcon.imageset/LoginIcon@2x.png b/Telegram/Watch/App/Assets.xcassets/LoginIcon.imageset/LoginIcon@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/LoginIcon.imageset/LoginIcon@2x.png
rename to Telegram/Watch/App/Assets.xcassets/LoginIcon.imageset/LoginIcon@2x.png
diff --git a/Watch/App/Assets.xcassets/MediaAudio.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/MediaAudio.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/MediaAudio.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/MediaAudio.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/MediaAudio.imageset/MediaAudio@2x.png b/Telegram/Watch/App/Assets.xcassets/MediaAudio.imageset/MediaAudio@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/MediaAudio.imageset/MediaAudio@2x.png
rename to Telegram/Watch/App/Assets.xcassets/MediaAudio.imageset/MediaAudio@2x.png
diff --git a/Watch/App/Assets.xcassets/MediaAudioPlay.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/MediaAudioPlay.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/MediaAudioPlay.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/MediaAudioPlay.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/MediaAudioPlay.imageset/MediaAudioPlay@2x.png b/Telegram/Watch/App/Assets.xcassets/MediaAudioPlay.imageset/MediaAudioPlay@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/MediaAudioPlay.imageset/MediaAudioPlay@2x.png
rename to Telegram/Watch/App/Assets.xcassets/MediaAudioPlay.imageset/MediaAudioPlay@2x.png
diff --git a/Watch/App/Assets.xcassets/MediaDocument.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/MediaDocument.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/MediaDocument.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/MediaDocument.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/MediaDocument.imageset/MediaDocument@2x.png b/Telegram/Watch/App/Assets.xcassets/MediaDocument.imageset/MediaDocument@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/MediaDocument.imageset/MediaDocument@2x.png
rename to Telegram/Watch/App/Assets.xcassets/MediaDocument.imageset/MediaDocument@2x.png
diff --git a/Watch/App/Assets.xcassets/MediaLocation.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/MediaLocation.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/MediaLocation.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/MediaLocation.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/MediaLocation.imageset/MediaLocation@2x.png b/Telegram/Watch/App/Assets.xcassets/MediaLocation.imageset/MediaLocation@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/MediaLocation.imageset/MediaLocation@2x.png
rename to Telegram/Watch/App/Assets.xcassets/MediaLocation.imageset/MediaLocation@2x.png
diff --git a/Watch/App/Assets.xcassets/MediaPhoto.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/MediaPhoto.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/MediaPhoto.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/MediaPhoto.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/MediaPhoto.imageset/MediaPhoto@2x.png b/Telegram/Watch/App/Assets.xcassets/MediaPhoto.imageset/MediaPhoto@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/MediaPhoto.imageset/MediaPhoto@2x.png
rename to Telegram/Watch/App/Assets.xcassets/MediaPhoto.imageset/MediaPhoto@2x.png
diff --git a/Watch/App/Assets.xcassets/MediaVideo.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/MediaVideo.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/MediaVideo.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/MediaVideo.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/MediaVideo.imageset/MediaVideo@2x.png b/Telegram/Watch/App/Assets.xcassets/MediaVideo.imageset/MediaVideo@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/MediaVideo.imageset/MediaVideo@2x.png
rename to Telegram/Watch/App/Assets.xcassets/MediaVideo.imageset/MediaVideo@2x.png
diff --git a/Watch/App/Assets.xcassets/MessageStatusDot.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/MessageStatusDot.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/MessageStatusDot.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/MessageStatusDot.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/MessageStatusDot.imageset/MessageStatusDot@2x.png b/Telegram/Watch/App/Assets.xcassets/MessageStatusDot.imageset/MessageStatusDot@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/MessageStatusDot.imageset/MessageStatusDot@2x.png
rename to Telegram/Watch/App/Assets.xcassets/MessageStatusDot.imageset/MessageStatusDot@2x.png
diff --git a/Watch/App/Assets.xcassets/MicAccessIcon.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/MicAccessIcon.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/MicAccessIcon.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/MicAccessIcon.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/MicAccessIcon.imageset/MicIcon@2x.png b/Telegram/Watch/App/Assets.xcassets/MicAccessIcon.imageset/MicIcon@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/MicAccessIcon.imageset/MicIcon@2x.png
rename to Telegram/Watch/App/Assets.xcassets/MicAccessIcon.imageset/MicIcon@2x.png
diff --git a/Watch/App/Assets.xcassets/MicIcon.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/MicIcon.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/MicIcon.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/MicIcon.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/MicIcon.imageset/Mic@2x.png b/Telegram/Watch/App/Assets.xcassets/MicIcon.imageset/Mic@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/MicIcon.imageset/Mic@2x.png
rename to Telegram/Watch/App/Assets.xcassets/MicIcon.imageset/Mic@2x.png
diff --git a/Watch/App/Assets.xcassets/PasscodeIcon.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/PasscodeIcon.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/PasscodeIcon.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/PasscodeIcon.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/PasscodeIcon.imageset/Passcode@2x.png b/Telegram/Watch/App/Assets.xcassets/PasscodeIcon.imageset/Passcode@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/PasscodeIcon.imageset/Passcode@2x.png
rename to Telegram/Watch/App/Assets.xcassets/PasscodeIcon.imageset/Passcode@2x.png
diff --git a/Watch/App/Assets.xcassets/PickLocation.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/PickLocation.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/PickLocation.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/PickLocation.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/PickLocation.imageset/PickLocation@2x.png b/Telegram/Watch/App/Assets.xcassets/PickLocation.imageset/PickLocation@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/PickLocation.imageset/PickLocation@2x.png
rename to Telegram/Watch/App/Assets.xcassets/PickLocation.imageset/PickLocation@2x.png
diff --git a/Watch/App/Assets.xcassets/RemotePhone.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/RemotePhone.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/RemotePhone.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/RemotePhone.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/RemotePhone.imageset/Phone@2x.png b/Telegram/Watch/App/Assets.xcassets/RemotePhone.imageset/Phone@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/RemotePhone.imageset/Phone@2x.png
rename to Telegram/Watch/App/Assets.xcassets/RemotePhone.imageset/Phone@2x.png
diff --git a/Watch/App/Assets.xcassets/RemotePlayVideo.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/RemotePlayVideo.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/RemotePlayVideo.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/RemotePlayVideo.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/RemotePlayVideo.imageset/RemotePlayVideo@2x.png b/Telegram/Watch/App/Assets.xcassets/RemotePlayVideo.imageset/RemotePlayVideo@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/RemotePlayVideo.imageset/RemotePlayVideo@2x.png
rename to Telegram/Watch/App/Assets.xcassets/RemotePlayVideo.imageset/RemotePlayVideo@2x.png
diff --git a/Watch/App/Assets.xcassets/SavedMessages.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/SavedMessages.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/SavedMessages.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/SavedMessages.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/SavedMessages.imageset/SavedMessages@2x.png b/Telegram/Watch/App/Assets.xcassets/SavedMessages.imageset/SavedMessages@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/SavedMessages.imageset/SavedMessages@2x.png
rename to Telegram/Watch/App/Assets.xcassets/SavedMessages.imageset/SavedMessages@2x.png
diff --git a/Watch/App/Assets.xcassets/SavedMessagesAvatar.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/SavedMessagesAvatar.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/SavedMessagesAvatar.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/SavedMessagesAvatar.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/SavedMessagesAvatar.imageset/SavedMessagesAvatar@2x.png b/Telegram/Watch/App/Assets.xcassets/SavedMessagesAvatar.imageset/SavedMessagesAvatar@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/SavedMessagesAvatar.imageset/SavedMessagesAvatar@2x.png
rename to Telegram/Watch/App/Assets.xcassets/SavedMessagesAvatar.imageset/SavedMessagesAvatar@2x.png
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner0.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner0.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner0.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner0.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner0.imageset/Spinner0@2x.png b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner0.imageset/Spinner0@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner0.imageset/Spinner0@2x.png
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner0.imageset/Spinner0@2x.png
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner1.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner1.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner1.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner1.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner1.imageset/Spinner1@2x.png b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner1.imageset/Spinner1@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner1.imageset/Spinner1@2x.png
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner1.imageset/Spinner1@2x.png
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner10.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner10.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner10.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner10.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner10.imageset/Spinner10@2x.png b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner10.imageset/Spinner10@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner10.imageset/Spinner10@2x.png
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner10.imageset/Spinner10@2x.png
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner11.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner11.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner11.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner11.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner11.imageset/Spinner11@2x.png b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner11.imageset/Spinner11@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner11.imageset/Spinner11@2x.png
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner11.imageset/Spinner11@2x.png
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner12.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner12.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner12.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner12.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner12.imageset/Spinner12@2x.png b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner12.imageset/Spinner12@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner12.imageset/Spinner12@2x.png
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner12.imageset/Spinner12@2x.png
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner13.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner13.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner13.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner13.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner13.imageset/Spinner13@2x.png b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner13.imageset/Spinner13@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner13.imageset/Spinner13@2x.png
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner13.imageset/Spinner13@2x.png
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner14.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner14.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner14.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner14.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner14.imageset/Spinner14@2x.png b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner14.imageset/Spinner14@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner14.imageset/Spinner14@2x.png
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner14.imageset/Spinner14@2x.png
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner15.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner15.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner15.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner15.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner15.imageset/Spinner15@2x.png b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner15.imageset/Spinner15@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner15.imageset/Spinner15@2x.png
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner15.imageset/Spinner15@2x.png
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner16.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner16.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner16.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner16.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner16.imageset/Spinner16@2x.png b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner16.imageset/Spinner16@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner16.imageset/Spinner16@2x.png
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner16.imageset/Spinner16@2x.png
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner17.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner17.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner17.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner17.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner17.imageset/Spinner17@2x.png b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner17.imageset/Spinner17@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner17.imageset/Spinner17@2x.png
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner17.imageset/Spinner17@2x.png
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner18.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner18.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner18.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner18.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner18.imageset/Spinner18@2x.png b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner18.imageset/Spinner18@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner18.imageset/Spinner18@2x.png
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner18.imageset/Spinner18@2x.png
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner19.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner19.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner19.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner19.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner19.imageset/Spinner19@2x.png b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner19.imageset/Spinner19@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner19.imageset/Spinner19@2x.png
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner19.imageset/Spinner19@2x.png
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner2.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner2.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner2.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner2.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner2.imageset/Spinner2@2x.png b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner2.imageset/Spinner2@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner2.imageset/Spinner2@2x.png
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner2.imageset/Spinner2@2x.png
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner20.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner20.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner20.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner20.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner20.imageset/Spinner20@2x.png b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner20.imageset/Spinner20@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner20.imageset/Spinner20@2x.png
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner20.imageset/Spinner20@2x.png
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner21.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner21.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner21.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner21.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner21.imageset/Spinner21@2x.png b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner21.imageset/Spinner21@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner21.imageset/Spinner21@2x.png
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner21.imageset/Spinner21@2x.png
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner22.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner22.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner22.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner22.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner22.imageset/Spinner22@2x.png b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner22.imageset/Spinner22@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner22.imageset/Spinner22@2x.png
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner22.imageset/Spinner22@2x.png
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner23.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner23.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner23.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner23.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner23.imageset/Spinner23@2x.png b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner23.imageset/Spinner23@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner23.imageset/Spinner23@2x.png
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner23.imageset/Spinner23@2x.png
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner24.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner24.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner24.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner24.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner24.imageset/Spinner24@2x.png b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner24.imageset/Spinner24@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner24.imageset/Spinner24@2x.png
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner24.imageset/Spinner24@2x.png
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner25.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner25.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner25.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner25.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner25.imageset/Spinner25@2x.png b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner25.imageset/Spinner25@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner25.imageset/Spinner25@2x.png
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner25.imageset/Spinner25@2x.png
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner26.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner26.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner26.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner26.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner26.imageset/Spinner26@2x.png b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner26.imageset/Spinner26@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner26.imageset/Spinner26@2x.png
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner26.imageset/Spinner26@2x.png
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner27.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner27.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner27.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner27.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner27.imageset/Spinner27@2x.png b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner27.imageset/Spinner27@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner27.imageset/Spinner27@2x.png
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner27.imageset/Spinner27@2x.png
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner28.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner28.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner28.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner28.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner28.imageset/Spinner28@2x.png b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner28.imageset/Spinner28@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner28.imageset/Spinner28@2x.png
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner28.imageset/Spinner28@2x.png
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner29.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner29.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner29.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner29.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner29.imageset/Spinner29@2x.png b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner29.imageset/Spinner29@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner29.imageset/Spinner29@2x.png
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner29.imageset/Spinner29@2x.png
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner3.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner3.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner3.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner3.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner3.imageset/Spinner3@2x.png b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner3.imageset/Spinner3@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner3.imageset/Spinner3@2x.png
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner3.imageset/Spinner3@2x.png
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner30.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner30.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner30.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner30.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner30.imageset/Spinner30@2x.png b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner30.imageset/Spinner30@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner30.imageset/Spinner30@2x.png
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner30.imageset/Spinner30@2x.png
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner31.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner31.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner31.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner31.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner31.imageset/Spinner31@2x.png b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner31.imageset/Spinner31@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner31.imageset/Spinner31@2x.png
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner31.imageset/Spinner31@2x.png
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner32.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner32.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner32.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner32.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner32.imageset/Spinner32@2x.png b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner32.imageset/Spinner32@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner32.imageset/Spinner32@2x.png
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner32.imageset/Spinner32@2x.png
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner33.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner33.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner33.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner33.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner33.imageset/Spinner33@2x.png b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner33.imageset/Spinner33@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner33.imageset/Spinner33@2x.png
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner33.imageset/Spinner33@2x.png
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner34.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner34.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner34.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner34.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner34.imageset/Spinner34@2x.png b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner34.imageset/Spinner34@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner34.imageset/Spinner34@2x.png
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner34.imageset/Spinner34@2x.png
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner35.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner35.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner35.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner35.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner35.imageset/Spinner35@2x.png b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner35.imageset/Spinner35@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner35.imageset/Spinner35@2x.png
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner35.imageset/Spinner35@2x.png
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner36.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner36.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner36.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner36.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner36.imageset/Spinner36@2x.png b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner36.imageset/Spinner36@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner36.imageset/Spinner36@2x.png
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner36.imageset/Spinner36@2x.png
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner37.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner37.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner37.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner37.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner37.imageset/Spinner37@2x.png b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner37.imageset/Spinner37@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner37.imageset/Spinner37@2x.png
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner37.imageset/Spinner37@2x.png
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner38.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner38.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner38.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner38.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner38.imageset/Spinner38@2x.png b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner38.imageset/Spinner38@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner38.imageset/Spinner38@2x.png
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner38.imageset/Spinner38@2x.png
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner4.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner4.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner4.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner4.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner4.imageset/Spinner4@2x.png b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner4.imageset/Spinner4@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner4.imageset/Spinner4@2x.png
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner4.imageset/Spinner4@2x.png
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner5.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner5.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner5.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner5.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner5.imageset/Spinner5@2x.png b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner5.imageset/Spinner5@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner5.imageset/Spinner5@2x.png
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner5.imageset/Spinner5@2x.png
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner6.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner6.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner6.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner6.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner6.imageset/Spinner6@2x.png b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner6.imageset/Spinner6@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner6.imageset/Spinner6@2x.png
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner6.imageset/Spinner6@2x.png
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner7.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner7.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner7.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner7.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner7.imageset/Spinner7@2x.png b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner7.imageset/Spinner7@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner7.imageset/Spinner7@2x.png
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner7.imageset/Spinner7@2x.png
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner8.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner8.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner8.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner8.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner8.imageset/Spinner8@2x.png b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner8.imageset/Spinner8@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner8.imageset/Spinner8@2x.png
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner8.imageset/Spinner8@2x.png
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner9.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner9.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner9.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner9.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/Spinner/Spinner9.imageset/Spinner9@2x.png b/Telegram/Watch/App/Assets.xcassets/Spinner/Spinner9.imageset/Spinner9@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/Spinner/Spinner9.imageset/Spinner9@2x.png
rename to Telegram/Watch/App/Assets.xcassets/Spinner/Spinner9.imageset/Spinner9@2x.png
diff --git a/Watch/App/Assets.xcassets/StatusDot.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/StatusDot.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/StatusDot.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/StatusDot.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/StatusDot.imageset/StatusDot@2x.png b/Telegram/Watch/App/Assets.xcassets/StatusDot.imageset/StatusDot@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/StatusDot.imageset/StatusDot@2x.png
rename to Telegram/Watch/App/Assets.xcassets/StatusDot.imageset/StatusDot@2x.png
diff --git a/Watch/App/Assets.xcassets/StickerIcon.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/StickerIcon.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/StickerIcon.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/StickerIcon.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/StickerIcon.imageset/StickerIcon@2x.png b/Telegram/Watch/App/Assets.xcassets/StickerIcon.imageset/StickerIcon@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/StickerIcon.imageset/StickerIcon@2x.png
rename to Telegram/Watch/App/Assets.xcassets/StickerIcon.imageset/StickerIcon@2x.png
diff --git a/Watch/App/Assets.xcassets/VerifiedProfile.imageset/Contents.json b/Telegram/Watch/App/Assets.xcassets/VerifiedProfile.imageset/Contents.json
similarity index 100%
rename from Watch/App/Assets.xcassets/VerifiedProfile.imageset/Contents.json
rename to Telegram/Watch/App/Assets.xcassets/VerifiedProfile.imageset/Contents.json
diff --git a/Watch/App/Assets.xcassets/VerifiedProfile.imageset/VerifiedProfile@2x.png b/Telegram/Watch/App/Assets.xcassets/VerifiedProfile.imageset/VerifiedProfile@2x.png
similarity index 100%
rename from Watch/App/Assets.xcassets/VerifiedProfile.imageset/VerifiedProfile@2x.png
rename to Telegram/Watch/App/Assets.xcassets/VerifiedProfile.imageset/VerifiedProfile@2x.png
diff --git a/Watch/App/Base.lproj/Interface.storyboard b/Telegram/Watch/App/Base.lproj/Interface.storyboard
similarity index 100%
rename from Watch/App/Base.lproj/Interface.storyboard
rename to Telegram/Watch/App/Base.lproj/Interface.storyboard
diff --git a/Watch/App/Info.plist b/Telegram/Watch/App/Info.plist
similarity index 100%
rename from Watch/App/Info.plist
rename to Telegram/Watch/App/Info.plist
diff --git a/Watch/Bridge/TGBridgeAudioSignals.h b/Telegram/Watch/Bridge/TGBridgeAudioSignals.h
similarity index 100%
rename from Watch/Bridge/TGBridgeAudioSignals.h
rename to Telegram/Watch/Bridge/TGBridgeAudioSignals.h
diff --git a/Watch/Bridge/TGBridgeAudioSignals.m b/Telegram/Watch/Bridge/TGBridgeAudioSignals.m
similarity index 100%
rename from Watch/Bridge/TGBridgeAudioSignals.m
rename to Telegram/Watch/Bridge/TGBridgeAudioSignals.m
diff --git a/Watch/Bridge/TGBridgeBotReplyMarkup.h b/Telegram/Watch/Bridge/TGBridgeBotReplyMarkup.h
similarity index 100%
rename from Watch/Bridge/TGBridgeBotReplyMarkup.h
rename to Telegram/Watch/Bridge/TGBridgeBotReplyMarkup.h
diff --git a/Watch/Bridge/TGBridgeBotReplyMarkup.m b/Telegram/Watch/Bridge/TGBridgeBotReplyMarkup.m
similarity index 100%
rename from Watch/Bridge/TGBridgeBotReplyMarkup.m
rename to Telegram/Watch/Bridge/TGBridgeBotReplyMarkup.m
diff --git a/Watch/Bridge/TGBridgeBotSignals.h b/Telegram/Watch/Bridge/TGBridgeBotSignals.h
similarity index 100%
rename from Watch/Bridge/TGBridgeBotSignals.h
rename to Telegram/Watch/Bridge/TGBridgeBotSignals.h
diff --git a/Watch/Bridge/TGBridgeBotSignals.m b/Telegram/Watch/Bridge/TGBridgeBotSignals.m
similarity index 100%
rename from Watch/Bridge/TGBridgeBotSignals.m
rename to Telegram/Watch/Bridge/TGBridgeBotSignals.m
diff --git a/Watch/Bridge/TGBridgeChat+TGTableItem.h b/Telegram/Watch/Bridge/TGBridgeChat+TGTableItem.h
similarity index 100%
rename from Watch/Bridge/TGBridgeChat+TGTableItem.h
rename to Telegram/Watch/Bridge/TGBridgeChat+TGTableItem.h
diff --git a/Watch/Bridge/TGBridgeChat+TGTableItem.m b/Telegram/Watch/Bridge/TGBridgeChat+TGTableItem.m
similarity index 100%
rename from Watch/Bridge/TGBridgeChat+TGTableItem.m
rename to Telegram/Watch/Bridge/TGBridgeChat+TGTableItem.m
diff --git a/Watch/Bridge/TGBridgeChatListSignals.h b/Telegram/Watch/Bridge/TGBridgeChatListSignals.h
similarity index 100%
rename from Watch/Bridge/TGBridgeChatListSignals.h
rename to Telegram/Watch/Bridge/TGBridgeChatListSignals.h
diff --git a/Watch/Bridge/TGBridgeChatListSignals.m b/Telegram/Watch/Bridge/TGBridgeChatListSignals.m
similarity index 100%
rename from Watch/Bridge/TGBridgeChatListSignals.m
rename to Telegram/Watch/Bridge/TGBridgeChatListSignals.m
diff --git a/Watch/Bridge/TGBridgeChatMessageListSignals.h b/Telegram/Watch/Bridge/TGBridgeChatMessageListSignals.h
similarity index 100%
rename from Watch/Bridge/TGBridgeChatMessageListSignals.h
rename to Telegram/Watch/Bridge/TGBridgeChatMessageListSignals.h
diff --git a/Watch/Bridge/TGBridgeChatMessageListSignals.m b/Telegram/Watch/Bridge/TGBridgeChatMessageListSignals.m
similarity index 100%
rename from Watch/Bridge/TGBridgeChatMessageListSignals.m
rename to Telegram/Watch/Bridge/TGBridgeChatMessageListSignals.m
diff --git a/Watch/Bridge/TGBridgeClient.h b/Telegram/Watch/Bridge/TGBridgeClient.h
similarity index 100%
rename from Watch/Bridge/TGBridgeClient.h
rename to Telegram/Watch/Bridge/TGBridgeClient.h
diff --git a/Watch/Bridge/TGBridgeClient.m b/Telegram/Watch/Bridge/TGBridgeClient.m
similarity index 100%
rename from Watch/Bridge/TGBridgeClient.m
rename to Telegram/Watch/Bridge/TGBridgeClient.m
diff --git a/Watch/Bridge/TGBridgeContactsSignals.h b/Telegram/Watch/Bridge/TGBridgeContactsSignals.h
similarity index 100%
rename from Watch/Bridge/TGBridgeContactsSignals.h
rename to Telegram/Watch/Bridge/TGBridgeContactsSignals.h
diff --git a/Watch/Bridge/TGBridgeContactsSignals.m b/Telegram/Watch/Bridge/TGBridgeContactsSignals.m
similarity index 100%
rename from Watch/Bridge/TGBridgeContactsSignals.m
rename to Telegram/Watch/Bridge/TGBridgeContactsSignals.m
diff --git a/Watch/Bridge/TGBridgeConversationSignals.h b/Telegram/Watch/Bridge/TGBridgeConversationSignals.h
similarity index 100%
rename from Watch/Bridge/TGBridgeConversationSignals.h
rename to Telegram/Watch/Bridge/TGBridgeConversationSignals.h
diff --git a/Watch/Bridge/TGBridgeConversationSignals.m b/Telegram/Watch/Bridge/TGBridgeConversationSignals.m
similarity index 100%
rename from Watch/Bridge/TGBridgeConversationSignals.m
rename to Telegram/Watch/Bridge/TGBridgeConversationSignals.m
diff --git a/Watch/Bridge/TGBridgeLocationSignals.h b/Telegram/Watch/Bridge/TGBridgeLocationSignals.h
similarity index 100%
rename from Watch/Bridge/TGBridgeLocationSignals.h
rename to Telegram/Watch/Bridge/TGBridgeLocationSignals.h
diff --git a/Watch/Bridge/TGBridgeLocationSignals.m b/Telegram/Watch/Bridge/TGBridgeLocationSignals.m
similarity index 100%
rename from Watch/Bridge/TGBridgeLocationSignals.m
rename to Telegram/Watch/Bridge/TGBridgeLocationSignals.m
diff --git a/Watch/Bridge/TGBridgeLocationVenue+TGTableItem.h b/Telegram/Watch/Bridge/TGBridgeLocationVenue+TGTableItem.h
similarity index 100%
rename from Watch/Bridge/TGBridgeLocationVenue+TGTableItem.h
rename to Telegram/Watch/Bridge/TGBridgeLocationVenue+TGTableItem.h
diff --git a/Watch/Bridge/TGBridgeLocationVenue+TGTableItem.m b/Telegram/Watch/Bridge/TGBridgeLocationVenue+TGTableItem.m
similarity index 100%
rename from Watch/Bridge/TGBridgeLocationVenue+TGTableItem.m
rename to Telegram/Watch/Bridge/TGBridgeLocationVenue+TGTableItem.m
diff --git a/Watch/Bridge/TGBridgeMediaSignals.h b/Telegram/Watch/Bridge/TGBridgeMediaSignals.h
similarity index 100%
rename from Watch/Bridge/TGBridgeMediaSignals.h
rename to Telegram/Watch/Bridge/TGBridgeMediaSignals.h
diff --git a/Watch/Bridge/TGBridgeMediaSignals.m b/Telegram/Watch/Bridge/TGBridgeMediaSignals.m
similarity index 100%
rename from Watch/Bridge/TGBridgeMediaSignals.m
rename to Telegram/Watch/Bridge/TGBridgeMediaSignals.m
diff --git a/Watch/Bridge/TGBridgeMessage+TGTableItem.h b/Telegram/Watch/Bridge/TGBridgeMessage+TGTableItem.h
similarity index 100%
rename from Watch/Bridge/TGBridgeMessage+TGTableItem.h
rename to Telegram/Watch/Bridge/TGBridgeMessage+TGTableItem.h
diff --git a/Watch/Bridge/TGBridgeMessage+TGTableItem.m b/Telegram/Watch/Bridge/TGBridgeMessage+TGTableItem.m
similarity index 100%
rename from Watch/Bridge/TGBridgeMessage+TGTableItem.m
rename to Telegram/Watch/Bridge/TGBridgeMessage+TGTableItem.m
diff --git a/Watch/Bridge/TGBridgePeerSettingsSignals.h b/Telegram/Watch/Bridge/TGBridgePeerSettingsSignals.h
similarity index 100%
rename from Watch/Bridge/TGBridgePeerSettingsSignals.h
rename to Telegram/Watch/Bridge/TGBridgePeerSettingsSignals.h
diff --git a/Watch/Bridge/TGBridgePeerSettingsSignals.m b/Telegram/Watch/Bridge/TGBridgePeerSettingsSignals.m
similarity index 100%
rename from Watch/Bridge/TGBridgePeerSettingsSignals.m
rename to Telegram/Watch/Bridge/TGBridgePeerSettingsSignals.m
diff --git a/Watch/Bridge/TGBridgePresetsSignals.h b/Telegram/Watch/Bridge/TGBridgePresetsSignals.h
similarity index 100%
rename from Watch/Bridge/TGBridgePresetsSignals.h
rename to Telegram/Watch/Bridge/TGBridgePresetsSignals.h
diff --git a/Watch/Bridge/TGBridgePresetsSignals.m b/Telegram/Watch/Bridge/TGBridgePresetsSignals.m
similarity index 100%
rename from Watch/Bridge/TGBridgePresetsSignals.m
rename to Telegram/Watch/Bridge/TGBridgePresetsSignals.m
diff --git a/Watch/Bridge/TGBridgeRemoteSignals.h b/Telegram/Watch/Bridge/TGBridgeRemoteSignals.h
similarity index 100%
rename from Watch/Bridge/TGBridgeRemoteSignals.h
rename to Telegram/Watch/Bridge/TGBridgeRemoteSignals.h
diff --git a/Watch/Bridge/TGBridgeRemoteSignals.m b/Telegram/Watch/Bridge/TGBridgeRemoteSignals.m
similarity index 100%
rename from Watch/Bridge/TGBridgeRemoteSignals.m
rename to Telegram/Watch/Bridge/TGBridgeRemoteSignals.m
diff --git a/Watch/Bridge/TGBridgeSendMessageSignals.h b/Telegram/Watch/Bridge/TGBridgeSendMessageSignals.h
similarity index 100%
rename from Watch/Bridge/TGBridgeSendMessageSignals.h
rename to Telegram/Watch/Bridge/TGBridgeSendMessageSignals.h
diff --git a/Watch/Bridge/TGBridgeSendMessageSignals.m b/Telegram/Watch/Bridge/TGBridgeSendMessageSignals.m
similarity index 100%
rename from Watch/Bridge/TGBridgeSendMessageSignals.m
rename to Telegram/Watch/Bridge/TGBridgeSendMessageSignals.m
diff --git a/Watch/Bridge/TGBridgeStateSignal.h b/Telegram/Watch/Bridge/TGBridgeStateSignal.h
similarity index 100%
rename from Watch/Bridge/TGBridgeStateSignal.h
rename to Telegram/Watch/Bridge/TGBridgeStateSignal.h
diff --git a/Watch/Bridge/TGBridgeStateSignal.m b/Telegram/Watch/Bridge/TGBridgeStateSignal.m
similarity index 100%
rename from Watch/Bridge/TGBridgeStateSignal.m
rename to Telegram/Watch/Bridge/TGBridgeStateSignal.m
diff --git a/Watch/Bridge/TGBridgeStickerPack.h b/Telegram/Watch/Bridge/TGBridgeStickerPack.h
similarity index 100%
rename from Watch/Bridge/TGBridgeStickerPack.h
rename to Telegram/Watch/Bridge/TGBridgeStickerPack.h
diff --git a/Watch/Bridge/TGBridgeStickerPack.m b/Telegram/Watch/Bridge/TGBridgeStickerPack.m
similarity index 100%
rename from Watch/Bridge/TGBridgeStickerPack.m
rename to Telegram/Watch/Bridge/TGBridgeStickerPack.m
diff --git a/Watch/Bridge/TGBridgeStickersSignals.h b/Telegram/Watch/Bridge/TGBridgeStickersSignals.h
similarity index 100%
rename from Watch/Bridge/TGBridgeStickersSignals.h
rename to Telegram/Watch/Bridge/TGBridgeStickersSignals.h
diff --git a/Watch/Bridge/TGBridgeStickersSignals.m b/Telegram/Watch/Bridge/TGBridgeStickersSignals.m
similarity index 100%
rename from Watch/Bridge/TGBridgeStickersSignals.m
rename to Telegram/Watch/Bridge/TGBridgeStickersSignals.m
diff --git a/Watch/Bridge/TGBridgeUser+TGTableItem.h b/Telegram/Watch/Bridge/TGBridgeUser+TGTableItem.h
similarity index 100%
rename from Watch/Bridge/TGBridgeUser+TGTableItem.h
rename to Telegram/Watch/Bridge/TGBridgeUser+TGTableItem.h
diff --git a/Watch/Bridge/TGBridgeUser+TGTableItem.m b/Telegram/Watch/Bridge/TGBridgeUser+TGTableItem.m
similarity index 100%
rename from Watch/Bridge/TGBridgeUser+TGTableItem.m
rename to Telegram/Watch/Bridge/TGBridgeUser+TGTableItem.m
diff --git a/Watch/Bridge/TGBridgeUserInfoSignals.h b/Telegram/Watch/Bridge/TGBridgeUserInfoSignals.h
similarity index 100%
rename from Watch/Bridge/TGBridgeUserInfoSignals.h
rename to Telegram/Watch/Bridge/TGBridgeUserInfoSignals.h
diff --git a/Watch/Bridge/TGBridgeUserInfoSignals.m b/Telegram/Watch/Bridge/TGBridgeUserInfoSignals.m
similarity index 100%
rename from Watch/Bridge/TGBridgeUserInfoSignals.m
rename to Telegram/Watch/Bridge/TGBridgeUserInfoSignals.m
diff --git a/Watch/Extension/Info.plist b/Telegram/Watch/Extension/Info.plist
similarity index 100%
rename from Watch/Extension/Info.plist
rename to Telegram/Watch/Extension/Info.plist
diff --git a/Watch/Extension/Resources/File@2x.png b/Telegram/Watch/Extension/Resources/File@2x.png
similarity index 100%
rename from Watch/Extension/Resources/File@2x.png
rename to Telegram/Watch/Extension/Resources/File@2x.png
diff --git a/Watch/Extension/Resources/Home88@2x.png b/Telegram/Watch/Extension/Resources/Home88@2x.png
similarity index 100%
rename from Watch/Extension/Resources/Home88@2x.png
rename to Telegram/Watch/Extension/Resources/Home88@2x.png
diff --git a/Watch/Extension/Resources/Location@2x.png b/Telegram/Watch/Extension/Resources/Location@2x.png
similarity index 100%
rename from Watch/Extension/Resources/Location@2x.png
rename to Telegram/Watch/Extension/Resources/Location@2x.png
diff --git a/Watch/Extension/Resources/MediaAudio@2x.png b/Telegram/Watch/Extension/Resources/MediaAudio@2x.png
similarity index 100%
rename from Watch/Extension/Resources/MediaAudio@2x.png
rename to Telegram/Watch/Extension/Resources/MediaAudio@2x.png
diff --git a/Watch/Extension/Resources/MediaDocument@2x.png b/Telegram/Watch/Extension/Resources/MediaDocument@2x.png
similarity index 100%
rename from Watch/Extension/Resources/MediaDocument@2x.png
rename to Telegram/Watch/Extension/Resources/MediaDocument@2x.png
diff --git a/Watch/Extension/Resources/MediaLocation@2x.png b/Telegram/Watch/Extension/Resources/MediaLocation@2x.png
similarity index 100%
rename from Watch/Extension/Resources/MediaLocation@2x.png
rename to Telegram/Watch/Extension/Resources/MediaLocation@2x.png
diff --git a/Watch/Extension/Resources/MediaPhoto@2x.png b/Telegram/Watch/Extension/Resources/MediaPhoto@2x.png
similarity index 100%
rename from Watch/Extension/Resources/MediaPhoto@2x.png
rename to Telegram/Watch/Extension/Resources/MediaPhoto@2x.png
diff --git a/Watch/Extension/Resources/MediaVideo@2x.png b/Telegram/Watch/Extension/Resources/MediaVideo@2x.png
similarity index 100%
rename from Watch/Extension/Resources/MediaVideo@2x.png
rename to Telegram/Watch/Extension/Resources/MediaVideo@2x.png
diff --git a/Watch/Extension/Resources/SavedMessagesAvatar@2x.png b/Telegram/Watch/Extension/Resources/SavedMessagesAvatar@2x.png
similarity index 100%
rename from Watch/Extension/Resources/SavedMessagesAvatar@2x.png
rename to Telegram/Watch/Extension/Resources/SavedMessagesAvatar@2x.png
diff --git a/Watch/Extension/Resources/VerifiedList@2x.png b/Telegram/Watch/Extension/Resources/VerifiedList@2x.png
similarity index 100%
rename from Watch/Extension/Resources/VerifiedList@2x.png
rename to Telegram/Watch/Extension/Resources/VerifiedList@2x.png
diff --git a/Watch/Extension/SSignalKit/SAtomic.h b/Telegram/Watch/Extension/SSignalKit/SAtomic.h
similarity index 100%
rename from Watch/Extension/SSignalKit/SAtomic.h
rename to Telegram/Watch/Extension/SSignalKit/SAtomic.h
diff --git a/Watch/Extension/SSignalKit/SAtomic.m b/Telegram/Watch/Extension/SSignalKit/SAtomic.m
similarity index 100%
rename from Watch/Extension/SSignalKit/SAtomic.m
rename to Telegram/Watch/Extension/SSignalKit/SAtomic.m
diff --git a/Watch/Extension/SSignalKit/SBag.h b/Telegram/Watch/Extension/SSignalKit/SBag.h
similarity index 100%
rename from Watch/Extension/SSignalKit/SBag.h
rename to Telegram/Watch/Extension/SSignalKit/SBag.h
diff --git a/Watch/Extension/SSignalKit/SBag.m b/Telegram/Watch/Extension/SSignalKit/SBag.m
similarity index 100%
rename from Watch/Extension/SSignalKit/SBag.m
rename to Telegram/Watch/Extension/SSignalKit/SBag.m
diff --git a/Watch/Extension/SSignalKit/SBlockDisposable.h b/Telegram/Watch/Extension/SSignalKit/SBlockDisposable.h
similarity index 100%
rename from Watch/Extension/SSignalKit/SBlockDisposable.h
rename to Telegram/Watch/Extension/SSignalKit/SBlockDisposable.h
diff --git a/Watch/Extension/SSignalKit/SBlockDisposable.m b/Telegram/Watch/Extension/SSignalKit/SBlockDisposable.m
similarity index 100%
rename from Watch/Extension/SSignalKit/SBlockDisposable.m
rename to Telegram/Watch/Extension/SSignalKit/SBlockDisposable.m
diff --git a/Watch/Extension/SSignalKit/SDisposable.h b/Telegram/Watch/Extension/SSignalKit/SDisposable.h
similarity index 100%
rename from Watch/Extension/SSignalKit/SDisposable.h
rename to Telegram/Watch/Extension/SSignalKit/SDisposable.h
diff --git a/Watch/Extension/SSignalKit/SDisposableSet.h b/Telegram/Watch/Extension/SSignalKit/SDisposableSet.h
similarity index 100%
rename from Watch/Extension/SSignalKit/SDisposableSet.h
rename to Telegram/Watch/Extension/SSignalKit/SDisposableSet.h
diff --git a/Watch/Extension/SSignalKit/SDisposableSet.m b/Telegram/Watch/Extension/SSignalKit/SDisposableSet.m
similarity index 100%
rename from Watch/Extension/SSignalKit/SDisposableSet.m
rename to Telegram/Watch/Extension/SSignalKit/SDisposableSet.m
diff --git a/Watch/Extension/SSignalKit/SMetaDisposable.h b/Telegram/Watch/Extension/SSignalKit/SMetaDisposable.h
similarity index 100%
rename from Watch/Extension/SSignalKit/SMetaDisposable.h
rename to Telegram/Watch/Extension/SSignalKit/SMetaDisposable.h
diff --git a/Watch/Extension/SSignalKit/SMetaDisposable.m b/Telegram/Watch/Extension/SSignalKit/SMetaDisposable.m
similarity index 100%
rename from Watch/Extension/SSignalKit/SMetaDisposable.m
rename to Telegram/Watch/Extension/SSignalKit/SMetaDisposable.m
diff --git a/Watch/Extension/SSignalKit/SMulticastSignalManager.h b/Telegram/Watch/Extension/SSignalKit/SMulticastSignalManager.h
similarity index 100%
rename from Watch/Extension/SSignalKit/SMulticastSignalManager.h
rename to Telegram/Watch/Extension/SSignalKit/SMulticastSignalManager.h
diff --git a/Watch/Extension/SSignalKit/SMulticastSignalManager.m b/Telegram/Watch/Extension/SSignalKit/SMulticastSignalManager.m
similarity index 100%
rename from Watch/Extension/SSignalKit/SMulticastSignalManager.m
rename to Telegram/Watch/Extension/SSignalKit/SMulticastSignalManager.m
diff --git a/Watch/Extension/SSignalKit/SQueue.h b/Telegram/Watch/Extension/SSignalKit/SQueue.h
similarity index 100%
rename from Watch/Extension/SSignalKit/SQueue.h
rename to Telegram/Watch/Extension/SSignalKit/SQueue.h
diff --git a/Watch/Extension/SSignalKit/SQueue.m b/Telegram/Watch/Extension/SSignalKit/SQueue.m
similarity index 100%
rename from Watch/Extension/SSignalKit/SQueue.m
rename to Telegram/Watch/Extension/SSignalKit/SQueue.m
diff --git a/Watch/Extension/SSignalKit/SSignal+Accumulate.h b/Telegram/Watch/Extension/SSignalKit/SSignal+Accumulate.h
similarity index 100%
rename from Watch/Extension/SSignalKit/SSignal+Accumulate.h
rename to Telegram/Watch/Extension/SSignalKit/SSignal+Accumulate.h
diff --git a/Watch/Extension/SSignalKit/SSignal+Accumulate.m b/Telegram/Watch/Extension/SSignalKit/SSignal+Accumulate.m
similarity index 100%
rename from Watch/Extension/SSignalKit/SSignal+Accumulate.m
rename to Telegram/Watch/Extension/SSignalKit/SSignal+Accumulate.m
diff --git a/Watch/Extension/SSignalKit/SSignal+Catch.h b/Telegram/Watch/Extension/SSignalKit/SSignal+Catch.h
similarity index 100%
rename from Watch/Extension/SSignalKit/SSignal+Catch.h
rename to Telegram/Watch/Extension/SSignalKit/SSignal+Catch.h
diff --git a/Watch/Extension/SSignalKit/SSignal+Catch.m b/Telegram/Watch/Extension/SSignalKit/SSignal+Catch.m
similarity index 100%
rename from Watch/Extension/SSignalKit/SSignal+Catch.m
rename to Telegram/Watch/Extension/SSignalKit/SSignal+Catch.m
diff --git a/Watch/Extension/SSignalKit/SSignal+Combine.h b/Telegram/Watch/Extension/SSignalKit/SSignal+Combine.h
similarity index 100%
rename from Watch/Extension/SSignalKit/SSignal+Combine.h
rename to Telegram/Watch/Extension/SSignalKit/SSignal+Combine.h
diff --git a/Watch/Extension/SSignalKit/SSignal+Combine.m b/Telegram/Watch/Extension/SSignalKit/SSignal+Combine.m
similarity index 100%
rename from Watch/Extension/SSignalKit/SSignal+Combine.m
rename to Telegram/Watch/Extension/SSignalKit/SSignal+Combine.m
diff --git a/Watch/Extension/SSignalKit/SSignal+Dispatch.h b/Telegram/Watch/Extension/SSignalKit/SSignal+Dispatch.h
similarity index 100%
rename from Watch/Extension/SSignalKit/SSignal+Dispatch.h
rename to Telegram/Watch/Extension/SSignalKit/SSignal+Dispatch.h
diff --git a/Watch/Extension/SSignalKit/SSignal+Dispatch.m b/Telegram/Watch/Extension/SSignalKit/SSignal+Dispatch.m
similarity index 100%
rename from Watch/Extension/SSignalKit/SSignal+Dispatch.m
rename to Telegram/Watch/Extension/SSignalKit/SSignal+Dispatch.m
diff --git a/Watch/Extension/SSignalKit/SSignal+Mapping.h b/Telegram/Watch/Extension/SSignalKit/SSignal+Mapping.h
similarity index 100%
rename from Watch/Extension/SSignalKit/SSignal+Mapping.h
rename to Telegram/Watch/Extension/SSignalKit/SSignal+Mapping.h
diff --git a/Watch/Extension/SSignalKit/SSignal+Mapping.m b/Telegram/Watch/Extension/SSignalKit/SSignal+Mapping.m
similarity index 100%
rename from Watch/Extension/SSignalKit/SSignal+Mapping.m
rename to Telegram/Watch/Extension/SSignalKit/SSignal+Mapping.m
diff --git a/Watch/Extension/SSignalKit/SSignal+Meta.h b/Telegram/Watch/Extension/SSignalKit/SSignal+Meta.h
similarity index 100%
rename from Watch/Extension/SSignalKit/SSignal+Meta.h
rename to Telegram/Watch/Extension/SSignalKit/SSignal+Meta.h
diff --git a/Watch/Extension/SSignalKit/SSignal+Meta.m b/Telegram/Watch/Extension/SSignalKit/SSignal+Meta.m
similarity index 100%
rename from Watch/Extension/SSignalKit/SSignal+Meta.m
rename to Telegram/Watch/Extension/SSignalKit/SSignal+Meta.m
diff --git a/Watch/Extension/SSignalKit/SSignal+Multicast.h b/Telegram/Watch/Extension/SSignalKit/SSignal+Multicast.h
similarity index 100%
rename from Watch/Extension/SSignalKit/SSignal+Multicast.h
rename to Telegram/Watch/Extension/SSignalKit/SSignal+Multicast.h
diff --git a/Watch/Extension/SSignalKit/SSignal+Multicast.m b/Telegram/Watch/Extension/SSignalKit/SSignal+Multicast.m
similarity index 100%
rename from Watch/Extension/SSignalKit/SSignal+Multicast.m
rename to Telegram/Watch/Extension/SSignalKit/SSignal+Multicast.m
diff --git a/Watch/Extension/SSignalKit/SSignal+Pipe.h b/Telegram/Watch/Extension/SSignalKit/SSignal+Pipe.h
similarity index 100%
rename from Watch/Extension/SSignalKit/SSignal+Pipe.h
rename to Telegram/Watch/Extension/SSignalKit/SSignal+Pipe.h
diff --git a/Watch/Extension/SSignalKit/SSignal+Pipe.m b/Telegram/Watch/Extension/SSignalKit/SSignal+Pipe.m
similarity index 100%
rename from Watch/Extension/SSignalKit/SSignal+Pipe.m
rename to Telegram/Watch/Extension/SSignalKit/SSignal+Pipe.m
diff --git a/Watch/Extension/SSignalKit/SSignal+SideEffects.h b/Telegram/Watch/Extension/SSignalKit/SSignal+SideEffects.h
similarity index 100%
rename from Watch/Extension/SSignalKit/SSignal+SideEffects.h
rename to Telegram/Watch/Extension/SSignalKit/SSignal+SideEffects.h
diff --git a/Watch/Extension/SSignalKit/SSignal+SideEffects.m b/Telegram/Watch/Extension/SSignalKit/SSignal+SideEffects.m
similarity index 100%
rename from Watch/Extension/SSignalKit/SSignal+SideEffects.m
rename to Telegram/Watch/Extension/SSignalKit/SSignal+SideEffects.m
diff --git a/Watch/Extension/SSignalKit/SSignal+Single.h b/Telegram/Watch/Extension/SSignalKit/SSignal+Single.h
similarity index 100%
rename from Watch/Extension/SSignalKit/SSignal+Single.h
rename to Telegram/Watch/Extension/SSignalKit/SSignal+Single.h
diff --git a/Watch/Extension/SSignalKit/SSignal+Single.m b/Telegram/Watch/Extension/SSignalKit/SSignal+Single.m
similarity index 100%
rename from Watch/Extension/SSignalKit/SSignal+Single.m
rename to Telegram/Watch/Extension/SSignalKit/SSignal+Single.m
diff --git a/Watch/Extension/SSignalKit/SSignal+Take.h b/Telegram/Watch/Extension/SSignalKit/SSignal+Take.h
similarity index 100%
rename from Watch/Extension/SSignalKit/SSignal+Take.h
rename to Telegram/Watch/Extension/SSignalKit/SSignal+Take.h
diff --git a/Watch/Extension/SSignalKit/SSignal+Take.m b/Telegram/Watch/Extension/SSignalKit/SSignal+Take.m
similarity index 100%
rename from Watch/Extension/SSignalKit/SSignal+Take.m
rename to Telegram/Watch/Extension/SSignalKit/SSignal+Take.m
diff --git a/Watch/Extension/SSignalKit/SSignal+Timing.h b/Telegram/Watch/Extension/SSignalKit/SSignal+Timing.h
similarity index 100%
rename from Watch/Extension/SSignalKit/SSignal+Timing.h
rename to Telegram/Watch/Extension/SSignalKit/SSignal+Timing.h
diff --git a/Watch/Extension/SSignalKit/SSignal+Timing.m b/Telegram/Watch/Extension/SSignalKit/SSignal+Timing.m
similarity index 100%
rename from Watch/Extension/SSignalKit/SSignal+Timing.m
rename to Telegram/Watch/Extension/SSignalKit/SSignal+Timing.m
diff --git a/Watch/Extension/SSignalKit/SSignal.h b/Telegram/Watch/Extension/SSignalKit/SSignal.h
similarity index 100%
rename from Watch/Extension/SSignalKit/SSignal.h
rename to Telegram/Watch/Extension/SSignalKit/SSignal.h
diff --git a/Watch/Extension/SSignalKit/SSignal.m b/Telegram/Watch/Extension/SSignalKit/SSignal.m
similarity index 100%
rename from Watch/Extension/SSignalKit/SSignal.m
rename to Telegram/Watch/Extension/SSignalKit/SSignal.m
diff --git a/Watch/Extension/SSignalKit/SSignalKit.h b/Telegram/Watch/Extension/SSignalKit/SSignalKit.h
similarity index 100%
rename from Watch/Extension/SSignalKit/SSignalKit.h
rename to Telegram/Watch/Extension/SSignalKit/SSignalKit.h
diff --git a/Watch/Extension/SSignalKit/SSubscriber.h b/Telegram/Watch/Extension/SSignalKit/SSubscriber.h
similarity index 100%
rename from Watch/Extension/SSignalKit/SSubscriber.h
rename to Telegram/Watch/Extension/SSignalKit/SSubscriber.h
diff --git a/Watch/Extension/SSignalKit/SSubscriber.m b/Telegram/Watch/Extension/SSignalKit/SSubscriber.m
similarity index 100%
rename from Watch/Extension/SSignalKit/SSubscriber.m
rename to Telegram/Watch/Extension/SSignalKit/SSubscriber.m
diff --git a/Watch/Extension/SSignalKit/SThreadPool.h b/Telegram/Watch/Extension/SSignalKit/SThreadPool.h
similarity index 100%
rename from Watch/Extension/SSignalKit/SThreadPool.h
rename to Telegram/Watch/Extension/SSignalKit/SThreadPool.h
diff --git a/Watch/Extension/SSignalKit/SThreadPool.m b/Telegram/Watch/Extension/SSignalKit/SThreadPool.m
similarity index 100%
rename from Watch/Extension/SSignalKit/SThreadPool.m
rename to Telegram/Watch/Extension/SSignalKit/SThreadPool.m
diff --git a/Watch/Extension/SSignalKit/SThreadPoolQueue.h b/Telegram/Watch/Extension/SSignalKit/SThreadPoolQueue.h
similarity index 100%
rename from Watch/Extension/SSignalKit/SThreadPoolQueue.h
rename to Telegram/Watch/Extension/SSignalKit/SThreadPoolQueue.h
diff --git a/Watch/Extension/SSignalKit/SThreadPoolQueue.m b/Telegram/Watch/Extension/SSignalKit/SThreadPoolQueue.m
similarity index 100%
rename from Watch/Extension/SSignalKit/SThreadPoolQueue.m
rename to Telegram/Watch/Extension/SSignalKit/SThreadPoolQueue.m
diff --git a/Watch/Extension/SSignalKit/SThreadPoolTask.h b/Telegram/Watch/Extension/SSignalKit/SThreadPoolTask.h
similarity index 100%
rename from Watch/Extension/SSignalKit/SThreadPoolTask.h
rename to Telegram/Watch/Extension/SSignalKit/SThreadPoolTask.h
diff --git a/Watch/Extension/SSignalKit/SThreadPoolTask.m b/Telegram/Watch/Extension/SSignalKit/SThreadPoolTask.m
similarity index 100%
rename from Watch/Extension/SSignalKit/SThreadPoolTask.m
rename to Telegram/Watch/Extension/SSignalKit/SThreadPoolTask.m
diff --git a/Watch/Extension/SSignalKit/STimer.h b/Telegram/Watch/Extension/SSignalKit/STimer.h
similarity index 100%
rename from Watch/Extension/SSignalKit/STimer.h
rename to Telegram/Watch/Extension/SSignalKit/STimer.h
diff --git a/Watch/Extension/SSignalKit/STimer.m b/Telegram/Watch/Extension/SSignalKit/STimer.m
similarity index 100%
rename from Watch/Extension/SSignalKit/STimer.m
rename to Telegram/Watch/Extension/SSignalKit/STimer.m
diff --git a/Watch/Extension/SSignalKit/SVariable.h b/Telegram/Watch/Extension/SSignalKit/SVariable.h
similarity index 100%
rename from Watch/Extension/SSignalKit/SVariable.h
rename to Telegram/Watch/Extension/SSignalKit/SVariable.h
diff --git a/Watch/Extension/SSignalKit/SVariable.m b/Telegram/Watch/Extension/SSignalKit/SVariable.m
similarity index 100%
rename from Watch/Extension/SSignalKit/SVariable.m
rename to Telegram/Watch/Extension/SSignalKit/SVariable.m
diff --git a/Watch/Extension/TGAudioMicAlertController.h b/Telegram/Watch/Extension/TGAudioMicAlertController.h
similarity index 100%
rename from Watch/Extension/TGAudioMicAlertController.h
rename to Telegram/Watch/Extension/TGAudioMicAlertController.h
diff --git a/Watch/Extension/TGAudioMicAlertController.m b/Telegram/Watch/Extension/TGAudioMicAlertController.m
similarity index 100%
rename from Watch/Extension/TGAudioMicAlertController.m
rename to Telegram/Watch/Extension/TGAudioMicAlertController.m
diff --git a/Watch/Extension/TGAvatarViewModel.h b/Telegram/Watch/Extension/TGAvatarViewModel.h
similarity index 100%
rename from Watch/Extension/TGAvatarViewModel.h
rename to Telegram/Watch/Extension/TGAvatarViewModel.h
diff --git a/Watch/Extension/TGAvatarViewModel.m b/Telegram/Watch/Extension/TGAvatarViewModel.m
similarity index 100%
rename from Watch/Extension/TGAvatarViewModel.m
rename to Telegram/Watch/Extension/TGAvatarViewModel.m
diff --git a/Watch/Extension/TGBotCommandController.h b/Telegram/Watch/Extension/TGBotCommandController.h
similarity index 100%
rename from Watch/Extension/TGBotCommandController.h
rename to Telegram/Watch/Extension/TGBotCommandController.h
diff --git a/Watch/Extension/TGBotCommandController.m b/Telegram/Watch/Extension/TGBotCommandController.m
similarity index 100%
rename from Watch/Extension/TGBotCommandController.m
rename to Telegram/Watch/Extension/TGBotCommandController.m
diff --git a/Watch/Extension/TGBotKeyboardButtonController.h b/Telegram/Watch/Extension/TGBotKeyboardButtonController.h
similarity index 100%
rename from Watch/Extension/TGBotKeyboardButtonController.h
rename to Telegram/Watch/Extension/TGBotKeyboardButtonController.h
diff --git a/Watch/Extension/TGBotKeyboardButtonController.m b/Telegram/Watch/Extension/TGBotKeyboardButtonController.m
similarity index 100%
rename from Watch/Extension/TGBotKeyboardButtonController.m
rename to Telegram/Watch/Extension/TGBotKeyboardButtonController.m
diff --git a/Watch/Extension/TGBotKeyboardController.h b/Telegram/Watch/Extension/TGBotKeyboardController.h
similarity index 100%
rename from Watch/Extension/TGBotKeyboardController.h
rename to Telegram/Watch/Extension/TGBotKeyboardController.h
diff --git a/Watch/Extension/TGBotKeyboardController.m b/Telegram/Watch/Extension/TGBotKeyboardController.m
similarity index 100%
rename from Watch/Extension/TGBotKeyboardController.m
rename to Telegram/Watch/Extension/TGBotKeyboardController.m
diff --git a/Watch/Extension/TGBridgeUserCache.h b/Telegram/Watch/Extension/TGBridgeUserCache.h
similarity index 100%
rename from Watch/Extension/TGBridgeUserCache.h
rename to Telegram/Watch/Extension/TGBridgeUserCache.h
diff --git a/Watch/Extension/TGBridgeUserCache.m b/Telegram/Watch/Extension/TGBridgeUserCache.m
similarity index 100%
rename from Watch/Extension/TGBridgeUserCache.m
rename to Telegram/Watch/Extension/TGBridgeUserCache.m
diff --git a/Watch/Extension/TGChatInfo.h b/Telegram/Watch/Extension/TGChatInfo.h
similarity index 100%
rename from Watch/Extension/TGChatInfo.h
rename to Telegram/Watch/Extension/TGChatInfo.h
diff --git a/Watch/Extension/TGChatInfo.m b/Telegram/Watch/Extension/TGChatInfo.m
similarity index 100%
rename from Watch/Extension/TGChatInfo.m
rename to Telegram/Watch/Extension/TGChatInfo.m
diff --git a/Watch/Extension/TGChatTimestamp.h b/Telegram/Watch/Extension/TGChatTimestamp.h
similarity index 100%
rename from Watch/Extension/TGChatTimestamp.h
rename to Telegram/Watch/Extension/TGChatTimestamp.h
diff --git a/Watch/Extension/TGChatTimestamp.m b/Telegram/Watch/Extension/TGChatTimestamp.m
similarity index 100%
rename from Watch/Extension/TGChatTimestamp.m
rename to Telegram/Watch/Extension/TGChatTimestamp.m
diff --git a/Watch/Extension/TGComplicationController.h b/Telegram/Watch/Extension/TGComplicationController.h
similarity index 100%
rename from Watch/Extension/TGComplicationController.h
rename to Telegram/Watch/Extension/TGComplicationController.h
diff --git a/Watch/Extension/TGComplicationController.m b/Telegram/Watch/Extension/TGComplicationController.m
similarity index 100%
rename from Watch/Extension/TGComplicationController.m
rename to Telegram/Watch/Extension/TGComplicationController.m
diff --git a/Watch/Extension/TGComposeController.h b/Telegram/Watch/Extension/TGComposeController.h
similarity index 100%
rename from Watch/Extension/TGComposeController.h
rename to Telegram/Watch/Extension/TGComposeController.h
diff --git a/Watch/Extension/TGComposeController.m b/Telegram/Watch/Extension/TGComposeController.m
similarity index 100%
rename from Watch/Extension/TGComposeController.m
rename to Telegram/Watch/Extension/TGComposeController.m
diff --git a/Watch/Extension/TGContactsController.h b/Telegram/Watch/Extension/TGContactsController.h
similarity index 100%
rename from Watch/Extension/TGContactsController.h
rename to Telegram/Watch/Extension/TGContactsController.h
diff --git a/Watch/Extension/TGContactsController.m b/Telegram/Watch/Extension/TGContactsController.m
similarity index 100%
rename from Watch/Extension/TGContactsController.m
rename to Telegram/Watch/Extension/TGContactsController.m
diff --git a/Watch/Extension/TGConversationFooterController.h b/Telegram/Watch/Extension/TGConversationFooterController.h
similarity index 100%
rename from Watch/Extension/TGConversationFooterController.h
rename to Telegram/Watch/Extension/TGConversationFooterController.h
diff --git a/Watch/Extension/TGConversationFooterController.m b/Telegram/Watch/Extension/TGConversationFooterController.m
similarity index 100%
rename from Watch/Extension/TGConversationFooterController.m
rename to Telegram/Watch/Extension/TGConversationFooterController.m
diff --git a/Watch/Extension/TGDateUtils.h b/Telegram/Watch/Extension/TGDateUtils.h
similarity index 100%
rename from Watch/Extension/TGDateUtils.h
rename to Telegram/Watch/Extension/TGDateUtils.h
diff --git a/Watch/Extension/TGDateUtils.m b/Telegram/Watch/Extension/TGDateUtils.m
similarity index 100%
rename from Watch/Extension/TGDateUtils.m
rename to Telegram/Watch/Extension/TGDateUtils.m
diff --git a/Watch/Extension/TGExtensionDelegate.h b/Telegram/Watch/Extension/TGExtensionDelegate.h
similarity index 100%
rename from Watch/Extension/TGExtensionDelegate.h
rename to Telegram/Watch/Extension/TGExtensionDelegate.h
diff --git a/Watch/Extension/TGExtensionDelegate.m b/Telegram/Watch/Extension/TGExtensionDelegate.m
similarity index 100%
rename from Watch/Extension/TGExtensionDelegate.m
rename to Telegram/Watch/Extension/TGExtensionDelegate.m
diff --git a/Watch/Extension/TGFileCache.h b/Telegram/Watch/Extension/TGFileCache.h
similarity index 100%
rename from Watch/Extension/TGFileCache.h
rename to Telegram/Watch/Extension/TGFileCache.h
diff --git a/Watch/Extension/TGFileCache.m b/Telegram/Watch/Extension/TGFileCache.m
similarity index 100%
rename from Watch/Extension/TGFileCache.m
rename to Telegram/Watch/Extension/TGFileCache.m
diff --git a/Watch/Extension/TGGeometry.h b/Telegram/Watch/Extension/TGGeometry.h
similarity index 100%
rename from Watch/Extension/TGGeometry.h
rename to Telegram/Watch/Extension/TGGeometry.h
diff --git a/Watch/Extension/TGGeometry.m b/Telegram/Watch/Extension/TGGeometry.m
similarity index 100%
rename from Watch/Extension/TGGeometry.m
rename to Telegram/Watch/Extension/TGGeometry.m
diff --git a/Watch/Extension/TGGroupInfoController.h b/Telegram/Watch/Extension/TGGroupInfoController.h
similarity index 100%
rename from Watch/Extension/TGGroupInfoController.h
rename to Telegram/Watch/Extension/TGGroupInfoController.h
diff --git a/Watch/Extension/TGGroupInfoController.m b/Telegram/Watch/Extension/TGGroupInfoController.m
similarity index 100%
rename from Watch/Extension/TGGroupInfoController.m
rename to Telegram/Watch/Extension/TGGroupInfoController.m
diff --git a/Watch/Extension/TGGroupInfoFooterController.h b/Telegram/Watch/Extension/TGGroupInfoFooterController.h
similarity index 100%
rename from Watch/Extension/TGGroupInfoFooterController.h
rename to Telegram/Watch/Extension/TGGroupInfoFooterController.h
diff --git a/Watch/Extension/TGGroupInfoFooterController.m b/Telegram/Watch/Extension/TGGroupInfoFooterController.m
similarity index 100%
rename from Watch/Extension/TGGroupInfoFooterController.m
rename to Telegram/Watch/Extension/TGGroupInfoFooterController.m
diff --git a/Watch/Extension/TGGroupInfoHeaderController.h b/Telegram/Watch/Extension/TGGroupInfoHeaderController.h
similarity index 100%
rename from Watch/Extension/TGGroupInfoHeaderController.h
rename to Telegram/Watch/Extension/TGGroupInfoHeaderController.h
diff --git a/Watch/Extension/TGGroupInfoHeaderController.m b/Telegram/Watch/Extension/TGGroupInfoHeaderController.m
similarity index 100%
rename from Watch/Extension/TGGroupInfoHeaderController.m
rename to Telegram/Watch/Extension/TGGroupInfoHeaderController.m
diff --git a/Watch/Extension/TGIndexPath.h b/Telegram/Watch/Extension/TGIndexPath.h
similarity index 100%
rename from Watch/Extension/TGIndexPath.h
rename to Telegram/Watch/Extension/TGIndexPath.h
diff --git a/Watch/Extension/TGIndexPath.m b/Telegram/Watch/Extension/TGIndexPath.m
similarity index 100%
rename from Watch/Extension/TGIndexPath.m
rename to Telegram/Watch/Extension/TGIndexPath.m
diff --git a/Watch/Extension/TGInputController.h b/Telegram/Watch/Extension/TGInputController.h
similarity index 100%
rename from Watch/Extension/TGInputController.h
rename to Telegram/Watch/Extension/TGInputController.h
diff --git a/Watch/Extension/TGInputController.m b/Telegram/Watch/Extension/TGInputController.m
similarity index 100%
rename from Watch/Extension/TGInputController.m
rename to Telegram/Watch/Extension/TGInputController.m
diff --git a/Watch/Extension/TGInterfaceController.h b/Telegram/Watch/Extension/TGInterfaceController.h
similarity index 100%
rename from Watch/Extension/TGInterfaceController.h
rename to Telegram/Watch/Extension/TGInterfaceController.h
diff --git a/Watch/Extension/TGInterfaceController.m b/Telegram/Watch/Extension/TGInterfaceController.m
similarity index 100%
rename from Watch/Extension/TGInterfaceController.m
rename to Telegram/Watch/Extension/TGInterfaceController.m
diff --git a/Watch/Extension/TGInterfaceMenu.h b/Telegram/Watch/Extension/TGInterfaceMenu.h
similarity index 100%
rename from Watch/Extension/TGInterfaceMenu.h
rename to Telegram/Watch/Extension/TGInterfaceMenu.h
diff --git a/Watch/Extension/TGInterfaceMenu.m b/Telegram/Watch/Extension/TGInterfaceMenu.m
similarity index 100%
rename from Watch/Extension/TGInterfaceMenu.m
rename to Telegram/Watch/Extension/TGInterfaceMenu.m
diff --git a/Watch/Extension/TGLocationController.h b/Telegram/Watch/Extension/TGLocationController.h
similarity index 100%
rename from Watch/Extension/TGLocationController.h
rename to Telegram/Watch/Extension/TGLocationController.h
diff --git a/Watch/Extension/TGLocationController.m b/Telegram/Watch/Extension/TGLocationController.m
similarity index 100%
rename from Watch/Extension/TGLocationController.m
rename to Telegram/Watch/Extension/TGLocationController.m
diff --git a/Watch/Extension/TGLocationMapHeaderController.h b/Telegram/Watch/Extension/TGLocationMapHeaderController.h
similarity index 100%
rename from Watch/Extension/TGLocationMapHeaderController.h
rename to Telegram/Watch/Extension/TGLocationMapHeaderController.h
diff --git a/Watch/Extension/TGLocationMapHeaderController.m b/Telegram/Watch/Extension/TGLocationMapHeaderController.m
similarity index 100%
rename from Watch/Extension/TGLocationMapHeaderController.m
rename to Telegram/Watch/Extension/TGLocationMapHeaderController.m
diff --git a/Watch/Extension/TGLocationUtils.h b/Telegram/Watch/Extension/TGLocationUtils.h
similarity index 100%
rename from Watch/Extension/TGLocationUtils.h
rename to Telegram/Watch/Extension/TGLocationUtils.h
diff --git a/Watch/Extension/TGLocationUtils.m b/Telegram/Watch/Extension/TGLocationUtils.m
similarity index 100%
rename from Watch/Extension/TGLocationUtils.m
rename to Telegram/Watch/Extension/TGLocationUtils.m
diff --git a/Watch/Extension/TGLocationVenueRowController.h b/Telegram/Watch/Extension/TGLocationVenueRowController.h
similarity index 100%
rename from Watch/Extension/TGLocationVenueRowController.h
rename to Telegram/Watch/Extension/TGLocationVenueRowController.h
diff --git a/Watch/Extension/TGLocationVenueRowController.m b/Telegram/Watch/Extension/TGLocationVenueRowController.m
similarity index 100%
rename from Watch/Extension/TGLocationVenueRowController.m
rename to Telegram/Watch/Extension/TGLocationVenueRowController.m
diff --git a/Watch/Extension/TGMessageViewController.h b/Telegram/Watch/Extension/TGMessageViewController.h
similarity index 100%
rename from Watch/Extension/TGMessageViewController.h
rename to Telegram/Watch/Extension/TGMessageViewController.h
diff --git a/Watch/Extension/TGMessageViewController.m b/Telegram/Watch/Extension/TGMessageViewController.m
similarity index 100%
rename from Watch/Extension/TGMessageViewController.m
rename to Telegram/Watch/Extension/TGMessageViewController.m
diff --git a/Watch/Extension/TGMessageViewFooterController.h b/Telegram/Watch/Extension/TGMessageViewFooterController.h
similarity index 100%
rename from Watch/Extension/TGMessageViewFooterController.h
rename to Telegram/Watch/Extension/TGMessageViewFooterController.h
diff --git a/Watch/Extension/TGMessageViewFooterController.m b/Telegram/Watch/Extension/TGMessageViewFooterController.m
similarity index 100%
rename from Watch/Extension/TGMessageViewFooterController.m
rename to Telegram/Watch/Extension/TGMessageViewFooterController.m
diff --git a/Watch/Extension/TGMessageViewMessageRowController.h b/Telegram/Watch/Extension/TGMessageViewMessageRowController.h
similarity index 100%
rename from Watch/Extension/TGMessageViewMessageRowController.h
rename to Telegram/Watch/Extension/TGMessageViewMessageRowController.h
diff --git a/Watch/Extension/TGMessageViewMessageRowController.m b/Telegram/Watch/Extension/TGMessageViewMessageRowController.m
similarity index 100%
rename from Watch/Extension/TGMessageViewMessageRowController.m
rename to Telegram/Watch/Extension/TGMessageViewMessageRowController.m
diff --git a/Watch/Extension/TGMessageViewModel.h b/Telegram/Watch/Extension/TGMessageViewModel.h
similarity index 100%
rename from Watch/Extension/TGMessageViewModel.h
rename to Telegram/Watch/Extension/TGMessageViewModel.h
diff --git a/Watch/Extension/TGMessageViewModel.m b/Telegram/Watch/Extension/TGMessageViewModel.m
similarity index 100%
rename from Watch/Extension/TGMessageViewModel.m
rename to Telegram/Watch/Extension/TGMessageViewModel.m
diff --git a/Watch/Extension/TGMessageViewWebPageRowController.h b/Telegram/Watch/Extension/TGMessageViewWebPageRowController.h
similarity index 100%
rename from Watch/Extension/TGMessageViewWebPageRowController.h
rename to Telegram/Watch/Extension/TGMessageViewWebPageRowController.h
diff --git a/Watch/Extension/TGMessageViewWebPageRowController.m b/Telegram/Watch/Extension/TGMessageViewWebPageRowController.m
similarity index 100%
rename from Watch/Extension/TGMessageViewWebPageRowController.m
rename to Telegram/Watch/Extension/TGMessageViewWebPageRowController.m
diff --git a/Watch/Extension/TGNeoAttachmentViewModel.h b/Telegram/Watch/Extension/TGNeoAttachmentViewModel.h
similarity index 100%
rename from Watch/Extension/TGNeoAttachmentViewModel.h
rename to Telegram/Watch/Extension/TGNeoAttachmentViewModel.h
diff --git a/Watch/Extension/TGNeoAttachmentViewModel.m b/Telegram/Watch/Extension/TGNeoAttachmentViewModel.m
similarity index 100%
rename from Watch/Extension/TGNeoAttachmentViewModel.m
rename to Telegram/Watch/Extension/TGNeoAttachmentViewModel.m
diff --git a/Watch/Extension/TGNeoAudioMessageViewModel.h b/Telegram/Watch/Extension/TGNeoAudioMessageViewModel.h
similarity index 100%
rename from Watch/Extension/TGNeoAudioMessageViewModel.h
rename to Telegram/Watch/Extension/TGNeoAudioMessageViewModel.h
diff --git a/Watch/Extension/TGNeoAudioMessageViewModel.m b/Telegram/Watch/Extension/TGNeoAudioMessageViewModel.m
similarity index 100%
rename from Watch/Extension/TGNeoAudioMessageViewModel.m
rename to Telegram/Watch/Extension/TGNeoAudioMessageViewModel.m
diff --git a/Watch/Extension/TGNeoBackgroundViewModel.h b/Telegram/Watch/Extension/TGNeoBackgroundViewModel.h
similarity index 100%
rename from Watch/Extension/TGNeoBackgroundViewModel.h
rename to Telegram/Watch/Extension/TGNeoBackgroundViewModel.h
diff --git a/Watch/Extension/TGNeoBackgroundViewModel.m b/Telegram/Watch/Extension/TGNeoBackgroundViewModel.m
similarity index 100%
rename from Watch/Extension/TGNeoBackgroundViewModel.m
rename to Telegram/Watch/Extension/TGNeoBackgroundViewModel.m
diff --git a/Watch/Extension/TGNeoBubbleMessageViewModel.h b/Telegram/Watch/Extension/TGNeoBubbleMessageViewModel.h
similarity index 100%
rename from Watch/Extension/TGNeoBubbleMessageViewModel.h
rename to Telegram/Watch/Extension/TGNeoBubbleMessageViewModel.h
diff --git a/Watch/Extension/TGNeoBubbleMessageViewModel.m b/Telegram/Watch/Extension/TGNeoBubbleMessageViewModel.m
similarity index 100%
rename from Watch/Extension/TGNeoBubbleMessageViewModel.m
rename to Telegram/Watch/Extension/TGNeoBubbleMessageViewModel.m
diff --git a/Watch/Extension/TGNeoChatRowController.h b/Telegram/Watch/Extension/TGNeoChatRowController.h
similarity index 100%
rename from Watch/Extension/TGNeoChatRowController.h
rename to Telegram/Watch/Extension/TGNeoChatRowController.h
diff --git a/Watch/Extension/TGNeoChatRowController.m b/Telegram/Watch/Extension/TGNeoChatRowController.m
similarity index 100%
rename from Watch/Extension/TGNeoChatRowController.m
rename to Telegram/Watch/Extension/TGNeoChatRowController.m
diff --git a/Watch/Extension/TGNeoChatViewModel.h b/Telegram/Watch/Extension/TGNeoChatViewModel.h
similarity index 100%
rename from Watch/Extension/TGNeoChatViewModel.h
rename to Telegram/Watch/Extension/TGNeoChatViewModel.h
diff --git a/Watch/Extension/TGNeoChatViewModel.m b/Telegram/Watch/Extension/TGNeoChatViewModel.m
similarity index 100%
rename from Watch/Extension/TGNeoChatViewModel.m
rename to Telegram/Watch/Extension/TGNeoChatViewModel.m
diff --git a/Watch/Extension/TGNeoChatsController.h b/Telegram/Watch/Extension/TGNeoChatsController.h
similarity index 100%
rename from Watch/Extension/TGNeoChatsController.h
rename to Telegram/Watch/Extension/TGNeoChatsController.h
diff --git a/Watch/Extension/TGNeoChatsController.m b/Telegram/Watch/Extension/TGNeoChatsController.m
similarity index 100%
rename from Watch/Extension/TGNeoChatsController.m
rename to Telegram/Watch/Extension/TGNeoChatsController.m
diff --git a/Watch/Extension/TGNeoContactMessageViewModel.h b/Telegram/Watch/Extension/TGNeoContactMessageViewModel.h
similarity index 100%
rename from Watch/Extension/TGNeoContactMessageViewModel.h
rename to Telegram/Watch/Extension/TGNeoContactMessageViewModel.h
diff --git a/Watch/Extension/TGNeoContactMessageViewModel.m b/Telegram/Watch/Extension/TGNeoContactMessageViewModel.m
similarity index 100%
rename from Watch/Extension/TGNeoContactMessageViewModel.m
rename to Telegram/Watch/Extension/TGNeoContactMessageViewModel.m
diff --git a/Watch/Extension/TGNeoConversationController.h b/Telegram/Watch/Extension/TGNeoConversationController.h
similarity index 100%
rename from Watch/Extension/TGNeoConversationController.h
rename to Telegram/Watch/Extension/TGNeoConversationController.h
diff --git a/Watch/Extension/TGNeoConversationController.m b/Telegram/Watch/Extension/TGNeoConversationController.m
similarity index 100%
rename from Watch/Extension/TGNeoConversationController.m
rename to Telegram/Watch/Extension/TGNeoConversationController.m
diff --git a/Watch/Extension/TGNeoConversationMediaRowController.h b/Telegram/Watch/Extension/TGNeoConversationMediaRowController.h
similarity index 100%
rename from Watch/Extension/TGNeoConversationMediaRowController.h
rename to Telegram/Watch/Extension/TGNeoConversationMediaRowController.h
diff --git a/Watch/Extension/TGNeoConversationMediaRowController.m b/Telegram/Watch/Extension/TGNeoConversationMediaRowController.m
similarity index 100%
rename from Watch/Extension/TGNeoConversationMediaRowController.m
rename to Telegram/Watch/Extension/TGNeoConversationMediaRowController.m
diff --git a/Watch/Extension/TGNeoConversationRowController.h b/Telegram/Watch/Extension/TGNeoConversationRowController.h
similarity index 100%
rename from Watch/Extension/TGNeoConversationRowController.h
rename to Telegram/Watch/Extension/TGNeoConversationRowController.h
diff --git a/Watch/Extension/TGNeoConversationRowController.m b/Telegram/Watch/Extension/TGNeoConversationRowController.m
similarity index 100%
rename from Watch/Extension/TGNeoConversationRowController.m
rename to Telegram/Watch/Extension/TGNeoConversationRowController.m
diff --git a/Watch/Extension/TGNeoConversationSimpleRowController.h b/Telegram/Watch/Extension/TGNeoConversationSimpleRowController.h
similarity index 100%
rename from Watch/Extension/TGNeoConversationSimpleRowController.h
rename to Telegram/Watch/Extension/TGNeoConversationSimpleRowController.h
diff --git a/Watch/Extension/TGNeoConversationSimpleRowController.m b/Telegram/Watch/Extension/TGNeoConversationSimpleRowController.m
similarity index 100%
rename from Watch/Extension/TGNeoConversationSimpleRowController.m
rename to Telegram/Watch/Extension/TGNeoConversationSimpleRowController.m
diff --git a/Watch/Extension/TGNeoConversationStaticRowController.h b/Telegram/Watch/Extension/TGNeoConversationStaticRowController.h
similarity index 100%
rename from Watch/Extension/TGNeoConversationStaticRowController.h
rename to Telegram/Watch/Extension/TGNeoConversationStaticRowController.h
diff --git a/Watch/Extension/TGNeoConversationStaticRowController.m b/Telegram/Watch/Extension/TGNeoConversationStaticRowController.m
similarity index 100%
rename from Watch/Extension/TGNeoConversationStaticRowController.m
rename to Telegram/Watch/Extension/TGNeoConversationStaticRowController.m
diff --git a/Watch/Extension/TGNeoConversationTimeRowController.h b/Telegram/Watch/Extension/TGNeoConversationTimeRowController.h
similarity index 100%
rename from Watch/Extension/TGNeoConversationTimeRowController.h
rename to Telegram/Watch/Extension/TGNeoConversationTimeRowController.h
diff --git a/Watch/Extension/TGNeoConversationTimeRowController.m b/Telegram/Watch/Extension/TGNeoConversationTimeRowController.m
similarity index 100%
rename from Watch/Extension/TGNeoConversationTimeRowController.m
rename to Telegram/Watch/Extension/TGNeoConversationTimeRowController.m
diff --git a/Watch/Extension/TGNeoFileMessageViewModel.h b/Telegram/Watch/Extension/TGNeoFileMessageViewModel.h
similarity index 100%
rename from Watch/Extension/TGNeoFileMessageViewModel.h
rename to Telegram/Watch/Extension/TGNeoFileMessageViewModel.h
diff --git a/Watch/Extension/TGNeoFileMessageViewModel.m b/Telegram/Watch/Extension/TGNeoFileMessageViewModel.m
similarity index 100%
rename from Watch/Extension/TGNeoFileMessageViewModel.m
rename to Telegram/Watch/Extension/TGNeoFileMessageViewModel.m
diff --git a/Watch/Extension/TGNeoForwardHeaderViewModel.h b/Telegram/Watch/Extension/TGNeoForwardHeaderViewModel.h
similarity index 100%
rename from Watch/Extension/TGNeoForwardHeaderViewModel.h
rename to Telegram/Watch/Extension/TGNeoForwardHeaderViewModel.h
diff --git a/Watch/Extension/TGNeoForwardHeaderViewModel.m b/Telegram/Watch/Extension/TGNeoForwardHeaderViewModel.m
similarity index 100%
rename from Watch/Extension/TGNeoForwardHeaderViewModel.m
rename to Telegram/Watch/Extension/TGNeoForwardHeaderViewModel.m
diff --git a/Watch/Extension/TGNeoImageViewModel.h b/Telegram/Watch/Extension/TGNeoImageViewModel.h
similarity index 100%
rename from Watch/Extension/TGNeoImageViewModel.h
rename to Telegram/Watch/Extension/TGNeoImageViewModel.h
diff --git a/Watch/Extension/TGNeoImageViewModel.m b/Telegram/Watch/Extension/TGNeoImageViewModel.m
similarity index 100%
rename from Watch/Extension/TGNeoImageViewModel.m
rename to Telegram/Watch/Extension/TGNeoImageViewModel.m
diff --git a/Watch/Extension/TGNeoLabelViewModel.h b/Telegram/Watch/Extension/TGNeoLabelViewModel.h
similarity index 100%
rename from Watch/Extension/TGNeoLabelViewModel.h
rename to Telegram/Watch/Extension/TGNeoLabelViewModel.h
diff --git a/Watch/Extension/TGNeoLabelViewModel.m b/Telegram/Watch/Extension/TGNeoLabelViewModel.m
similarity index 100%
rename from Watch/Extension/TGNeoLabelViewModel.m
rename to Telegram/Watch/Extension/TGNeoLabelViewModel.m
diff --git a/Watch/Extension/TGNeoMediaMessageViewModel.h b/Telegram/Watch/Extension/TGNeoMediaMessageViewModel.h
similarity index 100%
rename from Watch/Extension/TGNeoMediaMessageViewModel.h
rename to Telegram/Watch/Extension/TGNeoMediaMessageViewModel.h
diff --git a/Watch/Extension/TGNeoMediaMessageViewModel.m b/Telegram/Watch/Extension/TGNeoMediaMessageViewModel.m
similarity index 100%
rename from Watch/Extension/TGNeoMediaMessageViewModel.m
rename to Telegram/Watch/Extension/TGNeoMediaMessageViewModel.m
diff --git a/Watch/Extension/TGNeoMessageViewModel.h b/Telegram/Watch/Extension/TGNeoMessageViewModel.h
similarity index 100%
rename from Watch/Extension/TGNeoMessageViewModel.h
rename to Telegram/Watch/Extension/TGNeoMessageViewModel.h
diff --git a/Watch/Extension/TGNeoMessageViewModel.m b/Telegram/Watch/Extension/TGNeoMessageViewModel.m
similarity index 100%
rename from Watch/Extension/TGNeoMessageViewModel.m
rename to Telegram/Watch/Extension/TGNeoMessageViewModel.m
diff --git a/Watch/Extension/TGNeoRenderableViewModel.h b/Telegram/Watch/Extension/TGNeoRenderableViewModel.h
similarity index 100%
rename from Watch/Extension/TGNeoRenderableViewModel.h
rename to Telegram/Watch/Extension/TGNeoRenderableViewModel.h
diff --git a/Watch/Extension/TGNeoRenderableViewModel.m b/Telegram/Watch/Extension/TGNeoRenderableViewModel.m
similarity index 100%
rename from Watch/Extension/TGNeoRenderableViewModel.m
rename to Telegram/Watch/Extension/TGNeoRenderableViewModel.m
diff --git a/Watch/Extension/TGNeoReplyHeaderViewModel.h b/Telegram/Watch/Extension/TGNeoReplyHeaderViewModel.h
similarity index 100%
rename from Watch/Extension/TGNeoReplyHeaderViewModel.h
rename to Telegram/Watch/Extension/TGNeoReplyHeaderViewModel.h
diff --git a/Watch/Extension/TGNeoReplyHeaderViewModel.m b/Telegram/Watch/Extension/TGNeoReplyHeaderViewModel.m
similarity index 100%
rename from Watch/Extension/TGNeoReplyHeaderViewModel.m
rename to Telegram/Watch/Extension/TGNeoReplyHeaderViewModel.m
diff --git a/Watch/Extension/TGNeoRowController.h b/Telegram/Watch/Extension/TGNeoRowController.h
similarity index 100%
rename from Watch/Extension/TGNeoRowController.h
rename to Telegram/Watch/Extension/TGNeoRowController.h
diff --git a/Watch/Extension/TGNeoRowController.m b/Telegram/Watch/Extension/TGNeoRowController.m
similarity index 100%
rename from Watch/Extension/TGNeoRowController.m
rename to Telegram/Watch/Extension/TGNeoRowController.m
diff --git a/Watch/Extension/TGNeoServiceMessageViewModel.h b/Telegram/Watch/Extension/TGNeoServiceMessageViewModel.h
similarity index 100%
rename from Watch/Extension/TGNeoServiceMessageViewModel.h
rename to Telegram/Watch/Extension/TGNeoServiceMessageViewModel.h
diff --git a/Watch/Extension/TGNeoServiceMessageViewModel.m b/Telegram/Watch/Extension/TGNeoServiceMessageViewModel.m
similarity index 100%
rename from Watch/Extension/TGNeoServiceMessageViewModel.m
rename to Telegram/Watch/Extension/TGNeoServiceMessageViewModel.m
diff --git a/Watch/Extension/TGNeoSmiliesMessageViewModel.h b/Telegram/Watch/Extension/TGNeoSmiliesMessageViewModel.h
similarity index 100%
rename from Watch/Extension/TGNeoSmiliesMessageViewModel.h
rename to Telegram/Watch/Extension/TGNeoSmiliesMessageViewModel.h
diff --git a/Watch/Extension/TGNeoSmiliesMessageViewModel.m b/Telegram/Watch/Extension/TGNeoSmiliesMessageViewModel.m
similarity index 100%
rename from Watch/Extension/TGNeoSmiliesMessageViewModel.m
rename to Telegram/Watch/Extension/TGNeoSmiliesMessageViewModel.m
diff --git a/Watch/Extension/TGNeoStickerMessageViewModel.h b/Telegram/Watch/Extension/TGNeoStickerMessageViewModel.h
similarity index 100%
rename from Watch/Extension/TGNeoStickerMessageViewModel.h
rename to Telegram/Watch/Extension/TGNeoStickerMessageViewModel.h
diff --git a/Watch/Extension/TGNeoStickerMessageViewModel.m b/Telegram/Watch/Extension/TGNeoStickerMessageViewModel.m
similarity index 100%
rename from Watch/Extension/TGNeoStickerMessageViewModel.m
rename to Telegram/Watch/Extension/TGNeoStickerMessageViewModel.m
diff --git a/Watch/Extension/TGNeoTextMessageViewModel.h b/Telegram/Watch/Extension/TGNeoTextMessageViewModel.h
similarity index 100%
rename from Watch/Extension/TGNeoTextMessageViewModel.h
rename to Telegram/Watch/Extension/TGNeoTextMessageViewModel.h
diff --git a/Watch/Extension/TGNeoTextMessageViewModel.m b/Telegram/Watch/Extension/TGNeoTextMessageViewModel.m
similarity index 100%
rename from Watch/Extension/TGNeoTextMessageViewModel.m
rename to Telegram/Watch/Extension/TGNeoTextMessageViewModel.m
diff --git a/Watch/Extension/TGNeoUnsupportedMessageViewModel.h b/Telegram/Watch/Extension/TGNeoUnsupportedMessageViewModel.h
similarity index 100%
rename from Watch/Extension/TGNeoUnsupportedMessageViewModel.h
rename to Telegram/Watch/Extension/TGNeoUnsupportedMessageViewModel.h
diff --git a/Watch/Extension/TGNeoUnsupportedMessageViewModel.m b/Telegram/Watch/Extension/TGNeoUnsupportedMessageViewModel.m
similarity index 100%
rename from Watch/Extension/TGNeoUnsupportedMessageViewModel.m
rename to Telegram/Watch/Extension/TGNeoUnsupportedMessageViewModel.m
diff --git a/Watch/Extension/TGNeoVenueMessageViewModel.h b/Telegram/Watch/Extension/TGNeoVenueMessageViewModel.h
similarity index 100%
rename from Watch/Extension/TGNeoVenueMessageViewModel.h
rename to Telegram/Watch/Extension/TGNeoVenueMessageViewModel.h
diff --git a/Watch/Extension/TGNeoVenueMessageViewModel.m b/Telegram/Watch/Extension/TGNeoVenueMessageViewModel.m
similarity index 100%
rename from Watch/Extension/TGNeoVenueMessageViewModel.m
rename to Telegram/Watch/Extension/TGNeoVenueMessageViewModel.m
diff --git a/Watch/Extension/TGNeoViewModel.h b/Telegram/Watch/Extension/TGNeoViewModel.h
similarity index 100%
rename from Watch/Extension/TGNeoViewModel.h
rename to Telegram/Watch/Extension/TGNeoViewModel.h
diff --git a/Watch/Extension/TGNeoViewModel.m b/Telegram/Watch/Extension/TGNeoViewModel.m
similarity index 100%
rename from Watch/Extension/TGNeoViewModel.m
rename to Telegram/Watch/Extension/TGNeoViewModel.m
diff --git a/Watch/Extension/TGNotificationController.h b/Telegram/Watch/Extension/TGNotificationController.h
similarity index 100%
rename from Watch/Extension/TGNotificationController.h
rename to Telegram/Watch/Extension/TGNotificationController.h
diff --git a/Watch/Extension/TGNotificationController.m b/Telegram/Watch/Extension/TGNotificationController.m
similarity index 100%
rename from Watch/Extension/TGNotificationController.m
rename to Telegram/Watch/Extension/TGNotificationController.m
diff --git a/Watch/Extension/TGProfilePhotoController.h b/Telegram/Watch/Extension/TGProfilePhotoController.h
similarity index 100%
rename from Watch/Extension/TGProfilePhotoController.h
rename to Telegram/Watch/Extension/TGProfilePhotoController.h
diff --git a/Watch/Extension/TGProfilePhotoController.m b/Telegram/Watch/Extension/TGProfilePhotoController.m
similarity index 100%
rename from Watch/Extension/TGProfilePhotoController.m
rename to Telegram/Watch/Extension/TGProfilePhotoController.m
diff --git a/Watch/Extension/TGStickerPackRowController.h b/Telegram/Watch/Extension/TGStickerPackRowController.h
similarity index 100%
rename from Watch/Extension/TGStickerPackRowController.h
rename to Telegram/Watch/Extension/TGStickerPackRowController.h
diff --git a/Watch/Extension/TGStickerPackRowController.m b/Telegram/Watch/Extension/TGStickerPackRowController.m
similarity index 100%
rename from Watch/Extension/TGStickerPackRowController.m
rename to Telegram/Watch/Extension/TGStickerPackRowController.m
diff --git a/Watch/Extension/TGStickerPacksController.h b/Telegram/Watch/Extension/TGStickerPacksController.h
similarity index 100%
rename from Watch/Extension/TGStickerPacksController.h
rename to Telegram/Watch/Extension/TGStickerPacksController.h
diff --git a/Watch/Extension/TGStickerPacksController.m b/Telegram/Watch/Extension/TGStickerPacksController.m
similarity index 100%
rename from Watch/Extension/TGStickerPacksController.m
rename to Telegram/Watch/Extension/TGStickerPacksController.m
diff --git a/Watch/Extension/TGStickersController.h b/Telegram/Watch/Extension/TGStickersController.h
similarity index 100%
rename from Watch/Extension/TGStickersController.h
rename to Telegram/Watch/Extension/TGStickersController.h
diff --git a/Watch/Extension/TGStickersController.m b/Telegram/Watch/Extension/TGStickersController.m
similarity index 100%
rename from Watch/Extension/TGStickersController.m
rename to Telegram/Watch/Extension/TGStickersController.m
diff --git a/Watch/Extension/TGStickersHeaderController.h b/Telegram/Watch/Extension/TGStickersHeaderController.h
similarity index 100%
rename from Watch/Extension/TGStickersHeaderController.h
rename to Telegram/Watch/Extension/TGStickersHeaderController.h
diff --git a/Watch/Extension/TGStickersHeaderController.m b/Telegram/Watch/Extension/TGStickersHeaderController.m
similarity index 100%
rename from Watch/Extension/TGStickersHeaderController.m
rename to Telegram/Watch/Extension/TGStickersHeaderController.m
diff --git a/Watch/Extension/TGStickersRowController.h b/Telegram/Watch/Extension/TGStickersRowController.h
similarity index 100%
rename from Watch/Extension/TGStickersRowController.h
rename to Telegram/Watch/Extension/TGStickersRowController.h
diff --git a/Watch/Extension/TGStickersRowController.m b/Telegram/Watch/Extension/TGStickersRowController.m
similarity index 100%
rename from Watch/Extension/TGStickersRowController.m
rename to Telegram/Watch/Extension/TGStickersRowController.m
diff --git a/Watch/Extension/TGStickersSectionHeaderController.h b/Telegram/Watch/Extension/TGStickersSectionHeaderController.h
similarity index 100%
rename from Watch/Extension/TGStickersSectionHeaderController.h
rename to Telegram/Watch/Extension/TGStickersSectionHeaderController.h
diff --git a/Watch/Extension/TGStickersSectionHeaderController.m b/Telegram/Watch/Extension/TGStickersSectionHeaderController.m
similarity index 100%
rename from Watch/Extension/TGStickersSectionHeaderController.m
rename to Telegram/Watch/Extension/TGStickersSectionHeaderController.m
diff --git a/Watch/Extension/TGStringUtils.h b/Telegram/Watch/Extension/TGStringUtils.h
similarity index 100%
rename from Watch/Extension/TGStringUtils.h
rename to Telegram/Watch/Extension/TGStringUtils.h
diff --git a/Watch/Extension/TGStringUtils.m b/Telegram/Watch/Extension/TGStringUtils.m
similarity index 100%
rename from Watch/Extension/TGStringUtils.m
rename to Telegram/Watch/Extension/TGStringUtils.m
diff --git a/Watch/Extension/TGTableDeltaUpdater.h b/Telegram/Watch/Extension/TGTableDeltaUpdater.h
similarity index 100%
rename from Watch/Extension/TGTableDeltaUpdater.h
rename to Telegram/Watch/Extension/TGTableDeltaUpdater.h
diff --git a/Watch/Extension/TGTableDeltaUpdater.m b/Telegram/Watch/Extension/TGTableDeltaUpdater.m
similarity index 100%
rename from Watch/Extension/TGTableDeltaUpdater.m
rename to Telegram/Watch/Extension/TGTableDeltaUpdater.m
diff --git a/Watch/Extension/TGUserHandle.h b/Telegram/Watch/Extension/TGUserHandle.h
similarity index 100%
rename from Watch/Extension/TGUserHandle.h
rename to Telegram/Watch/Extension/TGUserHandle.h
diff --git a/Watch/Extension/TGUserHandle.m b/Telegram/Watch/Extension/TGUserHandle.m
similarity index 100%
rename from Watch/Extension/TGUserHandle.m
rename to Telegram/Watch/Extension/TGUserHandle.m
diff --git a/Watch/Extension/TGUserHandleRowController.h b/Telegram/Watch/Extension/TGUserHandleRowController.h
similarity index 100%
rename from Watch/Extension/TGUserHandleRowController.h
rename to Telegram/Watch/Extension/TGUserHandleRowController.h
diff --git a/Watch/Extension/TGUserHandleRowController.m b/Telegram/Watch/Extension/TGUserHandleRowController.m
similarity index 100%
rename from Watch/Extension/TGUserHandleRowController.m
rename to Telegram/Watch/Extension/TGUserHandleRowController.m
diff --git a/Watch/Extension/TGUserInfoController.h b/Telegram/Watch/Extension/TGUserInfoController.h
similarity index 100%
rename from Watch/Extension/TGUserInfoController.h
rename to Telegram/Watch/Extension/TGUserInfoController.h
diff --git a/Watch/Extension/TGUserInfoController.m b/Telegram/Watch/Extension/TGUserInfoController.m
similarity index 100%
rename from Watch/Extension/TGUserInfoController.m
rename to Telegram/Watch/Extension/TGUserInfoController.m
diff --git a/Watch/Extension/TGUserInfoHeaderController.h b/Telegram/Watch/Extension/TGUserInfoHeaderController.h
similarity index 100%
rename from Watch/Extension/TGUserInfoHeaderController.h
rename to Telegram/Watch/Extension/TGUserInfoHeaderController.h
diff --git a/Watch/Extension/TGUserInfoHeaderController.m b/Telegram/Watch/Extension/TGUserInfoHeaderController.m
similarity index 100%
rename from Watch/Extension/TGUserInfoHeaderController.m
rename to Telegram/Watch/Extension/TGUserInfoHeaderController.m
diff --git a/Watch/Extension/TGUserRowController.h b/Telegram/Watch/Extension/TGUserRowController.h
similarity index 100%
rename from Watch/Extension/TGUserRowController.h
rename to Telegram/Watch/Extension/TGUserRowController.h
diff --git a/Watch/Extension/TGUserRowController.m b/Telegram/Watch/Extension/TGUserRowController.m
similarity index 100%
rename from Watch/Extension/TGUserRowController.m
rename to Telegram/Watch/Extension/TGUserRowController.m
diff --git a/Watch/Extension/TGWatchColor.h b/Telegram/Watch/Extension/TGWatchColor.h
similarity index 100%
rename from Watch/Extension/TGWatchColor.h
rename to Telegram/Watch/Extension/TGWatchColor.h
diff --git a/Watch/Extension/TGWatchColor.m b/Telegram/Watch/Extension/TGWatchColor.m
similarity index 100%
rename from Watch/Extension/TGWatchColor.m
rename to Telegram/Watch/Extension/TGWatchColor.m
diff --git a/Watch/Extension/TGWatchCommon.h b/Telegram/Watch/Extension/TGWatchCommon.h
similarity index 100%
rename from Watch/Extension/TGWatchCommon.h
rename to Telegram/Watch/Extension/TGWatchCommon.h
diff --git a/Watch/Extension/TGWatchCommon.m b/Telegram/Watch/Extension/TGWatchCommon.m
similarity index 100%
rename from Watch/Extension/TGWatchCommon.m
rename to Telegram/Watch/Extension/TGWatchCommon.m
diff --git a/Watch/Extension/WKInterface+TGInterface.h b/Telegram/Watch/Extension/WKInterface+TGInterface.h
similarity index 100%
rename from Watch/Extension/WKInterface+TGInterface.h
rename to Telegram/Watch/Extension/WKInterface+TGInterface.h
diff --git a/Watch/Extension/WKInterface+TGInterface.m b/Telegram/Watch/Extension/WKInterface+TGInterface.m
similarity index 100%
rename from Watch/Extension/WKInterface+TGInterface.m
rename to Telegram/Watch/Extension/WKInterface+TGInterface.m
diff --git a/Watch/Extension/WKInterfaceGroup+Signals.h b/Telegram/Watch/Extension/WKInterfaceGroup+Signals.h
similarity index 100%
rename from Watch/Extension/WKInterfaceGroup+Signals.h
rename to Telegram/Watch/Extension/WKInterfaceGroup+Signals.h
diff --git a/Watch/Extension/WKInterfaceGroup+Signals.m b/Telegram/Watch/Extension/WKInterfaceGroup+Signals.m
similarity index 100%
rename from Watch/Extension/WKInterfaceGroup+Signals.m
rename to Telegram/Watch/Extension/WKInterfaceGroup+Signals.m
diff --git a/Watch/Extension/WKInterfaceImage+Signals.h b/Telegram/Watch/Extension/WKInterfaceImage+Signals.h
similarity index 100%
rename from Watch/Extension/WKInterfaceImage+Signals.h
rename to Telegram/Watch/Extension/WKInterfaceImage+Signals.h
diff --git a/Watch/Extension/WKInterfaceImage+Signals.m b/Telegram/Watch/Extension/WKInterfaceImage+Signals.m
similarity index 100%
rename from Watch/Extension/WKInterfaceImage+Signals.m
rename to Telegram/Watch/Extension/WKInterfaceImage+Signals.m
diff --git a/Watch/Extension/WKInterfaceTable+TGDataDrivenTable.h b/Telegram/Watch/Extension/WKInterfaceTable+TGDataDrivenTable.h
similarity index 100%
rename from Watch/Extension/WKInterfaceTable+TGDataDrivenTable.h
rename to Telegram/Watch/Extension/WKInterfaceTable+TGDataDrivenTable.h
diff --git a/Watch/Extension/WKInterfaceTable+TGDataDrivenTable.m b/Telegram/Watch/Extension/WKInterfaceTable+TGDataDrivenTable.m
similarity index 100%
rename from Watch/Extension/WKInterfaceTable+TGDataDrivenTable.m
rename to Telegram/Watch/Extension/WKInterfaceTable+TGDataDrivenTable.m
diff --git a/Watch/Extension/WatchExtension-Prefix.pch b/Telegram/Watch/Extension/WatchExtension-Prefix.pch
similarity index 100%
rename from Watch/Extension/WatchExtension-Prefix.pch
rename to Telegram/Watch/Extension/WatchExtension-Prefix.pch
diff --git a/Watch/WatchCommonWatch/TGBridgeActionMediaAttachment.h b/Telegram/Watch/WatchCommonWatch/TGBridgeActionMediaAttachment.h
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeActionMediaAttachment.h
rename to Telegram/Watch/WatchCommonWatch/TGBridgeActionMediaAttachment.h
diff --git a/Watch/WatchCommonWatch/TGBridgeActionMediaAttachment.m b/Telegram/Watch/WatchCommonWatch/TGBridgeActionMediaAttachment.m
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeActionMediaAttachment.m
rename to Telegram/Watch/WatchCommonWatch/TGBridgeActionMediaAttachment.m
diff --git a/Watch/WatchCommonWatch/TGBridgeAudioMediaAttachment.h b/Telegram/Watch/WatchCommonWatch/TGBridgeAudioMediaAttachment.h
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeAudioMediaAttachment.h
rename to Telegram/Watch/WatchCommonWatch/TGBridgeAudioMediaAttachment.h
diff --git a/Watch/WatchCommonWatch/TGBridgeAudioMediaAttachment.m b/Telegram/Watch/WatchCommonWatch/TGBridgeAudioMediaAttachment.m
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeAudioMediaAttachment.m
rename to Telegram/Watch/WatchCommonWatch/TGBridgeAudioMediaAttachment.m
diff --git a/Watch/WatchCommonWatch/TGBridgeBotCommandInfo.h b/Telegram/Watch/WatchCommonWatch/TGBridgeBotCommandInfo.h
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeBotCommandInfo.h
rename to Telegram/Watch/WatchCommonWatch/TGBridgeBotCommandInfo.h
diff --git a/Watch/WatchCommonWatch/TGBridgeBotCommandInfo.m b/Telegram/Watch/WatchCommonWatch/TGBridgeBotCommandInfo.m
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeBotCommandInfo.m
rename to Telegram/Watch/WatchCommonWatch/TGBridgeBotCommandInfo.m
diff --git a/Watch/WatchCommonWatch/TGBridgeBotInfo.h b/Telegram/Watch/WatchCommonWatch/TGBridgeBotInfo.h
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeBotInfo.h
rename to Telegram/Watch/WatchCommonWatch/TGBridgeBotInfo.h
diff --git a/Watch/WatchCommonWatch/TGBridgeBotInfo.m b/Telegram/Watch/WatchCommonWatch/TGBridgeBotInfo.m
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeBotInfo.m
rename to Telegram/Watch/WatchCommonWatch/TGBridgeBotInfo.m
diff --git a/Watch/WatchCommonWatch/TGBridgeChat.h b/Telegram/Watch/WatchCommonWatch/TGBridgeChat.h
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeChat.h
rename to Telegram/Watch/WatchCommonWatch/TGBridgeChat.h
diff --git a/Watch/WatchCommonWatch/TGBridgeChat.m b/Telegram/Watch/WatchCommonWatch/TGBridgeChat.m
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeChat.m
rename to Telegram/Watch/WatchCommonWatch/TGBridgeChat.m
diff --git a/Watch/WatchCommonWatch/TGBridgeChatMessages.h b/Telegram/Watch/WatchCommonWatch/TGBridgeChatMessages.h
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeChatMessages.h
rename to Telegram/Watch/WatchCommonWatch/TGBridgeChatMessages.h
diff --git a/Watch/WatchCommonWatch/TGBridgeChatMessages.m b/Telegram/Watch/WatchCommonWatch/TGBridgeChatMessages.m
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeChatMessages.m
rename to Telegram/Watch/WatchCommonWatch/TGBridgeChatMessages.m
diff --git a/Watch/WatchCommonWatch/TGBridgeCommon.h b/Telegram/Watch/WatchCommonWatch/TGBridgeCommon.h
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeCommon.h
rename to Telegram/Watch/WatchCommonWatch/TGBridgeCommon.h
diff --git a/Watch/WatchCommonWatch/TGBridgeCommon.m b/Telegram/Watch/WatchCommonWatch/TGBridgeCommon.m
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeCommon.m
rename to Telegram/Watch/WatchCommonWatch/TGBridgeCommon.m
diff --git a/Watch/WatchCommonWatch/TGBridgeContactMediaAttachment.h b/Telegram/Watch/WatchCommonWatch/TGBridgeContactMediaAttachment.h
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeContactMediaAttachment.h
rename to Telegram/Watch/WatchCommonWatch/TGBridgeContactMediaAttachment.h
diff --git a/Watch/WatchCommonWatch/TGBridgeContactMediaAttachment.m b/Telegram/Watch/WatchCommonWatch/TGBridgeContactMediaAttachment.m
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeContactMediaAttachment.m
rename to Telegram/Watch/WatchCommonWatch/TGBridgeContactMediaAttachment.m
diff --git a/Watch/WatchCommonWatch/TGBridgeContext.h b/Telegram/Watch/WatchCommonWatch/TGBridgeContext.h
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeContext.h
rename to Telegram/Watch/WatchCommonWatch/TGBridgeContext.h
diff --git a/Watch/WatchCommonWatch/TGBridgeContext.m b/Telegram/Watch/WatchCommonWatch/TGBridgeContext.m
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeContext.m
rename to Telegram/Watch/WatchCommonWatch/TGBridgeContext.m
diff --git a/Watch/WatchCommonWatch/TGBridgeDocumentMediaAttachment.h b/Telegram/Watch/WatchCommonWatch/TGBridgeDocumentMediaAttachment.h
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeDocumentMediaAttachment.h
rename to Telegram/Watch/WatchCommonWatch/TGBridgeDocumentMediaAttachment.h
diff --git a/Watch/WatchCommonWatch/TGBridgeDocumentMediaAttachment.m b/Telegram/Watch/WatchCommonWatch/TGBridgeDocumentMediaAttachment.m
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeDocumentMediaAttachment.m
rename to Telegram/Watch/WatchCommonWatch/TGBridgeDocumentMediaAttachment.m
diff --git a/Watch/WatchCommonWatch/TGBridgeForwardedMessageMediaAttachment.h b/Telegram/Watch/WatchCommonWatch/TGBridgeForwardedMessageMediaAttachment.h
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeForwardedMessageMediaAttachment.h
rename to Telegram/Watch/WatchCommonWatch/TGBridgeForwardedMessageMediaAttachment.h
diff --git a/Watch/WatchCommonWatch/TGBridgeForwardedMessageMediaAttachment.m b/Telegram/Watch/WatchCommonWatch/TGBridgeForwardedMessageMediaAttachment.m
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeForwardedMessageMediaAttachment.m
rename to Telegram/Watch/WatchCommonWatch/TGBridgeForwardedMessageMediaAttachment.m
diff --git a/Watch/WatchCommonWatch/TGBridgeImageMediaAttachment.h b/Telegram/Watch/WatchCommonWatch/TGBridgeImageMediaAttachment.h
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeImageMediaAttachment.h
rename to Telegram/Watch/WatchCommonWatch/TGBridgeImageMediaAttachment.h
diff --git a/Watch/WatchCommonWatch/TGBridgeImageMediaAttachment.m b/Telegram/Watch/WatchCommonWatch/TGBridgeImageMediaAttachment.m
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeImageMediaAttachment.m
rename to Telegram/Watch/WatchCommonWatch/TGBridgeImageMediaAttachment.m
diff --git a/Watch/WatchCommonWatch/TGBridgeLocationMediaAttachment.h b/Telegram/Watch/WatchCommonWatch/TGBridgeLocationMediaAttachment.h
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeLocationMediaAttachment.h
rename to Telegram/Watch/WatchCommonWatch/TGBridgeLocationMediaAttachment.h
diff --git a/Watch/WatchCommonWatch/TGBridgeLocationMediaAttachment.m b/Telegram/Watch/WatchCommonWatch/TGBridgeLocationMediaAttachment.m
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeLocationMediaAttachment.m
rename to Telegram/Watch/WatchCommonWatch/TGBridgeLocationMediaAttachment.m
diff --git a/Watch/WatchCommonWatch/TGBridgeLocationVenue.h b/Telegram/Watch/WatchCommonWatch/TGBridgeLocationVenue.h
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeLocationVenue.h
rename to Telegram/Watch/WatchCommonWatch/TGBridgeLocationVenue.h
diff --git a/Watch/WatchCommonWatch/TGBridgeLocationVenue.m b/Telegram/Watch/WatchCommonWatch/TGBridgeLocationVenue.m
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeLocationVenue.m
rename to Telegram/Watch/WatchCommonWatch/TGBridgeLocationVenue.m
diff --git a/Watch/WatchCommonWatch/TGBridgeMediaAttachment.h b/Telegram/Watch/WatchCommonWatch/TGBridgeMediaAttachment.h
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeMediaAttachment.h
rename to Telegram/Watch/WatchCommonWatch/TGBridgeMediaAttachment.h
diff --git a/Watch/WatchCommonWatch/TGBridgeMediaAttachment.m b/Telegram/Watch/WatchCommonWatch/TGBridgeMediaAttachment.m
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeMediaAttachment.m
rename to Telegram/Watch/WatchCommonWatch/TGBridgeMediaAttachment.m
diff --git a/Watch/WatchCommonWatch/TGBridgeMessage.h b/Telegram/Watch/WatchCommonWatch/TGBridgeMessage.h
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeMessage.h
rename to Telegram/Watch/WatchCommonWatch/TGBridgeMessage.h
diff --git a/Watch/WatchCommonWatch/TGBridgeMessage.m b/Telegram/Watch/WatchCommonWatch/TGBridgeMessage.m
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeMessage.m
rename to Telegram/Watch/WatchCommonWatch/TGBridgeMessage.m
diff --git a/Watch/WatchCommonWatch/TGBridgeMessageEntities.h b/Telegram/Watch/WatchCommonWatch/TGBridgeMessageEntities.h
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeMessageEntities.h
rename to Telegram/Watch/WatchCommonWatch/TGBridgeMessageEntities.h
diff --git a/Watch/WatchCommonWatch/TGBridgeMessageEntities.m b/Telegram/Watch/WatchCommonWatch/TGBridgeMessageEntities.m
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeMessageEntities.m
rename to Telegram/Watch/WatchCommonWatch/TGBridgeMessageEntities.m
diff --git a/Watch/WatchCommonWatch/TGBridgeMessageEntitiesAttachment.h b/Telegram/Watch/WatchCommonWatch/TGBridgeMessageEntitiesAttachment.h
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeMessageEntitiesAttachment.h
rename to Telegram/Watch/WatchCommonWatch/TGBridgeMessageEntitiesAttachment.h
diff --git a/Watch/WatchCommonWatch/TGBridgeMessageEntitiesAttachment.m b/Telegram/Watch/WatchCommonWatch/TGBridgeMessageEntitiesAttachment.m
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeMessageEntitiesAttachment.m
rename to Telegram/Watch/WatchCommonWatch/TGBridgeMessageEntitiesAttachment.m
diff --git a/Watch/WatchCommonWatch/TGBridgePeerIdAdapter.h b/Telegram/Watch/WatchCommonWatch/TGBridgePeerIdAdapter.h
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgePeerIdAdapter.h
rename to Telegram/Watch/WatchCommonWatch/TGBridgePeerIdAdapter.h
diff --git a/Watch/WatchCommonWatch/TGBridgePeerNotificationSettings.h b/Telegram/Watch/WatchCommonWatch/TGBridgePeerNotificationSettings.h
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgePeerNotificationSettings.h
rename to Telegram/Watch/WatchCommonWatch/TGBridgePeerNotificationSettings.h
diff --git a/Watch/WatchCommonWatch/TGBridgePeerNotificationSettings.m b/Telegram/Watch/WatchCommonWatch/TGBridgePeerNotificationSettings.m
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgePeerNotificationSettings.m
rename to Telegram/Watch/WatchCommonWatch/TGBridgePeerNotificationSettings.m
diff --git a/Watch/WatchCommonWatch/TGBridgeReplyMarkupMediaAttachment.h b/Telegram/Watch/WatchCommonWatch/TGBridgeReplyMarkupMediaAttachment.h
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeReplyMarkupMediaAttachment.h
rename to Telegram/Watch/WatchCommonWatch/TGBridgeReplyMarkupMediaAttachment.h
diff --git a/Watch/WatchCommonWatch/TGBridgeReplyMarkupMediaAttachment.m b/Telegram/Watch/WatchCommonWatch/TGBridgeReplyMarkupMediaAttachment.m
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeReplyMarkupMediaAttachment.m
rename to Telegram/Watch/WatchCommonWatch/TGBridgeReplyMarkupMediaAttachment.m
diff --git a/Watch/WatchCommonWatch/TGBridgeReplyMessageMediaAttachment.h b/Telegram/Watch/WatchCommonWatch/TGBridgeReplyMessageMediaAttachment.h
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeReplyMessageMediaAttachment.h
rename to Telegram/Watch/WatchCommonWatch/TGBridgeReplyMessageMediaAttachment.h
diff --git a/Watch/WatchCommonWatch/TGBridgeReplyMessageMediaAttachment.m b/Telegram/Watch/WatchCommonWatch/TGBridgeReplyMessageMediaAttachment.m
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeReplyMessageMediaAttachment.m
rename to Telegram/Watch/WatchCommonWatch/TGBridgeReplyMessageMediaAttachment.m
diff --git a/Watch/WatchCommonWatch/TGBridgeSubscriptions.h b/Telegram/Watch/WatchCommonWatch/TGBridgeSubscriptions.h
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeSubscriptions.h
rename to Telegram/Watch/WatchCommonWatch/TGBridgeSubscriptions.h
diff --git a/Watch/WatchCommonWatch/TGBridgeSubscriptions.m b/Telegram/Watch/WatchCommonWatch/TGBridgeSubscriptions.m
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeSubscriptions.m
rename to Telegram/Watch/WatchCommonWatch/TGBridgeSubscriptions.m
diff --git a/Watch/WatchCommonWatch/TGBridgeUnsupportedMediaAttachment.h b/Telegram/Watch/WatchCommonWatch/TGBridgeUnsupportedMediaAttachment.h
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeUnsupportedMediaAttachment.h
rename to Telegram/Watch/WatchCommonWatch/TGBridgeUnsupportedMediaAttachment.h
diff --git a/Watch/WatchCommonWatch/TGBridgeUnsupportedMediaAttachment.m b/Telegram/Watch/WatchCommonWatch/TGBridgeUnsupportedMediaAttachment.m
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeUnsupportedMediaAttachment.m
rename to Telegram/Watch/WatchCommonWatch/TGBridgeUnsupportedMediaAttachment.m
diff --git a/Watch/WatchCommonWatch/TGBridgeUser.h b/Telegram/Watch/WatchCommonWatch/TGBridgeUser.h
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeUser.h
rename to Telegram/Watch/WatchCommonWatch/TGBridgeUser.h
diff --git a/Watch/WatchCommonWatch/TGBridgeUser.m b/Telegram/Watch/WatchCommonWatch/TGBridgeUser.m
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeUser.m
rename to Telegram/Watch/WatchCommonWatch/TGBridgeUser.m
diff --git a/Watch/WatchCommonWatch/TGBridgeVideoMediaAttachment.h b/Telegram/Watch/WatchCommonWatch/TGBridgeVideoMediaAttachment.h
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeVideoMediaAttachment.h
rename to Telegram/Watch/WatchCommonWatch/TGBridgeVideoMediaAttachment.h
diff --git a/Watch/WatchCommonWatch/TGBridgeVideoMediaAttachment.m b/Telegram/Watch/WatchCommonWatch/TGBridgeVideoMediaAttachment.m
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeVideoMediaAttachment.m
rename to Telegram/Watch/WatchCommonWatch/TGBridgeVideoMediaAttachment.m
diff --git a/Watch/WatchCommonWatch/TGBridgeWebPageMediaAttachment.h b/Telegram/Watch/WatchCommonWatch/TGBridgeWebPageMediaAttachment.h
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeWebPageMediaAttachment.h
rename to Telegram/Watch/WatchCommonWatch/TGBridgeWebPageMediaAttachment.h
diff --git a/Watch/WatchCommonWatch/TGBridgeWebPageMediaAttachment.m b/Telegram/Watch/WatchCommonWatch/TGBridgeWebPageMediaAttachment.m
similarity index 100%
rename from Watch/WatchCommonWatch/TGBridgeWebPageMediaAttachment.m
rename to Telegram/Watch/WatchCommonWatch/TGBridgeWebPageMediaAttachment.m
diff --git a/Watch/WatchCommonWatch/WatchCommonWatch.h b/Telegram/Watch/WatchCommonWatch/WatchCommonWatch.h
similarity index 100%
rename from Watch/WatchCommonWatch/WatchCommonWatch.h
rename to Telegram/Watch/WatchCommonWatch/WatchCommonWatch.h
diff --git a/Widget/Info.plist b/Telegram/Widget/Info.plist
similarity index 100%
rename from Widget/Info.plist
rename to Telegram/Widget/Info.plist
diff --git a/Widget/PeerNode.swift b/Telegram/Widget/PeerNode.swift
similarity index 100%
rename from Widget/PeerNode.swift
rename to Telegram/Widget/PeerNode.swift
diff --git a/Widget/TodayViewController.swift b/Telegram/Widget/TodayViewController.swift
similarity index 100%
rename from Widget/TodayViewController.swift
rename to Telegram/Widget/TodayViewController.swift
diff --git a/Widget/Widget-Bridging-Header.h b/Telegram/Widget/Widget-Bridging-Header.h
similarity index 100%
rename from Widget/Widget-Bridging-Header.h
rename to Telegram/Widget/Widget-Bridging-Header.h
diff --git a/Widget/ar.lproj/InfoPlist.strings b/Telegram/Widget/ar.lproj/InfoPlist.strings
similarity index 100%
rename from Widget/ar.lproj/InfoPlist.strings
rename to Telegram/Widget/ar.lproj/InfoPlist.strings
diff --git a/Widget/de.lproj/InfoPlist.strings b/Telegram/Widget/de.lproj/InfoPlist.strings
similarity index 100%
rename from Widget/de.lproj/InfoPlist.strings
rename to Telegram/Widget/de.lproj/InfoPlist.strings
diff --git a/Widget/en.lproj/InfoPlist.strings b/Telegram/Widget/en.lproj/InfoPlist.strings
similarity index 100%
rename from Widget/en.lproj/InfoPlist.strings
rename to Telegram/Widget/en.lproj/InfoPlist.strings
diff --git a/Widget/en.lproj/Localizable.strings b/Telegram/Widget/en.lproj/Localizable.strings
similarity index 100%
rename from Widget/en.lproj/Localizable.strings
rename to Telegram/Widget/en.lproj/Localizable.strings
diff --git a/Widget/es.lproj/InfoPlist.strings b/Telegram/Widget/es.lproj/InfoPlist.strings
similarity index 100%
rename from Widget/es.lproj/InfoPlist.strings
rename to Telegram/Widget/es.lproj/InfoPlist.strings
diff --git a/Widget/it.lproj/InfoPlist.strings b/Telegram/Widget/it.lproj/InfoPlist.strings
similarity index 100%
rename from Widget/it.lproj/InfoPlist.strings
rename to Telegram/Widget/it.lproj/InfoPlist.strings
diff --git a/Widget/ko.lproj/InfoPlist.strings b/Telegram/Widget/ko.lproj/InfoPlist.strings
similarity index 100%
rename from Widget/ko.lproj/InfoPlist.strings
rename to Telegram/Widget/ko.lproj/InfoPlist.strings
diff --git a/Widget/nl.lproj/InfoPlist.strings b/Telegram/Widget/nl.lproj/InfoPlist.strings
similarity index 100%
rename from Widget/nl.lproj/InfoPlist.strings
rename to Telegram/Widget/nl.lproj/InfoPlist.strings
diff --git a/Widget/pt.lproj/InfoPlist.strings b/Telegram/Widget/pt.lproj/InfoPlist.strings
similarity index 100%
rename from Widget/pt.lproj/InfoPlist.strings
rename to Telegram/Widget/pt.lproj/InfoPlist.strings
diff --git a/Widget/ru.lproj/InfoPlist.strings b/Telegram/Widget/ru.lproj/InfoPlist.strings
similarity index 100%
rename from Widget/ru.lproj/InfoPlist.strings
rename to Telegram/Widget/ru.lproj/InfoPlist.strings
diff --git a/Telegram/telegram_info_plist.bzl b/Telegram/telegram_info_plist.bzl
new file mode 100644
index 0000000000..6e38968e65
--- /dev/null
+++ b/Telegram/telegram_info_plist.bzl
@@ -0,0 +1,77 @@
+load("//build-system:defines.bzl",
+ "string_value",
+)
+
+def _telegram_info_plist(ctx):
+ output = ctx.outputs.out
+
+ plist_string = """
+
+
+
+
+ CFBundleShortVersionString
+ {app_version}
+ CFBundleVersion
+ {build_number}
+ CFBundleURLTypes
+
+
+ CFBundleTypeRole
+ Viewer
+ CFBundleURLName
+ {bundle_id}
+ CFBundleURLSchemes
+
+ telegram
+
+
+
+ CFBundleTypeRole
+ Viewer
+ CFBundleURLName
+ {bundle_id}.ton
+ CFBundleURLSchemes
+
+ ton
+
+
+
+ CFBundleTypeRole
+ Viewer
+ CFBundleURLName
+ {app_name}.compatibility
+ CFBundleURLSchemes
+
+ {url_scheme}
+
+
+
+
+
+ """.format(
+ app_version = string_value(ctx, ctx.attr.app_version_define),
+ build_number = string_value(ctx, ctx.attr.build_number_define),
+ bundle_id = string_value(ctx, ctx.attr.bundle_id_define),
+ app_name = ctx.attr.app_name,
+ url_scheme = ctx.attr.url_scheme,
+ )
+
+ ctx.actions.write(
+ output = output,
+ content = plist_string,
+ )
+
+telegram_info_plist = rule(
+ implementation = _telegram_info_plist,
+ attrs = {
+ "app_name": attr.string(mandatory = True),
+ "url_scheme": attr.string(mandatory = True),
+ "bundle_id_define": attr.string(mandatory = True),
+ "app_version_define": attr.string(mandatory = True),
+ "build_number_define": attr.string(mandatory = True),
+ },
+ outputs = {
+ "out": "%{name}.plist"
+ },
+)
diff --git a/WORKSPACE b/WORKSPACE
new file mode 100644
index 0000000000..069a35c57e
--- /dev/null
+++ b/WORKSPACE
@@ -0,0 +1,52 @@
+load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
+
+http_archive(
+ name = "com_google_protobuf",
+ urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.8.0.zip"],
+ sha256 = "1e622ce4b84b88b6d2cdf1db38d1a634fe2392d74f0b7b74ff98f3a51838ee53",
+ strip_prefix = "protobuf-3.8.0",
+ type = "zip",
+)
+
+load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
+protobuf_deps()
+
+local_repository(
+ name = "build_bazel_rules_apple",
+ path = "build-system/bazel-rules/rules_apple",
+)
+
+local_repository(
+ name = "build_bazel_rules_swift",
+ path = "build-system/bazel-rules/rules_swift",
+)
+
+local_repository(
+ name = "build_bazel_apple_support",
+ path = "build-system/bazel-rules/apple_support",
+)
+
+load(
+ "@build_bazel_rules_apple//apple:repositories.bzl",
+ "apple_rules_dependencies",
+)
+
+apple_rules_dependencies()
+
+load(
+ "@build_bazel_rules_swift//swift:repositories.bzl",
+ "swift_rules_dependencies",
+)
+
+swift_rules_dependencies()
+
+load(
+ "@build_bazel_apple_support//lib:repositories.bzl",
+ "apple_support_dependencies",
+)
+
+apple_support_dependencies()
+
+load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
+
+bazel_skylib_workspace()
diff --git a/Wallet.makefile b/Wallet.makefile
index 20ead97244..90d359969c 100644
--- a/Wallet.makefile
+++ b/Wallet.makefile
@@ -16,7 +16,10 @@ WALLET_BUCK_OPTIONS=\
--config custom.isInternalBuild="${IS_INTERNAL_BUILD}" \
--config custom.isAppStoreBuild="${IS_APPSTORE_BUILD}" \
--config custom.appStoreId="${APPSTORE_ID}" \
- --config custom.appSpecificUrlScheme="${APP_SPECIFIC_URL_SCHEME}"
+ --config custom.appSpecificUrlScheme="${APP_SPECIFIC_URL_SCHEME}" \
+ --config buildfile.name=BUCK
+
+BAZEL=$(shell which bazel)
wallet_deps: check_env
$(BUCK) query "deps(//Wallet:AppPackage)" --output-attribute buck.type \
@@ -48,3 +51,5 @@ wallet_package:
wallet_app: build_wallet wallet_package
+tulsi_project:
+ ${HOME}/Applications/Tulsi.app/Contents/MacOS/Tulsi -- --genconfig Wallet/Wallet.tulsiproj:Default --bazel "${BAZEL}"
diff --git a/Wallet/BUILD b/Wallet/BUILD
new file mode 100644
index 0000000000..a924e4a93e
--- /dev/null
+++ b/Wallet/BUILD
@@ -0,0 +1,111 @@
+load("@build_bazel_rules_apple//apple:ios.bzl", "ios_application", "ios_framework")
+load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
+
+version_info_plist_source = """
+echo \
+'' \
+'' \
+'' \
+'' \
+' CFBundleShortVersionString' \
+' {}' \
+' CFBundleVersion' \
+' {}' \
+'' \
+'' \
+> "$@"
+""".format("1.0", "30")
+
+genrule(
+ name = "VersionInfoPlist",
+ outs = ["VersionInfo.plist"],
+ cmd = version_info_plist_source,
+)
+
+filegroup(
+ name = "Strings",
+ srcs = glob([
+ "Strings/**/*",
+ ], exclude = ["Strings/**/.*"]),
+)
+
+objc_library(
+ name = "Main",
+ srcs = [
+ "Sources/main.m"
+ ],
+)
+
+ios_framework(
+ name = "AsyncDisplayKitFramework",
+ deps = ["//submodules/AsyncDisplayKit:AsyncDisplayKit"],
+ bundle_id = "org.telegram.Telegram.AsyncDisplayKit",
+ families = ["iphone", "ipad"],
+ minimum_os_version = "9.0",
+ infoplists = [
+ "Info.plist"
+ ],
+)
+
+swift_library(
+ name = "Lib",
+ srcs = glob([
+ "Sources/**/*.swift",
+ ]),
+ data = [
+ ":Strings",
+ ],
+ deps = [
+ "//submodules/GZip:GZip",
+ "//submodules/AsyncDisplayKit:AsyncDisplayKit",
+ "//submodules/SSignalKit/SSignalKit:SSignalKit",
+ "//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
+ "//submodules/ObjCRuntimeUtils:ObjCRuntimeUtils",
+ "//submodules/UIKitRuntimeUtils:UIKitRuntimeUtils",
+ "//submodules/Display:Display",
+ "//submodules/AlertUI:AlertUI",
+ "//submodules/ActivityIndicator:ActivityIndicator",
+ "//submodules/OverlayStatusController:OverlayStatusController",
+ "//submodules/openssl:openssl",
+ "//submodules/OpenSSLEncryptionProvider:OpenSSLEncryptionProvider",
+ "//submodules/WalletCore:WalletCore",
+ "//submodules/BuildConfig:BuildConfig",
+ "//submodules/AppBundle:AppBundle",
+ "//submodules/SolidRoundedButtonNode:SolidRoundedButtonNode",
+ "//submodules/Camera:Camera",
+ "//submodules/QrCode:QrCode",
+ "//submodules/MergeLists:MergeLists",
+ "//submodules/GlassButtonNode:GlassButtonNode",
+ "//submodules/UrlEscaping:UrlEscaping",
+ "//submodules/LocalAuth:LocalAuth",
+ "//submodules/ScreenCaptureDetection:ScreenCaptureDetection",
+ "//submodules/WalletUrl:WalletUrl",
+ "//submodules/ProgressNavigationButtonNode:ProgressNavigationButtonNode",
+ "//submodules/Markdown:Markdown",
+ "//submodules/StringPluralization:StringPluralization",
+ "//submodules/YuvConversion:YuvConversion",
+ "//submodules/rlottie:RLottieBinding",
+ "//submodules/AnimatedStickerNode:AnimatedStickerNode",
+ "//submodules/WalletUI:WalletUI",
+ "//submodules/FFMpegBinding:FFMpegBinding",
+ ],
+)
+
+ios_application(
+ name = "Wallet",
+ bundle_id = "{wallet_bundle_id}",
+ families = ["iphone", "ipad"],
+ minimum_os_version = "9.0",
+ provisioning_profile = "Wallet.mobileprovision",
+ infoplists = [
+ ":Info.plist",
+ ":VersionInfoPlist",
+ ],
+ frameworks = [
+ ":AsyncDisplayKitFramework",
+ ],
+ deps = [
+ ":Main",
+ ":Lib",
+ ],
+)
diff --git a/Wallet/Info.plist b/Wallet/Info.plist
index 7646b3381e..7e6af0fec1 100644
--- a/Wallet/Info.plist
+++ b/Wallet/Info.plist
@@ -7,7 +7,7 @@
CFBundleDevelopmentRegion
en
CFBundleDisplayName
- ${APP_NAME}
+ ${PRODUCT_NAME}
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIcons
diff --git a/Wallet/Sources/AppDelegate.swift b/Wallet/Sources/AppDelegate.swift
index cefa741684..6eb23fdcaa 100644
--- a/Wallet/Sources/AppDelegate.swift
+++ b/Wallet/Sources/AppDelegate.swift
@@ -765,7 +765,7 @@ final class AppDelegate: NSObject, UIApplicationDelegate {
beginWithController(infoScreen)
})
} else {
- let createdScreen = WalletSplashScreen(context: walletContext, mode: .created(record.info, nil), walletCreatedPreloadState: nil)
+ let createdScreen = WalletSplashScreen(context: walletContext, mode: .created(walletInfo: record.info, words: nil), walletCreatedPreloadState: nil)
beginWithController(createdScreen)
}
} else {
diff --git a/Wallet/Strings/en.lproj/Localizable.strings b/Wallet/Strings/en.lproj/Localizable.strings
index 83e12f54a4..94b0aa8ad2 100644
--- a/Wallet/Strings/en.lproj/Localizable.strings
+++ b/Wallet/Strings/en.lproj/Localizable.strings
@@ -62,6 +62,7 @@
"Wallet.Send.OwnAddressAlertProceed" = "Proceed";
"Wallet.Send.TransactionInProgress" = "Please wait until the current transaction is completed.";
"Wallet.Send.SyncInProgress" = "Please wait while the wallet finishes syncing with the TON Blockchain.";
+"Wallet.Send.EncryptComment" = "Encrypt Text";
"Wallet.Settings.Title" = "Settings";
"Wallet.Settings.Configuration" = "Server Settings";
"Wallet.Settings.ConfigurationInfo" = "Advanced Settings";
diff --git a/Wallet/SupportFiles/Empty.swift b/Wallet/SupportFiles/Empty.swift
index 8b13789179..e69de29bb2 100644
--- a/Wallet/SupportFiles/Empty.swift
+++ b/Wallet/SupportFiles/Empty.swift
@@ -1 +0,0 @@
-
diff --git a/Wallet/Wallet.mobileprovision b/Wallet/Wallet.mobileprovision
new file mode 100644
index 0000000000..879842ec7b
Binary files /dev/null and b/Wallet/Wallet.mobileprovision differ
diff --git a/submodules/HockeySDK-iOS/Support/HockeySDKTests/Fixtures/live_report_empty.plcrash b/Wallet/configuration.bzl
similarity index 100%
rename from submodules/HockeySDK-iOS/Support/HockeySDKTests/Fixtures/live_report_empty.plcrash
rename to Wallet/configuration.bzl
diff --git a/build-input/BUILD b/build-input/BUILD
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/build-system/BUILD b/build-system/BUILD
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/build-system/bazel-rules/apple_support b/build-system/bazel-rules/apple_support
new file mode 160000
index 0000000000..501b4afb27
--- /dev/null
+++ b/build-system/bazel-rules/apple_support
@@ -0,0 +1 @@
+Subproject commit 501b4afb27745c4813a88ffa28acd901408014e4
diff --git a/build-system/bazel-rules/rules_apple b/build-system/bazel-rules/rules_apple
new file mode 160000
index 0000000000..6e1f592277
--- /dev/null
+++ b/build-system/bazel-rules/rules_apple
@@ -0,0 +1 @@
+Subproject commit 6e1f592277650a2727b6e84705ec1a2dc17764fa
diff --git a/build-system/bazel-rules/rules_swift b/build-system/bazel-rules/rules_swift
new file mode 160000
index 0000000000..bbe187c4b1
--- /dev/null
+++ b/build-system/bazel-rules/rules_swift
@@ -0,0 +1 @@
+Subproject commit bbe187c4b1f55c0974a0da345e5e313eaed37c05
diff --git a/build-system/copy-provisioning-profiles.sh b/build-system/copy-provisioning-profiles.sh
new file mode 100755
index 0000000000..ef676cc5b5
--- /dev/null
+++ b/build-system/copy-provisioning-profiles.sh
@@ -0,0 +1,125 @@
+#!/bin/sh
+
+copy_provisioning_profiles () {
+ if [ "$CODESIGNING_DATA_PATH" = "" ]; then
+ >&2 echo "CODESIGNING_DATA_PATH not defined"
+ exit 1
+ fi
+
+
+ PROFILES_TYPE="$1"
+ case "$PROFILES_TYPE" in
+ development)
+ EXPECTED_VARIABLES=(\
+ DEVELOPMENT_PROVISIONING_PROFILE_APP \
+ DEVELOPMENT_PROVISIONING_PROFILE_EXTENSION_SHARE \
+ DEVELOPMENT_PROVISIONING_PROFILE_EXTENSION_WIDGET \
+ DEVELOPMENT_PROVISIONING_PROFILE_EXTENSION_NOTIFICATIONSERVICE \
+ DEVELOPMENT_PROVISIONING_PROFILE_EXTENSION_NOTIFICATIONCONTENT \
+ DEVELOPMENT_PROVISIONING_PROFILE_EXTENSION_INTENTS \
+ DEVELOPMENT_PROVISIONING_PROFILE_WATCH_APP \
+ DEVELOPMENT_PROVISIONING_PROFILE_WATCH_EXTENSION \
+ )
+ ;;
+ distribution)
+ EXPECTED_VARIABLES=(\
+ DISTRIBUTION_PROVISIONING_PROFILE_APP \
+ DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_SHARE \
+ DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_WIDGET \
+ DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_NOTIFICATIONSERVICE \
+ DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_NOTIFICATIONCONTENT \
+ DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_INTENTS \
+ DISTRIBUTION_PROVISIONING_PROFILE_WATCH_APP \
+ DISTRIBUTION_PROVISIONING_PROFILE_WATCH_EXTENSION \
+ )
+ ;;
+ *)
+ echo "Unknown build provisioning type: $PROFILES_TYPE"
+ exit 1
+ ;;
+ esac
+
+ EXPECTED_VARIABLE_NAMES=(\
+ Telegram \
+ Share \
+ Widget \
+ NotificationService \
+ NotificationContent \
+ Intents \
+ WatchApp \
+ WatchExtension \
+ )
+
+ local SEARCH_NAMES=()
+
+ local MISSING_VARIABLES="0"
+ for VARIABLE_NAME in ${EXPECTED_VARIABLES[@]}; do
+ if [ "${!VARIABLE_NAME}" = "" ]; then
+ echo "$VARIABLE_NAME not defined"
+ MISSING_VARIABLES="1"
+ fi
+ done
+
+ if [ "$MISSING_VARIABLES" == "1" ]; then
+ exit 1
+ fi
+
+ local VARIABLE_COUNT=${#EXPECTED_VARIABLES[@]}
+ for (( i=0; i<$VARIABLE_COUNT; i=i+1 )); do
+ VARIABLE_NAME="${EXPECTED_VARIABLES[$(($i))]}"
+ SEARCH_NAMES=("${SEARCH_NAMES[@]}" "${EXPECTED_VARIABLE_NAMES[$i]}" "${!VARIABLE_NAME}")
+ done
+
+ local DATA_PATH="build-input/data"
+
+ local OUTPUT_DIRECTORY="$DATA_PATH/provisioning-profiles"
+ rm -rf "$OUTPUT_DIRECTORY"
+ mkdir -p "$OUTPUT_DIRECTORY"
+
+ local BUILD_PATH="$OUTPUT_DIRECTORY/BUILD"
+ touch "$BUILD_PATH"
+
+ echo "exports_files([" >> "$BUILD_PATH"
+
+ local ELEMENT_COUNT=${#SEARCH_NAMES[@]}
+ local REMAINDER=$(($ELEMENT_COUNT % 2))
+
+ if [ $REMAINDER != 0 ]; then
+ >&2 echo "Expecting key-value pairs"
+ exit 1
+ fi
+
+ for PROFILE in `find "$CODESIGNING_DATA_PATH" -type f -name "*.mobileprovision"`; do
+ PROFILE_DATA=$(security cms -D -i "$PROFILE")
+ PROFILE_NAME=$(/usr/libexec/PlistBuddy -c "Print :Name" /dev/stdin <<< $(echo $PROFILE_DATA))
+ for (( i=0; i<$ELEMENT_COUNT; i=i+2 )); do
+ ID=${SEARCH_NAMES[$i]}
+ SEARCH_NAME=${SEARCH_NAMES[$(($i + 1))]}
+ if [ "$PROFILE_NAME" = "$SEARCH_NAME" ]; then
+ VARIABLE_NAME="FOUND_PROFILE_$ID"
+ if [ "${!VARIABLE_NAME}" = "" ]; then
+ eval "FOUND_PROFILE_$ID=\"$PROFILE\""
+ else
+ >&2 echo "Found multiple profiles with name \"$SEARCH_NAME\""
+ exit 1
+ fi
+ fi
+ done
+ done
+
+ for (( i=0; i<$ELEMENT_COUNT; i=i+2 )); do
+ ID=${SEARCH_NAMES[$i]}
+ SEARCH_NAME=${SEARCH_NAMES[$(($i + 1))]}
+ VARIABLE_NAME="FOUND_PROFILE_$ID"
+ FOUND_PROFILE="${!VARIABLE_NAME}"
+ if [ "$FOUND_PROFILE" = "" ]; then
+ >&2 echo "Profile \"$SEARCH_NAME\" not found"
+ exit 1
+ fi
+
+ cp "$FOUND_PROFILE" "$OUTPUT_DIRECTORY/$ID.mobileprovision"
+ echo " \"$ID.mobileprovision\"," >> $BUILD_PATH
+ done
+
+ echo "])" >> "$BUILD_PATH"
+}
diff --git a/build-system/defines.bzl b/build-system/defines.bzl
new file mode 100644
index 0000000000..d9e5ac9fdd
--- /dev/null
+++ b/build-system/defines.bzl
@@ -0,0 +1,36 @@
+def string_value(ctx, define_name):
+ """Looks up a define on ctx for a string value.
+
+ Will also report an error if the value is not defined.
+
+ Args:
+ ctx: A skylark context.
+ define_name: The name of the define to look up.
+
+ Returns:
+ The value of the define.
+ """
+ value = ctx.var.get(define_name, None)
+ if value != None:
+ return value
+ fail("Expected value for --define={} was not found".format(
+ define_name,
+ ))
+
+def _file_from_define(ctx):
+ output = ctx.outputs.out
+ ctx.actions.write(
+ output = output,
+ content = "profile_data",
+ )
+
+file_from_define = rule(
+ implementation = _file_from_define,
+ attrs = {
+ "define_name": attr.string(mandatory = True),
+ "extension": attr.string(mandatory = True),
+ },
+ outputs = {
+ "out": "%{name}.%{extension}"
+ },
+)
diff --git a/build-system/generate-xcode-project.sh b/build-system/generate-xcode-project.sh
new file mode 100755
index 0000000000..4cc7c0d8b1
--- /dev/null
+++ b/build-system/generate-xcode-project.sh
@@ -0,0 +1,95 @@
+#!/bin/sh
+
+set -e
+
+BAZEL="$(which bazel)"
+if [ "$BAZEL" = "" ]; then
+ echo "bazel not found in PATH"
+ exit 1
+fi
+
+XCODE_VERSION=$(cat "build-system/xcode_version")
+INSTALLED_XCODE_VERSION=$(echo `plutil -p \`xcode-select -p\`/../Info.plist | grep -e CFBundleShortVersionString | sed 's/[^0-9\.]*//g'`)
+
+if [ "$INSTALLED_XCODE_VERSION" != "$XCODE_VERSION" ]; then
+ echo "Xcode $XCODE_VERSION required, $INSTALLED_XCODE_VERSION installed (at $(xcode-select -p))"
+ exit 1
+fi
+
+EXPECTED_VARIABLES=(\
+ BUILD_NUMBER \
+ APP_VERSION \
+ BUNDLE_ID \
+ DEVELOPMENT_TEAM \
+ API_ID \
+ API_HASH \
+ APP_CENTER_ID \
+ IS_INTERNAL_BUILD \
+ IS_APPSTORE_BUILD \
+ APPSTORE_ID \
+ APP_SPECIFIC_URL_SCHEME \
+)
+
+MISSING_VARIABLES="0"
+for VARIABLE_NAME in ${EXPECTED_VARIABLES[@]}; do
+ if [ "${!VARIABLE_NAME}" = "" ]; then
+ echo "$VARIABLE_NAME not defined"
+ MISSING_VARIABLES="1"
+ fi
+done
+if [ "$MISSING_VARIABLES" == "1" ]; then
+ exit 1
+fi
+
+GEN_DIRECTORY="build-input/gen/project"
+rm -rf "$GEN_DIRECTORY"
+mkdir -p "$GEN_DIRECTORY"
+
+pushd "build-system/tulsi"
+"$BAZEL" build //:tulsi --xcode_version="$XCODE_VERSION"
+popd
+
+TULSI_DIRECTORY="build-input/gen/project"
+TULSI_APP="build-input/gen/project/Tulsi.app"
+TULSI="$TULSI_APP/Contents/MacOS/Tulsi"
+mkdir -p "$TULSI_DIRECTORY"
+
+unzip -oq "build-system/tulsi/bazel-bin/tulsi.zip" -d "$TULSI_DIRECTORY"
+
+CORE_COUNT=$(sysctl -n hw.logicalcpu)
+CORE_COUNT_MINUS_ONE=$(expr ${CORE_COUNT} \- 1)
+
+BAZEL_OPTIONS=(\
+ --features=swift.use_global_module_cache \
+ --spawn_strategy=standalone \
+ --strategy=SwiftCompile=standalone \
+ --features=swift.enable_batch_mode \
+ --swiftcopt=-j${CORE_COUNT_MINUS_ONE} \
+)
+
+if [ "$BAZEL_CACHE_DIR" != "" ]; then
+ BAZEL_OPTIONS=("${BAZEL_OPTIONS[@]}" --disk_cache="$(echo $BAZEL_CACHE_DIR | sed -e 's/[\/&]/\\&/g')")
+fi
+
+"$TULSI" -- \
+ --verbose \
+ --create-tulsiproj Telegram \
+ --workspaceroot ./ \
+ --bazel "$BAZEL" \
+ --outputfolder "$GEN_DIRECTORY" \
+ --target Telegram:Telegram \
+ --target Telegram:Main \
+ --target Telegram:Lib \
+
+PATCH_OPTIONS="BazelBuildOptionsDebug BazelBuildOptionsRelease"
+for NAME in $PATCH_OPTIONS; do
+ sed -i "" -e '1h;2,$H;$!d;g' -e 's/\("'"$NAME"'" : {\n[ ]*"p" : "$(inherited)\)/\1'" ${BAZEL_OPTIONS[*]}"'/' "$GEN_DIRECTORY/Telegram.tulsiproj/Configs/Telegram.tulsigen"
+done
+
+sed -i "" -e '1h;2,$H;$!d;g' -e 's/\("sourceFilters" : \[\n[ ]*\)"\.\/\.\.\."/\1"Telegram\/...", "submodules\/..."/' "$GEN_DIRECTORY/Telegram.tulsiproj/Configs/Telegram.tulsigen"
+
+"$TULSI" -- \
+ --verbose \
+ --genconfig "$GEN_DIRECTORY/Telegram.tulsiproj:Telegram" \
+ --bazel "$BAZEL" \
+ --outputfolder "$GEN_DIRECTORY" \
diff --git a/build-system/manage-developer-portal-app.sh b/build-system/manage-developer-portal-app.sh
new file mode 100644
index 0000000000..60e21c1381
--- /dev/null
+++ b/build-system/manage-developer-portal-app.sh
@@ -0,0 +1,129 @@
+#!/bin/bash
+
+set -e
+
+FASTLANE="$(which fastlane)"
+
+EXPECTED_VARIABLES=(\
+ APPLE_ID \
+ BASE_BUNDLE_ID \
+ APP_NAME \
+ TEAM_ID \
+ PROVISIONING_DIRECTORY \
+)
+
+MISSING_VARIABLES="0"
+for VARIABLE_NAME in ${EXPECTED_VARIABLES[@]}; do
+ if [ "${!VARIABLE_NAME}" = "" ]; then
+ echo "$VARIABLE_NAME not defined"
+ MISSING_VARIABLES="1"
+ fi
+done
+if [ "$MISSING_VARIABLES" == "1" ]; then
+ exit 1
+fi
+
+if [ ! -d "$PROVISIONING_DIRECTORY" ]; then
+ echo "Directory $PROVISIONING_DIRECTORY does not exist"
+ exit 1
+fi
+
+BASE_DIR=$(mktemp -d)
+FASTLANE_DIR="$BASE_DIR/fastlane"
+mkdir "$FASTLANE_DIR"
+FASTFILE="$FASTLANE_DIR/Fastfile"
+
+touch "$FASTFILE"
+
+CREDENTIALS=(\
+ --username "$APPLE_ID" \
+ --team_id "$TEAM_ID" \
+)
+export FASTLANE_SKIP_UPDATE_CHECK=1
+
+APP_EXTENSIONS=(\
+ Share \
+ SiriIntents \
+ NotificationContent \
+ NotificationService \
+ Widget \
+)
+
+echo "lane :manage_app do" >> "$FASTFILE"
+echo " produce(" >> "$FASTFILE"
+echo " username: '$APPLE_ID'," >> "$FASTFILE"
+echo " app_identifier: '${BASE_BUNDLE_ID}'," >> "$FASTFILE"
+echo " app_name: '$APP_NAME'," >> "$FASTFILE"
+echo " language: 'English'," >> "$FASTFILE"
+echo " app_version: '1.0'," >> "$FASTFILE"
+echo " team_id: '$TEAM_ID'," >> "$FASTFILE"
+echo " skip_itc: true," >> "$FASTFILE"
+echo " )" >> "$FASTFILE"
+
+echo " produce(" >> "$FASTFILE"
+echo " username: '$APPLE_ID'," >> "$FASTFILE"
+echo " app_identifier: '${BASE_BUNDLE_ID}.watchkitapp'," >> "$FASTFILE"
+echo " app_name: '$APP_NAME Watch App'," >> "$FASTFILE"
+echo " language: 'English'," >> "$FASTFILE"
+echo " app_version: '1.0'," >> "$FASTFILE"
+echo " team_id: '$TEAM_ID'," >> "$FASTFILE"
+echo " skip_itc: true," >> "$FASTFILE"
+echo " )" >> "$FASTFILE"
+
+echo " produce(" >> "$FASTFILE"
+echo " username: '$APPLE_ID'," >> "$FASTFILE"
+echo " app_identifier: '${BASE_BUNDLE_ID}.watchkitapp.watchkitextension'," >> "$FASTFILE"
+echo " app_name: '$APP_NAME Watch App Extension'," >> "$FASTFILE"
+echo " language: 'English'," >> "$FASTFILE"
+echo " app_version: '1.0'," >> "$FASTFILE"
+echo " team_id: '$TEAM_ID'," >> "$FASTFILE"
+echo " skip_itc: true," >> "$FASTFILE"
+echo " )" >> "$FASTFILE"
+
+for EXTENSION in ${APP_EXTENSIONS[@]}; do
+ echo " produce(" >> "$FASTFILE"
+ echo " username: '$APPLE_ID'," >> "$FASTFILE"
+ echo " app_identifier: '${BASE_BUNDLE_ID}.${EXTENSION}'," >> "$FASTFILE"
+ echo " app_name: '${APP_NAME} ${EXTENSION}'," >> "$FASTFILE"
+ echo " language: 'English'," >> "$FASTFILE"
+ echo " app_version: '1.0'," >> "$FASTFILE"
+ echo " team_id: '$TEAM_ID'," >> "$FASTFILE"
+ echo " skip_itc: true," >> "$FASTFILE"
+ echo " )" >> "$FASTFILE"
+done
+
+echo "end" >> "$FASTFILE"
+
+pushd "$BASE_DIR"
+
+fastlane cert ${CREDENTIALS[@]} --development
+
+fastlane manage_app
+
+fastlane produce group -g "group.$BASE_BUNDLE_ID" -n "$APP_NAME Group" ${CREDENTIALS[@]}
+
+fastlane produce enable_services -a "$BASE_BUNDLE_ID" ${CREDENTIALS[@]} \
+ --app-group \
+ --push-notification \
+ --sirikit
+
+fastlane produce associate_group -a "$BASE_BUNDLE_ID" "group.$BASE_BUNDLE_ID" ${CREDENTIALS[@]}
+for EXTENSION in ${APP_EXTENSIONS[@]}; do
+ fastlane produce enable_services -a "${BASE_BUNDLE_ID}.${EXTENSION}" ${CREDENTIALS[@]} \
+ --app-group
+
+ fastlane produce associate_group -a "${BASE_BUNDLE_ID}.${EXTENSION}" "group.$BASE_BUNDLE_ID" ${CREDENTIALS[@]}
+done
+
+for DEVELOPMENT_FLAG in "--development"; do
+ fastlane sigh -a "$BASE_BUNDLE_ID" ${CREDENTIALS[@]} -o "$PROVISIONING_DIRECTORY" $DEVELOPMENT_FLAG \
+ --skip_install
+ for EXTENSION in ${APP_EXTENSIONS[@]}; do
+ fastlane sigh -a "${BASE_BUNDLE_ID}.${EXTENSION}" ${CREDENTIALS[@]} -o "$PROVISIONING_DIRECTORY" $DEVELOPMENT_FLAG \
+ --skip_install
+ done
+done
+
+popd
+
+rm -rf "$BASE_DIR"
diff --git a/build-system/plist_fragment.bzl b/build-system/plist_fragment.bzl
new file mode 100644
index 0000000000..4b28670773
--- /dev/null
+++ b/build-system/plist_fragment.bzl
@@ -0,0 +1,52 @@
+load("//build-system:defines.bzl",
+ "string_value",
+)
+
+def _plist_fragment(ctx):
+ output = ctx.outputs.out
+
+ found_keys = list()
+ template = ctx.attr.template
+ current_start = 0
+ for i in range(len(template)):
+ start_index = template.find("{", current_start)
+ if start_index == -1:
+ break
+ end_index = template.find("}", start_index + 1)
+ if end_index == -1:
+ fail("Could not find the matching '}' for the '{' at {}".format(start_index))
+ found_keys.append(template[start_index + 1:end_index])
+ current_start = end_index + 1
+
+ resolved_values = dict()
+ for key in found_keys:
+ value = ctx.var.get(key, None)
+ if value == None:
+ fail("Expected value for --define={} was not found".format(key))
+ resolved_values[key] = value
+
+ plist_string = """
+
+
+
+
+ """ + template.format(**resolved_values) + """
+
+
+ """
+
+ ctx.actions.write(
+ output = output,
+ content = plist_string,
+ )
+
+plist_fragment = rule(
+ implementation = _plist_fragment,
+ attrs = {
+ "extension": attr.string(mandatory = True),
+ "template": attr.string(mandatory = True),
+ },
+ outputs = {
+ "out": "%{name}.%{extension}"
+ },
+)
diff --git a/build-system/prepare-build-variables.sh b/build-system/prepare-build-variables.sh
new file mode 100755
index 0000000000..d88042f518
--- /dev/null
+++ b/build-system/prepare-build-variables.sh
@@ -0,0 +1,69 @@
+#!/bin/sh
+
+set -e
+
+prepare_build_variables () {
+ BUILD_TYPE="$1"
+ case "$BUILD_TYPE" in
+ development)
+ APS_ENVIRONMENT="development"
+ ;;
+ distribution)
+ APS_ENVIRONMENT="production"
+ ;;
+ *)
+ echo "Unknown build provisioning type: $BUILD_TYPE"
+ exit 1
+ ;;
+ esac
+
+ local BAZEL="$(which bazel)"
+ if [ "$BAZEL" = "" ]; then
+ echo "bazel not found in PATH"
+ exit 1
+ fi
+
+ local EXPECTED_VARIABLES=(\
+ BUILD_NUMBER \
+ APP_VERSION \
+ BUNDLE_ID \
+ DEVELOPMENT_TEAM \
+ API_ID \
+ API_HASH \
+ APP_CENTER_ID \
+ IS_INTERNAL_BUILD \
+ IS_APPSTORE_BUILD \
+ APPSTORE_ID \
+ APP_SPECIFIC_URL_SCHEME \
+ )
+
+ local MISSING_VARIABLES="0"
+ for VARIABLE_NAME in ${EXPECTED_VARIABLES[@]}; do
+ if [ "${!VARIABLE_NAME}" = "" ]; then
+ echo "$VARIABLE_NAME not defined"
+ MISSING_VARIABLES="1"
+ fi
+ done
+
+ if [ "$MISSING_VARIABLES" == "1" ]; then
+ exit 1
+ fi
+
+ local VARIABLES_DIRECTORY="build-input/data"
+ mkdir -p "$VARIABLES_DIRECTORY"
+ local VARIABLES_PATH="$VARIABLES_DIRECTORY/variables.bzl"
+ rm -f "$VARIABLES_PATH"
+
+ echo "telegram_build_number = \"$BUILD_NUMBER\"" >> "$VARIABLES_PATH"
+ echo "telegram_version = \"$APP_VERSION\"" >> "$VARIABLES_PATH"
+ echo "telegram_bundle_id = \"$BUNDLE_ID\"" >> "$VARIABLES_PATH"
+ echo "telegram_api_id = \"$API_ID\"" >> "$VARIABLES_PATH"
+ echo "telegram_team_id = \"$DEVELOPMENT_TEAM\"" >> "$VARIABLES_PATH"
+ echo "telegram_api_hash = \"$API_HASH\"" >> "$VARIABLES_PATH"
+ echo "telegram_app_center_id = \"$APP_CENTER_ID\"" >> "$VARIABLES_PATH"
+ echo "telegram_is_internal_build = \"$IS_INTERNAL_BUILD\"" >> "$VARIABLES_PATH"
+ echo "telegram_is_appstore_build = \"$IS_APPSTORE_BUILD\"" >> "$VARIABLES_PATH"
+ echo "telegram_appstore_id = \"$APPSTORE_ID\"" >> "$VARIABLES_PATH"
+ echo "telegram_app_specific_url_scheme = \"$APP_SPECIFIC_URL_SCHEME\"" >> "$VARIABLES_PATH"
+ echo "telegram_aps_environment = \"$APS_ENVIRONMENT\"" >> "$VARIABLES_PATH"
+}
diff --git a/build-system/prepare-build.sh b/build-system/prepare-build.sh
new file mode 100755
index 0000000000..c65df066f1
--- /dev/null
+++ b/build-system/prepare-build.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+set -e
+
+BUILD_TYPE="$1"
+case "$BUILD_TYPE" in
+ development)
+ PROFILES_TYPE="development"
+ ;;
+ distribution)
+ PROFILES_TYPE="distribution"
+ ;;
+ *)
+ echo "Unknown build provisioning type: $BUILD_TYPE"
+ exit 1
+ ;;
+esac
+
+BASE_PATH=$(dirname $0)
+
+DATA_DIRECTORY="build-input/data"
+rm -rf "$DATA_DIRECTORY"
+mkdir -p "$DATA_DIRECTORY"
+touch "$DATA_DIRECTORY/BUILD"
+
+source "$BASE_PATH/copy-provisioning-profiles.sh"
+source "$BASE_PATH/prepare-build-variables.sh"
+
+echo "Copying provisioning profiles..."
+copy_provisioning_profiles "$PROFILES_TYPE"
+
+echo "Preparing build variables..."
+prepare_build_variables "$BUILD_TYPE"
diff --git a/build-system/tulsi b/build-system/tulsi
new file mode 160000
index 0000000000..ee185c4c20
--- /dev/null
+++ b/build-system/tulsi
@@ -0,0 +1 @@
+Subproject commit ee185c4c20ea4384bc3cbf8ccd8705c904154abb
diff --git a/build-system/unique_directories.bzl b/build-system/unique_directories.bzl
new file mode 100644
index 0000000000..a2ff428504
--- /dev/null
+++ b/build-system/unique_directories.bzl
@@ -0,0 +1,10 @@
+
+def unique_directories(paths):
+ result = []
+ for path in paths:
+ index = path.rfind("/")
+ if index != -1:
+ directory = path[:index]
+ if not directory in result:
+ result.append(directory)
+ return result
diff --git a/build-system/verify.sh b/build-system/verify.sh
index d260604e30..89e33bef02 100644
--- a/build-system/verify.sh
+++ b/build-system/verify.sh
@@ -21,22 +21,22 @@ if [ -z "$BUILD_NUMBER" ]; then
exit 1
fi
-export ENTITLEMENTS_APP="Telegram/Telegram-iOS/Telegram-iOS-AppStoreLLC.entitlements"
+export ENTITLEMENTS_APP="Telegram-iOS/Telegram-iOS-AppStoreLLC.entitlements"
export DEVELOPMENT_PROVISIONING_PROFILE_APP="match Development ph.telegra.Telegraph"
export DISTRIBUTION_PROVISIONING_PROFILE_APP="match AppStore ph.telegra.Telegraph"
-export ENTITLEMENTS_EXTENSION_SHARE="Telegram/Share/Share-AppStoreLLC.entitlements"
+export ENTITLEMENTS_EXTENSION_SHARE="Share/Share-AppStoreLLC.entitlements"
export DEVELOPMENT_PROVISIONING_PROFILE_EXTENSION_SHARE="match Development ph.telegra.Telegraph.Share"
export DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_SHARE="match AppStore ph.telegra.Telegraph.Share"
-export ENTITLEMENTS_EXTENSION_WIDGET="Telegram/Widget/Widget-AppStoreLLC.entitlements"
+export ENTITLEMENTS_EXTENSION_WIDGET="Widget/Widget-AppStoreLLC.entitlements"
export DEVELOPMENT_PROVISIONING_PROFILE_EXTENSION_WIDGET="match Development ph.telegra.Telegraph.Widget"
export DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_WIDGET="match AppStore ph.telegra.Telegraph.Widget"
-export ENTITLEMENTS_EXTENSION_NOTIFICATIONSERVICE="Telegram/NotificationService/NotificationService-AppStoreLLC.entitlements"
+export ENTITLEMENTS_EXTENSION_NOTIFICATIONSERVICE="NotificationService/NotificationService-AppStoreLLC.entitlements"
export DEVELOPMENT_PROVISIONING_PROFILE_EXTENSION_NOTIFICATIONSERVICE="match Development ph.telegra.Telegraph.NotificationService"
export DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_NOTIFICATIONSERVICE="match AppStore ph.telegra.Telegraph.NotificationService"
-export ENTITLEMENTS_EXTENSION_NOTIFICATIONCONTENT="Telegram/NotificationContent/NotificationContent-AppStoreLLC.entitlements"
+export ENTITLEMENTS_EXTENSION_NOTIFICATIONCONTENT="NotificationContent/NotificationContent-AppStoreLLC.entitlements"
export DEVELOPMENT_PROVISIONING_PROFILE_EXTENSION_NOTIFICATIONCONTENT="match Development ph.telegra.Telegraph.NotificationContent"
export DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_NOTIFICATIONCONTENT="match AppStore ph.telegra.Telegraph.NotificationContent"
-export ENTITLEMENTS_EXTENSION_INTENTS="Telegram/SiriIntents/SiriIntents-AppStoreLLC.entitlements"
+export ENTITLEMENTS_EXTENSION_INTENTS="SiriIntents/SiriIntents-AppStoreLLC.entitlements"
export DEVELOPMENT_PROVISIONING_PROFILE_EXTENSION_INTENTS="match Development ph.telegra.Telegraph.SiriIntents"
export DISTRIBUTION_PROVISIONING_PROFILE_EXTENSION_INTENTS="match AppStore ph.telegra.Telegraph.SiriIntents"
export DEVELOPMENT_PROVISIONING_PROFILE_WATCH_APP="match Development ph.telegra.Telegraph.watchkitapp"
diff --git a/build-system/xcode_version b/build-system/xcode_version
new file mode 100644
index 0000000000..f226094f1f
--- /dev/null
+++ b/build-system/xcode_version
@@ -0,0 +1 @@
+11.3.1
\ No newline at end of file
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
deleted file mode 100644
index 9d9c295348..0000000000
--- a/fastlane/Fastfile
+++ /dev/null
@@ -1,65 +0,0 @@
-fastlane_version "1.81.0"
-
-default_platform :ios
-
-base_app_identifier_llc = "ph.telegra.Telegraph"
-app_identifier_llc = [
- base_app_identifier_llc,
- base_app_identifier_llc + ".Widget",
- base_app_identifier_llc + ".NotificationContent",
- base_app_identifier_llc + ".SiriIntents",
- base_app_identifier_llc + ".Share",
- base_app_identifier_llc + ".watchkitapp",
- base_app_identifier_llc + ".watchkitapp.watchkitextension",
- base_app_identifier_llc + ".NotificationService"
-]
-signing_identity_llc = "iPhone Distribution: Digital Fortress LLC (C67CF9S4VU)"
-
-lane :do_build_app do |options|
- puts("Building with build number: " + options[:build_number] + ", commit id: " + options[:commit_id])
- gym(
- workspace: "Telegram-iOS.xcworkspace",
- configuration: options[:configuration],
- scheme: options[:scheme],
- silent: false,
- clean: true,
- export_method: options[:export_method],
- output_name: options[:scheme],
- derived_data_path: "build/" + options[:scheme] + "/DerivedData",
- xcargs: "BUILD_NUMBER='" + options[:build_number] + "' " + "COMMIT_ID='" + options[:commit_id] + "'",
- archive_path: "build/" + options[:scheme] + "/Archive",
- export_options: {
- compileBitcode: false,
- iCloudContainerEnvironment: "Production",
- provisioningProfiles: options[:provisioningProfiles],
- stripSwiftSymbols: true,
- uploadBitcode: false,
- signingCertificate: options[:signingCertificate]
- }
- )
-end
-
-lane :build_for_appstore do |options|
- do_build_app(
- configuration: "ReleaseAppStoreLLC",
- scheme: "Telegram-iOS-AppStoreLLC",
- export_method: "app-store",
- build_number: options[:build_number],
- commit_id: options[:commit_hash],
- signingCertificate: signing_identity_llc,
- provisioningProfiles: {
- base_app_identifier_llc => "match AppStore " + base_app_identifier_llc,
- base_app_identifier_llc + ".Share" => "match AppStore " + base_app_identifier_llc + ".Share",
- base_app_identifier_llc + ".SiriIntents" => "match AppStore " + base_app_identifier_llc + ".SiriIntents",
- base_app_identifier_llc + ".Widget" => "match AppStore " + base_app_identifier_llc + ".Widget",
- base_app_identifier_llc + ".NotificationContent" => "match AppStore " + base_app_identifier_llc + ".NotificationContent",
- base_app_identifier_llc + ".watchkitapp.watchkitextension" => "match AppStore " + base_app_identifier_llc + ".watchkitapp.watchkitextension",
- base_app_identifier_llc + ".watchkitapp" => "match AppStore " + base_app_identifier_llc + ".watchkitapp",
- base_app_identifier_llc + ".NotificationService" => "match AppStore " + base_app_identifier_llc + ".NotificationService"
- }
- )
-end
-
-if File.exists?("../buildbox/transient-data/telegram-ios-shared/fastlane/Fastfile")
- import "../buildbox/transient-data/telegram-ios-shared/fastlane/Fastfile"
-end
diff --git a/package_app.sh b/package_app.sh
index cbf6961a69..bd0c12db93 100644
--- a/package_app.sh
+++ b/package_app.sh
@@ -1,6 +1,5 @@
#!/bin/sh
-#set -x
set -e
if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]; then
@@ -55,7 +54,7 @@ mkdir -p "$TEMP_ENTITLEMENTS_PATH"
if [ "$APP_TYPE" == "wallet" ]; then
cp "buck-out/gen/Wallet/AppPackage#$PLATFORM_FLAVORS.ipa" "$IPA_PATH.original"
else
- cp "buck-out/gen/AppPackage#$PLATFORM_FLAVORS.ipa" "$IPA_PATH.original"
+ cp "buck-out/gen/Telegram/AppPackage#$PLATFORM_FLAVORS.ipa" "$IPA_PATH.original"
fi
rm -rf "$IPA_PATH.original.unpacked"
rm -f "$BUILD_PATH/${APP_NAME}_signed.ipa"
@@ -278,7 +277,7 @@ APP_PLIST="$APP_PATH/Info.plist"
if [ "$APP_TYPE" == "wallet" ]; then
APP_BINARY_TARGET="//Wallet:Wallet"
else
- APP_BINARY_TARGET="//:Telegram"
+ APP_BINARY_TARGET="//Telegram:Telegram"
fi
echo "Repacking frameworks..."
@@ -312,7 +311,7 @@ done
if [ "$APP_TYPE" == "wallet" ]; then
APP_BINARY_DSYM_PATH="buck-out/gen/Wallet/Wallet#dwarf-and-dsym,$PLATFORM_FLAVORS,no-include-frameworks/Wallet.app.dSYM"
else
- APP_BINARY_DSYM_PATH="buck-out/gen/Telegram#dwarf-and-dsym,$PLATFORM_FLAVORS,no-include-frameworks/Telegram.app.dSYM"
+ APP_BINARY_DSYM_PATH="buck-out/gen/Telegram/Telegram#dwarf-and-dsym,$PLATFORM_FLAVORS,no-include-frameworks/Telegram.app.dSYM"
fi
cp -r "$APP_BINARY_DSYM_PATH" "$DSYMS_DIR/"
@@ -323,12 +322,12 @@ else
fi
for EXTENSION in $EXTENSIONS; do
- EXTENSION_DSYM_PATH="buck-out/gen/${EXTENSION}Extension#dwarf-and-dsym,$PLATFORM_FLAVORS,no-include-frameworks/${EXTENSION}Extension.appex.dSYM"
+ EXTENSION_DSYM_PATH="buck-out/gen/Telegram/${EXTENSION}Extension#dwarf-and-dsym,$PLATFORM_FLAVORS,no-include-frameworks/${EXTENSION}Extension.appex.dSYM"
cp -r "$EXTENSION_DSYM_PATH" "$DSYMS_DIR/"
done
if [ "$APP_TYPE" != "wallet" ]; then
- WATCH_EXTENSION_DSYM_PATH="buck-out/gen/WatchAppExtension#dwarf-and-dsym,no-include-frameworks,watchos-arm64_32,watchos-armv7k/WatchAppExtension.appex.dSYM"
+ WATCH_EXTENSION_DSYM_PATH="buck-out/gen/Telegram/WatchAppExtension#dwarf-and-dsym,no-include-frameworks,watchos-arm64_32,watchos-armv7k/WatchAppExtension.appex.dSYM"
cp -r "$WATCH_EXTENSION_DSYM_PATH" "$DSYMS_DIR/"
fi
diff --git a/submodules/AccountContext/BUCK b/submodules/AccountContext/BUCK
index 6a3a3d431f..120fec2a7e 100644
--- a/submodules/AccountContext/BUCK
+++ b/submodules/AccountContext/BUCK
@@ -16,7 +16,7 @@ static_library(
"//submodules/Postbox:Postbox#shared",
"//submodules/TelegramCore:TelegramCore#shared",
"//submodules/SyncCore:SyncCore#shared",
- #"//submodules/WalletCore:WalletCore",
+ "//submodules/WalletCore:WalletCore",
],
frameworks = [
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
diff --git a/submodules/AccountContext/BUILD b/submodules/AccountContext/BUILD
new file mode 100644
index 0000000000..fd5976b7f7
--- /dev/null
+++ b/submodules/AccountContext/BUILD
@@ -0,0 +1,25 @@
+load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
+
+swift_library(
+ name = "AccountContext",
+ module_name = "AccountContext",
+ srcs = glob([
+ "Sources/**/*.swift",
+ ]),
+ deps = [
+ "//submodules/TelegramAudio:TelegramAudio",
+ "//submodules/AsyncDisplayKit:AsyncDisplayKit",
+ "//submodules/TemporaryCachedPeerDataManager:TemporaryCachedPeerDataManager",
+ "//submodules/DeviceLocationManager:DeviceLocationManager",
+ "//submodules/MediaPlayer:UniversalMediaPlayer",
+ "//submodules/TelegramPresentationData:TelegramPresentationData",
+ "//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
+ "//submodules/Postbox:Postbox",
+ "//submodules/TelegramCore:TelegramCore",
+ "//submodules/SyncCore:SyncCore",
+ "//submodules/WalletCore:WalletCore",
+ ],
+ visibility = [
+ "//visibility:public",
+ ],
+)
diff --git a/submodules/AccountContext/Info.plist b/submodules/AccountContext/Info.plist
deleted file mode 100644
index e1fe4cfb7b..0000000000
--- a/submodules/AccountContext/Info.plist
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
- CFBundleDevelopmentRegion
- $(DEVELOPMENT_LANGUAGE)
- CFBundleExecutable
- $(EXECUTABLE_NAME)
- CFBundleIdentifier
- $(PRODUCT_BUNDLE_IDENTIFIER)
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- $(PRODUCT_NAME)
- CFBundlePackageType
- FMWK
- CFBundleShortVersionString
- 1.0
- CFBundleVersion
- $(CURRENT_PROJECT_VERSION)
-
-
diff --git a/submodules/AccountContext/Sources/AccountContext.swift b/submodules/AccountContext/Sources/AccountContext.swift
index cb51c254cc..28b26239f2 100644
--- a/submodules/AccountContext/Sources/AccountContext.swift
+++ b/submodules/AccountContext/Sources/AccountContext.swift
@@ -1,10 +1,12 @@
import Foundation
+import UIKit
import Postbox
import TelegramCore
import SyncCore
import TelegramPresentationData
import TelegramUIPreferences
import SwiftSignalKit
+import AsyncDisplayKit
import Display
import DeviceLocationManager
import TemporaryCachedPeerDataManager
@@ -262,6 +264,7 @@ public enum PeerInfoControllerMode {
case generic
case calls(messages: [Message])
case nearbyPeer
+ case group(PeerId)
}
public enum ContactListActionItemInlineIconPosition {
diff --git a/submodules/AccountContext/Sources/ChatController.swift b/submodules/AccountContext/Sources/ChatController.swift
index da9d89bc63..4ecd45faa4 100644
--- a/submodules/AccountContext/Sources/ChatController.swift
+++ b/submodules/AccountContext/Sources/ChatController.swift
@@ -1,8 +1,10 @@
import Foundation
+import UIKit
import Postbox
import TelegramCore
import SyncCore
import TextFormat
+import AsyncDisplayKit
import Display
import SwiftSignalKit
import TelegramPresentationData
diff --git a/submodules/AccountContext/Sources/ChatListController.swift b/submodules/AccountContext/Sources/ChatListController.swift
index f0e4304440..ad9ac4ee69 100644
--- a/submodules/AccountContext/Sources/ChatListController.swift
+++ b/submodules/AccountContext/Sources/ChatListController.swift
@@ -1,4 +1,5 @@
import Foundation
+import UIKit
import Postbox
import Display
diff --git a/submodules/AccountContext/Sources/ContactMultiselectionController.swift b/submodules/AccountContext/Sources/ContactMultiselectionController.swift
index 0d69cfc183..a0371a2cd3 100644
--- a/submodules/AccountContext/Sources/ContactMultiselectionController.swift
+++ b/submodules/AccountContext/Sources/ContactMultiselectionController.swift
@@ -1,12 +1,36 @@
import Foundation
+import UIKit
import Display
import SwiftSignalKit
import Postbox
+public struct ChatListNodeAdditionalCategory {
+ public var id: Int
+ public var icon: UIImage?
+ public var title: String
+
+ public init(id: Int, icon: UIImage?, title: String) {
+ self.id = id
+ self.icon = icon
+ self.title = title
+ }
+}
+
+public struct ContactMultiselectionControllerAdditionalCategories {
+ public var categories: [ChatListNodeAdditionalCategory]
+ public var selectedCategories: Set
+
+ public init(categories: [ChatListNodeAdditionalCategory], selectedCategories: Set) {
+ self.categories = categories
+ self.selectedCategories = selectedCategories
+ }
+}
+
public enum ContactMultiselectionControllerMode {
case groupCreation
case peerSelection(searchChatList: Bool, searchGroups: Bool, searchChannels: Bool)
case channelCreation
+ case chatSelection(selectedChats: Set, additionalCategories: ContactMultiselectionControllerAdditionalCategories?)
}
public enum ContactListFilter {
@@ -20,17 +44,24 @@ public final class ContactMultiselectionControllerParams {
public let mode: ContactMultiselectionControllerMode
public let options: [ContactListAdditionalOption]
public let filters: [ContactListFilter]
+ public let alwaysEnabled: Bool
- public init(context: AccountContext, mode: ContactMultiselectionControllerMode, options: [ContactListAdditionalOption], filters: [ContactListFilter] = [.excludeSelf]) {
+ public init(context: AccountContext, mode: ContactMultiselectionControllerMode, options: [ContactListAdditionalOption], filters: [ContactListFilter] = [.excludeSelf], alwaysEnabled: Bool = false) {
self.context = context
self.mode = mode
self.options = options
self.filters = filters
+ self.alwaysEnabled = alwaysEnabled
}
}
+public enum ContactMultiselectionResult {
+ case none
+ case result(peerIds: [ContactListPeerId], additionalOptionIds: [Int])
+}
+
public protocol ContactMultiselectionController: ViewController {
- var result: Signal<[ContactListPeerId], NoError> { get }
+ var result: Signal { get }
var displayProgress: Bool { get set }
var dismissed: (() -> Void)? { get set }
}
diff --git a/submodules/AccountContext/Sources/OpenChatMessage.swift b/submodules/AccountContext/Sources/OpenChatMessage.swift
index 4ff4350a6f..39bf422b69 100644
--- a/submodules/AccountContext/Sources/OpenChatMessage.swift
+++ b/submodules/AccountContext/Sources/OpenChatMessage.swift
@@ -5,6 +5,7 @@ import TelegramCore
import SyncCore
import SwiftSignalKit
import Display
+import AsyncDisplayKit
public enum ChatControllerInteractionOpenMessageMode {
case `default`
diff --git a/submodules/AccountUtils/BUILD b/submodules/AccountUtils/BUILD
new file mode 100644
index 0000000000..4edfde468a
--- /dev/null
+++ b/submodules/AccountUtils/BUILD
@@ -0,0 +1,20 @@
+load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
+
+swift_library(
+ name = "AccountUtils",
+ module_name = "AccountUtils",
+ srcs = glob([
+ "Sources/**/*.swift",
+ ]),
+ deps = [
+ "//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
+ "//submodules/Postbox:Postbox",
+ "//submodules/TelegramCore:TelegramCore",
+ "//submodules/SyncCore:SyncCore",
+ "//submodules/AccountContext:AccountContext",
+ "//submodules/TelegramUIPreferences:TelegramUIPreferences",
+ ],
+ visibility = [
+ "//visibility:public",
+ ],
+)
diff --git a/submodules/ActionSheetPeerItem/BUILD b/submodules/ActionSheetPeerItem/BUILD
new file mode 100644
index 0000000000..e2840eb207
--- /dev/null
+++ b/submodules/ActionSheetPeerItem/BUILD
@@ -0,0 +1,22 @@
+load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
+
+swift_library(
+ name = "ActionSheetPeerItem",
+ module_name = "ActionSheetPeerItem",
+ srcs = glob([
+ "Sources/**/*.swift",
+ ]),
+ deps = [
+ "//submodules/Postbox:Postbox",
+ "//submodules/TelegramCore:TelegramCore",
+ "//submodules/SyncCore:SyncCore",
+ "//submodules/AsyncDisplayKit:AsyncDisplayKit",
+ "//submodules/Display:Display",
+ "//submodules/AvatarNode:AvatarNode",
+ "//submodules/TelegramPresentationData:TelegramPresentationData",
+ "//submodules/AccountContext:AccountContext",
+ ],
+ visibility = [
+ "//visibility:public",
+ ],
+)
diff --git a/submodules/ActionSheetPeerItem/Info.plist b/submodules/ActionSheetPeerItem/Info.plist
deleted file mode 100644
index e1fe4cfb7b..0000000000
--- a/submodules/ActionSheetPeerItem/Info.plist
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
- CFBundleDevelopmentRegion
- $(DEVELOPMENT_LANGUAGE)
- CFBundleExecutable
- $(EXECUTABLE_NAME)
- CFBundleIdentifier
- $(PRODUCT_BUNDLE_IDENTIFIER)
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- $(PRODUCT_NAME)
- CFBundlePackageType
- FMWK
- CFBundleShortVersionString
- 1.0
- CFBundleVersion
- $(CURRENT_PROJECT_VERSION)
-
-
diff --git a/submodules/ActionSheetPeerItem/Sources/ActionSheetPeerItem.h b/submodules/ActionSheetPeerItem/Sources/ActionSheetPeerItem.h
deleted file mode 100644
index 43128d709d..0000000000
--- a/submodules/ActionSheetPeerItem/Sources/ActionSheetPeerItem.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//
-// ActionSheetPeerItem.h
-// ActionSheetPeerItem
-//
-// Created by Peter on 8/5/19.
-// Copyright © 2019 Telegram Messenger LLP. All rights reserved.
-//
-
-#import
-
-//! Project version number for ActionSheetPeerItem.
-FOUNDATION_EXPORT double ActionSheetPeerItemVersionNumber;
-
-//! Project version string for ActionSheetPeerItem.
-FOUNDATION_EXPORT const unsigned char ActionSheetPeerItemVersionString[];
-
-// In this header, you should import all the public headers of your framework using statements like #import
-
-
diff --git a/submodules/ActivityIndicator/BUCK b/submodules/ActivityIndicator/BUCK
index fd29559549..334ac6aecf 100644
--- a/submodules/ActivityIndicator/BUCK
+++ b/submodules/ActivityIndicator/BUCK
@@ -7,7 +7,7 @@ static_library(
]),
deps = [
"//submodules/AsyncDisplayKit:AsyncDisplayKit#shared",
- "//submodules/Display:Display#shared",
+ "//submodules/Display:Display#shared",
],
frameworks = [
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
diff --git a/submodules/ActivityIndicator/BUILD b/submodules/ActivityIndicator/BUILD
new file mode 100644
index 0000000000..08c019b637
--- /dev/null
+++ b/submodules/ActivityIndicator/BUILD
@@ -0,0 +1,16 @@
+load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
+
+swift_library(
+ name = "ActivityIndicator",
+ module_name = "ActivityIndicator",
+ srcs = glob([
+ "Sources/**/*.swift",
+ ]),
+ deps = [
+ "//submodules/Display:Display",
+ "//submodules/AsyncDisplayKit:AsyncDisplayKit",
+ ],
+ visibility = [
+ "//visibility:public",
+ ],
+)
diff --git a/submodules/ActivityIndicator/Info.plist b/submodules/ActivityIndicator/Info.plist
deleted file mode 100644
index e1fe4cfb7b..0000000000
--- a/submodules/ActivityIndicator/Info.plist
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
- CFBundleDevelopmentRegion
- $(DEVELOPMENT_LANGUAGE)
- CFBundleExecutable
- $(EXECUTABLE_NAME)
- CFBundleIdentifier
- $(PRODUCT_BUNDLE_IDENTIFIER)
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- $(PRODUCT_NAME)
- CFBundlePackageType
- FMWK
- CFBundleShortVersionString
- 1.0
- CFBundleVersion
- $(CURRENT_PROJECT_VERSION)
-
-
diff --git a/submodules/ActivityIndicator/Sources/ActivityIndicator.h b/submodules/ActivityIndicator/Sources/ActivityIndicator.h
deleted file mode 100644
index d1f730c19a..0000000000
--- a/submodules/ActivityIndicator/Sources/ActivityIndicator.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//
-// ActivityIndicator.h
-// ActivityIndicator
-//
-// Created by Peter on 8/1/19.
-// Copyright © 2019 Telegram Messenger LLP. All rights reserved.
-//
-
-#import
-
-//! Project version number for ActivityIndicator.
-FOUNDATION_EXPORT double ActivityIndicatorVersionNumber;
-
-//! Project version string for ActivityIndicator.
-FOUNDATION_EXPORT const unsigned char ActivityIndicatorVersionString[];
-
-// In this header, you should import all the public headers of your framework using statements like #import
-
-
diff --git a/submodules/ActivityIndicator/Sources/ActivityIndicator.swift b/submodules/ActivityIndicator/Sources/ActivityIndicator.swift
index 205ef1c454..0336241068 100644
--- a/submodules/ActivityIndicator/Sources/ActivityIndicator.swift
+++ b/submodules/ActivityIndicator/Sources/ActivityIndicator.swift
@@ -92,7 +92,6 @@ public final class ActivityIndicator: ASDisplayNode {
self.indicatorNode = ASImageNode()
self.indicatorNode.isLayerBacked = true
- self.indicatorNode.displayWithoutProcessing = true
self.indicatorNode.displaysAsynchronously = false
super.init()
diff --git a/submodules/AlertUI/BUILD b/submodules/AlertUI/BUILD
new file mode 100644
index 0000000000..f9b4dacc69
--- /dev/null
+++ b/submodules/AlertUI/BUILD
@@ -0,0 +1,15 @@
+load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
+
+swift_library(
+ name = "AlertUI",
+ module_name = "AlertUI",
+ srcs = glob([
+ "Sources/**/*.swift",
+ ]),
+ deps = [
+ "//submodules/Display:Display",
+ ],
+ visibility = [
+ "//visibility:public",
+ ],
+)
diff --git a/submodules/AlertUI/Info.plist b/submodules/AlertUI/Info.plist
deleted file mode 100644
index e1fe4cfb7b..0000000000
--- a/submodules/AlertUI/Info.plist
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
- CFBundleDevelopmentRegion
- $(DEVELOPMENT_LANGUAGE)
- CFBundleExecutable
- $(EXECUTABLE_NAME)
- CFBundleIdentifier
- $(PRODUCT_BUNDLE_IDENTIFIER)
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- $(PRODUCT_NAME)
- CFBundlePackageType
- FMWK
- CFBundleShortVersionString
- 1.0
- CFBundleVersion
- $(CURRENT_PROJECT_VERSION)
-
-
diff --git a/submodules/AlertUI/Sources/AlertUI.h b/submodules/AlertUI/Sources/AlertUI.h
deleted file mode 100644
index b188aba6c8..0000000000
--- a/submodules/AlertUI/Sources/AlertUI.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//
-// AlertUI.h
-// AlertUI
-//
-// Created by Peter on 8/10/19.
-// Copyright © 2019 Telegram Messenger LLP. All rights reserved.
-//
-
-#import
-
-//! Project version number for AlertUI.
-FOUNDATION_EXPORT double AlertUIVersionNumber;
-
-//! Project version string for AlertUI.
-FOUNDATION_EXPORT const unsigned char AlertUIVersionString[];
-
-// In this header, you should import all the public headers of your framework using statements like #import
-
-
diff --git a/submodules/AnimatedStickerNode/BUILD b/submodules/AnimatedStickerNode/BUILD
new file mode 100644
index 0000000000..bf1ba42bdd
--- /dev/null
+++ b/submodules/AnimatedStickerNode/BUILD
@@ -0,0 +1,20 @@
+load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
+
+swift_library(
+ name = "AnimatedStickerNode",
+ module_name = "AnimatedStickerNode",
+ srcs = glob([
+ "Sources/**/*.swift",
+ ]),
+ deps = [
+ "//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
+ "//submodules/AsyncDisplayKit:AsyncDisplayKit",
+ "//submodules/Display:Display",
+ "//submodules/YuvConversion:YuvConversion",
+ "//submodules/GZip:GZip",
+ "//submodules/rlottie:RLottieBinding",
+ ],
+ visibility = [
+ "//visibility:public",
+ ],
+)
diff --git a/submodules/AnimatedStickerNode/Sources/AnimatedStickerNode.swift b/submodules/AnimatedStickerNode/Sources/AnimatedStickerNode.swift
index 173646c596..cbff90d2f2 100644
--- a/submodules/AnimatedStickerNode/Sources/AnimatedStickerNode.swift
+++ b/submodules/AnimatedStickerNode/Sources/AnimatedStickerNode.swift
@@ -274,9 +274,7 @@ private final class AnimatedStickerDirectFrameSource: AnimatedStickerFrameSource
self.height = height
self.bytesPerRow = (4 * Int(width) + 15) & (~15)
self.currentFrame = 0
- guard let rawData = TGGUnzipData(data, 8 * 1024 * 1024) else {
- return nil
- }
+ let rawData = TGGUnzipData(data, 8 * 1024 * 1024) ?? data
guard let animation = LottieInstance(data: rawData, cacheKey: "") else {
return nil
}
diff --git a/submodules/AnimationUI/BUILD b/submodules/AnimationUI/BUILD
new file mode 100644
index 0000000000..adc0b2a210
--- /dev/null
+++ b/submodules/AnimationUI/BUILD
@@ -0,0 +1,28 @@
+load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
+
+swift_library(
+ name = "AnimationUI",
+ module_name = "AnimationUI",
+ srcs = glob([
+ "Sources/**/*.swift",
+ ]),
+ deps = [
+ "//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
+ "//submodules/Postbox:Postbox",
+ "//submodules/TelegramCore:TelegramCore",
+ "//submodules/SyncCore:SyncCore",
+ "//submodules/AsyncDisplayKit:AsyncDisplayKit",
+ "//submodules/Display:Display",
+ "//submodules/YuvConversion:YuvConversion",
+ "//submodules/StickerResources:StickerResources",
+ "//submodules/MediaResources:MediaResources",
+ "//submodules/Tuples:Tuples",
+ "//submodules/GZip:GZip",
+ "//submodules/rlottie:RLottieBinding",
+ "//submodules/lottie-ios:Lottie",
+ "//submodules/AppBundle:AppBundle",
+ ],
+ visibility = [
+ "//visibility:public",
+ ],
+)
diff --git a/submodules/AnimationUI/Info.plist b/submodules/AnimationUI/Info.plist
deleted file mode 100644
index e1fe4cfb7b..0000000000
--- a/submodules/AnimationUI/Info.plist
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
- CFBundleDevelopmentRegion
- $(DEVELOPMENT_LANGUAGE)
- CFBundleExecutable
- $(EXECUTABLE_NAME)
- CFBundleIdentifier
- $(PRODUCT_BUNDLE_IDENTIFIER)
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- $(PRODUCT_NAME)
- CFBundlePackageType
- FMWK
- CFBundleShortVersionString
- 1.0
- CFBundleVersion
- $(CURRENT_PROJECT_VERSION)
-
-
diff --git a/submodules/AppBundle/BUCK b/submodules/AppBundle/BUCK
index 7c15ea5d15..34e2293199 100644
--- a/submodules/AppBundle/BUCK
+++ b/submodules/AppBundle/BUCK
@@ -3,14 +3,13 @@ load("//Config:buck_rule_macros.bzl", "static_library")
static_library(
name = "AppBundle",
srcs = glob([
- "Sources/**/*.swift",
"Sources/**/*.m",
]),
headers = glob([
"Sources/**/*.h",
]),
exported_headers = glob([
- "Sources/**/*.h",
+ "PublicHeaders/**/*.h",
]),
deps = [
],
diff --git a/submodules/AppBundle/BUILD b/submodules/AppBundle/BUILD
new file mode 100644
index 0000000000..92d153bd64
--- /dev/null
+++ b/submodules/AppBundle/BUILD
@@ -0,0 +1,23 @@
+
+objc_library(
+ name = "AppBundle",
+ module_name = "AppBundle",
+ enable_modules = True,
+ srcs = glob([
+ "Sources/**/*.m",
+ "Sources/**/*.h",
+ ]),
+ hdrs = glob([
+ "PublicHeaders/**/*.h",
+ ]),
+ includes = [
+ "PublicHeaders",
+ ],
+ sdk_frameworks = [
+ "Foundation",
+ "UIKit",
+ ],
+ visibility = [
+ "//visibility:public",
+ ],
+)
diff --git a/submodules/AppBundle/Info.plist b/submodules/AppBundle/Info.plist
deleted file mode 100644
index e1fe4cfb7b..0000000000
--- a/submodules/AppBundle/Info.plist
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
- CFBundleDevelopmentRegion
- $(DEVELOPMENT_LANGUAGE)
- CFBundleExecutable
- $(EXECUTABLE_NAME)
- CFBundleIdentifier
- $(PRODUCT_BUNDLE_IDENTIFIER)
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- $(PRODUCT_NAME)
- CFBundlePackageType
- FMWK
- CFBundleShortVersionString
- 1.0
- CFBundleVersion
- $(CURRENT_PROJECT_VERSION)
-
-
diff --git a/submodules/AppBundle/Sources/AppBundle.h b/submodules/AppBundle/PublicHeaders/AppBundle/AppBundle.h
similarity index 53%
rename from submodules/AppBundle/Sources/AppBundle.h
rename to submodules/AppBundle/PublicHeaders/AppBundle/AppBundle.h
index b78e84bc8d..d00fe35efa 100644
--- a/submodules/AppBundle/Sources/AppBundle.h
+++ b/submodules/AppBundle/PublicHeaders/AppBundle/AppBundle.h
@@ -1,12 +1,6 @@
#import
#import
-//! Project version number for AppBundle.
-FOUNDATION_EXPORT double AppBundleVersionNumber;
-
-//! Project version string for AppBundle.
-FOUNDATION_EXPORT const unsigned char AppBundleVersionString[];
-
NSBundle * _Nonnull getAppBundle(void);
@interface UIImage (AppBundle)
diff --git a/submodules/AppBundle/Sources/AppBundle.m b/submodules/AppBundle/Sources/AppBundle/AppBundle.m
similarity index 96%
rename from submodules/AppBundle/Sources/AppBundle.m
rename to submodules/AppBundle/Sources/AppBundle/AppBundle.m
index 8103a03e40..66f5e08fc8 100644
--- a/submodules/AppBundle/Sources/AppBundle.m
+++ b/submodules/AppBundle/Sources/AppBundle/AppBundle.m
@@ -1,4 +1,4 @@
-#import "AppBundle.h"
+#import
NSBundle * _Nonnull getAppBundle() {
NSBundle *bundle = [NSBundle mainBundle];
diff --git a/submodules/AppLock/BUILD b/submodules/AppLock/BUILD
new file mode 100644
index 0000000000..ae89bbf200
--- /dev/null
+++ b/submodules/AppLock/BUILD
@@ -0,0 +1,25 @@
+load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
+
+swift_library(
+ name = "AppLock",
+ module_name = "AppLock",
+ srcs = glob([
+ "Sources/**/*.swift",
+ ]),
+ deps = [
+ "//submodules/AsyncDisplayKit:AsyncDisplayKit",
+ "//submodules/Display:Display",
+ "//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
+ "//submodules/Postbox:Postbox",
+ "//submodules/TelegramPresentationData:TelegramPresentationData",
+ "//submodules/MonotonicTime:MonotonicTime",
+ "//submodules/PasscodeUI:PasscodeUI",
+ "//submodules/TelegramUIPreferences:TelegramUIPreferences",
+ "//submodules/ImageBlur:ImageBlur",
+ "//submodules/AccountContext:AccountContext",
+ "//submodules/AppLockState:AppLockState",
+ ],
+ visibility = [
+ "//visibility:public",
+ ],
+)
diff --git a/submodules/AppLock/Sources/AppLock.swift b/submodules/AppLock/Sources/AppLock.swift
index e339ed19ad..112873aac4 100644
--- a/submodules/AppLock/Sources/AppLock.swift
+++ b/submodules/AppLock/Sources/AppLock.swift
@@ -9,6 +9,7 @@ import TelegramPresentationData
import PasscodeUI
import TelegramUIPreferences
import ImageBlur
+import FastBlur
import AppLockState
private func isLocked(passcodeSettings: PresentationPasscodeSettings, state: LockState, isApplicationActive: Bool) -> Bool {
diff --git a/submodules/AppLockState/BUILD b/submodules/AppLockState/BUILD
new file mode 100644
index 0000000000..d87c6ecb7f
--- /dev/null
+++ b/submodules/AppLockState/BUILD
@@ -0,0 +1,15 @@
+load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
+
+swift_library(
+ name = "AppLockState",
+ module_name = "AppLockState",
+ srcs = glob([
+ "Sources/**/*.swift",
+ ]),
+ deps = [
+ "//submodules/MonotonicTime:MonotonicTime",
+ ],
+ visibility = [
+ "//visibility:public",
+ ],
+)
diff --git a/submodules/ArchivedStickerPacksNotice/BUILD b/submodules/ArchivedStickerPacksNotice/BUILD
new file mode 100644
index 0000000000..296ed10c8d
--- /dev/null
+++ b/submodules/ArchivedStickerPacksNotice/BUILD
@@ -0,0 +1,29 @@
+load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
+
+swift_library(
+ name = "ArchivedStickerPacksNotice",
+ module_name = "ArchivedStickerPacksNotice",
+ srcs = glob([
+ "Sources/**/*.swift",
+ ]),
+ deps = [
+ "//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
+ "//submodules/AsyncDisplayKit:AsyncDisplayKit",
+ "//submodules/Display:Display",
+ "//submodules/Postbox:Postbox",
+ "//submodules/TelegramCore:TelegramCore",
+ "//submodules/SyncCore:SyncCore",
+ "//submodules/TelegramPresentationData:TelegramPresentationData",
+ "//submodules/AccountContext:AccountContext",
+ "//submodules/TelegramUIPreferences:TelegramUIPreferences",
+ "//submodules/StickerResources:StickerResources",
+ "//submodules/AlertUI:AlertUI",
+ "//submodules/PresentationDataUtils:PresentationDataUtils",
+ "//submodules/MergeLists:MergeLists",
+ "//submodules/ItemListUI:ItemListUI",
+ "//submodules/ItemListStickerPackItem:ItemListStickerPackItem",
+ ],
+ visibility = [
+ "//visibility:public",
+ ],
+)
diff --git a/submodules/AsyncDisplayKit/AsyncDisplayKit.xcworkspace/contents.xcworkspacedata b/submodules/AsyncDisplayKit/AsyncDisplayKit.xcworkspace/contents.xcworkspacedata
deleted file mode 100644
index 574f0ec195..0000000000
--- a/submodules/AsyncDisplayKit/AsyncDisplayKit.xcworkspace/contents.xcworkspacedata
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
diff --git a/submodules/AsyncDisplayKit/AsyncDisplayKit.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/submodules/AsyncDisplayKit/AsyncDisplayKit.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
deleted file mode 100644
index 18d981003d..0000000000
--- a/submodules/AsyncDisplayKit/AsyncDisplayKit.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
- IDEDidComputeMac32BitWarning
-
-
-
diff --git a/submodules/AsyncDisplayKit/AsyncDisplayKit.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/submodules/AsyncDisplayKit/AsyncDisplayKit.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
deleted file mode 100644
index 08de0be8d3..0000000000
--- a/submodules/AsyncDisplayKit/AsyncDisplayKit.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
- IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded
-
-
-
diff --git a/submodules/AsyncDisplayKit/AsyncDisplayKit/ASPagerFlowLayout.m b/submodules/AsyncDisplayKit/AsyncDisplayKit/ASPagerFlowLayout.m
deleted file mode 100644
index df8ce69868..0000000000
--- a/submodules/AsyncDisplayKit/AsyncDisplayKit/ASPagerFlowLayout.m
+++ /dev/null
@@ -1,96 +0,0 @@
-//
-// ASPagerFlowLayout.m
-// AsyncDisplayKit
-//
-// Created by Levi McCallum on 2/12/16.
-//
-// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-//
-
-#ifndef MINIMAL_ASDK
-#import
-
-@interface ASPagerFlowLayout () {
- BOOL _didRotate;
- CGRect _cachedCollectionViewBounds;
- NSIndexPath *_currentIndexPath;
-}
-
-@end
-
-@implementation ASPagerFlowLayout
-
-- (CGPoint)targetContentOffsetForProposedContentOffset:(CGPoint)proposedContentOffset withScrollingVelocity:(CGPoint)velocity
-{
- NSInteger currentPage = ceil(proposedContentOffset.x / self.collectionView.bounds.size.width);
- _currentIndexPath = [NSIndexPath indexPathForItem:currentPage inSection:0];
-
- return [super targetContentOffsetForProposedContentOffset:proposedContentOffset withScrollingVelocity:velocity];
-}
-
-
-- (void)prepareForAnimatedBoundsChange:(CGRect)oldBounds
-{
- // Cache the current page if a rotation did happen. This happens before the rotation animation
- // is occuring and the bounds changed so we use this as an opportunity to cache the current index path
- if (_cachedCollectionViewBounds.size.width != self.collectionView.bounds.size.width) {
- _cachedCollectionViewBounds = self.collectionView.bounds;
-
- // Figurring out current page based on the old bounds visible space
- CGRect visibleRect = oldBounds;
-
- CGFloat visibleXCenter = CGRectGetMidX(visibleRect);
- NSArray *layoutAttributes = [self layoutAttributesForElementsInRect:visibleRect];
- for (UICollectionViewLayoutAttributes *attributes in layoutAttributes) {
- if ([attributes representedElementCategory] == UICollectionElementCategoryCell && attributes.center.x == visibleXCenter) {
- _currentIndexPath = attributes.indexPath;
- break;
- }
- }
-
- _didRotate = YES;
- }
-
- [super prepareForAnimatedBoundsChange:oldBounds];
-}
-- (CGPoint)targetContentOffsetForProposedContentOffset:(CGPoint)proposedContentOffset
-{
- // Don't mess around if the user is interacting with the page node. Although if just a rotation happened we should
- // try to use the current index path to not end up setting the target content offset to something in between pages
- if (_didRotate || (!self.collectionView.isDecelerating && !self.collectionView.isTracking)) {
- _didRotate = NO;
- if (_currentIndexPath) {
- return [self _targetContentOffsetForItemAtIndexPath:_currentIndexPath proposedContentOffset:proposedContentOffset];
- }
- }
-
- return [super targetContentOffsetForProposedContentOffset:proposedContentOffset];
-}
-
-- (CGPoint)_targetContentOffsetForItemAtIndexPath:(NSIndexPath *)indexPath proposedContentOffset:(CGPoint)proposedContentOffset
-{
- if ([self _dataSourceIsEmpty]) {
- return proposedContentOffset;
- }
-
- UICollectionViewLayoutAttributes *attributes = [self layoutAttributesForItemAtIndexPath:_currentIndexPath];
- if (attributes == nil) {
- return proposedContentOffset;
- }
-
- CGFloat xOffset = (CGRectGetWidth(self.collectionView.bounds) - CGRectGetWidth(attributes.frame)) / 2.0;
- return CGPointMake(attributes.frame.origin.x - xOffset, proposedContentOffset.y);
-}
-
-- (BOOL)_dataSourceIsEmpty
-{
- return ([self.collectionView numberOfSections] == 0 ||
- [self.collectionView numberOfItemsInSection:0] == 0);
-}
-
-@end
-
-#endif
diff --git a/submodules/AsyncDisplayKit/AsyncDisplayKit/Debug/ASLayoutElementInspectorCell.h b/submodules/AsyncDisplayKit/AsyncDisplayKit/Debug/ASLayoutElementInspectorCell.h
deleted file mode 100644
index 8e0602911e..0000000000
--- a/submodules/AsyncDisplayKit/AsyncDisplayKit/Debug/ASLayoutElementInspectorCell.h
+++ /dev/null
@@ -1,31 +0,0 @@
-//
-// ASLayoutElementInspectorCell.h
-// AsyncDisplayKit
-//
-// Created by Hannah Troisi on 3/27/16.
-// Copyright © 2016 Facebook. All rights reserved.
-//
-
-#ifndef MINIMAL_ASDK
-
-#import
-
-typedef NS_ENUM(NSInteger, ASLayoutElementPropertyType) {
- ASLayoutElementPropertyFlexGrow = 0,
- ASLayoutElementPropertyFlexShrink,
- ASLayoutElementPropertyAlignSelf,
- ASLayoutElementPropertyFlexBasis,
- ASLayoutElementPropertySpacingBefore,
- ASLayoutElementPropertySpacingAfter,
- ASLayoutElementPropertyAscender,
- ASLayoutElementPropertyDescender,
- ASLayoutElementPropertyCount
-};
-
-@interface ASLayoutElementInspectorCell : ASCellNode
-
-- (instancetype)initWithProperty:(ASLayoutElementPropertyType)property layoutElementToEdit:(id)layoutable NS_DESIGNATED_INITIALIZER;
-
-@end
-
-#endif
diff --git a/submodules/AsyncDisplayKit/AsyncDisplayKit/Debug/ASLayoutElementInspectorCell.m b/submodules/AsyncDisplayKit/AsyncDisplayKit/Debug/ASLayoutElementInspectorCell.m
deleted file mode 100644
index 7e5ca1ad9c..0000000000
--- a/submodules/AsyncDisplayKit/AsyncDisplayKit/Debug/ASLayoutElementInspectorCell.m
+++ /dev/null
@@ -1,570 +0,0 @@
-//
-// ASLayoutElementInspectorCell.m
-// AsyncDisplayKit
-//
-// Created by Hannah Troisi on 3/27/16.
-// Copyright © 2016 Facebook. All rights reserved.
-//
-#ifndef MINIMAL_ASDK
-#import
-#import
-
-typedef NS_ENUM(NSInteger, CellDataType) {
- CellDataTypeBool,
- CellDataTypeFloat,
-};
-
-__weak static ASLayoutElementInspectorCell *__currentlyOpenedCell = nil;
-
-@protocol InspectorCellEditingBubbleProtocol
-- (void)valueChangedToIndex:(NSUInteger)index;
-@end
-
-@interface ASLayoutElementInspectorCellEditingBubble : ASDisplayNode
-@property (nonatomic, strong, readwrite) id delegate;
-- (instancetype)initWithEnumOptions:(BOOL)yes enumStrings:(NSArray *)options currentOptionIndex:(NSUInteger)currentOption;
-- (instancetype)initWithSliderMinValue:(CGFloat)min maxValue:(CGFloat)max currentValue:(CGFloat)current
-;@end
-
-@interface ASLayoutElementInspectorCell ()
-@end
-
-@implementation ASLayoutElementInspectorCell
-{
- ASLayoutElementPropertyType _propertyType;
- CellDataType _dataType;
- id _layoutElementToEdit;
-
- ASButtonNode *_buttonNode;
- ASTextNode *_textNode;
- ASTextNode *_textNode2;
-
- ASLayoutElementInspectorCellEditingBubble *_textBubble;
-}
-
-#pragma mark - Lifecycle
-
-- (instancetype)initWithProperty:(ASLayoutElementPropertyType)property layoutElementToEdit:(id)layoutElement
-{
- self = [super init];
- if (self) {
-
- _propertyType = property;
- _dataType = [ASLayoutElementInspectorCell dataTypeForProperty:property];
- _layoutElementToEdit = layoutElement;
-
- self.automaticallyManagesSubnodes = YES;
-
- _buttonNode = [self makeBtnNodeWithTitle:[ASLayoutElementInspectorCell propertyStringForPropertyType:property]];
- [_buttonNode addTarget:self action:@selector(buttonTapped:) forControlEvents:ASControlNodeEventTouchUpInside];
-
- _textNode = [[ASTextNode alloc] init];
- _textNode.attributedText = [ASLayoutElementInspectorCell propertyValueAttributedStringForProperty:property withLayoutElement:layoutElement];
-
- [self updateButtonStateForProperty:property withLayoutElement:layoutElement];
-
- _textNode2 = [[ASTextNode alloc] init];
- _textNode2.attributedText = [ASLayoutElementInspectorCell propertyValueDetailAttributedStringForProperty:property withLayoutElement:layoutElement];
-
- }
- return self;
-}
-
-- (void)updateButtonStateForProperty:(ASLayoutElementPropertyType)property withLayoutElement:(id)layoutElement
-{
- if (property == ASLayoutElementPropertyFlexGrow) {
- _buttonNode.selected = layoutElement.style.flexGrow;
- }
- else if (property == ASLayoutElementPropertyFlexShrink) {
- _buttonNode.selected = layoutElement.style.flexShrink;
- }
-}
-
-- (ASLayoutSpec *)layoutSpecThatFits:(ASSizeRange)constrainedSize
-{
- ASStackLayoutSpec *horizontalSpec = [ASStackLayoutSpec horizontalStackLayoutSpec];
- horizontalSpec.children = @[_buttonNode, _textNode];
- horizontalSpec.style.flexGrow = 1.0;
- horizontalSpec.alignItems = ASStackLayoutAlignItemsCenter;
- horizontalSpec.justifyContent = ASStackLayoutJustifyContentSpaceBetween;
-
- ASLayoutSpec *childSpec;
- if (_textBubble) {
- ASStackLayoutSpec *verticalSpec = [ASStackLayoutSpec verticalStackLayoutSpec];
- verticalSpec.children = @[horizontalSpec, _textBubble];
- verticalSpec.spacing = 8;
- verticalSpec.style.flexGrow = 1.0;
- _textBubble.style.flexGrow = 1.0;
- childSpec = verticalSpec;
- } else {
- childSpec = horizontalSpec;
- }
- ASInsetLayoutSpec *insetSpec = [ASInsetLayoutSpec insetLayoutSpecWithInsets:UIEdgeInsetsMake(2, 4, 2, 4) child:childSpec];
- insetSpec.style.flexGrow =1.0;
-
- return insetSpec;
-}
-
-+ (NSAttributedString *)propertyValueAttributedStringForProperty:(ASLayoutElementPropertyType)property withLayoutElement:(id)layoutElement
-{
- NSString *valueString;
-
- switch (property) {
- case ASLayoutElementPropertyFlexGrow:
- valueString = layoutElement.style.flexGrow ? @"YES" : @"NO";
- break;
- case ASLayoutElementPropertyFlexShrink:
- valueString = layoutElement.style.flexShrink ? @"YES" : @"NO";
- break;
- case ASLayoutElementPropertyAlignSelf:
- valueString = [ASLayoutElementInspectorCell alignSelfEnumValueString:layoutElement.style.alignSelf];
- break;
- case ASLayoutElementPropertyFlexBasis:
- if (layoutElement.style.flexBasis.unit && layoutElement.style.flexBasis.value) { // ENUM TYPE
- valueString = [NSString stringWithFormat:@"%0.0f %@", layoutElement.style.flexBasis.value,
- [ASLayoutElementInspectorCell ASRelativeDimensionEnumString:layoutElement.style.alignSelf]];
- } else {
- valueString = @"0 pts";
- }
- break;
- case ASLayoutElementPropertySpacingBefore:
- valueString = [NSString stringWithFormat:@"%0.0f", layoutElement.style.spacingBefore];
- break;
- case ASLayoutElementPropertySpacingAfter:
- valueString = [NSString stringWithFormat:@"%0.0f", layoutElement.style.spacingAfter];
- break;
- case ASLayoutElementPropertyAscender:
- valueString = [NSString stringWithFormat:@"%0.0f", layoutElement.style.ascender];
- break;
- case ASLayoutElementPropertyDescender:
- valueString = [NSString stringWithFormat:@"%0.0f", layoutElement.style.descender];
- break;
- default:
- valueString = @"?";
- break;
- }
- return [ASLayoutElementInspectorCell attributedStringFromString:valueString];
-}
-
-+ (NSAttributedString *)propertyValueDetailAttributedStringForProperty:(ASLayoutElementPropertyType)property withLayoutElement:(id)layoutElement
-{
- NSString *valueString;
-
- switch (property) {
- case ASLayoutElementPropertyFlexGrow:
- case ASLayoutElementPropertyFlexShrink:
- case ASLayoutElementPropertyAlignSelf:
- case ASLayoutElementPropertyFlexBasis:
- case ASLayoutElementPropertySpacingBefore:
- case ASLayoutElementPropertySpacingAfter:
- case ASLayoutElementPropertyAscender:
- case ASLayoutElementPropertyDescender:
- default:
- return nil;
- }
- return [ASLayoutElementInspectorCell attributedStringFromString:valueString];
-}
-
-- (void)endEditingValue
-{
- _textBubble = nil;
- __currentlyOpenedCell = nil;
- _buttonNode.selected = NO;
- [self setNeedsLayout];
-}
-
-- (void)beginEditingValue
-{
- _textBubble.delegate = self;
- __currentlyOpenedCell = self;
- [self setNeedsLayout];
-}
-
-- (void)valueChangedToIndex:(NSUInteger)index
-{
- switch (_propertyType) {
-
- case ASLayoutElementPropertyAlignSelf:
- _layoutElementToEdit.style.alignSelf = (ASStackLayoutAlignSelf)index;
- _textNode.attributedText = [ASLayoutElementInspectorCell attributedStringFromString:[ASLayoutElementInspectorCell alignSelfEnumValueString:index]];
- break;
-
- case ASLayoutElementPropertySpacingBefore:
- _layoutElementToEdit.style.spacingBefore = (CGFloat)index;
- _textNode.attributedText = [ASLayoutElementInspectorCell attributedStringFromString:[NSString stringWithFormat:@"%0.0f", _layoutElementToEdit.style.spacingBefore]];
- break;
-
- case ASLayoutElementPropertySpacingAfter:
- _layoutElementToEdit.style.spacingAfter = (CGFloat)index;
- _textNode.attributedText = [ASLayoutElementInspectorCell attributedStringFromString:[NSString stringWithFormat:@"%0.0f", _layoutElementToEdit.style.spacingAfter]];
- break;
-
- case ASLayoutElementPropertyAscender:
- _layoutElementToEdit.style.ascender = (CGFloat)index;
- _textNode.attributedText = [ASLayoutElementInspectorCell attributedStringFromString:[NSString stringWithFormat:@"%0.0f", _layoutElementToEdit.style.ascender]];
- break;
-
- case ASLayoutElementPropertyDescender:
- _layoutElementToEdit.style.descender = (CGFloat)index;
- _textNode.attributedText = [ASLayoutElementInspectorCell attributedStringFromString:[NSString stringWithFormat:@"%0.0f", _layoutElementToEdit.style.descender]];
- break;
-
- default:
- break;
- }
-
- [self setNeedsLayout];
-}
-
-#pragma mark - gesture handling
-
-- (void)buttonTapped:(ASButtonNode *)sender
-{
- BOOL selfIsEditing = (self == __currentlyOpenedCell);
- [__currentlyOpenedCell endEditingValue];
- if (selfIsEditing) {
- sender.selected = NO;
- return;
- }
-
-// NSUInteger currentAlignSelfValue;
-// NSUInteger nextAlignSelfValue;
-// CGFloat newValue;
-
- sender.selected = !sender.selected;
- switch (_propertyType) {
-
- case ASLayoutElementPropertyFlexGrow:
- _layoutElementToEdit.style.flexGrow = sender.isSelected ? 1.0 : 0.0;
- _textNode.attributedText = [ASLayoutElementInspectorCell attributedStringFromString:sender.selected ? @"YES" : @"NO"];
- break;
-
- case ASLayoutElementPropertyFlexShrink:
- _layoutElementToEdit.style.flexShrink = sender.isSelected ? 1.0 : 0.0;
- _textNode.attributedText = [ASLayoutElementInspectorCell attributedStringFromString:sender.selected ? @"YES" : @"NO"];
- break;
-
- case ASLayoutElementPropertyAlignSelf:
- _textBubble = [[ASLayoutElementInspectorCellEditingBubble alloc] initWithEnumOptions:YES
- enumStrings:[ASLayoutElementInspectorCell alignSelfEnumStringArray]
- currentOptionIndex:_layoutElementToEdit.style.alignSelf];
-
- [self beginEditingValue];
-// if ([self layoutSpec]) {
-// currentAlignSelfValue = [[self layoutSpec] alignSelf];
-// nextAlignSelfValue = (currentAlignSelfValue + 1 <= ASStackLayoutAlignSelfStretch) ? currentAlignSelfValue + 1 : 0;
-// [[self layoutSpec] setAlignSelf:nextAlignSelfValue];
-//
-// } else if ([self node]) {
-// currentAlignSelfValue = [[self node] alignSelf];
-// nextAlignSelfValue = (currentAlignSelfValue + 1 <= ASStackLayoutAlignSelfStretch) ? currentAlignSelfValue + 1 : 0;
-// [[self node] setAlignSelf:nextAlignSelfValue];
-// }
- break;
-
- case ASLayoutElementPropertySpacingBefore:
- _textBubble = [[ASLayoutElementInspectorCellEditingBubble alloc] initWithSliderMinValue:0 maxValue:100 currentValue:_layoutElementToEdit.style.spacingBefore];
- [self beginEditingValue];
- _textNode.attributedText = [ASLayoutElementInspectorCell attributedStringFromString:[NSString stringWithFormat:@"%0.0f", _layoutElementToEdit.style.spacingBefore]];
- break;
-
- case ASLayoutElementPropertySpacingAfter:
- _textBubble = [[ASLayoutElementInspectorCellEditingBubble alloc] initWithSliderMinValue:0 maxValue:100 currentValue:_layoutElementToEdit.style.spacingAfter];
- [self beginEditingValue];
- _textNode.attributedText = [ASLayoutElementInspectorCell attributedStringFromString:[NSString stringWithFormat:@"%0.0f", _layoutElementToEdit.style.spacingAfter]];
- break;
-
-
- case ASLayoutElementPropertyAscender:
- _textBubble = [[ASLayoutElementInspectorCellEditingBubble alloc] initWithSliderMinValue:0 maxValue:100 currentValue:_layoutElementToEdit.style.ascender];
- [self beginEditingValue];
- _textNode.attributedText = [ASLayoutElementInspectorCell attributedStringFromString:[NSString stringWithFormat:@"%0.0f", _layoutElementToEdit.style.ascender]];
- break;
-
- case ASLayoutElementPropertyDescender:
- _textBubble = [[ASLayoutElementInspectorCellEditingBubble alloc] initWithSliderMinValue:0 maxValue:100 currentValue:_layoutElementToEdit.style.descender];
- [self beginEditingValue];
- _textNode.attributedText = [ASLayoutElementInspectorCell attributedStringFromString:[NSString stringWithFormat:@"%0.0f", _layoutElementToEdit.style.descender]];
- break;
-
- default:
- break;
- }
- [self setNeedsLayout];
-}
-
-#pragma mark - cast layoutElementToEdit
-
-- (ASDisplayNode *)node
-{
- if (_layoutElementToEdit.layoutElementType == ASLayoutElementTypeDisplayNode) {
- return (ASDisplayNode *)_layoutElementToEdit;
- }
- return nil;
-}
-
-- (ASLayoutSpec *)layoutSpec
-{
- if (_layoutElementToEdit.layoutElementType == ASLayoutElementTypeLayoutSpec) {
- return (ASLayoutSpec *)_layoutElementToEdit;
- }
- return nil;
-}
-
-#pragma mark - data / property type helper methods
-
-+ (CellDataType)dataTypeForProperty:(ASLayoutElementPropertyType)property
-{
- switch (property) {
-
- case ASLayoutElementPropertyFlexGrow:
- case ASLayoutElementPropertyFlexShrink:
- return CellDataTypeBool;
-
- case ASLayoutElementPropertySpacingBefore:
- case ASLayoutElementPropertySpacingAfter:
- case ASLayoutElementPropertyAscender:
- case ASLayoutElementPropertyDescender:
- return CellDataTypeFloat;
-
- default:
- break;
- }
- return CellDataTypeBool;
-}
-
-+ (NSString *)propertyStringForPropertyType:(ASLayoutElementPropertyType)property
-{
- NSString *string;
- switch (property) {
- case ASLayoutElementPropertyFlexGrow:
- string = @"FlexGrow";
- break;
- case ASLayoutElementPropertyFlexShrink:
- string = @"FlexShrink";
- break;
- case ASLayoutElementPropertyAlignSelf:
- string = @"AlignSelf";
- break;
- case ASLayoutElementPropertyFlexBasis:
- string = @"FlexBasis";
- break;
- case ASLayoutElementPropertySpacingBefore:
- string = @"SpacingBefore";
- break;
- case ASLayoutElementPropertySpacingAfter:
- string = @"SpacingAfter";
- break;
- case ASLayoutElementPropertyAscender:
- string = @"Ascender";
- break;
- case ASLayoutElementPropertyDescender:
- string = @"Descender";
- break;
- default:
- string = @"Unknown";
- break;
- }
- return string;
-}
-
-+ (NSDictionary *)alignSelfTypeNames
-{
- return @{@(ASStackLayoutAlignSelfAuto) : @"Auto",
- @(ASStackLayoutAlignSelfStart) : @"Start",
- @(ASStackLayoutAlignSelfEnd) : @"End",
- @(ASStackLayoutAlignSelfCenter) : @"Center",
- @(ASStackLayoutAlignSelfStretch) : @"Stretch"};
-}
-
-+ (NSString *)alignSelfEnumValueString:(NSUInteger)type
-{
- return [[self class] alignSelfTypeNames][@(type)];
-}
-
-+ (NSArray *)alignSelfEnumStringArray
-{
- return @[@"ASStackLayoutAlignSelfAuto",
- @"ASStackLayoutAlignSelfStart",
- @"ASStackLayoutAlignSelfEnd",
- @"ASStackLayoutAlignSelfCenter",
- @"ASStackLayoutAlignSelfStretch"];
-}
-
-+ (NSDictionary *)ASRelativeDimensionTypeNames
-{
- return @{@(ASDimensionUnitPoints) : @"pts",
- @(ASDimensionUnitFraction) : @"%"};
-}
-
-+ (NSString *)ASRelativeDimensionEnumString:(NSUInteger)type
-{
- return [[self class] ASRelativeDimensionTypeNames][@(type)];
-}
-
-#pragma mark - formatting helper methods
-
-+ (NSAttributedString *)attributedStringFromString:(NSString *)string
-{
- return [ASLayoutElementInspectorCell attributedStringFromString:string withTextColor:[UIColor whiteColor]];
-}
-
-+ (NSAttributedString *)attributedStringFromString:(NSString *)string withTextColor:(nullable UIColor *)color
-{
- NSDictionary *attributes = @{NSForegroundColorAttributeName : color,
- NSFontAttributeName : [UIFont fontWithName:@"Menlo-Regular" size:12]};
-
- return [[NSAttributedString alloc] initWithString:string attributes:attributes];
-}
-
-- (ASButtonNode *)makeBtnNodeWithTitle:(NSString *)title
-{
- UIColor *orangeColor = [UIColor colorWithRed:255/255.0 green:181/255.0 blue:68/255.0 alpha:1];
- UIImage *orangeStretchBtnImg = [ASLayoutElementInspectorCell imageForButtonWithBackgroundColor:orangeColor
- borderColor:[UIColor whiteColor]
- borderWidth:3];
- UIImage *greyStretchBtnImg = [ASLayoutElementInspectorCell imageForButtonWithBackgroundColor:[UIColor darkGrayColor]
- borderColor:[UIColor lightGrayColor]
- borderWidth:3];
- UIImage *clearStretchBtnImg = [ASLayoutElementInspectorCell imageForButtonWithBackgroundColor:[UIColor clearColor]
- borderColor:[UIColor whiteColor]
- borderWidth:3];
- ASButtonNode *btn = [[ASButtonNode alloc] init];
- btn.contentEdgeInsets = UIEdgeInsetsMake(5, 5, 5, 5);
- [btn setAttributedTitle:[ASLayoutElementInspectorCell attributedStringFromString:title] forState:ASControlStateNormal];
- [btn setAttributedTitle:[ASLayoutElementInspectorCell attributedStringFromString:title withTextColor:[UIColor lightGrayColor]] forState:ASControlStateDisabled];
- [btn setBackgroundImage:clearStretchBtnImg forState:ASControlStateNormal];
- [btn setBackgroundImage:orangeStretchBtnImg forState:ASControlStateSelected];
- [btn setBackgroundImage:greyStretchBtnImg forState:ASControlStateDisabled];
-
- return btn;
-}
-
-#define CORNER_RADIUS 3
-+ (UIImage *)imageForButtonWithBackgroundColor:(UIColor *)backgroundColor borderColor:(UIColor *)borderColor borderWidth:(CGFloat)width
-{
- CGSize unstretchedSize = CGSizeMake(2 * CORNER_RADIUS + 1, 2 * CORNER_RADIUS + 1);
- CGRect rect = (CGRect) {CGPointZero, unstretchedSize};
- UIBezierPath *path = [UIBezierPath bezierPathWithRoundedRect:rect cornerRadius:CORNER_RADIUS];
-
- // create a graphics context for the following status button
- UIGraphicsBeginImageContextWithOptions(unstretchedSize, NO, 0);
-
- [path addClip];
- [backgroundColor setFill];
- [path fill];
-
- path.lineWidth = width;
- [borderColor setStroke];
- [path stroke];
-
- UIImage *btnImage = UIGraphicsGetImageFromCurrentImageContext();
- UIGraphicsEndImageContext();
-
- return [btnImage stretchableImageWithLeftCapWidth:CORNER_RADIUS topCapHeight:CORNER_RADIUS];
-}
-
-@end
-
-
-
-@implementation ASLayoutElementInspectorCellEditingBubble
-{
- NSMutableArray *_textNodes;
- ASDisplayNode *_slider;
-}
-
-- (instancetype)initWithEnumOptions:(BOOL)yes enumStrings:(NSArray *)options currentOptionIndex:(NSUInteger)currentOption
-{
- self = [super init];
- if (self) {
- self.automaticallyManagesSubnodes = YES;
- self.backgroundColor = [UIColor colorWithRed:255/255.0 green:181/255.0 blue:68/255.0 alpha:1];
-
- _textNodes = [[NSMutableArray alloc] init];
- int index = 0;
- for (NSString *optionStr in options) {
- ASButtonNode *btn = [[ASButtonNode alloc] init];
- [btn setAttributedTitle:[ASLayoutElementInspectorCell attributedStringFromString:optionStr] forState:ASControlStateNormal];
- [btn setAttributedTitle:[ASLayoutElementInspectorCell attributedStringFromString:optionStr withTextColor:[UIColor redColor]]
- forState:ASControlStateSelected];
- [btn addTarget:self action:@selector(enumOptionSelected:) forControlEvents:ASControlNodeEventTouchUpInside];
- btn.selected = (index == currentOption) ? YES : NO;
- [_textNodes addObject:btn];
- index++;
- }
- }
- return self;
-}
-
-- (instancetype)initWithSliderMinValue:(CGFloat)min maxValue:(CGFloat)max currentValue:(CGFloat)current
-{
- if (self = [super init]) {
- self.userInteractionEnabled = YES;
- self.automaticallyManagesSubnodes = YES;
- self.backgroundColor = [UIColor colorWithRed:255/255.0 green:181/255.0 blue:68/255.0 alpha:1];
-
- __weak id weakSelf = self;
- _slider = [[ASDisplayNode alloc] initWithViewBlock:^UIView * _Nonnull{
- UISlider *slider = [[UISlider alloc] init];
- slider.minimumValue = min;
- slider.maximumValue = max;
- slider.value = current;
- [slider addTarget:weakSelf action:@selector(sliderValueChanged:) forControlEvents:UIControlEventValueChanged];
-
- return slider;
- }];
- _slider.userInteractionEnabled = YES;
- }
- return self;
-}
-
-- (ASLayoutSpec *)layoutSpecThatFits:(ASSizeRange)constrainedSize
-{
- _slider.style.preferredSize = CGSizeMake(constrainedSize.max.width, 25);
-
- NSMutableArray *children = [[NSMutableArray alloc] init];
- if (_textNodes) {
- ASStackLayoutSpec *textStack = [ASStackLayoutSpec verticalStackLayoutSpec];
- textStack.children = _textNodes;
- textStack.spacing = 2;
- [children addObject:textStack];
- }
- if (_slider) {
- _slider.style.flexGrow = 1.0;
- [children addObject:_slider];
- }
-
- ASStackLayoutSpec *verticalStackSpec = [ASStackLayoutSpec verticalStackLayoutSpec];
- verticalStackSpec.children = children;
- verticalStackSpec.spacing = 2;
- verticalStackSpec.style.flexGrow = 1.0;
- verticalStackSpec.style.alignSelf = ASStackLayoutAlignSelfStretch;
-
- ASInsetLayoutSpec *insetSpec = [ASInsetLayoutSpec insetLayoutSpecWithInsets:UIEdgeInsetsMake(8, 8, 8, 8) child:verticalStackSpec];
-
- return insetSpec;
-}
-
-#pragma mark - gesture handling
-- (void)enumOptionSelected:(ASButtonNode *)sender
-{
- sender.selected = !sender.selected;
- for (ASButtonNode *node in _textNodes) {
- if (node != sender) {
- node.selected = NO;
- }
- }
- [self.delegate valueChangedToIndex:[_textNodes indexOfObject:sender]];
- [self setNeedsLayout];
-}
-
-- (void)sliderValueChanged:(UISlider *)sender
-{
- [self.delegate valueChangedToIndex:roundf(sender.value)];
-}
-
-@end
-
-
-#endif
diff --git a/submodules/AsyncDisplayKit/AsyncDisplayKit/Debug/ASLayoutElementInspectorNode.m b/submodules/AsyncDisplayKit/AsyncDisplayKit/Debug/ASLayoutElementInspectorNode.m
deleted file mode 100644
index b71c2f7413..0000000000
--- a/submodules/AsyncDisplayKit/AsyncDisplayKit/Debug/ASLayoutElementInspectorNode.m
+++ /dev/null
@@ -1,426 +0,0 @@
-//
-// ASLayoutElementInspectorNode.m
-// Sample
-//
-// Created by Hannah Troisi on 3/19/16.
-// Copyright © 2016 Facebook. All rights reserved.
-//
-
-#import
-#ifndef MINIMAL_ASDK
-#import
-#endif
-#import
-#import
-#import
-#import
-#import
-
-@interface ASLayoutElementInspectorNode ()
-#ifndef MINIMAL_ASDK
-
-#endif
-@end
-
-@implementation ASLayoutElementInspectorNode
-{
-#ifndef MINIMAL_ASDK
- ASTableNode *_tableNode;
-#endif
-}
-
-#pragma mark - class methods
-+ (instancetype)sharedInstance
-{
- static ASLayoutElementInspectorNode *__inspector = nil;
-
- static dispatch_once_t onceToken;
- dispatch_once(&onceToken, ^{
- __inspector = [[ASLayoutElementInspectorNode alloc] init];
- });
-
- return __inspector;
-}
-
-#pragma mark - lifecycle
-- (instancetype)init
-{
- self = [super init];
- if (self) {
-
-#ifndef MINIMAL_ASDK
- _tableNode = [[ASTableNode alloc] init];
- _tableNode.delegate = self;
- _tableNode.dataSource = self;
-
- [self addSubnode:_tableNode]; // required because of manual layout
-#endif
- }
- return self;
-}
-
-- (void)didLoad
-{
- [super didLoad];
-#ifndef MINIMAL_ASDK
- _tableNode.view.backgroundColor = [UIColor colorWithRed:40/255.0 green:43/255.0 blue:53/255.0 alpha:1];
- _tableNode.view.separatorStyle = UITableViewCellSeparatorStyleNone;
- _tableNode.view.allowsSelection = NO;
- _tableNode.view.sectionHeaderHeight = 40;
-#endif
-}
-
-- (void)layout
-{
- [super layout];
-#ifndef MINIMAL_ASDK
- _tableNode.frame = self.bounds;
-#endif
-}
-
-#pragma mark - intstance methods
-- (void)setLayoutElementToEdit:(id)layoutElementToEdit
-{
- if (_layoutElementToEdit != layoutElementToEdit) {
- _layoutElementToEdit = layoutElementToEdit;
- }
-#ifndef MINIMAL_ASDK
- [_tableNode reloadData];
-#endif
-}
-
-#pragma mark - ASTableDataSource
-
-#ifndef MINIMAL_ASDK
-- (ASCellNode *)tableView:(ASTableView *)tableView nodeForRowAtIndexPath:(NSIndexPath *)indexPath
-{
- if (indexPath.section == 0) {
- NSDictionary *attributes = @{NSForegroundColorAttributeName : [UIColor colorWithRed:255/255.0 green:181/255.0 blue:68/255.0 alpha:1],
- NSFontAttributeName : [UIFont fontWithName:@"Menlo-Regular" size:12]};
- ASTextCellNode *textCell = [[ASTextCellNode alloc] initWithAttributes:attributes insets:UIEdgeInsetsMake(0, 4, 0, 0)];
- textCell.text = [_layoutElementToEdit description];
- return textCell;
- } else {
- return [[ASLayoutElementInspectorCell alloc] initWithProperty:(ASLayoutElementPropertyType)indexPath.row layoutElementToEdit:_layoutElementToEdit];
- }
-}
-
-- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
-{
- if (section == 0) {
- return 1;
- } else {
- return ASLayoutElementPropertyCount;
- }
-}
-
-- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
-{
- return 2;
-}
-
-- (nullable UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
-{
- UILabel *headerTitle = [[UILabel alloc] initWithFrame:CGRectZero];
-
- NSString *title;
- if (section == 0) {
- title = @" Item";
- } else {
- title = @" Properties";
- }
-
- NSDictionary *attributes = @{NSForegroundColorAttributeName : [UIColor whiteColor],
- NSFontAttributeName : [UIFont fontWithName:@"Menlo-Bold" size:12]};
- headerTitle.attributedText = [[NSAttributedString alloc] initWithString:title attributes:attributes];
-
- return headerTitle;
-}
-
-#endif
-
-//- (ASLayoutSpec *)layoutSpecThatFits:(ASSizeRange)constrainedSize
-//{
-// // navigate layout hierarchy
-//
-// _parentNodeNavBtn.alignSelf = ASStackLayoutAlignSelfCenter;
-// _childNodeNavBtn.alignSelf = ASStackLayoutAlignSelfCenter;
-//
-// ASStackLayoutSpec *horizontalStackNav = [ASStackLayoutSpec horizontalStackLayoutSpec];
-// horizontalStackNav.style.flexGrow = 1.0;
-// horizontalStackNav.alignSelf = ASStackLayoutAlignSelfCenter;
-// horizontalStackNav.children = @[_siblingNodeLefttNavBtn, _siblingNodeRightNavBtn];
-//
-// ASStackLayoutSpec *horizontalStack = [ASStackLayoutSpec horizontalStackLayoutSpec];
-// horizontalStack.style.flexGrow = 1.0;
-// ASLayoutSpec *spacer = [[ASLayoutSpec alloc] init];
-//
-// spacer.style.flexGrow = 1.0;
-// horizontalStack.children = @[_flexGrowBtn, spacer];
-// _flexGrowValue.alignSelf = ASStackLayoutAlignSelfEnd; // FIXME: make framework give a warning if you use ASAlignmentBottom!!!!!
-//
-// ASStackLayoutSpec *horizontalStack2 = [ASStackLayoutSpec horizontalStackLayoutSpec];
-// horizontalStack2.style.flexGrow = 1.0;
-// horizontalStack2.children = @[_flexShrinkBtn, spacer];
-// _flexShrinkValue.alignSelf = ASStackLayoutAlignSelfEnd;
-//
-// ASStackLayoutSpec *horizontalStack3 = [ASStackLayoutSpec horizontalStackLayoutSpec];
-// horizontalStack3.style.flexGrow = 1.0;
-// horizontalStack3.children = @[_flexBasisBtn, spacer, _flexBasisValue];
-// _flexBasisValue.alignSelf = ASStackLayoutAlignSelfEnd;
-//
-// ASStackLayoutSpec *itemDescriptionStack = [ASStackLayoutSpec verticalStackLayoutSpec];
-// itemDescriptionStack.children = @[_itemDescription];
-// itemDescriptionStack.spacing = 5;
-// itemDescriptionStack.style.flexGrow = 1.0;
-//
-// ASStackLayoutSpec *layoutableStack = [ASStackLayoutSpec verticalStackLayoutSpec];
-// layoutableStack.children = @[_layoutablePropertiesSectionTitle, horizontalStack, horizontalStack2, horizontalStack3, _alignSelfBtn];
-// layoutableStack.spacing = 5;
-// layoutableStack.style.flexGrow = 1.0;
-//
-// ASStackLayoutSpec *layoutSpecStack = [ASStackLayoutSpec verticalStackLayoutSpec];
-// layoutSpecStack.children = @[_layoutSpecPropertiesSectionTitle, _alignItemsBtn];
-// layoutSpecStack.spacing = 5;
-// layoutSpecStack.style.flexGrow = 1.0;
-//
-// ASStackLayoutSpec *debugHelpStack = [ASStackLayoutSpec verticalStackLayoutSpec];
-// debugHelpStack.children = @[_debugSectionTitle, _vizNodeInsetSizeBtn, _vizNodeBordersBtn];
-// debugHelpStack.spacing = 5;
-// debugHelpStack.style.flexGrow = 1.0;
-//
-// ASStackLayoutSpec *verticalLayoutableStack = [ASStackLayoutSpec verticalStackLayoutSpec];
-// verticalLayoutableStack.style.flexGrow = 1.0;
-// verticalLayoutableStack.spacing = 20;
-// verticalLayoutableStack.children = @[_parentNodeNavBtn, horizontalStackNav, _childNodeNavBtn, itemDescriptionStack, layoutableStack, layoutSpecStack, debugHelpStack];
-// verticalLayoutableStack.alignItems = ASStackLayoutAlignItemsStretch; // stretch headerStack to fill horizontal space
-//
-// ASLayoutSpec *insetSpec = [ASInsetLayoutSpec insetLayoutSpecWithInsets:UIEdgeInsetsMake(100, 10, 10, 10) child:verticalLayoutableStack];
-// insetSpec.style.flexGrow = 1.0;
-// return insetSpec;
-//}
-//
-//#pragma mark - configure Inspector node for layoutable
-//- (void)updateInspectorWithLayoutable
-//{
-// _itemDescription.attributedText = [self attributedStringFromLayoutable:_layoutElementToEdit];
-//
-// if ([self node]) {
-// UIColor *nodeBackgroundColor = [[self node] backgroundColor];
-// UIImage *colorBtnImg = [ASLayoutElementInspectorNode imageForButtonWithBackgroundColor:nodeBackgroundColor
-// borderColor:[UIColor whiteColor]
-// borderWidth:3];
-// [_itemBackgroundColorBtn setBackgroundImage:colorBtnImg forState:ASControlStateNormal];
-// } else {
-// _itemBackgroundColorBtn.enabled = NO;
-// }
-//
-// _flexGrowBtn.selected = [self.layoutElementToEdit flexGrow];
-// _flexGrowValue.attributedText = [self attributedStringFromString: (_flexGrowBtn.selected) ? @"YES" : @"NO"];
-//
-// _flexShrinkBtn.selected = self.layoutElementToEdit.style.flexShrink;
-// _flexShrinkValue.attributedText = [self attributedStringFromString: (_flexShrinkBtn.selected) ? @"YES" : @"NO"];
-//
-// // _flexBasisBtn.selected = self.layoutElementToEdit.style.flexShrink;
-// // _flexBasisValue.attributedText = [self attributedStringFromString: (_flexBasisBtn.selected) ? @"YES" : @"NO"];
-//
-//
-// NSUInteger alignSelfValue = [self.layoutElementToEdit alignSelf];
-// NSString *newTitle = [@"alignSelf:" stringByAppendingString:[self alignSelfName:alignSelfValue]];
-// [_alignSelfBtn setAttributedTitle:[self attributedStringFromString:newTitle] forState:ASControlStateNormal];
-//
-// if ([self layoutSpec]) {
-// _alignItemsBtn.enabled = YES;
-//// NSUInteger alignItemsValue = [[self layoutSpec] alignItems];
-//// newTitle = [@"alignItems:" stringByAppendingString:[self alignSelfName:alignItemsValue]];
-//// [_alignItemsBtn setAttributedTitle:[self attributedStringFromString:newTitle] forState:ASControlStateNormal];
-// }
-//
-// [self setNeedsLayout];
-//}
-
-
-//- (void)enableInspectorNodesForLayoutable
-//{
-// if ([self layoutSpec]) {
-//
-// _itemBackgroundColorBtn.enabled = YES;
-// _flexGrowBtn.enabled = YES;
-// _flexShrinkBtn.enabled = YES;
-// _flexBasisBtn.enabled = YES;
-// _alignSelfBtn.enabled = YES;
-// _spacingBeforeBtn.enabled = YES;
-// _spacingAfterBtn.enabled = YES;
-// _alignItemsBtn.enabled = YES;
-//
-// } else if ([self node]) {
-//
-// _itemBackgroundColorBtn.enabled = YES;
-// _flexGrowBtn.enabled = YES;
-// _flexShrinkBtn.enabled = YES;
-// _flexBasisBtn.enabled = YES;
-// _alignSelfBtn.enabled = YES;
-// _spacingBeforeBtn.enabled = YES;
-// _spacingAfterBtn.enabled = YES;
-// _alignItemsBtn.enabled = NO;
-//
-// } else {
-//
-// _itemBackgroundColorBtn.enabled = NO;
-// _flexGrowBtn.enabled = NO;
-// _flexShrinkBtn.enabled = NO;
-// _flexBasisBtn.enabled = NO;
-// _alignSelfBtn.enabled = NO;
-// _spacingBeforeBtn.enabled = NO;
-// _spacingAfterBtn.enabled = NO;
-// _alignItemsBtn.enabled = YES;
-// }
-//}
-
-//+ (NSDictionary *)alignSelfTypeNames
-//{
-// return @{@(ASStackLayoutAlignSelfAuto) : @"Auto",
-// @(ASStackLayoutAlignSelfStart) : @"Start",
-// @(ASStackLayoutAlignSelfEnd) : @"End",
-// @(ASStackLayoutAlignSelfCenter) : @"Center",
-// @(ASStackLayoutAlignSelfStretch) : @"Stretch"};
-//}
-//
-//- (NSString *)alignSelfName:(NSUInteger)type
-//{
-// return [[self class] alignSelfTypeNames][@(type)];
-//}
-//
-//+ (NSDictionary *)alignItemTypeNames
-//{
-// return @{@(ASStackLayoutAlignItemsBaselineFirst) : @"BaselineFirst",
-// @(ASStackLayoutAlignItemsBaselineLast) : @"BaselineLast",
-// @(ASStackLayoutAlignItemsCenter) : @"Center",
-// @(ASStackLayoutAlignItemsEnd) : @"End",
-// @(ASStackLayoutAlignItemsStart) : @"Start",
-// @(ASStackLayoutAlignItemsStretch) : @"Stretch"};
-//}
-//
-//- (NSString *)alignItemName:(NSUInteger)type
-//{
-// return [[self class] alignItemTypeNames][@(type)];
-//}
-
-//#pragma mark - gesture handling
-//- (void)changeColor:(ASButtonNode *)sender
-//{
-// if ([self node]) {
-// NSArray *colorArray = @[[UIColor orangeColor],
-// [UIColor redColor],
-// [UIColor greenColor],
-// [UIColor purpleColor]];
-//
-// UIColor *nodeBackgroundColor = [(ASDisplayNode *)self.layoutElementToEdit backgroundColor];
-//
-// NSUInteger colorIndex = [colorArray indexOfObject:nodeBackgroundColor];
-// colorIndex = (colorIndex + 1 < [colorArray count]) ? colorIndex + 1 : 0;
-//
-// [[self node] setBackgroundColor: [colorArray objectAtIndex:colorIndex]];
-// }
-//
-// [self updateInspectorWithLayoutable];
-//}
-//
-//- (void)setFlexGrowValue:(ASButtonNode *)sender
-//{
-// [sender setSelected:!sender.isSelected]; // FIXME: fix ASControlNode documentation that this is automatic - unlike highlighted, it is up to the application to decide when a button should be selected or not. Selected is a more persistant thing and highlighted is for the moment, like as a user has a finger on it,
-//
-// if ([self layoutSpec]) {
-// [[self layoutSpec] setFlexGrow:sender.isSelected];
-// } else if ([self node]) {
-// [[self node] setFlexGrow:sender.isSelected];
-// }
-//
-// [self updateInspectorWithLayoutable];
-//}
-//
-//- (void)setFlexShrinkValue:(ASButtonNode *)sender
-//{
-// [sender setSelected:!sender.isSelected]; // FIXME: fix ASControlNode documentation that this is automatic - unlike highlighted, it is up to the application to decide when a button should be selected or not. Selected is a more persistant thing and highlighted is for the moment, like as a user has a finger on it,
-//
-// if ([self layoutSpec]) {
-// [[self layoutSpec] setFlexShrink:sender.isSelected];
-// } else if ([self node]) {
-// [[self node] setFlexShrink:sender.isSelected];
-// }
-//
-// [self updateInspectorWithLayoutable];
-//}
-//
-//- (void)setAlignSelfValue:(ASButtonNode *)sender
-//{
-// NSUInteger currentAlignSelfValue;
-// NSUInteger nextAlignSelfValue;
-//
-// if ([self layoutSpec]) {
-// currentAlignSelfValue = [[self layoutSpec] alignSelf];
-// nextAlignSelfValue = (currentAlignSelfValue + 1 <= ASStackLayoutAlignSelfStretch) ? currentAlignSelfValue + 1 : 0;
-// [[self layoutSpec] setAlignSelf:nextAlignSelfValue];
-//
-// } else if ([self node]) {
-// currentAlignSelfValue = [[self node] alignSelf];
-// nextAlignSelfValue = (currentAlignSelfValue + 1 <= ASStackLayoutAlignSelfStretch) ? currentAlignSelfValue + 1 : 0;
-// [[self node] setAlignSelf:nextAlignSelfValue];
-// }
-//
-// [self updateInspectorWithLayoutable];
-//}
-//
-//- (void)setAlignItemsValue:(ASButtonNode *)sender
-//{
-// NSUInteger currentAlignItemsValue;
-// NSUInteger nextAlignItemsValue;
-//
-// if ([self layoutSpec]) {
-// currentAlignItemsValue = [[self layoutSpec] alignSelf];
-// nextAlignItemsValue = (currentAlignItemsValue + 1 <= ASStackLayoutAlignSelfStretch) ? currentAlignItemsValue + 1 : 0;
-//// [[self layoutSpec] setAlignItems:nextAlignItemsValue];
-//
-// } else if ([self node]) {
-// currentAlignItemsValue = [[self node] alignSelf];
-// nextAlignItemsValue = (currentAlignItemsValue + 1 <= ASStackLayoutAlignSelfStretch) ? currentAlignItemsValue + 1 : 0;
-//// [[self node] setAlignItems:nextAlignItemsValue];
-// }
-//
-// [self updateInspectorWithLayoutable];
-//}
-//- (void)setFlexBasisValue:(ASButtonNode *)sender
-//{
-// [sender setSelected:!sender.isSelected]; // FIXME: fix ASControlNode documentation that this is automatic - unlike highlighted, it is up to the application to decide when a button should be selected or not. Selected is a more persistant thing and highlighted is for the moment, like as a user has a finger on it,
-// FIXME: finish
-//}
-//
-//- (void)setVizNodeInsets:(ASButtonNode *)sender
-//{
-// BOOL newState = !sender.selected;
-//
-// if (newState == YES) {
-// self.vizNodeInsetSize = 0;
-// [self.delegate toggleVisualization:NO]; // FIXME
-// [self.delegate toggleVisualization:YES]; // FIXME
-// _vizNodeBordersBtn.selected = YES;
-//
-// } else {
-// self.vizNodeInsetSize = 10;
-// [self.delegate toggleVisualization:NO]; // FIXME
-// [self.delegate toggleVisualization:YES]; // FIXME
-// }
-//
-// sender.selected = newState;
-//}
-//
-//- (void)setVizNodeBorders:(ASButtonNode *)sender
-//{
-// BOOL newState = !sender.selected;
-//
-// [self.delegate toggleVisualization:newState]; // FIXME
-//
-// sender.selected = newState;
-//}
-
-@end
diff --git a/submodules/AsyncDisplayKit/AsyncDisplayKit/Details/ASChangeSetDataController.h b/submodules/AsyncDisplayKit/AsyncDisplayKit/Details/ASChangeSetDataController.h
deleted file mode 100644
index 49df1dc24d..0000000000
--- a/submodules/AsyncDisplayKit/AsyncDisplayKit/Details/ASChangeSetDataController.h
+++ /dev/null
@@ -1,31 +0,0 @@
-//
-// ASChangeSetDataController.h
-// AsyncDisplayKit
-//
-// Created by Huy Nguyen on 19/10/15.
-//
-// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-//
-
-#ifndef MINIMAL_ASDK
-
-#import
-
-/**
- * @abstract Subclass of ASDataController that simulates ordering of operations in batch updates defined in UITableView and UICollectionView.
- *
- * @discussion The ordering is achieved by using _ASHierarchyChangeSet to enqueue and sort operations.
- * More information about the ordering and the index paths used for operations can be found here:
- * https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/TableView_iPhone/ManageInsertDeleteRow/ManageInsertDeleteRow.html#//apple_ref/doc/uid/TP40007451-CH10-SW17
- *
- * @see ASDataController
- * @see _ASHierarchyChangeSet
- */
-@interface ASChangeSetDataController : ASDataController
-
-@end
-
-#endif
diff --git a/submodules/AsyncDisplayKit/AsyncDisplayKit/Details/ASChangeSetDataController.mm b/submodules/AsyncDisplayKit/AsyncDisplayKit/Details/ASChangeSetDataController.mm
deleted file mode 100644
index c41820dbb0..0000000000
--- a/submodules/AsyncDisplayKit/AsyncDisplayKit/Details/ASChangeSetDataController.mm
+++ /dev/null
@@ -1,212 +0,0 @@
-//
-// ASChangeSetDataController.m
-// AsyncDisplayKit
-//
-// Created by Huy Nguyen on 19/10/15.
-//
-// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-//
-
-#ifndef MINIMAL_ASDK
-
-#import "ASChangeSetDataController.h"
-#import "_ASHierarchyChangeSet.h"
-#import "ASAssert.h"
-#import "ASDataController+Subclasses.h"
-
-@implementation ASChangeSetDataController {
- NSInteger _changeSetBatchUpdateCounter;
- _ASHierarchyChangeSet *_changeSet;
-}
-
-- (void)dealloc
-{
- ASDisplayNodeCAssert(_changeSetBatchUpdateCounter == 0, @"ASChangeSetDataController deallocated in the middle of a batch update.");
-}
-
-#pragma mark - Batching (External API)
-
-- (void)beginUpdates
-{
- ASDisplayNodeAssertMainThread();
- if (_changeSetBatchUpdateCounter <= 0) {
- _changeSetBatchUpdateCounter = 0;
- _changeSet = [[_ASHierarchyChangeSet alloc] initWithOldData:[self itemCountsFromDataSource]];
- }
- _changeSetBatchUpdateCounter++;
-}
-
-- (void)endUpdatesAnimated:(BOOL)animated completion:(void (^)(BOOL))completion
-{
- ASDisplayNodeAssertMainThread();
- _changeSetBatchUpdateCounter--;
-
- // Prevent calling endUpdatesAnimated:completion: in an unbalanced way
- NSAssert(_changeSetBatchUpdateCounter >= 0, @"endUpdatesAnimated:completion: called without having a balanced beginUpdates call");
-
- [_changeSet addCompletionHandler:completion];
- if (_changeSetBatchUpdateCounter == 0) {
- void (^batchCompletion)(BOOL) = _changeSet.completionHandler;
-
- /**
- * If the initial reloadData has not been called, just bail because we don't have
- * our old data source counts.
- * See ASUICollectionViewTests.testThatIssuingAnUpdateBeforeInitialReloadIsUnacceptable
- * For the issue that UICollectionView has that we're choosing to workaround.
- */
- if (!self.initialReloadDataHasBeenCalled) {
- if (batchCompletion != nil) {
- batchCompletion(YES);
- }
- _changeSet = nil;
- return;
- }
-
- [self invalidateDataSourceItemCounts];
-
- // Attempt to mark the update completed. This is when update validation will occur inside the changeset.
- // If an invalid update exception is thrown, we catch it and inject our "validationErrorSource" object,
- // which is the table/collection node's data source, into the exception reason to help debugging.
- @try {
- [_changeSet markCompletedWithNewItemCounts:[self itemCountsFromDataSource]];
- } @catch (NSException *e) {
- id responsibleDataSource = self.validationErrorSource;
- if (e.name == ASCollectionInvalidUpdateException && responsibleDataSource != nil) {
- [NSException raise:ASCollectionInvalidUpdateException format:@"%@: %@", [responsibleDataSource class], e.reason];
- } else {
- @throw e;
- }
- }
-
- ASDataControllerLogEvent(self, @"triggeredUpdate: %@", _changeSet);
-
- [super beginUpdates];
-
- for (_ASHierarchyItemChange *change in [_changeSet itemChangesOfType:_ASHierarchyChangeTypeDelete]) {
- [super deleteRowsAtIndexPaths:change.indexPaths withAnimationOptions:change.animationOptions];
- }
-
- for (_ASHierarchySectionChange *change in [_changeSet sectionChangesOfType:_ASHierarchyChangeTypeDelete]) {
- [super deleteSections:change.indexSet withAnimationOptions:change.animationOptions];
- }
-
- for (_ASHierarchySectionChange *change in [_changeSet sectionChangesOfType:_ASHierarchyChangeTypeInsert]) {
- [super insertSections:change.indexSet withAnimationOptions:change.animationOptions];
- }
-
- for (_ASHierarchyItemChange *change in [_changeSet itemChangesOfType:_ASHierarchyChangeTypeInsert]) {
- [super insertRowsAtIndexPaths:change.indexPaths withAnimationOptions:change.animationOptions];
- }
-
-#if ASEVENTLOG_ENABLE
- NSString *changeSetDescription = ASObjectDescriptionMakeTiny(_changeSet);
- batchCompletion = ^(BOOL finished) {
- if (batchCompletion != nil) {
- batchCompletion(finished);
- }
- ASDataControllerLogEvent(self, @"finishedUpdate: %@", changeSetDescription);
- };
-#endif
-
- [super endUpdatesAnimated:animated completion:batchCompletion];
-
- _changeSet = nil;
- }
-}
-
-- (BOOL)batchUpdating
-{
- BOOL batchUpdating = (_changeSetBatchUpdateCounter != 0);
- // _changeSet must be available during batch update
- ASDisplayNodeAssertTrue(batchUpdating == (_changeSet != nil));
- return batchUpdating;
-}
-
-- (void)waitUntilAllUpdatesAreCommitted
-{
- ASDisplayNodeAssertMainThread();
- if (self.batchUpdating) {
- // This assertion will be enabled soon.
-// ASDisplayNodeFailAssert(@"Should not call %@ during batch update", NSStringFromSelector(_cmd));
- return;
- }
-
- [super waitUntilAllUpdatesAreCommitted];
-}
-
-#pragma mark - Section Editing (External API)
-
-- (void)insertSections:(NSIndexSet *)sections withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions
-{
- ASDisplayNodeAssertMainThread();
- [self beginUpdates];
- [_changeSet insertSections:sections animationOptions:animationOptions];
- [self endUpdates];
-}
-
-- (void)deleteSections:(NSIndexSet *)sections withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions
-{
- ASDisplayNodeAssertMainThread();
- [self beginUpdates];
- [_changeSet deleteSections:sections animationOptions:animationOptions];
- [self endUpdates];
-}
-
-- (void)reloadSections:(NSIndexSet *)sections withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions
-{
- ASDisplayNodeAssertMainThread();
- [self beginUpdates];
- [_changeSet reloadSections:sections animationOptions:animationOptions];
- [self endUpdates];
-}
-
-- (void)moveSection:(NSInteger)section toSection:(NSInteger)newSection withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions
-{
- ASDisplayNodeAssertMainThread();
- [self beginUpdates];
- [_changeSet deleteSections:[NSIndexSet indexSetWithIndex:section] animationOptions:animationOptions];
- [_changeSet insertSections:[NSIndexSet indexSetWithIndex:newSection] animationOptions:animationOptions];
- [self endUpdates];
-}
-
-#pragma mark - Row Editing (External API)
-
-- (void)insertRowsAtIndexPaths:(NSArray *)indexPaths withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions
-{
- ASDisplayNodeAssertMainThread();
- [self beginUpdates];
- [_changeSet insertItems:indexPaths animationOptions:animationOptions];
- [self endUpdates];
-}
-
-- (void)deleteRowsAtIndexPaths:(NSArray *)indexPaths withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions
-{
- ASDisplayNodeAssertMainThread();
- [self beginUpdates];
- [_changeSet deleteItems:indexPaths animationOptions:animationOptions];
- [self endUpdates];
-}
-
-- (void)reloadRowsAtIndexPaths:(NSArray *)indexPaths withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions
-{
- ASDisplayNodeAssertMainThread();
- [self beginUpdates];
- [_changeSet reloadItems:indexPaths animationOptions:animationOptions];
- [self endUpdates];
-}
-
-- (void)moveRowAtIndexPath:(NSIndexPath *)indexPath toIndexPath:(NSIndexPath *)newIndexPath withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions
-{
- ASDisplayNodeAssertMainThread();
- [self beginUpdates];
- [_changeSet deleteItems:@[indexPath] animationOptions:animationOptions];
- [_changeSet insertItems:@[newIndexPath] animationOptions:animationOptions];
- [self endUpdates];
-}
-
-@end
-
-#endif
diff --git a/submodules/AsyncDisplayKit/AsyncDisplayKit/Details/ASCollectionDataController.h b/submodules/AsyncDisplayKit/AsyncDisplayKit/Details/ASCollectionDataController.h
deleted file mode 100644
index adc1d8d957..0000000000
--- a/submodules/AsyncDisplayKit/AsyncDisplayKit/Details/ASCollectionDataController.h
+++ /dev/null
@@ -1,57 +0,0 @@
-//
-// ASCollectionDataController.h
-// AsyncDisplayKit
-//
-// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-//
-
-#ifndef MINIMAL_ASDK
-
-#import
-
-#import
-#import
-
-@class ASDisplayNode;
-@class ASCollectionDataController;
-@protocol ASSectionContext;
-
-NS_ASSUME_NONNULL_BEGIN
-
-@protocol ASCollectionDataControllerSource
-
-/**
- The constrained size range for layout.
- */
-- (ASSizeRange)dataController:(ASCollectionDataController *)dataController constrainedSizeForSupplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath;
-
-- (NSArray *)supplementaryNodeKindsInDataController:(ASCollectionDataController *)dataController sections:(NSIndexSet *)sections;
-
-- (NSUInteger)dataController:(ASCollectionDataController *)dataController supplementaryNodesOfKind:(NSString *)kind inSection:(NSUInteger)section;
-
-- (nullable id)dataController:(ASCollectionDataController *)dataController contextForSection:(NSInteger)section;
-
-@optional
-
-- (ASCellNode *)dataController:(ASCollectionDataController *)dataController supplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath;
-
-- (ASCellNodeBlock)dataController:(ASCollectionDataController *)dataController supplementaryNodeBlockOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath;
-
-@end
-
-@interface ASCollectionDataController : ASDataController
-
-- (instancetype)initWithDataSource:(id)dataSource eventLog:(nullable ASEventLog *)eventLog NS_DESIGNATED_INITIALIZER;
-
-- (nullable ASCellNode *)supplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath;
-
-- (nullable id)contextForSection:(NSInteger)section;
-
-@end
-
-NS_ASSUME_NONNULL_END
-
-#endif
diff --git a/submodules/AsyncDisplayKit/AsyncDisplayKit/Details/ASCollectionDataController.mm b/submodules/AsyncDisplayKit/AsyncDisplayKit/Details/ASCollectionDataController.mm
deleted file mode 100644
index 2dc4bb203c..0000000000
--- a/submodules/AsyncDisplayKit/AsyncDisplayKit/Details/ASCollectionDataController.mm
+++ /dev/null
@@ -1,320 +0,0 @@
-//
-// ASCollectionDataController.mm
-// AsyncDisplayKit
-//
-// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-//
-#ifndef MINIMAL_ASDK
-#import
-
-#import
-#import
-#import
-#import
-#import
-#import
-#import
-#import
-
-//#define LOG(...) NSLog(__VA_ARGS__)
-#define LOG(...)
-
-@interface ASCollectionDataController () {
- BOOL _dataSourceImplementsSupplementaryNodeBlockOfKindAtIndexPath;
- NSInteger _nextSectionID;
- NSMutableArray *_sections;
- NSArray *_pendingSections;
-
- /**
- * supplementaryKinds can only be accessed on the main thread
- * and so we set this in the -prepare stage, and then read it during the -will
- * stage of each update operation.
- */
- NSArray *_supplementaryKindsForPendingOperation;
-}
-
-- (id)collectionDataSource;
-
-@end
-
-@implementation ASCollectionDataController {
- NSMutableDictionary *> *_pendingNodeContexts;
-}
-
-- (instancetype)initWithDataSource:(id)dataSource eventLog:(ASEventLog *)eventLog
-{
- self = [super initWithDataSource:dataSource eventLog:eventLog];
- if (self != nil) {
- _pendingNodeContexts = [NSMutableDictionary dictionary];
- _dataSourceImplementsSupplementaryNodeBlockOfKindAtIndexPath = [dataSource respondsToSelector:@selector(dataController:supplementaryNodeBlockOfKind:atIndexPath:)];
-
- ASDisplayNodeAssertTrue(_dataSourceImplementsSupplementaryNodeBlockOfKindAtIndexPath || [dataSource respondsToSelector:@selector(dataController:supplementaryNodeOfKind:atIndexPath:)]);
-
- _nextSectionID = 0;
- _sections = [NSMutableArray array];
- }
- return self;
-}
-
-- (void)prepareForReloadDataWithSectionCount:(NSInteger)newSectionCount
-{
- ASDisplayNodeAssertMainThread();
- NSIndexSet *sections = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, newSectionCount)];
-
- [_sections removeAllObjects];
- [self _populatePendingSectionsFromDataSource:sections];
-
- for (NSString *kind in [self supplementaryKindsInSections:sections]) {
- LOG(@"Populating elements of kind: %@", kind);
- NSMutableArray *contexts = [NSMutableArray array];
- [self _populateSupplementaryNodesOfKind:kind withSections:sections mutableContexts:contexts];
- _pendingNodeContexts[kind] = contexts;
- }
-}
-
-- (void)willReloadDataWithSectionCount:(NSInteger)newSectionCount
-{
- NSIndexSet *sectionIndexes = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, newSectionCount)];
-
- [self applyPendingSections:sectionIndexes];
-
- // Assert that ASDataController has already deleted all the old sections for us.
- ASDisplayNodeAssert([self editingNodesOfKind:ASDataControllerRowNodeKind].count == 0, @"Expected that all old sections were deleted before %@. Sections: %@", NSStringFromSelector(_cmd), [self editingNodesOfKind:ASDataControllerRowNodeKind]);
-
- [_pendingNodeContexts enumerateKeysAndObjectsUsingBlock:^(NSString * _Nonnull kind, NSMutableArray * _Nonnull contexts, __unused BOOL * _Nonnull stop) {
- // Insert each section
- NSMutableArray *sections = [NSMutableArray arrayWithCapacity:newSectionCount];
- for (int i = 0; i < newSectionCount; i++) {
- [sections addObject:[NSMutableArray array]];
- }
- [self insertSections:sections ofKind:kind atIndexSet:sectionIndexes completion:nil];
-
- [self batchLayoutNodesFromContexts:contexts batchCompletion:^(NSArray *nodes, NSArray *indexPaths) {
- [self insertNodes:nodes ofKind:kind atIndexPaths:indexPaths completion:nil];
- }];
- }];
- [_pendingNodeContexts removeAllObjects];
-}
-
-- (void)prepareForInsertSections:(NSIndexSet *)sections
-{
- ASDisplayNodeAssertMainThread();
- [self _populatePendingSectionsFromDataSource:sections];
-
- for (NSString *kind in [self supplementaryKindsInSections:sections]) {
- LOG(@"Populating elements of kind: %@, for sections: %@", kind, sections);
- NSMutableArray *contexts = [NSMutableArray array];
- [self _populateSupplementaryNodesOfKind:kind withSections:sections mutableContexts:contexts];
- _pendingNodeContexts[kind] = contexts;
- }
-}
-
-- (void)willInsertSections:(NSIndexSet *)sections
-{
- [self applyPendingSections:sections];
-
- [_pendingNodeContexts enumerateKeysAndObjectsUsingBlock:^(NSString * _Nonnull kind, NSMutableArray * _Nonnull contexts, BOOL * _Nonnull stop) {
- NSMutableArray *sectionArray = [NSMutableArray arrayWithCapacity:sections.count];
- for (NSUInteger i = 0; i < sections.count; i++) {
- [sectionArray addObject:[NSMutableArray array]];
- }
-
- [self insertSections:sectionArray ofKind:kind atIndexSet:sections completion:nil];
- [self batchLayoutNodesFromContexts:contexts batchCompletion:^(NSArray *nodes, NSArray *indexPaths) {
- [self insertNodes:nodes ofKind:kind atIndexPaths:indexPaths completion:nil];
- }];
- }];
- [_pendingNodeContexts removeAllObjects];
-}
-
-- (void)willDeleteSections:(NSIndexSet *)sections
-{
- [_sections removeObjectsAtIndexes:sections];
-}
-
-- (void)prepareForInsertRowsAtIndexPaths:(NSArray *)indexPaths
-{
- ASDisplayNodeAssertMainThread();
- NSIndexSet *sections = [NSIndexSet as_sectionsFromIndexPaths:indexPaths];
- for (NSString *kind in [self supplementaryKindsInSections:sections]) {
- LOG(@"Populating elements of kind: %@, for index paths: %@", kind, indexPaths);
- NSMutableArray *contexts = [NSMutableArray array];
- [self _populateSupplementaryNodesOfKind:kind atIndexPaths:indexPaths mutableContexts:contexts];
- _pendingNodeContexts[kind] = contexts;
- }
-}
-
-- (void)willInsertRowsAtIndexPaths:(NSArray *)indexPaths
-{
- [_pendingNodeContexts enumerateKeysAndObjectsUsingBlock:^(NSString * _Nonnull kind, NSMutableArray * _Nonnull contexts, BOOL * _Nonnull stop) {
- [self batchLayoutNodesFromContexts:contexts batchCompletion:^(NSArray *nodes, NSArray *indexPaths) {
- [self insertNodes:nodes ofKind:kind atIndexPaths:indexPaths completion:nil];
- }];
- }];
-
- [_pendingNodeContexts removeAllObjects];
-}
-
-- (void)prepareForDeleteRowsAtIndexPaths:(NSArray *)indexPaths
-{
- ASDisplayNodeAssertMainThread();
- NSIndexSet *sections = [NSIndexSet as_sectionsFromIndexPaths:indexPaths];
- _supplementaryKindsForPendingOperation = [self supplementaryKindsInSections:sections];
- for (NSString *kind in _supplementaryKindsForPendingOperation) {
- NSMutableArray *contexts = [NSMutableArray array];
- [self _populateSupplementaryNodesOfKind:kind atIndexPaths:indexPaths mutableContexts:contexts];
- _pendingNodeContexts[kind] = contexts;
- }
-}
-
-- (void)willDeleteRowsAtIndexPaths:(NSArray *)indexPaths
-{
- for (NSString *kind in _supplementaryKindsForPendingOperation) {
- NSArray *deletedIndexPaths = ASIndexPathsInMultidimensionalArrayIntersectingIndexPaths([self editingNodesOfKind:kind], indexPaths);
-
- [self deleteNodesOfKind:kind atIndexPaths:deletedIndexPaths completion:nil];
-
- // If any of the contexts remain after the deletion, re-insert them, e.g.
- // UICollectionElementKindSectionHeader remains even if item 0 is deleted.
- NSMutableArray *reinsertedContexts = [NSMutableArray array];
- for (ASIndexedNodeContext *context in _pendingNodeContexts[kind]) {
- if ([deletedIndexPaths containsObject:context.indexPath]) {
- [reinsertedContexts addObject:context];
- }
- }
-
- [self batchLayoutNodesFromContexts:reinsertedContexts batchCompletion:^(NSArray *nodes, NSArray *indexPaths) {
- [self insertNodes:nodes ofKind:kind atIndexPaths:indexPaths completion:nil];
- }];
- }
- [_pendingNodeContexts removeAllObjects];
- _supplementaryKindsForPendingOperation = nil;
-}
-
-- (void)_populatePendingSectionsFromDataSource:(NSIndexSet *)sectionIndexes
-{
- ASDisplayNodeAssertMainThread();
-
- NSMutableArray *sections = [NSMutableArray arrayWithCapacity:sectionIndexes.count];
- [sectionIndexes enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL * _Nonnull stop) {
- id context = [self.collectionDataSource dataController:self contextForSection:idx];
- [sections addObject:[[ASSection alloc] initWithSectionID:_nextSectionID context:context]];
- _nextSectionID++;
- }];
- _pendingSections = sections;
-}
-
-- (void)_populateSupplementaryNodesOfKind:(NSString *)kind withSections:(NSIndexSet *)sections mutableContexts:(NSMutableArray *)contexts
-{
- __weak id environment = [self.environmentDelegate dataControllerEnvironment];
-
- [sections enumerateRangesUsingBlock:^(NSRange range, BOOL * _Nonnull stop) {
- for (NSUInteger sec = range.location; sec < NSMaxRange(range); sec++) {
- NSUInteger itemCount = [self.collectionDataSource dataController:self supplementaryNodesOfKind:kind inSection:sec];
- for (NSUInteger i = 0; i < itemCount; i++) {
- NSIndexPath *indexPath = [NSIndexPath indexPathForItem:i inSection:sec];
- [self _populateSupplementaryNodeOfKind:kind atIndexPath:indexPath mutableContexts:contexts environment:environment];
- }
- }
- }];
-}
-
-- (void)_populateSupplementaryNodesOfKind:(NSString *)kind atIndexPaths:(NSArray *)indexPaths mutableContexts:(NSMutableArray *)contexts
-{
- __weak id environment = [self.environmentDelegate dataControllerEnvironment];
-
- NSMutableIndexSet *sections = [NSMutableIndexSet indexSet];
- for (NSIndexPath *indexPath in indexPaths) {
- [sections addIndex:indexPath.section];
- }
-
- [sections enumerateRangesUsingBlock:^(NSRange range, BOOL * _Nonnull stop) {
- for (NSUInteger sec = range.location; sec < NSMaxRange(range); sec++) {
- NSUInteger itemCount = [self.collectionDataSource dataController:self supplementaryNodesOfKind:kind inSection:sec];
- for (NSUInteger i = 0; i < itemCount; i++) {
- NSIndexPath *indexPath = [NSIndexPath indexPathForItem:i inSection:sec];
- [self _populateSupplementaryNodeOfKind:kind atIndexPath:indexPath mutableContexts:contexts environment:environment];
- }
- }
- }];
-}
-
-- (void)_populateSupplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath mutableContexts:(NSMutableArray *)contexts environment:(id)environment
-{
- ASCellNodeBlock supplementaryCellBlock;
- if (_dataSourceImplementsSupplementaryNodeBlockOfKindAtIndexPath) {
- supplementaryCellBlock = [self.collectionDataSource dataController:self supplementaryNodeBlockOfKind:kind atIndexPath:indexPath];
- } else {
- ASCellNode *supplementaryNode = [self.collectionDataSource dataController:self supplementaryNodeOfKind:kind atIndexPath:indexPath];
- supplementaryCellBlock = ^{ return supplementaryNode; };
- }
-
- ASSizeRange constrainedSize = [self constrainedSizeForNodeOfKind:kind atIndexPath:indexPath];
- ASIndexedNodeContext *context = [[ASIndexedNodeContext alloc] initWithNodeBlock:supplementaryCellBlock
- indexPath:indexPath
- supplementaryElementKind:kind
- constrainedSize:constrainedSize
- environment:environment];
- [contexts addObject:context];
-}
-
-#pragma mark - Sizing query
-
-- (ASSizeRange)constrainedSizeForNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath
-{
- if ([kind isEqualToString:ASDataControllerRowNodeKind]) {
- return [super constrainedSizeForNodeOfKind:kind atIndexPath:indexPath];
- } else {
- ASDisplayNodeAssertMainThread();
- return [self.collectionDataSource dataController:self constrainedSizeForSupplementaryNodeOfKind:kind atIndexPath:indexPath];
- }
-}
-
-#pragma mark - External supplementary store and section context querying
-
-- (ASCellNode *)supplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath
-{
- ASDisplayNodeAssertMainThread();
- NSArray *nodesOfKind = [self completedNodesOfKind:kind];
- NSInteger section = indexPath.section;
- if (section < nodesOfKind.count) {
- NSArray *nodesOfKindInSection = nodesOfKind[section];
- NSInteger itemIndex = indexPath.item;
- if (itemIndex < nodesOfKindInSection.count) {
- return nodesOfKindInSection[itemIndex];
- }
- }
- return nil;
-}
-
-- (id)contextForSection:(NSInteger)section
-{
- ASDisplayNodeAssertMainThread();
- ASDisplayNodeAssertTrue(section >= 0 && section < _sections.count);
- return _sections[section].context;
-}
-
-#pragma mark - Private Helpers
-
-- (NSArray *)supplementaryKindsInSections:(NSIndexSet *)sections
-{
- return [self.collectionDataSource supplementaryNodeKindsInDataController:self sections:sections];
-}
-
-- (id)collectionDataSource
-{
- return (id)self.dataSource;
-}
-
-- (void)applyPendingSections:(NSIndexSet *)sectionIndexes
-{
- [_sections insertObjects:_pendingSections atIndexes:sectionIndexes];
- _pendingSections = nil;
-}
-
-@end
-
-#endif
diff --git a/submodules/AsyncDisplayKit/AsyncDisplayKit/Details/ASDataController.mm b/submodules/AsyncDisplayKit/AsyncDisplayKit/Details/ASDataController.mm
deleted file mode 100644
index 047b59099a..0000000000
--- a/submodules/AsyncDisplayKit/AsyncDisplayKit/Details/ASDataController.mm
+++ /dev/null
@@ -1,1093 +0,0 @@
-//
-// ASDataController.mm
-// AsyncDisplayKit
-//
-// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-//
-#ifndef MINIMAL_ASDK
-#import
-
-#import
-#import
-#import
-#import
-#import
-#import
-#import
-#import
-#import
-#import
-#import
-#import
-
-//#define LOG(...) NSLog(__VA_ARGS__)
-#define LOG(...)
-
-#define AS_MEASURE_AVOIDED_DATACONTROLLER_WORK 0
-
-#define RETURN_IF_NO_DATASOURCE(val) if (_dataSource == nil) { return val; }
-#define ASSERT_ON_EDITING_QUEUE ASDisplayNodeAssertNotNil(dispatch_get_specific(&kASDataControllerEditingQueueKey), @"%@ must be called on the editing transaction queue.", NSStringFromSelector(_cmd))
-
-const static NSUInteger kASDataControllerSizingCountPerProcessor = 5;
-const static char * kASDataControllerEditingQueueKey = "kASDataControllerEditingQueueKey";
-const static char * kASDataControllerEditingQueueContext = "kASDataControllerEditingQueueContext";
-
-NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind";
-NSString * const ASCollectionInvalidUpdateException = @"ASCollectionInvalidUpdateException";
-
-#if AS_MEASURE_AVOIDED_DATACONTROLLER_WORK
-@interface ASDataController (AvoidedWorkMeasuring)
-+ (void)_didLayoutNode;
-+ (void)_expectToInsertNodes:(NSUInteger)count;
-@end
-#endif
-
-@interface ASDataController () {
- NSMutableDictionary *_nodeContexts; // Main thread only. This is modified immediately during edits i.e. these are in the dataSource's index space.
- NSMutableArray *_externalCompletedNodes; // Main thread only. External data access can immediately query this if available.
- NSMutableDictionary *_completedNodes; // Main thread only. External data access can immediately query this if _externalCompletedNodes is unavailable.
- NSMutableDictionary *_editingNodes; // Modified on _editingTransactionQueue only. Updates propagated to _completedNodes.
- BOOL _itemCountsFromDataSourceAreValid; // Main thread only.
- std::vector _itemCountsFromDataSource; // Main thread only.
-
- ASMainSerialQueue *_mainSerialQueue;
-
- dispatch_queue_t _editingTransactionQueue; // Serial background queue. Dispatches concurrent layout and manages _editingNodes.
- dispatch_group_t _editingTransactionGroup; // Group of all edit transaction blocks. Useful for waiting.
-
- BOOL _initialReloadDataHasBeenCalled;
-
- BOOL _delegateDidInsertNodes;
- BOOL _delegateDidDeleteNodes;
- BOOL _delegateDidInsertSections;
- BOOL _delegateDidDeleteSections;
-}
-
-@end
-
-@implementation ASDataController
-
-#pragma mark - Lifecycle
-
-- (instancetype)initWithDataSource:(id)dataSource eventLog:(ASEventLog *)eventLog
-{
- if (!(self = [super init])) {
- return nil;
- }
-
- _dataSource = dataSource;
-
-#if ASEVENTLOG_ENABLE
- _eventLog = eventLog;
-#endif
-
- _nodeContexts = [NSMutableDictionary dictionary];
- _completedNodes = [NSMutableDictionary dictionary];
- _editingNodes = [NSMutableDictionary dictionary];
-
- _nodeContexts[ASDataControllerRowNodeKind] = [NSMutableArray array];
- _completedNodes[ASDataControllerRowNodeKind] = [NSMutableArray array];
- _editingNodes[ASDataControllerRowNodeKind] = [NSMutableArray array];
-
- _mainSerialQueue = [[ASMainSerialQueue alloc] init];
-
- const char *queueName = [[NSString stringWithFormat:@"org.AsyncDisplayKit.ASDataController.editingTransactionQueue:%p", self] cStringUsingEncoding:NSASCIIStringEncoding];
- _editingTransactionQueue = dispatch_queue_create(queueName, DISPATCH_QUEUE_SERIAL);
- dispatch_queue_set_specific(_editingTransactionQueue, &kASDataControllerEditingQueueKey, &kASDataControllerEditingQueueContext, NULL);
- _editingTransactionGroup = dispatch_group_create();
-
- return self;
-}
-
-- (instancetype)init
-{
- ASDisplayNodeFailAssert(@"Failed to call designated initializer.");
- id fakeDataSource = nil;
- ASEventLog *eventLog = nil;
- return [self initWithDataSource:fakeDataSource eventLog:eventLog];
-}
-
-- (void)setDelegate:(id)delegate
-{
- if (_delegate == delegate) {
- return;
- }
-
- _delegate = delegate;
-
- // Interrogate our delegate to understand its capabilities, optimizing away expensive respondsToSelector: calls later.
- _delegateDidInsertNodes = [_delegate respondsToSelector:@selector(dataController:didInsertNodes:atIndexPaths:withAnimationOptions:)];
- _delegateDidDeleteNodes = [_delegate respondsToSelector:@selector(dataController:didDeleteNodes:atIndexPaths:withAnimationOptions:)];
- _delegateDidInsertSections = [_delegate respondsToSelector:@selector(dataController:didInsertSections:atIndexSet:withAnimationOptions:)];
- _delegateDidDeleteSections = [_delegate respondsToSelector:@selector(dataController:didDeleteSectionsAtIndexSet:withAnimationOptions:)];
-}
-
-+ (NSUInteger)parallelProcessorCount
-{
- static NSUInteger parallelProcessorCount;
-
- static dispatch_once_t onceToken;
- dispatch_once(&onceToken, ^{
- parallelProcessorCount = [[NSProcessInfo processInfo] activeProcessorCount];
- });
-
- return parallelProcessorCount;
-}
-
-#pragma mark - Cell Layout
-
-- (void)batchLayoutNodesFromContexts:(NSArray *)contexts batchCompletion:(ASDataControllerCompletionBlock)batchCompletionHandler
-{
- ASSERT_ON_EDITING_QUEUE;
-#if AS_MEASURE_AVOIDED_DATACONTROLLER_WORK
- [ASDataController _expectToInsertNodes:contexts.count];
-#endif
-
- if (contexts.count == 0) {
- batchCompletionHandler(@[], @[]);
- return;
- }
-
- ASProfilingSignpostStart(2, _dataSource);
-
- NSUInteger blockSize = [[ASDataController class] parallelProcessorCount] * kASDataControllerSizingCountPerProcessor;
- NSUInteger count = contexts.count;
-
- // Processing in batches
- for (NSUInteger i = 0; i < count; i += blockSize) {
- NSRange batchedRange = NSMakeRange(i, MIN(count - i, blockSize));
- NSArray *batchedContexts = [contexts subarrayWithRange:batchedRange];
- NSArray *nodes = [self _layoutNodesFromContexts:batchedContexts];
- NSArray *indexPaths = [ASIndexedNodeContext indexPathsFromContexts:batchedContexts];
- batchCompletionHandler(nodes, indexPaths);
- }
-
- ASProfilingSignpostEnd(2, _dataSource);
-}
-
-/**
- * Measure and layout the given node with the constrained size range.
- */
-- (void)_layoutNode:(ASCellNode *)node withConstrainedSize:(ASSizeRange)constrainedSize
-{
- ASDisplayNodeAssert(ASSizeRangeHasSignificantArea(constrainedSize), @"Attempt to layout cell node with invalid size range %@", NSStringFromASSizeRange(constrainedSize));
-
- CGRect frame = CGRectZero;
- frame.size = [node layoutThatFits:constrainedSize].size;
- node.frame = frame;
-}
-
-/**
- * Measures and defines the layout for each node in optimized batches on an editing queue, inserting the results into the backing store.
- */
-- (void)_batchLayoutAndInsertNodesFromContexts:(NSArray *)contexts withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions
-{
- ASSERT_ON_EDITING_QUEUE;
-
- [self batchLayoutNodesFromContexts:contexts batchCompletion:^(NSArray *nodes, NSArray *indexPaths) {
- // Insert finished nodes into data storage
- [self _insertNodes:nodes atIndexPaths:indexPaths withAnimationOptions:animationOptions];
- }];
-}
-
-- (NSArray *)_layoutNodesFromContexts:(NSArray *)contexts
-{
- ASSERT_ON_EDITING_QUEUE;
-
- NSUInteger nodeCount = contexts.count;
- if (!nodeCount || _dataSource == nil) {
- return nil;
- }
-
- __strong ASCellNode **allocatedNodeBuffer = (__strong ASCellNode **)calloc(nodeCount, sizeof(ASCellNode *));
-
- dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
- ASDispatchApply(nodeCount, queue, 0, ^(size_t i) {
- RETURN_IF_NO_DATASOURCE();
-
- // Allocate the node.
- ASIndexedNodeContext *context = contexts[i];
- ASCellNode *node = context.node;
- if (node == nil) {
- ASDisplayNodeAssertNotNil(node, @"Node block created nil node; %@, %@", self, self.dataSource);
- node = [[ASCellNode alloc] init]; // Fallback to avoid crash for production apps.
- }
-
- // Layout the node if the size range is valid.
- ASSizeRange sizeRange = context.constrainedSize;
- if (ASSizeRangeHasSignificantArea(sizeRange)) {
- [self _layoutNode:node withConstrainedSize:sizeRange];
- }
-
-#if AS_MEASURE_AVOIDED_DATACONTROLLER_WORK
- [ASDataController _didLayoutNode];
-#endif
- allocatedNodeBuffer[i] = node;
- });
-
- BOOL canceled = _dataSource == nil;
-
- // Create nodes array
- NSArray *nodes = canceled ? nil : [NSArray arrayWithObjects:allocatedNodeBuffer count:nodeCount];
-
- // Nil out buffer indexes to allow arc to free the stored cells.
- for (int i = 0; i < nodeCount; i++) {
- allocatedNodeBuffer[i] = nil;
- }
- free(allocatedNodeBuffer);
-
- return nodes;
-}
-
-- (ASSizeRange)constrainedSizeForNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath
-{
- return [_dataSource dataController:self constrainedSizeForNodeAtIndexPath:indexPath];
-}
-
-#pragma mark - External Data Querying + Editing
-
-- (void)insertNodes:(NSArray *)nodes ofKind:(NSString *)kind atIndexPaths:(NSArray *)indexPaths completion:(ASDataControllerCompletionBlock)completionBlock
-{
- ASSERT_ON_EDITING_QUEUE;
- if (!indexPaths.count || _dataSource == nil) {
- return;
- }
-
- NSMutableArray *editingNodes = _editingNodes[kind];
- ASInsertElementsIntoMultidimensionalArrayAtIndexPaths(editingNodes, indexPaths, nodes);
-
- // Deep copy is critical here, or future edits to the sub-arrays will pollute state between _editing and _complete on different threads.
- NSMutableArray *completedNodes = ASTwoDimensionalArrayDeepMutableCopy(editingNodes);
-
- [_mainSerialQueue performBlockOnMainThread:^{
- _completedNodes[kind] = completedNodes;
- if (completionBlock) {
- completionBlock(nodes, indexPaths);
- }
- }];
-}
-
-- (void)deleteNodesOfKind:(NSString *)kind atIndexPaths:(NSArray *)indexPaths completion:(ASDataControllerCompletionBlock)completionBlock
-{
- ASSERT_ON_EDITING_QUEUE;
- if (!indexPaths.count || _dataSource == nil) {
- return;
- }
-
- LOG(@"_deleteNodesAtIndexPaths:%@ ofKind:%@, full index paths in _editingNodes = %@", indexPaths, kind, ASIndexPathsForTwoDimensionalArray(_editingNodes[kind]));
- ASDeleteElementsInMultidimensionalArrayAtIndexPaths(_editingNodes[kind], indexPaths);
-
- [_mainSerialQueue performBlockOnMainThread:^{
- NSMutableArray *allNodes = _completedNodes[kind];
- NSArray *nodes = ASFindElementsInMultidimensionalArrayAtIndexPaths(allNodes, indexPaths);
- ASDeleteElementsInMultidimensionalArrayAtIndexPaths(allNodes, indexPaths);
- if (completionBlock) {
- completionBlock(nodes, indexPaths);
- }
- }];
-}
-
-- (void)insertSections:(NSMutableArray *)sections ofKind:(NSString *)kind atIndexSet:(NSIndexSet *)indexSet completion:(void (^)(NSArray *sections, NSIndexSet *indexSet))completionBlock
-{
- ASSERT_ON_EDITING_QUEUE;
- if (!indexSet.count|| _dataSource == nil) {
- return;
- }
-
- if (_editingNodes[kind] == nil) {
- _editingNodes[kind] = [NSMutableArray array];
- }
-
- [_editingNodes[kind] insertObjects:sections atIndexes:indexSet];
-
- // Deep copy is critical here, or future edits to the sub-arrays will pollute state between _editing and _complete on different threads.
- NSArray *sectionsForCompleted = ASTwoDimensionalArrayDeepMutableCopy(sections);
-
- [_mainSerialQueue performBlockOnMainThread:^{
- [_completedNodes[kind] insertObjects:sectionsForCompleted atIndexes:indexSet];
- if (completionBlock) {
- completionBlock(sections, indexSet);
- }
- }];
-}
-
-- (void)deleteSections:(NSIndexSet *)indexSet completion:(void (^)())completionBlock
-{
- ASSERT_ON_EDITING_QUEUE;
- if (!indexSet.count || _dataSource == nil) {
- return;
- }
-
- [_editingNodes enumerateKeysAndObjectsUsingBlock:^(NSString * _Nonnull kind, NSMutableArray *sections, BOOL * _Nonnull stop) {
- [sections removeObjectsAtIndexes:indexSet];
- }];
- [_mainSerialQueue performBlockOnMainThread:^{
- [_completedNodes enumerateKeysAndObjectsUsingBlock:^(NSString * _Nonnull kind, NSMutableArray *sections, BOOL * _Nonnull stop) {
- [sections removeObjectsAtIndexes:indexSet];
- }];
- if (completionBlock) {
- completionBlock();
- }
- }];
-}
-
-#pragma mark - Internal Data Querying + Editing
-
-/**
- * Inserts the specified nodes into the given index paths and notifies the delegate of newly inserted nodes.
- *
- * @discussion Nodes are first inserted into the editing store, then the completed store is replaced by a deep copy
- * of the editing nodes. The delegate is invoked on the main thread.
- */
-- (void)_insertNodes:(NSArray *)nodes atIndexPaths:(NSArray *)indexPaths withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions
-{
- ASSERT_ON_EDITING_QUEUE;
-
- [self insertNodes:nodes ofKind:ASDataControllerRowNodeKind atIndexPaths:indexPaths completion:^(NSArray *nodes, NSArray *indexPaths) {
- ASDisplayNodeAssertMainThread();
-
- if (_delegateDidInsertNodes)
- [_delegate dataController:self didInsertNodes:nodes atIndexPaths:indexPaths withAnimationOptions:animationOptions];
- }];
-}
-
-/**
- * Removes the specified nodes at the given index paths and notifies the delegate of the nodes removed.
- *
- * @discussion Nodes are first removed from the editing store then removed from the completed store on the main thread.
- * Once the backing stores are consistent, the delegate is invoked on the main thread.
- */
-- (void)_deleteNodesAtIndexPaths:(NSArray *)indexPaths withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions
-{
- ASSERT_ON_EDITING_QUEUE;
-
- [self deleteNodesOfKind:ASDataControllerRowNodeKind atIndexPaths:indexPaths completion:^(NSArray *nodes, NSArray *indexPaths) {
- ASDisplayNodeAssertMainThread();
-
- if (_delegateDidDeleteNodes)
- [_delegate dataController:self didDeleteNodes:nodes atIndexPaths:indexPaths withAnimationOptions:animationOptions];
- }];
-}
-
-/**
- * Inserts sections, represented as arrays, into the backing store at the given indices and notifies the delegate.
- *
- * @discussion The section arrays are inserted into the editing store, then a deep copy of the sections are inserted
- * in the completed store on the main thread. The delegate is invoked on the main thread.
- */
-- (void)_insertSections:(NSMutableArray *)sections atIndexSet:(NSIndexSet *)indexSet withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions
-{
- ASSERT_ON_EDITING_QUEUE;
-
- [self insertSections:sections ofKind:ASDataControllerRowNodeKind atIndexSet:indexSet completion:^(NSArray *sections, NSIndexSet *indexSet) {
- ASDisplayNodeAssertMainThread();
-
- if (_delegateDidInsertSections)
- [_delegate dataController:self didInsertSections:sections atIndexSet:indexSet withAnimationOptions:animationOptions];
- }];
-}
-
-/**
- * Removes sections at the given indices from the backing store and notifies the delegate.
- *
- * @discussion Section array are first removed from the editing store, then the associated section in the completed
- * store is removed on the main thread. The delegate is invoked on the main thread.
- */
-- (void)_deleteSectionsAtIndexSet:(NSIndexSet *)indexSet withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions
-{
- ASSERT_ON_EDITING_QUEUE;
-
- [self deleteSections:indexSet completion:^() {
- ASDisplayNodeAssertMainThread();
-
- if (_delegateDidDeleteSections)
- [_delegate dataController:self didDeleteSectionsAtIndexSet:indexSet withAnimationOptions:animationOptions];
- }];
-}
-
-#pragma mark - Initial Load & Full Reload (External API)
-
-- (void)reloadDataWithAnimationOptions:(ASDataControllerAnimationOptions)animationOptions completion:(void (^)())completion
-{
- [self _reloadDataWithAnimationOptions:animationOptions synchronously:NO completion:completion];
-}
-
-- (void)reloadDataImmediatelyWithAnimationOptions:(ASDataControllerAnimationOptions)animationOptions
-{
- [self _reloadDataWithAnimationOptions:animationOptions synchronously:YES completion:nil];
-}
-
-- (void)_reloadDataWithAnimationOptions:(ASDataControllerAnimationOptions)animationOptions synchronously:(BOOL)synchronously completion:(void (^)())completion
-{
- ASDisplayNodeAssertMainThread();
-
- _initialReloadDataHasBeenCalled = YES;
- dispatch_group_wait(_editingTransactionGroup, DISPATCH_TIME_FOREVER);
-
- [self invalidateDataSourceItemCounts];
- NSUInteger sectionCount = [self itemCountsFromDataSource].size();
- NSIndexSet *sectionIndexes = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, sectionCount)];
- NSArray *newContexts = [self _populateNodeContextsFromDataSourceForSections:sectionIndexes];
-
- // Update _nodeContexts
- NSMutableArray *allContexts = _nodeContexts[ASDataControllerRowNodeKind];
- [allContexts removeAllObjects];
- NSArray *nodeIndexPaths = [ASIndexedNodeContext indexPathsFromContexts:newContexts];
- for (int i = 0; i < sectionCount; i++) {
- [allContexts addObject:[[NSMutableArray alloc] init]];
- }
- ASInsertElementsIntoMultidimensionalArrayAtIndexPaths(allContexts, nodeIndexPaths, newContexts);
-
- // Allow subclasses to perform setup before going into the edit transaction
- [self prepareForReloadDataWithSectionCount:sectionCount];
-
- dispatch_group_async(_editingTransactionGroup, _editingTransactionQueue, ^{
- LOG(@"Edit Transaction - reloadData");
-
- /**
- * Leave the current data in the collection view until the first batch of nodes are laid out.
- * Once the first batch is laid out, in one operation, replace all the sections and insert
- * the first batch of items.
- *
- * We previously would replace all the sections immediately, and then start adding items as they
- * were laid out. This resulted in more traffic to the UICollectionView and it also caused all the
- * section headers to bunch up until the items come and fill out the sections.
- */
- __block BOOL isFirstBatch = YES;
- [self batchLayoutNodesFromContexts:newContexts batchCompletion:^(NSArray *nodes, NSArray *indexPaths) {
- if (isFirstBatch) {
- // -beginUpdates
- [_mainSerialQueue performBlockOnMainThread:^{
- [_delegate dataControllerBeginUpdates:self];
- [_delegate dataControllerWillDeleteAllData:self];
- }];
-
- // deleteSections:
- // Remove everything that existed before the reload, now that we're ready to insert replacements
- NSUInteger oldSectionCount = [_editingNodes[ASDataControllerRowNodeKind] count];
- if (oldSectionCount) {
- NSIndexSet *indexSet = [[NSIndexSet alloc] initWithIndexesInRange:NSMakeRange(0, oldSectionCount)];
- [self _deleteSectionsAtIndexSet:indexSet withAnimationOptions:animationOptions];
- }
-
- [self willReloadDataWithSectionCount:sectionCount];
-
- // insertSections:
- NSMutableArray *sections = [NSMutableArray arrayWithCapacity:sectionCount];
- for (int i = 0; i < sectionCount; i++) {
- [sections addObject:[[NSMutableArray alloc] init]];
- }
- [self _insertSections:sections atIndexSet:sectionIndexes withAnimationOptions:animationOptions];
- }
-
- // insertItemsAtIndexPaths:
- [self _insertNodes:nodes atIndexPaths:indexPaths withAnimationOptions:animationOptions];
-
- if (isFirstBatch) {
- // -endUpdates
- [_mainSerialQueue performBlockOnMainThread:^{
- [_delegate dataController:self endUpdatesAnimated:NO completion:nil];
- }];
- isFirstBatch = NO;
- }
- }];
-
- if (completion) {
- [_mainSerialQueue performBlockOnMainThread:completion];
- }
- });
- if (synchronously) {
- [self waitUntilAllUpdatesAreCommitted];
- }
-}
-
-- (void)waitUntilAllUpdatesAreCommitted
-{
- ASDisplayNodeAssertMainThread();
-
- dispatch_group_wait(_editingTransactionGroup, DISPATCH_TIME_FOREVER);
-
- // Schedule block in main serial queue to wait until all operations are finished that are
- // where scheduled while waiting for the _editingTransactionQueue to finish
- [_mainSerialQueue performBlockOnMainThread:^{ }];
-}
-
-#pragma mark - Data Source Access (Calling _dataSource)
-
-/**
- * Fetches row contexts for the provided sections from the data source.
- */
-- (NSArray *)_populateNodeContextsFromDataSourceForSections:(NSIndexSet *)sections
-{
- ASDisplayNodeAssertMainThread();
-
- __weak id environment = [self.environmentDelegate dataControllerEnvironment];
-
- std::vector counts = [self itemCountsFromDataSource];
- NSMutableArray *contexts = [NSMutableArray array];
- [sections enumerateRangesUsingBlock:^(NSRange range, BOOL * _Nonnull stop) {
- for (NSUInteger sectionIndex = range.location; sectionIndex < NSMaxRange(range); sectionIndex++) {
- NSUInteger itemCount = counts[sectionIndex];
- for (NSUInteger i = 0; i < itemCount; i++) {
- NSIndexPath *indexPath = [NSIndexPath indexPathForItem:i inSection:sectionIndex];
- ASCellNodeBlock nodeBlock = [_dataSource dataController:self nodeBlockAtIndexPath:indexPath];
-
- ASSizeRange constrainedSize = [self constrainedSizeForNodeOfKind:ASDataControllerRowNodeKind atIndexPath:indexPath];
- [contexts addObject:[[ASIndexedNodeContext alloc] initWithNodeBlock:nodeBlock
- indexPath:indexPath
- supplementaryElementKind:nil
- constrainedSize:constrainedSize
- environment:environment]];
- }
- }
- }];
- return contexts;
-}
-
-- (void)invalidateDataSourceItemCounts
-{
- ASDisplayNodeAssertMainThread();
- _itemCountsFromDataSourceAreValid = NO;
-}
-
-- (std::vector)itemCountsFromDataSource
-{
- ASDisplayNodeAssertMainThread();
- if (NO == _itemCountsFromDataSourceAreValid) {
- id source = self.dataSource;
- NSInteger sectionCount = [source numberOfSectionsInDataController:self];
- std::vector newCounts;
- newCounts.reserve(sectionCount);
- for (NSInteger i = 0; i < sectionCount; i++) {
- newCounts.push_back([source dataController:self rowsInSection:i]);
- }
- _itemCountsFromDataSource = newCounts;
- _itemCountsFromDataSourceAreValid = YES;
- }
- return _itemCountsFromDataSource;
-}
-
-#pragma mark - Batching (External API)
-
-- (void)beginUpdates
-{
- ASDisplayNodeAssertMainThread();
- // TODO: make this -waitUntilAllUpdatesAreCommitted?
- dispatch_group_wait(_editingTransactionGroup, DISPATCH_TIME_FOREVER);
-
- dispatch_group_async(_editingTransactionGroup, _editingTransactionQueue, ^{
- [_mainSerialQueue performBlockOnMainThread:^{
- // Deep copy _completedNodes to _externalCompletedNodes.
- // Any external queries from now on will be done on _externalCompletedNodes, to guarantee data consistency with the delegate.
- _externalCompletedNodes = ASTwoDimensionalArrayDeepMutableCopy(_completedNodes[ASDataControllerRowNodeKind]);
-
- LOG(@"beginUpdates - begin updates call to delegate");
- [_delegate dataControllerBeginUpdates:self];
- }];
- });
-}
-
-- (void)endUpdatesAnimated:(BOOL)animated completion:(void (^)(BOOL))completion
-{
- LOG(@"endUpdatesWithCompletion - beginning");
- ASDisplayNodeAssertMainThread();
-
- // Running these commands may result in blocking on an _editingTransactionQueue operation that started even before -beginUpdates.
- // Each subsequent command in the queue will also wait on the full asynchronous completion of the prior command's edit transaction.
- dispatch_group_async(_editingTransactionGroup, _editingTransactionQueue, ^{
- [_mainSerialQueue performBlockOnMainThread:^{
- // Now that the transaction is done, _completedNodes can be accessed externally again.
- _externalCompletedNodes = nil;
-
- LOG(@"endUpdatesWithCompletion - calling delegate end");
- [_delegate dataController:self endUpdatesAnimated:animated completion:completion];
- }];
- });
-}
-
-- (void)updateWithChangeSet:(_ASHierarchyChangeSet *)changeSet animated:(BOOL)animated
-{
- ASDisplayNodeAssertMainThread();
-
- void (^batchCompletion)(BOOL) = changeSet.completionHandler;
-
- /**
- * If the initial reloadData has not been called, just bail because we don't have
- * our old data source counts.
- * See ASUICollectionViewTests.testThatIssuingAnUpdateBeforeInitialReloadIsUnacceptable
- * For the issue that UICollectionView has that we're choosing to workaround.
- */
- if (!self.initialReloadDataHasBeenCalled) {
- if (batchCompletion != nil) {
- batchCompletion(YES);
- }
- return;
- }
-
- [self invalidateDataSourceItemCounts];
-
- // Attempt to mark the update completed. This is when update validation will occur inside the changeset.
- // If an invalid update exception is thrown, we catch it and inject our "validationErrorSource" object,
- // which is the table/collection node's data source, into the exception reason to help debugging.
- @try {
- [changeSet markCompletedWithNewItemCounts:[self itemCountsFromDataSource]];
- } @catch (NSException *e) {
- id responsibleDataSource = self.validationErrorSource;
- if (e.name == ASCollectionInvalidUpdateException && responsibleDataSource != nil) {
- [NSException raise:ASCollectionInvalidUpdateException format:@"%@: %@", [responsibleDataSource class], e.reason];
- } else {
- @throw e;
- }
- }
-
- ASDataControllerLogEvent(self, @"triggeredUpdate: %@", changeSet);
-
- [self beginUpdates];
-
- for (_ASHierarchyItemChange *change in [changeSet itemChangesOfType:_ASHierarchyChangeTypeDelete]) {
- [self deleteRowsAtIndexPaths:change.indexPaths withAnimationOptions:change.animationOptions];
- }
-
- for (_ASHierarchySectionChange *change in [changeSet sectionChangesOfType:_ASHierarchyChangeTypeDelete]) {
- [self deleteSections:change.indexSet withAnimationOptions:change.animationOptions];
- }
-
- for (_ASHierarchySectionChange *change in [changeSet sectionChangesOfType:_ASHierarchyChangeTypeInsert]) {
- [self insertSections:change.indexSet withAnimationOptions:change.animationOptions];
- }
-
- for (_ASHierarchyItemChange *change in [changeSet itemChangesOfType:_ASHierarchyChangeTypeInsert]) {
- [self insertRowsAtIndexPaths:change.indexPaths withAnimationOptions:change.animationOptions];
- }
-
-#if ASEVENTLOG_ENABLE
- NSString *changeSetDescription = ASObjectDescriptionMakeTiny(changeSet);
- batchCompletion = ^(BOOL finished) {
- if (batchCompletion != nil) {
- batchCompletion(finished);
- }
- ASDataControllerLogEvent(self, @"finishedUpdate: %@", changeSetDescription);
- };
-#endif
-
- [self endUpdatesAnimated:animated completion:batchCompletion];
-}
-
-#pragma mark - Section Editing (External API)
-
-- (void)insertSections:(NSIndexSet *)sections withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions
-{
- ASDisplayNodeAssertMainThread();
- LOG(@"Edit Command - insertSections: %@", sections);
- if (!_initialReloadDataHasBeenCalled) {
- return;
- }
-
- dispatch_group_wait(_editingTransactionGroup, DISPATCH_TIME_FOREVER);
-
- NSArray *contexts = [self _populateNodeContextsFromDataSourceForSections:sections];
-
- // Update _nodeContexts
- {
- NSMutableArray *sectionArray = [NSMutableArray arrayWithCapacity:sections.count];
- for (NSUInteger i = 0; i < sections.count; i++) {
- [sectionArray addObject:[NSMutableArray array]];
- }
- NSMutableArray *allRowContexts = _nodeContexts[ASDataControllerRowNodeKind];
- [allRowContexts insertObjects:sectionArray atIndexes:sections];
- ASInsertElementsIntoMultidimensionalArrayAtIndexPaths(allRowContexts, [ASIndexedNodeContext indexPathsFromContexts:contexts], contexts);
- }
-
- [self prepareForInsertSections:sections];
-
- dispatch_group_async(_editingTransactionGroup, _editingTransactionQueue, ^{
- [self willInsertSections:sections];
-
- LOG(@"Edit Transaction - insertSections: %@", sections);
- NSMutableArray *sectionArray = [NSMutableArray arrayWithCapacity:sections.count];
- for (NSUInteger i = 0; i < sections.count; i++) {
- [sectionArray addObject:[NSMutableArray array]];
- }
-
- [self _insertSections:sectionArray atIndexSet:sections withAnimationOptions:animationOptions];
-
- [self _batchLayoutAndInsertNodesFromContexts:contexts withAnimationOptions:animationOptions];
- });
-}
-
-- (void)deleteSections:(NSIndexSet *)sections withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions
-{
- ASDisplayNodeAssertMainThread();
- LOG(@"Edit Command - deleteSections: %@", sections);
- if (!_initialReloadDataHasBeenCalled) {
- return;
- }
-
- [_nodeContexts[ASDataControllerRowNodeKind] removeObjectsAtIndexes:sections];
-
- dispatch_group_wait(_editingTransactionGroup, DISPATCH_TIME_FOREVER);
-
- [self prepareForDeleteSections:sections];
- dispatch_group_async(_editingTransactionGroup, _editingTransactionQueue, ^{
- [self willDeleteSections:sections];
-
- // remove elements
- LOG(@"Edit Transaction - deleteSections: %@", sections);
- [self _deleteSectionsAtIndexSet:sections withAnimationOptions:animationOptions];
- });
-}
-
-#pragma mark - Backing store manipulation optional hooks (Subclass API)
-
-- (void)prepareForReloadDataWithSectionCount:(NSInteger)newSectionCount
-{
- // Optional template hook for subclasses (See ASDataController+Subclasses.h)
-}
-
-- (void)willReloadDataWithSectionCount:(NSInteger)newSectionCount
-{
- // Optional template hook for subclasses (See ASDataController+Subclasses.h)
-}
-
-- (void)prepareForInsertSections:(NSIndexSet *)sections
-{
- // Optional template hook for subclasses (See ASDataController+Subclasses.h)
-}
-
-- (void)prepareForDeleteSections:(NSIndexSet *)sections
-{
- // Optional template hook for subclasses (See ASDataController+Subclasses.h)
-}
-
-- (void)willInsertSections:(NSIndexSet *)sections
-{
- // Optional template hook for subclasses (See ASDataController+Subclasses.h)
-}
-
-- (void)willDeleteSections:(NSIndexSet *)sections
-{
- // Optional template hook for subclasses (See ASDataController+Subclasses.h)
-}
-
-- (void)willMoveSection:(NSInteger)section toSection:(NSInteger)newSection
-{
- // Optional template hook for subclasses (See ASDataController+Subclasses.h)
-}
-
-- (void)prepareForInsertRowsAtIndexPaths:(NSArray *)indexPaths
-{
- // Optional template hook for subclasses (See ASDataController+Subclasses.h)
-}
-
-- (void)willInsertRowsAtIndexPaths:(NSArray *)indexPaths
-{
- // Optional template hook for subclasses (See ASDataController+Subclasses.h)
-}
-
-- (void)prepareForDeleteRowsAtIndexPaths:(NSArray *)indexPaths
-{
- // Optional template hook for subclasses (See ASDataController+Subclasses.h)
-}
-
-- (void)willDeleteRowsAtIndexPaths:(NSArray *)indexPaths
-{
- // Optional template hook for subclasses (See ASDataController+Subclasses.h)
-}
-
-#pragma mark - Row Editing (External API)
-
-- (void)insertRowsAtIndexPaths:(NSArray *)indexPaths withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions
-{
- ASDisplayNodeAssertMainThread();
- if (!_initialReloadDataHasBeenCalled) {
- return;
- }
-
- LOG(@"Edit Command - insertRows: %@", indexPaths);
- dispatch_group_wait(_editingTransactionGroup, DISPATCH_TIME_FOREVER);
-
- // Sort indexPath to avoid messing up the index when inserting in several batches
- NSArray *sortedIndexPaths = [indexPaths sortedArrayUsingSelector:@selector(compare:)];
- NSMutableArray *contexts = [[NSMutableArray alloc] initWithCapacity:indexPaths.count];
-
- __weak id environment = [self.environmentDelegate dataControllerEnvironment];
-
- for (NSIndexPath *indexPath in sortedIndexPaths) {
- ASCellNodeBlock nodeBlock = [_dataSource dataController:self nodeBlockAtIndexPath:indexPath];
- ASSizeRange constrainedSize = [self constrainedSizeForNodeOfKind:ASDataControllerRowNodeKind atIndexPath:indexPath];
- [contexts addObject:[[ASIndexedNodeContext alloc] initWithNodeBlock:nodeBlock
- indexPath:indexPath
- supplementaryElementKind:nil
- constrainedSize:constrainedSize
- environment:environment]];
- }
-
- ASInsertElementsIntoMultidimensionalArrayAtIndexPaths(_nodeContexts[ASDataControllerRowNodeKind], sortedIndexPaths, contexts);
- [self prepareForInsertRowsAtIndexPaths:indexPaths];
-
- dispatch_group_async(_editingTransactionGroup, _editingTransactionQueue, ^{
- [self willInsertRowsAtIndexPaths:indexPaths];
-
- LOG(@"Edit Transaction - insertRows: %@", indexPaths);
- [self _batchLayoutAndInsertNodesFromContexts:contexts withAnimationOptions:animationOptions];
- });
-}
-
-- (void)deleteRowsAtIndexPaths:(NSArray *)indexPaths withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions
-{
- ASDisplayNodeAssertMainThread();
-
- if (!_initialReloadDataHasBeenCalled) {
- return;
- }
-
- LOG(@"Edit Command - deleteRows: %@", indexPaths);
-
- dispatch_group_wait(_editingTransactionGroup, DISPATCH_TIME_FOREVER);
-
- // Sort indexPath in order to avoid messing up the index when deleting in several batches.
- // FIXME: Shouldn't deletes be sorted in descending order?
- NSArray *sortedIndexPaths = [indexPaths sortedArrayUsingSelector:@selector(compare:)];
-
- ASDeleteElementsInMultidimensionalArrayAtIndexPaths(_nodeContexts[ASDataControllerRowNodeKind], sortedIndexPaths);
- [self prepareForDeleteRowsAtIndexPaths:sortedIndexPaths];
-
- dispatch_group_async(_editingTransactionGroup, _editingTransactionQueue, ^{
- [self willDeleteRowsAtIndexPaths:sortedIndexPaths];
-
- LOG(@"Edit Transaction - deleteRows: %@", indexPaths);
- [self _deleteNodesAtIndexPaths:sortedIndexPaths withAnimationOptions:animationOptions];
- });
-}
-
-- (void)relayoutAllNodes
-{
- ASDisplayNodeAssertMainThread();
- if (!_initialReloadDataHasBeenCalled) {
- return;
- }
-
- LOG(@"Edit Command - relayoutRows");
- dispatch_group_wait(_editingTransactionGroup, DISPATCH_TIME_FOREVER);
-
- // Can't relayout right away because _completedNodes may not be up-to-date,
- // i.e there might be some nodes that were measured using the old constrained size but haven't been added to _completedNodes
- // (see _layoutNodes:atIndexPaths:withAnimationOptions:).
- dispatch_group_async(_editingTransactionGroup, _editingTransactionQueue, ^{
- [_mainSerialQueue performBlockOnMainThread:^{
- for (NSString *kind in _completedNodes) {
- [self _relayoutNodesOfKind:kind];
- }
- }];
- });
-}
-
-- (void)_relayoutNodesOfKind:(NSString *)kind
-{
- ASDisplayNodeAssertMainThread();
- NSArray *nodes = [self completedNodesOfKind:kind];
- if (!nodes.count) {
- return;
- }
-
- NSUInteger sectionIndex = 0;
- for (NSMutableArray *section in nodes) {
- NSUInteger rowIndex = 0;
- for (ASCellNode *node in section) {
- RETURN_IF_NO_DATASOURCE();
- NSIndexPath *indexPath = [NSIndexPath indexPathForRow:rowIndex inSection:sectionIndex];
- ASSizeRange constrainedSize = [self constrainedSizeForNodeOfKind:kind atIndexPath:indexPath];
- if (ASSizeRangeHasSignificantArea(constrainedSize)) {
- [self _layoutNode:node withConstrainedSize:constrainedSize];
- }
- rowIndex += 1;
- }
- sectionIndex += 1;
- }
-}
-
-#pragma mark - Data Querying (Subclass API)
-
-- (NSMutableArray *)editingNodesOfKind:(NSString *)kind
-{
- return _editingNodes[kind] ? : [NSMutableArray array];
-}
-
-- (NSMutableArray *)completedNodesOfKind:(NSString *)kind
-{
- return _completedNodes[kind];
-}
-
-#pragma mark - Data Querying (External API)
-
-- (NSUInteger)numberOfSections
-{
- ASDisplayNodeAssertMainThread();
- return [_nodeContexts[ASDataControllerRowNodeKind] count];
-}
-
-- (NSUInteger)numberOfRowsInSection:(NSUInteger)section
-{
- ASDisplayNodeAssertMainThread();
- NSArray *contextSections = _nodeContexts[ASDataControllerRowNodeKind];
- return (section < contextSections.count) ? [contextSections[section] count] : 0;
-}
-
-- (NSUInteger)completedNumberOfSections
-{
- ASDisplayNodeAssertMainThread();
- return [[self completedNodes] count];
-}
-
-- (NSUInteger)completedNumberOfRowsInSection:(NSUInteger)section
-{
- ASDisplayNodeAssertMainThread();
- NSArray *completedNodes = [self completedNodes];
- return (section < completedNodes.count) ? [completedNodes[section] count] : 0;
-}
-
-- (ASCellNode *)nodeAtIndexPath:(NSIndexPath *)indexPath
-{
- ASDisplayNodeAssertMainThread();
- if (indexPath == nil) {
- return nil;
- }
-
- NSArray *contexts = _nodeContexts[ASDataControllerRowNodeKind];
- NSInteger section = indexPath.section;
- NSInteger row = indexPath.row;
- ASIndexedNodeContext *context = nil;
-
- if (section >= 0 && row >= 0 && section < contexts.count) {
- NSArray *completedNodesSection = contexts[section];
- if (row < completedNodesSection.count) {
- context = completedNodesSection[row];
- }
- }
- return context.node;
-}
-
-- (ASCellNode *)nodeAtCompletedIndexPath:(NSIndexPath *)indexPath
-{
- ASDisplayNodeAssertMainThread();
- if (indexPath == nil) {
- return nil;
- }
-
- NSArray *completedNodes = [self completedNodes];
- NSInteger section = indexPath.section;
- NSInteger row = indexPath.row;
- ASCellNode *node = nil;
-
- if (section >= 0 && row >= 0 && section < completedNodes.count) {
- NSArray *completedNodesSection = completedNodes[section];
- if (row < completedNodesSection.count) {
- node = completedNodesSection[row];
- }
- }
-
- return node;
-}
-
-- (NSIndexPath *)indexPathForNode:(ASCellNode *)cellNode;
-{
- ASDisplayNodeAssertMainThread();
- if (cellNode == nil) {
- return nil;
- }
-
- NSString *kind = cellNode.supplementaryElementKind ?: ASDataControllerRowNodeKind;
- NSArray *contexts = _nodeContexts[kind];
-
- // Check if the cached index path is still correct.
- NSIndexPath *indexPath = cellNode.cachedIndexPath;
- if (indexPath != nil) {
- ASIndexedNodeContext *context = ASGetElementInTwoDimensionalArray(contexts, indexPath);
- if (context.nodeIfAllocated == cellNode) {
- return indexPath;
- } else {
- indexPath = nil;
- }
- }
-
- // Loop through each section to look for the node context
- NSInteger section = 0;
- for (NSArray *nodeContexts in contexts) {
- NSUInteger item = [nodeContexts indexOfObjectPassingTest:^BOOL(ASIndexedNodeContext * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
- return obj.nodeIfAllocated == cellNode;
- }];
- if (item != NSNotFound) {
- indexPath = [NSIndexPath indexPathForItem:item inSection:section];
- break;
- }
- section += 1;
- }
- cellNode.cachedIndexPath = indexPath;
- return indexPath;
-}
-
-- (NSIndexPath *)completedIndexPathForNode:(ASCellNode *)cellNode
-{
- ASDisplayNodeAssertMainThread();
- if (cellNode == nil) {
- return nil;
- }
-
- NSInteger section = 0;
- // Loop through each section to look for the cellNode
- NSString *kind = cellNode.supplementaryElementKind ?: ASDataControllerRowNodeKind;
- for (NSArray *sectionNodes in [self completedNodesOfKind:kind]) {
- NSUInteger item = [sectionNodes indexOfObjectIdenticalTo:cellNode];
- if (item != NSNotFound) {
- return [NSIndexPath indexPathForItem:item inSection:section];
- }
- section += 1;
- }
-
- return nil;
-}
-
-/// Returns nodes that can be queried externally. _externalCompletedNodes is used if available, _completedNodes otherwise.
-- (NSArray *)completedNodes
-{
- ASDisplayNodeAssertMainThread();
- return _externalCompletedNodes ? : _completedNodes[ASDataControllerRowNodeKind];
-}
-
-- (void)moveCompletedNodeAtIndexPath:(NSIndexPath *)indexPath toIndexPath:(NSIndexPath *)newIndexPath
-{
- ASDisplayNodeAssertMainThread();
- ASMoveElementInTwoDimensionalArray(_externalCompletedNodes, indexPath, newIndexPath);
- ASMoveElementInTwoDimensionalArray(_completedNodes[ASDataControllerRowNodeKind], indexPath, newIndexPath);
-}
-
-@end
-
-#if AS_MEASURE_AVOIDED_DATACONTROLLER_WORK
-
-static volatile int64_t _totalExpectedItems = 0;
-static volatile int64_t _totalMeasuredNodes = 0;
-
-@implementation ASDataController (WorkMeasuring)
-
-+ (void)_didLayoutNode
-{
- int64_t measured = OSAtomicIncrement64(&_totalMeasuredNodes);
- int64_t expected = _totalExpectedItems;
- if (measured % 20 == 0 || measured == expected) {
- NSLog(@"Data controller avoided work (underestimated): %lld / %lld", measured, expected);
- }
-}
-
-+ (void)_expectToInsertNodes:(NSUInteger)count
-{
- OSAtomicAdd64((int64_t)count, &_totalExpectedItems);
-}
-
-@end
-#endif
-
-#endif
diff --git a/submodules/AsyncDisplayKit/AsyncDisplayKit/Details/ASFlowLayoutController.h b/submodules/AsyncDisplayKit/AsyncDisplayKit/Details/ASFlowLayoutController.h
deleted file mode 100644
index 7eeb4d3533..0000000000
--- a/submodules/AsyncDisplayKit/AsyncDisplayKit/Details/ASFlowLayoutController.h
+++ /dev/null
@@ -1,44 +0,0 @@
-//
-// ASFlowLayoutController.h
-// AsyncDisplayKit
-//
-// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-//
-#ifndef MINIMAL_ASDK
-#import
-#import
-
-NS_ASSUME_NONNULL_BEGIN
-
-@class ASCellNode;
-
-typedef NS_ENUM(NSUInteger, ASFlowLayoutDirection) {
- ASFlowLayoutDirectionVertical,
- ASFlowLayoutDirectionHorizontal,
-};
-
-@protocol ASFlowLayoutControllerDataSource
-
-- (NSArray *> *)completedNodes; // This provides access to ASDataController's _completedNodes multidimensional array.
-
-@end
-
-/**
- * An optimized flow layout controller that supports only vertical or horizontal scrolling, not simultaneously two-dimensional scrolling.
- * It is used for all ASTableViews, and may be used with ASCollectionView.
- */
-@interface ASFlowLayoutController : ASAbstractLayoutController
-
-@property (nonatomic, readonly, assign) ASFlowLayoutDirection layoutDirection;
-@property (nonatomic, readwrite, weak) id dataSource;
-
-- (instancetype)initWithScrollOption:(ASFlowLayoutDirection)layoutDirection;
-
-@end
-
-NS_ASSUME_NONNULL_END
-
-#endif
diff --git a/submodules/AsyncDisplayKit/AsyncDisplayKit/Details/ASFlowLayoutController.mm b/submodules/AsyncDisplayKit/AsyncDisplayKit/Details/ASFlowLayoutController.mm
deleted file mode 100644
index 4a23ec25a6..0000000000
--- a/submodules/AsyncDisplayKit/AsyncDisplayKit/Details/ASFlowLayoutController.mm
+++ /dev/null
@@ -1,203 +0,0 @@
-//
-// ASFlowLayoutController.mm
-// AsyncDisplayKit
-//
-// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
-// This source code is licensed under the BSD-style license found in the
-// LICENSE file in the root directory of this source tree. An additional grant
-// of patent rights can be found in the PATENTS file in the same directory.
-//
-#ifndef MINIMAL_ASDK
-#import
-#import
-#import
-#import
-#import
-
-#include