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
|
globalExpandType = .none
|
||||||
}
|
}
|
||||||
|
|
||||||
let lowercasedQuery = finalQuery.lowercased()
|
if let _ = messageTags {
|
||||||
if presentationData.strings.DialogList_SavedMessages.lowercased().hasPrefix(lowercasedQuery) || "saved messages".hasPrefix(lowercasedQuery) {
|
} else {
|
||||||
if !existingPeerIds.contains(accountPeer.id), filteredPeer(accountPeer, accountPeer) {
|
let lowercasedQuery = finalQuery.lowercased()
|
||||||
existingPeerIds.insert(accountPeer.id)
|
if presentationData.strings.DialogList_SavedMessages.lowercased().hasPrefix(lowercasedQuery) || "saved messages".hasPrefix(lowercasedQuery) {
|
||||||
entries.append(.localPeer(accountPeer, nil, nil, index, presentationData.theme, presentationData.strings, presentationData.nameSortOrder, presentationData.nameDisplayOrder, localExpandType))
|
if !existingPeerIds.contains(accountPeer.id), filteredPeer(accountPeer, accountPeer) {
|
||||||
index += 1
|
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 peer = renderedPeer.peers[renderedPeer.peerId], peer.id != context.account.peerId, filteredPeer(peer, accountPeer) {
|
var numberOfLocalPeers = 0
|
||||||
if !existingPeerIds.contains(peer.id) {
|
for renderedPeer in foundLocalPeers.peers {
|
||||||
existingPeerIds.insert(peer.id)
|
if case .expand = localExpandType, numberOfLocalPeers >= 5 {
|
||||||
var associatedPeer: Peer?
|
break
|
||||||
if let associatedPeerId = peer.associatedPeerId {
|
}
|
||||||
associatedPeer = renderedPeer.peers[associatedPeerId]
|
|
||||||
|
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
|
index += 1
|
||||||
numberOfLocalPeers += 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
|
var numberOfGlobalPeers = 0
|
||||||
index = 0
|
index = 0
|
||||||
for peer in foundRemotePeers.1 {
|
for peer in foundRemotePeers.1 {
|
||||||
if case .expand = globalExpandType, numberOfGlobalPeers >= 3 {
|
if case .expand = globalExpandType, numberOfGlobalPeers >= 3 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
if !existingPeerIds.contains(peer.peer.id), filteredPeer(peer.peer, accountPeer) {
|
if !existingPeerIds.contains(peer.peer.id), filteredPeer(peer.peer, accountPeer) {
|
||||||
existingPeerIds.insert(peer.peer.id)
|
existingPeerIds.insert(peer.peer.id)
|
||||||
entries.append(.globalPeer(peer, nil, index, presentationData.theme, presentationData.strings, presentationData.nameSortOrder, presentationData.nameDisplayOrder, globalExpandType))
|
entries.append(.globalPeer(peer, nil, index, presentationData.theme, presentationData.strings, presentationData.nameSortOrder, presentationData.nameDisplayOrder, globalExpandType))
|
||||||
index += 1
|
index += 1
|
||||||
numberOfGlobalPeers += 1
|
numberOfGlobalPeers += 1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1005,8 +1005,10 @@ final class CallControllerNode: ViewControllerTracingNode, CallControllerNodePro
|
|||||||
self.updateButtonsMode()
|
self.updateButtonsMode()
|
||||||
self.updateDimVisibility()
|
self.updateDimVisibility()
|
||||||
|
|
||||||
if self.incomingVideoViewRequested && self.outgoingVideoViewRequested {
|
if self.incomingVideoViewRequested || self.outgoingVideoViewRequested {
|
||||||
self.displayedCameraTooltip = true
|
if self.incomingVideoViewRequested && self.outgoingVideoViewRequested {
|
||||||
|
self.displayedCameraTooltip = true
|
||||||
|
}
|
||||||
self.displayedCameraConfirmation = true
|
self.displayedCameraConfirmation = true
|
||||||
}
|
}
|
||||||
if self.incomingVideoViewRequested && !self.outgoingVideoViewRequested && !self.displayedCameraTooltip && (self.toastContent?.isEmpty ?? true) {
|
if self.incomingVideoViewRequested && !self.outgoingVideoViewRequested && !self.displayedCameraTooltip && (self.toastContent?.isEmpty ?? true) {
|
||||||
|
@ -308,10 +308,13 @@ public final class PrincipalThemeEssentialGraphics {
|
|||||||
self.clockFreeMinImage = emptyImage
|
self.clockFreeMinImage = emptyImage
|
||||||
self.dateAndStatusMediaBackground = emptyImage
|
self.dateAndStatusMediaBackground = emptyImage
|
||||||
self.dateAndStatusFreeBackground = emptyImage
|
self.dateAndStatusFreeBackground = emptyImage
|
||||||
self.incomingDateAndStatusImpressionIcon = emptyImage
|
|
||||||
self.outgoingDateAndStatusImpressionIcon = emptyImage
|
let impressionCountImage = UIImage(bundleImageName: "Chat/Message/ImpressionCount")!
|
||||||
self.mediaImpressionIcon = emptyImage
|
self.incomingDateAndStatusImpressionIcon = generateTintedImage(image: impressionCountImage, color: theme.message.incoming.secondaryTextColor)!
|
||||||
self.freeImpressionIcon = emptyImage
|
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.radialIndicatorFileIconIncoming = emptyImage
|
||||||
self.radialIndicatorFileIconOutgoing = emptyImage
|
self.radialIndicatorFileIconOutgoing = emptyImage
|
||||||
} else {
|
} else {
|
||||||
|
@ -1109,7 +1109,7 @@ class ChatMessageAnimatedStickerItemNode: ChatMessageItemView {
|
|||||||
|> deliverOnMainQueue
|
|> 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
|
let peach = 0x1F351
|
||||||
|
|
||||||
if let text = self.item?.message.text, let firstScalar = text.unicodeScalars.first, beatingHearts.contains(firstScalar.value) || firstScalar.value == peach {
|
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
|
|> map { networkType -> MediaAutoDownloadNetworkType in
|
||||||
switch networkType {
|
switch networkType {
|
||||||
case .none, .cellular:
|
case .none, .cellular:
|
||||||
return.cellular
|
return .cellular
|
||||||
case .wifi:
|
case .wifi:
|
||||||
return .wifi
|
return .wifi
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user