mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-02 00:17:02 +00:00
Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios
This commit is contained in:
commit
c4261f6d29
@ -33,5 +33,7 @@
|
||||
<string>merchant.privatbank.test.telergramios</string>
|
||||
<string>merchant.privatbank.prod.telergram</string>
|
||||
</array>
|
||||
<key>com.apple.developer.pushkit.unrestricted-voip</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
@ -32,5 +32,7 @@
|
||||
<array>
|
||||
<string>X834Q8SBVP.org.telegram.Telegram-iOS</string>
|
||||
</array>
|
||||
<key>com.apple.developer.pushkit.unrestricted-voip</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
@ -146,6 +146,7 @@ REMOVE_ENTITLEMENT_KEYS=(\
|
||||
COPY_ENTITLEMENT_KEYS=(\
|
||||
"com.apple.developer.associated-domains" \
|
||||
"com.apple.developer.icloud-services" \
|
||||
"com.apple.developer.pushkit.unrestricted-voip" \
|
||||
)
|
||||
|
||||
REPLACE_TO_PRODUCTION_ENTITLEMENT_KEYS=(\
|
||||
@ -217,9 +218,12 @@ for ITEM in $APP_ITEMS_WITH_PROVISIONING_PROFILE; do
|
||||
VALUE=$(/usr/libexec/PlistBuddy -c "Print :$KEY" "$PROFILE_ENTITLEMENTS_PATH" 2>/dev/null || echo "")
|
||||
if [ ! -z "$VALUE" ]; then
|
||||
PLUTIL_KEY=$(echo "$KEY" | sed 's/\./\\\./g')
|
||||
VALUE=$(plutil -extract "$PLUTIL_KEY" xml1 -o - "${!ENTITLEMENTS_VAR}")
|
||||
/usr/libexec/PlistBuddy -c "Delete $KEY" "$PROFILE_ENTITLEMENTS_PATH" 2>/dev/null
|
||||
plutil -insert "$PLUTIL_KEY" -xml "$VALUE" "$PROFILE_ENTITLEMENTS_PATH"
|
||||
TEST_VALUE=$(plutil -extract "$PLUTIL_KEY" xml1 -o - "${!ENTITLEMENTS_VAR}" 1>/dev/null || echo "error")
|
||||
if [ "$TEST_VALUE" != "error" ]; then
|
||||
VALUE=$(plutil -extract "$PLUTIL_KEY" xml1 -o - "${!ENTITLEMENTS_VAR}")
|
||||
/usr/libexec/PlistBuddy -c "Delete $KEY" "$PROFILE_ENTITLEMENTS_PATH" 2>/dev/null
|
||||
plutil -insert "$PLUTIL_KEY" -xml "$VALUE" "$PROFILE_ENTITLEMENTS_PATH"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
@ -237,7 +237,7 @@ using AS::MutexLocker;
|
||||
UIImage *image = nil;
|
||||
|
||||
if (shouldCreateGraphicsContext && !currentContext) {
|
||||
ASDisplayNodeAssert(NO, @"Failed to create a CGContext (size: %@)", NSStringFromCGSize(bounds.size));
|
||||
//ASDisplayNodeAssert(NO, @"Failed to create a CGContext (size: %@)", NSStringFromCGSize(bounds.size));
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
@ -700,7 +700,7 @@ final class SecureIdAuthControllerNode: ViewControllerTracingNode {
|
||||
guard let strongSelf = self else {
|
||||
return
|
||||
}
|
||||
strongSelf.interaction.present(SecureIdPlaintextFormController(context: strongSelf.context, secureIdContext: secureIdContext, type: type, immediatelyAvailableValue: immediatelyAvailableValue, updatedValue: { valueWithContext in
|
||||
strongSelf.interaction.push(SecureIdPlaintextFormController(context: strongSelf.context, secureIdContext: secureIdContext, type: type, immediatelyAvailableValue: immediatelyAvailableValue, updatedValue: { valueWithContext in
|
||||
if let strongSelf = self {
|
||||
strongSelf.interaction.updateState { state in
|
||||
if case let .form(form) = state, let formData = form.formData {
|
||||
@ -723,7 +723,7 @@ final class SecureIdAuthControllerNode: ViewControllerTracingNode {
|
||||
return state
|
||||
}
|
||||
}
|
||||
}), nil)
|
||||
}))
|
||||
}
|
||||
|
||||
if let currentValue = currentValue {
|
||||
@ -941,9 +941,9 @@ final class SecureIdAuthControllerNode: ViewControllerTracingNode {
|
||||
if let peer = list.accountPeer as? TelegramUser, let phone = peer.phone, !phone.isEmpty {
|
||||
immediatelyAvailableValue = .phone(SecureIdPhoneValue(phone: phone))
|
||||
}
|
||||
self.interaction.present(SecureIdPlaintextFormController(context: self.context, secureIdContext: secureIdContext, type: .phone, immediatelyAvailableValue: immediatelyAvailableValue, updatedValue: { value in
|
||||
self.interaction.push(SecureIdPlaintextFormController(context: self.context, secureIdContext: secureIdContext, type: .phone, immediatelyAvailableValue: immediatelyAvailableValue, updatedValue: { value in
|
||||
updatedValues(.phone)(value.flatMap({ [$0] }) ?? [])
|
||||
}), nil)
|
||||
}))
|
||||
}
|
||||
case .email:
|
||||
if findValue(values, key: .email) != nil {
|
||||
@ -953,9 +953,9 @@ final class SecureIdAuthControllerNode: ViewControllerTracingNode {
|
||||
if let email = list.twoStepEmail {
|
||||
immediatelyAvailableValue = .email(SecureIdEmailValue(email: email))
|
||||
}
|
||||
self.interaction.present(SecureIdPlaintextFormController(context: self.context, secureIdContext: secureIdContext, type: .email, immediatelyAvailableValue: immediatelyAvailableValue, updatedValue: { value in
|
||||
self.interaction.push(SecureIdPlaintextFormController(context: self.context, secureIdContext: secureIdContext, type: .email, immediatelyAvailableValue: immediatelyAvailableValue, updatedValue: { value in
|
||||
updatedValues(.email)(value.flatMap({ [$0] }) ?? [])
|
||||
}), nil)
|
||||
}))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -37,6 +37,8 @@ public final class SecureIdPlaintextFormController: FormController<SecureIdPlain
|
||||
|
||||
super.init(initParams: SecureIdPlaintextFormControllerNodeInitParams(context: context, secureIdContext: secureIdContext), presentationData: self.presentationData)
|
||||
|
||||
self.navigationPresentation = .modal
|
||||
|
||||
switch type {
|
||||
case .phone:
|
||||
self.title = self.presentationData.strings.Passport_Phone_Title
|
||||
|
@ -465,7 +465,7 @@ private func channelVisibilityControllerEntries(presentationData: PresentationDa
|
||||
} else if let cachedChannelData = view.cachedData as? CachedChannelData, cachedChannelData.peerGeoLocation != nil {
|
||||
selectedType = .publicChannel
|
||||
} else {
|
||||
selectedType = .privateChannel
|
||||
selectedType = .publicChannel
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -641,14 +641,14 @@ public func privacyAndSecurityController(context: AccountContext, initialSetting
|
||||
case .set:
|
||||
break
|
||||
case let .notSet(pendingEmail):
|
||||
if pendingEmail == nil {
|
||||
break
|
||||
//intro = pendingEmail == nil
|
||||
/*if pendingEmail == nil {
|
||||
let controller = TwoFactorAuthSplashScreen(context: context, mode: .intro)
|
||||
pushControllerImpl?(controller, true)
|
||||
} else {
|
||||
|
||||
}
|
||||
//intro = pendingEmail == nil
|
||||
return
|
||||
}*/
|
||||
}
|
||||
}
|
||||
if intro {
|
||||
|
@ -203,7 +203,6 @@ framework(
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/CoreAudio.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/WebKit.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/Intents.framework",
|
||||
],
|
||||
weak_frameworks = [
|
||||
"Vision",
|
||||
@ -211,5 +210,6 @@ framework(
|
||||
"CallKit",
|
||||
"PassKit",
|
||||
"Contacts",
|
||||
"Intents",
|
||||
],
|
||||
)
|
||||
|
@ -164,11 +164,12 @@ public class ShareRootControllerImpl {
|
||||
|
||||
let internalContext: InternalContext
|
||||
|
||||
let accountManager = AccountManager(basePath: rootPath + "/accounts-metadata")
|
||||
|
||||
if let globalInternalContext = globalInternalContext {
|
||||
internalContext = globalInternalContext
|
||||
} else {
|
||||
initializeAccountManagement()
|
||||
let accountManager = AccountManager(basePath: rootPath + "/accounts-metadata")
|
||||
var initialPresentationDataAndSettings: InitialPresentationDataAndSettings?
|
||||
let semaphore = DispatchSemaphore(value: 0)
|
||||
let systemUserInterfaceStyle: WindowUserInterfaceStyle
|
||||
@ -205,16 +206,28 @@ public class ShareRootControllerImpl {
|
||||
|
||||
Logger.shared.redactSensitiveData = loggingSettings.redactSensitiveData
|
||||
|
||||
return sharedContext.activeAccountsWithInfo
|
||||
return combineLatest(sharedContext.activeAccountsWithInfo, accountManager.transaction { transaction -> Set<AccountRecordId> in
|
||||
return Set(transaction.getRecords().map { record in
|
||||
return record.id
|
||||
})
|
||||
})
|
||||
|> castError(ShareAuthorizationError.self)
|
||||
|> take(1)
|
||||
|> mapToSignal { primary, accounts -> Signal<(SharedAccountContextImpl, Account, [AccountWithInfo]), ShareAuthorizationError> in
|
||||
guard let primary = primary else {
|
||||
|> mapToSignal { primaryAndAccounts, validAccountIds -> Signal<(SharedAccountContextImpl, Account, [AccountWithInfo]), ShareAuthorizationError> in
|
||||
var (maybePrimary, accounts) = primaryAndAccounts
|
||||
for i in (0 ..< accounts.count).reversed() {
|
||||
if !validAccountIds.contains(accounts[i].account.id) {
|
||||
accounts.remove(at: i)
|
||||
}
|
||||
}
|
||||
|
||||
guard let primary = maybePrimary, validAccountIds.contains(primary) else {
|
||||
return .fail(.unauthorized)
|
||||
}
|
||||
guard let info = accounts.first(where: { $0.account.id == primary }) else {
|
||||
return .fail(.unauthorized)
|
||||
}
|
||||
|
||||
return .single((sharedContext, info.account, Array(accounts)))
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user