mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Various fixes
This commit is contained in:
parent
67b2c051d0
commit
5f15fecb75
@ -927,60 +927,63 @@ public final class ChatListSearchContainerNode: SearchDisplayControllerContentNo
|
||||
globalExpandType = .none
|
||||
}
|
||||
|
||||
let lowercasedQuery = finalQuery.lowercased()
|
||||
if presentationData.strings.DialogList_SavedMessages.lowercased().hasPrefix(lowercasedQuery) || "saved messages".hasPrefix(lowercasedQuery) {
|
||||
if !existingPeerIds.contains(accountPeer.id), filteredPeer(accountPeer, accountPeer) {
|
||||
existingPeerIds.insert(accountPeer.id)
|
||||
entries.append(.localPeer(accountPeer, nil, nil, index, presentationData.theme, presentationData.strings, presentationData.nameSortOrder, presentationData.nameDisplayOrder, localExpandType))
|
||||
index += 1
|
||||
}
|
||||
}
|
||||
|
||||
var numberOfLocalPeers = 0
|
||||
for renderedPeer in foundLocalPeers.peers {
|
||||
if case .expand = localExpandType, numberOfLocalPeers >= 5 {
|
||||
break
|
||||
if let _ = messageTags {
|
||||
} else {
|
||||
let lowercasedQuery = finalQuery.lowercased()
|
||||
if presentationData.strings.DialogList_SavedMessages.lowercased().hasPrefix(lowercasedQuery) || "saved messages".hasPrefix(lowercasedQuery) {
|
||||
if !existingPeerIds.contains(accountPeer.id), filteredPeer(accountPeer, accountPeer) {
|
||||
existingPeerIds.insert(accountPeer.id)
|
||||
entries.append(.localPeer(accountPeer, nil, nil, index, presentationData.theme, presentationData.strings, presentationData.nameSortOrder, presentationData.nameDisplayOrder, localExpandType))
|
||||
index += 1
|
||||
}
|
||||
}
|
||||
|
||||
if let peer = renderedPeer.peers[renderedPeer.peerId], peer.id != context.account.peerId, filteredPeer(peer, accountPeer) {
|
||||
if !existingPeerIds.contains(peer.id) {
|
||||
existingPeerIds.insert(peer.id)
|
||||
var associatedPeer: Peer?
|
||||
if let associatedPeerId = peer.associatedPeerId {
|
||||
associatedPeer = renderedPeer.peers[associatedPeerId]
|
||||
var numberOfLocalPeers = 0
|
||||
for renderedPeer in foundLocalPeers.peers {
|
||||
if case .expand = localExpandType, numberOfLocalPeers >= 5 {
|
||||
break
|
||||
}
|
||||
|
||||
if let peer = renderedPeer.peers[renderedPeer.peerId], peer.id != context.account.peerId, filteredPeer(peer, accountPeer) {
|
||||
if !existingPeerIds.contains(peer.id) {
|
||||
existingPeerIds.insert(peer.id)
|
||||
var associatedPeer: Peer?
|
||||
if let associatedPeerId = peer.associatedPeerId {
|
||||
associatedPeer = renderedPeer.peers[associatedPeerId]
|
||||
}
|
||||
entries.append(.localPeer(peer, associatedPeer, foundLocalPeers.unread[peer.id], index, presentationData.theme, presentationData.strings, presentationData.nameSortOrder, presentationData.nameDisplayOrder, localExpandType))
|
||||
index += 1
|
||||
numberOfLocalPeers += 1
|
||||
}
|
||||
entries.append(.localPeer(peer, associatedPeer, foundLocalPeers.unread[peer.id], index, presentationData.theme, presentationData.strings, presentationData.nameSortOrder, presentationData.nameDisplayOrder, localExpandType))
|
||||
}
|
||||
}
|
||||
|
||||
for peer in foundRemotePeers.0 {
|
||||
if case .expand = localExpandType, numberOfLocalPeers >= 5 {
|
||||
break
|
||||
}
|
||||
|
||||
if !existingPeerIds.contains(peer.peer.id), filteredPeer(peer.peer, accountPeer) {
|
||||
existingPeerIds.insert(peer.peer.id)
|
||||
entries.append(.localPeer(peer.peer, nil, nil, index, presentationData.theme, presentationData.strings, presentationData.nameSortOrder, presentationData.nameDisplayOrder, localExpandType))
|
||||
index += 1
|
||||
numberOfLocalPeers += 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for peer in foundRemotePeers.0 {
|
||||
if case .expand = localExpandType, numberOfLocalPeers >= 5 {
|
||||
break
|
||||
}
|
||||
|
||||
if !existingPeerIds.contains(peer.peer.id), filteredPeer(peer.peer, accountPeer) {
|
||||
existingPeerIds.insert(peer.peer.id)
|
||||
entries.append(.localPeer(peer.peer, nil, nil, index, presentationData.theme, presentationData.strings, presentationData.nameSortOrder, presentationData.nameDisplayOrder, localExpandType))
|
||||
index += 1
|
||||
numberOfLocalPeers += 1
|
||||
}
|
||||
}
|
||||
|
||||
var numberOfGlobalPeers = 0
|
||||
index = 0
|
||||
for peer in foundRemotePeers.1 {
|
||||
if case .expand = globalExpandType, numberOfGlobalPeers >= 3 {
|
||||
break
|
||||
}
|
||||
|
||||
if !existingPeerIds.contains(peer.peer.id), filteredPeer(peer.peer, accountPeer) {
|
||||
existingPeerIds.insert(peer.peer.id)
|
||||
entries.append(.globalPeer(peer, nil, index, presentationData.theme, presentationData.strings, presentationData.nameSortOrder, presentationData.nameDisplayOrder, globalExpandType))
|
||||
index += 1
|
||||
numberOfGlobalPeers += 1
|
||||
var numberOfGlobalPeers = 0
|
||||
index = 0
|
||||
for peer in foundRemotePeers.1 {
|
||||
if case .expand = globalExpandType, numberOfGlobalPeers >= 3 {
|
||||
break
|
||||
}
|
||||
|
||||
if !existingPeerIds.contains(peer.peer.id), filteredPeer(peer.peer, accountPeer) {
|
||||
existingPeerIds.insert(peer.peer.id)
|
||||
entries.append(.globalPeer(peer, nil, index, presentationData.theme, presentationData.strings, presentationData.nameSortOrder, presentationData.nameDisplayOrder, globalExpandType))
|
||||
index += 1
|
||||
numberOfGlobalPeers += 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1005,8 +1005,10 @@ final class CallControllerNode: ViewControllerTracingNode, CallControllerNodePro
|
||||
self.updateButtonsMode()
|
||||
self.updateDimVisibility()
|
||||
|
||||
if self.incomingVideoViewRequested && self.outgoingVideoViewRequested {
|
||||
self.displayedCameraTooltip = true
|
||||
if self.incomingVideoViewRequested || self.outgoingVideoViewRequested {
|
||||
if self.incomingVideoViewRequested && self.outgoingVideoViewRequested {
|
||||
self.displayedCameraTooltip = true
|
||||
}
|
||||
self.displayedCameraConfirmation = true
|
||||
}
|
||||
if self.incomingVideoViewRequested && !self.outgoingVideoViewRequested && !self.displayedCameraTooltip && (self.toastContent?.isEmpty ?? true) {
|
||||
|
@ -308,10 +308,13 @@ public final class PrincipalThemeEssentialGraphics {
|
||||
self.clockFreeMinImage = emptyImage
|
||||
self.dateAndStatusMediaBackground = emptyImage
|
||||
self.dateAndStatusFreeBackground = emptyImage
|
||||
self.incomingDateAndStatusImpressionIcon = emptyImage
|
||||
self.outgoingDateAndStatusImpressionIcon = emptyImage
|
||||
self.mediaImpressionIcon = emptyImage
|
||||
self.freeImpressionIcon = emptyImage
|
||||
|
||||
let impressionCountImage = UIImage(bundleImageName: "Chat/Message/ImpressionCount")!
|
||||
self.incomingDateAndStatusImpressionIcon = generateTintedImage(image: impressionCountImage, color: theme.message.incoming.secondaryTextColor)!
|
||||
self.outgoingDateAndStatusImpressionIcon = generateTintedImage(image: impressionCountImage, color: theme.message.outgoing.secondaryTextColor)!
|
||||
self.mediaImpressionIcon = generateTintedImage(image: impressionCountImage, color: .white)!
|
||||
self.freeImpressionIcon = generateTintedImage(image: impressionCountImage, color: serviceColor.primaryText)!
|
||||
|
||||
self.radialIndicatorFileIconIncoming = emptyImage
|
||||
self.radialIndicatorFileIconOutgoing = emptyImage
|
||||
} else {
|
||||
|
@ -1109,7 +1109,7 @@ class ChatMessageAnimatedStickerItemNode: ChatMessageItemView {
|
||||
|> deliverOnMainQueue
|
||||
}
|
||||
|
||||
let beatingHearts: [UInt32] = [0x2764, 0x1F90E, 0x1F9E1, 0x1F49A, 0x1F49C, 0x1F49B, 0x1F5A4, 0x1F90D]
|
||||
let beatingHearts: [UInt32] = [0x2764, 0x1F90E, 0x1F9E1, 0x1F499, 0x1F49A, 0x1F49C, 0x1F49B, 0x1F5A4, 0x1F90D]
|
||||
let peach = 0x1F351
|
||||
|
||||
if let text = self.item?.message.text, let firstScalar = text.unicodeScalars.first, beatingHearts.contains(firstScalar.value) || firstScalar.value == peach {
|
||||
|
@ -38,7 +38,7 @@ private final class PrefetchManagerImpl {
|
||||
|> map { networkType -> MediaAutoDownloadNetworkType in
|
||||
switch networkType {
|
||||
case .none, .cellular:
|
||||
return.cellular
|
||||
return .cellular
|
||||
case .wifi:
|
||||
return .wifi
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user