mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Various improvements
This commit is contained in:
parent
68dd428cbd
commit
83c7c54616
@ -164,6 +164,18 @@ public final class PeerInfoChatPaneNode: ASDisplayNode, PeerInfoPaneNode, UIScro
|
|||||||
self.presentationData = presentationData
|
self.presentationData = presentationData
|
||||||
})
|
})
|
||||||
|
|
||||||
|
let strings = self.presentationData.strings
|
||||||
|
self.statusPromise.set(self.context.engine.data.subscribe(
|
||||||
|
TelegramEngine.EngineData.Item.Messages.MessageCount(peerId: self.context.account.peerId, threadId: peerId.toInt64(), tag: [])
|
||||||
|
)
|
||||||
|
|> map { count in
|
||||||
|
if let count {
|
||||||
|
return PeerInfoStatusData(text: strings.Conversation_Messages(Int32(count)), isActivity: false, key: .savedMessages)
|
||||||
|
} else {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
self.ready.set(self.chatController.ready.get())
|
self.ready.set(self.chatController.ready.get())
|
||||||
|
|
||||||
self.addSubnode(self.chatController.displayNode)
|
self.addSubnode(self.chatController.displayNode)
|
||||||
|
@ -9,6 +9,8 @@ public enum PeerInfoPaneKey: Int32 {
|
|||||||
case members
|
case members
|
||||||
case stories
|
case stories
|
||||||
case media
|
case media
|
||||||
|
case savedMessagesChats
|
||||||
|
case savedMessages
|
||||||
case files
|
case files
|
||||||
case music
|
case music
|
||||||
case voice
|
case voice
|
||||||
@ -16,8 +18,6 @@ public enum PeerInfoPaneKey: Int32 {
|
|||||||
case gifs
|
case gifs
|
||||||
case groupsInCommon
|
case groupsInCommon
|
||||||
case recommended
|
case recommended
|
||||||
case savedMessagesChats
|
|
||||||
case savedMessages
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public struct PeerInfoStatusData: Equatable {
|
public struct PeerInfoStatusData: Equatable {
|
||||||
|
@ -36,7 +36,11 @@ final class ChatSearchNavigationContentNode: NavigationBarContentNode {
|
|||||||
switch chatLocation {
|
switch chatLocation {
|
||||||
case .peer, .replyThread, .feed:
|
case .peer, .replyThread, .feed:
|
||||||
if chatLocation.peerId == context.account.peerId, presentationInterfaceState.hasSearchTags {
|
if chatLocation.peerId == context.account.peerId, presentationInterfaceState.hasSearchTags {
|
||||||
|
if case .standard(.embedded(false)) = presentationInterfaceState.mode {
|
||||||
|
placeholderText = strings.Common_Search
|
||||||
|
} else {
|
||||||
placeholderText = strings.Chat_SearchTagsPlaceholder
|
placeholderText = strings.Chat_SearchTagsPlaceholder
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
placeholderText = strings.Conversation_SearchPlaceholder
|
placeholderText = strings.Conversation_SearchPlaceholder
|
||||||
}
|
}
|
||||||
@ -114,7 +118,11 @@ final class ChatSearchNavigationContentNode: NavigationBarContentNode {
|
|||||||
if presentationInterfaceState.historyFilter != nil {
|
if presentationInterfaceState.historyFilter != nil {
|
||||||
placeholderText = self.strings.Common_Search
|
placeholderText = self.strings.Common_Search
|
||||||
} else if self.chatLocation.peerId == self.context.account.peerId, presentationInterfaceState.hasSearchTags {
|
} else if self.chatLocation.peerId == self.context.account.peerId, presentationInterfaceState.hasSearchTags {
|
||||||
|
if case .standard(.embedded(false)) = presentationInterfaceState.mode {
|
||||||
|
placeholderText = strings.Common_Search
|
||||||
|
} else {
|
||||||
placeholderText = self.strings.Chat_SearchTagsPlaceholder
|
placeholderText = self.strings.Chat_SearchTagsPlaceholder
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
placeholderText = self.strings.Conversation_SearchPlaceholder
|
placeholderText = self.strings.Conversation_SearchPlaceholder
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user