Various fixes for media streaming

Preload next track when playing music
Added ability to resend failed messages
This commit is contained in:
Peter
2018-11-02 22:43:30 +04:00
parent f110dd2b66
commit 1fb0bfa240
55 changed files with 615 additions and 231 deletions

View File

@@ -1328,7 +1328,7 @@ public func groupInfoController(account: Account, peerId: PeerId) -> ViewControl
let members: Promise<[PeerId]> = Promise()
if peerId.namespace == Namespaces.Peer.CloudChannel {
var membersDisposable: Disposable?
let (disposable, _) = account.telegramApplicationContext.peerChannelMemberCategoriesContextsManager.recent(postbox: account.postbox, network: account.network, peerId: peerId, updated: { listState in
let (disposable, _) = account.telegramApplicationContext.peerChannelMemberCategoriesContextsManager.recent(postbox: account.postbox, network: account.network, accountPeerId: account.peerId, peerId: peerId, updated: { listState in
members.set(.single(listState.list.map {$0.peer.id}))
membersDisposable?.dispose()
})
@@ -1650,7 +1650,7 @@ public func groupInfoController(account: Account, peerId: PeerId) -> ViewControl
let channelMembersPromise = Promise<[RenderedChannelParticipant]>()
if peerId.namespace == Namespaces.Peer.CloudChannel {
let (disposable, control) = account.telegramApplicationContext.peerChannelMemberCategoriesContextsManager.recent(postbox: account.postbox, network: account.network, peerId: peerId, updated: { state in
let (disposable, control) = account.telegramApplicationContext.peerChannelMemberCategoriesContextsManager.recent(postbox: account.postbox, network: account.network, accountPeerId: account.peerId, peerId: peerId, updated: { state in
channelMembersPromise.set(.single(state.list))
})
loadMoreControl = control