mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-09 03:20:48 +00:00
macos syntax
This commit is contained in:
parent
48a6568df0
commit
97b8a1c309
@ -709,7 +709,7 @@ extension StoreMessage {
|
||||
if mediaValue is TelegramMediaWebpage {
|
||||
let leadingPreview = (flags & (1 << 27)) != 0
|
||||
|
||||
if let webpageAttributes {
|
||||
if let webpageAttributes = webpageAttributes {
|
||||
attributes.append(WebpagePreviewMessageAttribute(leadingPreview: leadingPreview, forceLargeMedia: webpageAttributes.forceLargeMedia, isManuallyAdded: webpageAttributes.isManuallyAdded, isSafe: webpageAttributes.isSafe))
|
||||
}
|
||||
}
|
||||
|
@ -1153,7 +1153,7 @@ private func finalStateWithUpdatesAndServerTime(accountPeerId: PeerId, postbox:
|
||||
medias.append(mediaValue)
|
||||
|
||||
if mediaValue is TelegramMediaWebpage {
|
||||
if let webpageAttributes {
|
||||
if let webpageAttributes = webpageAttributes {
|
||||
attributes.append(WebpagePreviewMessageAttribute(leadingPreview: false, forceLargeMedia: webpageAttributes.forceLargeMedia, isManuallyAdded: webpageAttributes.isManuallyAdded, isSafe: webpageAttributes.isSafe))
|
||||
}
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ private final class AccountPresenceManagerImpl {
|
||||
self.shouldKeepOnlinePresenceDisposable = (shouldKeepOnlinePresence
|
||||
|> distinctUntilChanged
|
||||
|> deliverOn(self.queue)).start(next: { [weak self] value in
|
||||
guard let self else {
|
||||
guard let `self` = self else {
|
||||
return
|
||||
}
|
||||
if self.wasOnline != value {
|
||||
|
@ -104,7 +104,7 @@ func _internal_getPremiumGiveawayInfo(account: Account, peerId: EnginePeer.Id, m
|
||||
return .single(nil)
|
||||
}
|
||||
|> map { result -> PremiumGiveawayInfo? in
|
||||
if let result {
|
||||
if let result = result {
|
||||
switch result {
|
||||
case let .giveawayInfo(flags, startDate, joinedTooEarlyDate, adminDisallowedChatId, disallowedCountry):
|
||||
if (flags & (1 << 3)) != 0 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user