macos syntax

This commit is contained in:
Mike Renoir 2023-10-24 19:39:01 +04:00
parent 48a6568df0
commit 97b8a1c309
4 changed files with 4 additions and 4 deletions

View File

@ -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))
}
}

View File

@ -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))
}
}

View File

@ -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 {

View File

@ -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 {