no message

This commit is contained in:
Peter Iakovlev
2018-01-29 03:04:39 +04:00
parent 0d3e30c7c9
commit 3fb2a63e21
21 changed files with 1038 additions and 333 deletions

View File

@@ -106,10 +106,9 @@ private func parseDialogs(apiDialogs: [Api.Dialog], apiMessages: [Api.Message],
}
notificationSettings[peerId] = TelegramPeerNotificationSettings(apiSettings: apiNotificationSettings)
/*%layer76*/
/*case let .dialogFeed(_, _, _, feedId, _, _, _, _):
case let .dialogFeed(_, _, _, feedId, _, _, _, _):
itemIds.append(.group(PeerGroupId(rawValue: feedId)))
referencedFeeds.insert(PeerGroupId(rawValue: feedId))*/
referencedFeeds.insert(PeerGroupId(rawValue: feedId))
}
}
@@ -216,8 +215,7 @@ func fetchChatList(postbox: Postbox, network: Network, location: FetchChatListLo
requestFeedId = groupId.rawValue
flags |= 1 << 1
}
/*%layer76*/
let requestChats = network.request(Api.functions.messages.getDialogs(flags: flags/*, feedId: requestFeedId*/, offsetDate: timestamp, offsetId: id, offsetPeer: peer, limit: 100))
let requestChats = network.request(Api.functions.messages.getDialogs(flags: flags, feedId: requestFeedId, offsetDate: timestamp, offsetId: id, offsetPeer: peer, limit: 100))
|> retryRequest
return combineLatest(requestChats, additionalPinnedChats)
@@ -237,8 +235,7 @@ func fetchChatList(postbox: Postbox, network: Network, location: FetchChatListLo
}
var feedSignals: [Signal<(PeerGroupId, ParsedDialogs), NoError>] = []
/*%layer76*/
/*if case .general = location {
if case .general = location {
for groupId in combinedReferencedFeeds {
let flags: Int32 = 1 << 1
let requestFeed = network.request(Api.functions.messages.getDialogs(flags: flags, feedId: groupId.rawValue, offsetDate: 0, offsetId: 0, offsetPeer: .inputPeerEmpty, limit: 4))
@@ -250,7 +247,7 @@ func fetchChatList(postbox: Postbox, network: Network, location: FetchChatListLo
}
feedSignals.append(requestFeed)
}
}*/
}
return combineLatest(feedSignals)
|> map { feeds -> FetchedChatList in