mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-09 11:23:48 +00:00
Various fixes
This commit is contained in:
parent
780909673a
commit
83ef360953
@ -2213,6 +2213,7 @@ public protocol ContextExtractedContentSource: AnyObject {
|
||||
var keepDefaultContentTouches: Bool { get }
|
||||
var blurBackground: Bool { get }
|
||||
var shouldBeDismissed: Signal<Bool, NoError> { get }
|
||||
var additionalInsets: UIEdgeInsets { get }
|
||||
|
||||
var actionsHorizontalAlignment: ContextActionsHorizontalAlignment { get }
|
||||
|
||||
@ -2237,6 +2238,10 @@ public extension ContextExtractedContentSource {
|
||||
return false
|
||||
}
|
||||
|
||||
var additionalInsets: UIEdgeInsets {
|
||||
return .zero
|
||||
}
|
||||
|
||||
var actionsHorizontalAlignment: ContextActionsHorizontalAlignment {
|
||||
return .default
|
||||
}
|
||||
|
@ -586,7 +586,7 @@ final class ContextControllerExtractedPresentationNode: ASDisplayNode, ContextCo
|
||||
let actionsEdgeInset: CGFloat
|
||||
let actionsSideInset: CGFloat
|
||||
let topInset: CGFloat = layout.insets(options: .statusBar).top + 8.0
|
||||
let bottomInset: CGFloat = 10.0
|
||||
var bottomInset: CGFloat = 10.0
|
||||
|
||||
let itemContentNode: ItemContentNode?
|
||||
let controllerContentNode: ControllerContentNode?
|
||||
@ -903,6 +903,7 @@ final class ContextControllerExtractedPresentationNode: ASDisplayNode, ContextCo
|
||||
case let .extracted(source):
|
||||
keepInPlace = source.keepInPlace
|
||||
actionsHorizontalAlignment = source.actionsHorizontalAlignment
|
||||
bottomInset += source.additionalInsets.bottom
|
||||
case .controller:
|
||||
//TODO:
|
||||
keepInPlace = false
|
||||
|
@ -536,10 +536,7 @@ final class OverlayAudioPlayerControllerNode: ViewControllerTracingNode, ASGestu
|
||||
}
|
||||
|
||||
private func updateMusicSaved(file: FileMediaReference, isSaved: Bool) {
|
||||
guard let playlistLocation = self.playlistLocation as? PeerMessagesPlaylistLocation, case let .savedMusic(savedMusicContext, _, _) = playlistLocation else {
|
||||
return
|
||||
}
|
||||
if savedMusicContext.peerId == self.context.account.peerId {
|
||||
if let playlistLocation = self.playlistLocation as? PeerMessagesPlaylistLocation, case let .savedMusic(savedMusicContext, _, _) = playlistLocation, savedMusicContext.peerId == self.context.account.peerId {
|
||||
if isSaved {
|
||||
let _ = savedMusicContext.addMusic(file: file).start()
|
||||
} else {
|
||||
@ -1226,6 +1223,7 @@ private final class OverlayAudioPlayerContextExtractedContentSource: ContextExtr
|
||||
let keepInPlace: Bool = false
|
||||
let ignoreContentTouches: Bool = false
|
||||
let blurBackground: Bool = true
|
||||
let additionalInsets = UIEdgeInsets(top: 0.0, left: 0.0, bottom: 80.0, right: 0.0)
|
||||
|
||||
private let contentNode: ContextExtractedContentContainingNode
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user