mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-16 19:30:29 +00:00
Read counters
This commit is contained in:
parent
62a58f5b0a
commit
a340133bd9
@ -267,7 +267,11 @@
|
|||||||
"PUSH_MESSAGE_STORY" = "%1$@|shared a story with you";
|
"PUSH_MESSAGE_STORY" = "%1$@|shared a story with you";
|
||||||
"PUSH_MESSAGE_STORY_MENTION" = "%1$@|mentioned you in a story";
|
"PUSH_MESSAGE_STORY_MENTION" = "%1$@|mentioned you in a story";
|
||||||
"PUSH_CHANNEL_MESSAGE_STORY" = "%1$@|shared a story";
|
"PUSH_CHANNEL_MESSAGE_STORY" = "%1$@|shared a story";
|
||||||
"PUSH_CHAT_MESSAGE_STORY" = "%2$@|%1$@ shared a story to the group";
|
|
||||||
|
"PUSH_REACT_HIDDEN" = "New reaction to your message";
|
||||||
|
"PUSH_REACT_STORY" = "%1$@|%2$@ to your story";
|
||||||
|
"PUSH_REACT_STORY_HIDDEN" = "New reaction to your story";
|
||||||
|
"PUSH_CHAT_REACT_STORY" = "%2$@|%1$@ %3$@ to your story";
|
||||||
|
|
||||||
"LOCAL_MESSAGE_FWDS" = "%1$@ forwarded you %2$d messages";
|
"LOCAL_MESSAGE_FWDS" = "%1$@ forwarded you %2$d messages";
|
||||||
"LOCAL_CHANNEL_MESSAGE_FWDS" = "%1$@ posted %2$d forwarded messages";
|
"LOCAL_CHANNEL_MESSAGE_FWDS" = "%1$@ posted %2$d forwarded messages";
|
||||||
|
|||||||
@ -3040,6 +3040,11 @@ final class ChatListSearchListPaneNode: ASDisplayNode, ChatListSearchPaneNode {
|
|||||||
return TelegramEngine.EngineData.Item.Peer.StoryStats(id: peerId)
|
return TelegramEngine.EngineData.Item.Peer.StoryStats(id: peerId)
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
|
EngineDataMap(
|
||||||
|
allChannelIds.map { peerId -> TelegramEngine.EngineData.Item.Messages.PeerReadCounters in
|
||||||
|
return TelegramEngine.EngineData.Item.Messages.PeerReadCounters(id: peerId)
|
||||||
|
}
|
||||||
|
),
|
||||||
EngineDataMap(
|
EngineDataMap(
|
||||||
allChannelIds.map { peerId -> TelegramEngine.EngineData.Item.Peer.ParticipantCount in
|
allChannelIds.map { peerId -> TelegramEngine.EngineData.Item.Peer.ParticipantCount in
|
||||||
return TelegramEngine.EngineData.Item.Peer.ParticipantCount(id: peerId)
|
return TelegramEngine.EngineData.Item.Peer.ParticipantCount(id: peerId)
|
||||||
@ -3047,7 +3052,7 @@ final class ChatListSearchListPaneNode: ASDisplayNode, ChatListSearchPaneNode {
|
|||||||
),
|
),
|
||||||
TelegramEngine.EngineData.Item.NotificationSettings.Global()
|
TelegramEngine.EngineData.Item.NotificationSettings.Global()
|
||||||
)
|
)
|
||||||
|> map { peers, notificationSettings, unreadCounts, storyStats, participantCounts, globalNotificationSettings -> RecentItems in
|
|> map { peers, notificationSettings, unreadCounts, storyStats, readCounters, participantCounts, globalNotificationSettings -> RecentItems in
|
||||||
/*#if DEBUG
|
/*#if DEBUG
|
||||||
var localChannels = localChannels
|
var localChannels = localChannels
|
||||||
localChannels.peerIds = []
|
localChannels.peerIds = []
|
||||||
@ -3078,13 +3083,17 @@ final class ChatListSearchListPaneNode: ASDisplayNode, ChatListSearchPaneNode {
|
|||||||
if let value = storyStats[peer.id] {
|
if let value = storyStats[peer.id] {
|
||||||
peerStoryStats = value
|
peerStoryStats = value
|
||||||
}
|
}
|
||||||
|
var unreadCount: Int32 = 0
|
||||||
|
if let value = readCounters[peer.id] {
|
||||||
|
unreadCount = value.count
|
||||||
|
}
|
||||||
result.append(.peer(
|
result.append(.peer(
|
||||||
index: result.count,
|
index: result.count,
|
||||||
peer: RecentlySearchedPeer(
|
peer: RecentlySearchedPeer(
|
||||||
peer: RenderedPeer(peer: peer._asPeer()),
|
peer: RenderedPeer(peer: peer._asPeer()),
|
||||||
presence: nil,
|
presence: nil,
|
||||||
notificationSettings: peerNotificationSettings.flatMap({ $0._asNotificationSettings() }),
|
notificationSettings: peerNotificationSettings.flatMap({ $0._asNotificationSettings() }),
|
||||||
unreadCount: 0,
|
unreadCount: unreadCount,
|
||||||
subpeerSummary: subpeerSummary
|
subpeerSummary: subpeerSummary
|
||||||
),
|
),
|
||||||
.local,
|
.local,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user