mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Remove unneeded isPresented check
This commit is contained in:
parent
c93375d4fb
commit
2b8f1da881
2 changed files with 2 additions and 14 deletions
|
|
@ -14,10 +14,6 @@
|
|||
@State var showVoiceSheet = false
|
||||
@State var tabIndex: Int = 0
|
||||
|
||||
var isPresented: Bool {
|
||||
audioController.itemAudioProperties != nil && audioController.state != .stopped
|
||||
}
|
||||
|
||||
var playPauseButtonImage: String {
|
||||
switch audioController.state {
|
||||
case .playing:
|
||||
|
|
@ -345,7 +341,7 @@
|
|||
}
|
||||
|
||||
public var body: some View {
|
||||
if let itemAudioProperties = self.audioController.itemAudioProperties, isPresented {
|
||||
if let itemAudioProperties = self.audioController.itemAudioProperties {
|
||||
playerContent(itemAudioProperties)
|
||||
.tint(.appGrayTextContrast)
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -20,14 +20,6 @@
|
|||
self.presentingView = AnyView(presentingView)
|
||||
}
|
||||
|
||||
var isPresented: Bool {
|
||||
let presented = audioController.itemAudioProperties != nil && audioController.state != .stopped
|
||||
if !presented {
|
||||
print("isPresented: ", audioController.itemAudioProperties, audioController.state)
|
||||
}
|
||||
return true // presented
|
||||
}
|
||||
|
||||
var playPauseButtonImage: String {
|
||||
switch audioController.state {
|
||||
case .playing:
|
||||
|
|
@ -162,7 +154,7 @@
|
|||
public var body: some View {
|
||||
ZStack(alignment: .center) {
|
||||
presentingView
|
||||
if let itemAudioProperties = self.audioController.itemAudioProperties, isPresented {
|
||||
if let itemAudioProperties = self.audioController.itemAudioProperties {
|
||||
ZStack(alignment: .bottom) {
|
||||
Color.systemBackground.edgesIgnoringSafeArea(.bottom)
|
||||
.frame(height: expanded ? 0 : 88, alignment: .bottom)
|
||||
|
|
|
|||
Loading…
Reference in a new issue