mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
merge fixes
This commit is contained in:
parent
b7cbb997bd
commit
341d22ae1a
@ -1340,7 +1340,7 @@ private final class NotificationServiceHandler {
|
|||||||
}
|
}
|
||||||
case let .groupCall(groupCallData):
|
case let .groupCall(groupCallData):
|
||||||
if let stateManager = strongSelf.stateManager {
|
if let stateManager = strongSelf.stateManager {
|
||||||
let content = NotificationContent(isLockedMessage: nil)
|
let content = NotificationContent(sgStatus: sgStatus, isLockedMessage: nil)
|
||||||
updateCurrentContent(content)
|
updateCurrentContent(content)
|
||||||
|
|
||||||
let _ = (stateManager.postbox.transaction { transaction -> TelegramUser? in
|
let _ = (stateManager.postbox.transaction { transaction -> TelegramUser? in
|
||||||
@ -1361,7 +1361,7 @@ private final class NotificationServiceHandler {
|
|||||||
|
|
||||||
if #available(iOS 14.5, *), voiceCallSettings.enableSystemIntegration {
|
if #available(iOS 14.5, *), voiceCallSettings.enableSystemIntegration {
|
||||||
Logger.shared.log("NotificationService \(episode)", "Will report voip notification")
|
Logger.shared.log("NotificationService \(episode)", "Will report voip notification")
|
||||||
let content = NotificationContent(isLockedMessage: nil)
|
let content = NotificationContent(sgStatus: sgStatus, isLockedMessage: nil)
|
||||||
updateCurrentContent(content)
|
updateCurrentContent(content)
|
||||||
|
|
||||||
CXProvider.reportNewIncomingVoIPPushPayload(voipPayload, completion: { error in
|
CXProvider.reportNewIncomingVoIPPushPayload(voipPayload, completion: { error in
|
||||||
@ -1370,7 +1370,7 @@ private final class NotificationServiceHandler {
|
|||||||
completed()
|
completed()
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
var content = NotificationContent(isLockedMessage: nil)
|
var content = NotificationContent(sgStatus: sgStatus, isLockedMessage: nil)
|
||||||
if let peer = fromPeer {
|
if let peer = fromPeer {
|
||||||
content.title = peer.debugDisplayTitle
|
content.title = peer.debugDisplayTitle
|
||||||
content.body = incomingCallMessage
|
content.body = incomingCallMessage
|
||||||
|
@ -3099,8 +3099,10 @@ private final class PremiumIntroScreenComponent: CombinedComponent {
|
|||||||
let presentationData = self.screenContext.presentationData
|
let presentationData = self.screenContext.presentationData
|
||||||
|
|
||||||
// MARK: Swiftgram
|
// MARK: Swiftgram
|
||||||
let alertController = textAlertController(context: self.context, title: i18n("Common.OpenTelegram", presentationData.strings.baseLanguageCode), text: i18n("Common.UseTelegramForPremium", presentationData.strings.baseLanguageCode), actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_OK, action: {})])
|
if let context = self.screenContext.context {
|
||||||
self.present(alertController)
|
let alertController = textAlertController(context: context, title: i18n("Common.OpenTelegram", presentationData.strings.baseLanguageCode), text: i18n("Common.UseTelegramForPremium", presentationData.strings.baseLanguageCode), actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_OK, action: {})])
|
||||||
|
self.present(alertController)
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if case let .gift(_, _, _, giftCode) = self.source, let giftCode, giftCode.usedDate == nil {
|
if case let .gift(_, _, _, giftCode) = self.source, let giftCode, giftCode.usedDate == nil {
|
||||||
|
@ -3,10 +3,11 @@ import TelegramCore
|
|||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
|
|
||||||
public struct CallListSettings: Codable, Equatable {
|
public struct CallListSettings: Codable, Equatable {
|
||||||
|
public var showContactsTab: Bool
|
||||||
public var _showTab: Bool?
|
public var _showTab: Bool?
|
||||||
|
|
||||||
public static var defaultSettings: CallListSettings {
|
public static var defaultSettings: CallListSettings {
|
||||||
return CallListSettings(showTab: nil)
|
return CallListSettings(showContactsTab: true, showTab: nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
public var showTab: Bool {
|
public var showTab: Bool {
|
||||||
@ -21,13 +22,14 @@ public struct CallListSettings: Codable, Equatable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public init(showTab: Bool?) {
|
public init(showContactsTab: Bool, showTab: Bool?) {
|
||||||
|
self.showContactsTab = showContactsTab
|
||||||
self._showTab = showTab
|
self._showTab = showTab
|
||||||
}
|
}
|
||||||
|
|
||||||
public init(from decoder: Decoder) throws {
|
public init(from decoder: Decoder) throws {
|
||||||
let container = try decoder.container(keyedBy: StringCodingKey.self)
|
let container = try decoder.container(keyedBy: StringCodingKey.self)
|
||||||
|
self.showContactsTab = (try container.decode(Int32.self, forKey: "showContactsTab")) != 0
|
||||||
if let value = try container.decodeIfPresent(Int32.self, forKey: "showTab") {
|
if let value = try container.decodeIfPresent(Int32.self, forKey: "showTab") {
|
||||||
self._showTab = value != 0
|
self._showTab = value != 0
|
||||||
}
|
}
|
||||||
@ -35,7 +37,7 @@ public struct CallListSettings: Codable, Equatable {
|
|||||||
|
|
||||||
public func encode(to encoder: Encoder) throws {
|
public func encode(to encoder: Encoder) throws {
|
||||||
var container = encoder.container(keyedBy: StringCodingKey.self)
|
var container = encoder.container(keyedBy: StringCodingKey.self)
|
||||||
|
try container.encode((self.showContactsTab ? 1 : 0) as Int32, forKey: "showContactsTab")
|
||||||
if let showTab = self._showTab {
|
if let showTab = self._showTab {
|
||||||
try container.encode((showTab ? 1 : 0) as Int32, forKey: "showTab")
|
try container.encode((showTab ? 1 : 0) as Int32, forKey: "showTab")
|
||||||
} else {
|
} else {
|
||||||
@ -44,11 +46,15 @@ public struct CallListSettings: Codable, Equatable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static func ==(lhs: CallListSettings, rhs: CallListSettings) -> Bool {
|
public static func ==(lhs: CallListSettings, rhs: CallListSettings) -> Bool {
|
||||||
return lhs._showTab == rhs._showTab
|
return lhs.showContactsTab == rhs.showContactsTab && lhs._showTab == rhs._showTab
|
||||||
}
|
}
|
||||||
|
|
||||||
public func withUpdatedShowTab(_ showTab: Bool) -> CallListSettings {
|
public func withUpdatedShowTab(_ showTab: Bool) -> CallListSettings {
|
||||||
return CallListSettings(showTab: showTab)
|
return CallListSettings(showContactsTab: self.showContactsTab, showTab: showTab)
|
||||||
|
}
|
||||||
|
|
||||||
|
public func withUpdatedShowContactsTab(_ showContactsTab: Bool) -> CallListSettings {
|
||||||
|
return CallListSettings(showContactsTab: showContactsTab, showTab: self.showTab)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user