Merge commit '40dbadccd45de57f22f2399de999be95b2457d94'

This commit is contained in:
Ali 2023-10-24 20:40:24 +04:00
commit f0eef9dfe7
5 changed files with 5 additions and 5 deletions

View File

@ -709,7 +709,7 @@ extension StoreMessage {
if mediaValue is TelegramMediaWebpage { if mediaValue is TelegramMediaWebpage {
let leadingPreview = (flags & (1 << 27)) != 0 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)) 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) medias.append(mediaValue)
if mediaValue is TelegramMediaWebpage { 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)) 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 self.shouldKeepOnlinePresenceDisposable = (shouldKeepOnlinePresence
|> distinctUntilChanged |> distinctUntilChanged
|> deliverOn(self.queue)).start(next: { [weak self] value in |> deliverOn(self.queue)).start(next: { [weak self] value in
guard let self else { guard let `self` = self else {
return return
} }
if self.wasOnline != value { if self.wasOnline != value {

View File

@ -104,7 +104,7 @@ func _internal_getPremiumGiveawayInfo(account: Account, peerId: EnginePeer.Id, m
return .single(nil) return .single(nil)
} }
|> map { result -> PremiumGiveawayInfo? in |> map { result -> PremiumGiveawayInfo? in
if let result { if let result = result {
switch result { switch result {
case let .giveawayInfo(flags, startDate, joinedTooEarlyDate, adminDisallowedChatId, disallowedCountry): case let .giveawayInfo(flags, startDate, joinedTooEarlyDate, adminDisallowedChatId, disallowedCountry):
if (flags & (1 << 3)) != 0 { if (flags & (1 << 3)) != 0 {

View File

@ -43,7 +43,7 @@ public func makeTempContext(
}, },
appDelegate: nil appDelegate: nil
) )
self.sharedTempContext = sharedContext sharedTempContext = sharedContext
return sharedContext.activeAccountContexts return sharedContext.activeAccountContexts
|> take(1) |> take(1)