mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-02-04 00:17:30 +01:00
Notifications: Full media size + autoplay
This commit is contained in:
parent
0b96b76641
commit
2b446833da
@ -13,6 +13,10 @@ private struct IsCompact: EnvironmentKey {
|
|||||||
static let defaultValue: Bool = false
|
static let defaultValue: Bool = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private struct IsMediaCompact: EnvironmentKey {
|
||||||
|
static let defaultValue: Bool = false
|
||||||
|
}
|
||||||
|
|
||||||
private struct IsModal: EnvironmentKey {
|
private struct IsModal: EnvironmentKey {
|
||||||
static let defaultValue: Bool = false
|
static let defaultValue: Bool = false
|
||||||
}
|
}
|
||||||
@ -53,6 +57,11 @@ public extension EnvironmentValues {
|
|||||||
set { self[IsCompact.self] = newValue }
|
set { self[IsCompact.self] = newValue }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var isMediaCompact: Bool {
|
||||||
|
get { self[IsMediaCompact.self] }
|
||||||
|
set { self[IsMediaCompact.self] = newValue }
|
||||||
|
}
|
||||||
|
|
||||||
var isModal: Bool {
|
var isModal: Bool {
|
||||||
get { self[IsModal.self] }
|
get { self[IsModal.self] }
|
||||||
set { self[IsModal.self] = newValue }
|
set { self[IsModal.self] = newValue }
|
||||||
|
@ -75,7 +75,7 @@ import SwiftUI
|
|||||||
@MainActor
|
@MainActor
|
||||||
public struct MediaUIAttachmentVideoView: View {
|
public struct MediaUIAttachmentVideoView: View {
|
||||||
@Environment(\.scenePhase) private var scenePhase
|
@Environment(\.scenePhase) private var scenePhase
|
||||||
@Environment(\.isCompact) private var isCompact
|
@Environment(\.isMediaCompact) private var isCompact
|
||||||
@Environment(UserPreferences.self) private var preferences
|
@Environment(UserPreferences.self) private var preferences
|
||||||
@Environment(Theme.self) private var theme
|
@Environment(Theme.self) private var theme
|
||||||
|
|
||||||
|
@ -160,6 +160,7 @@ struct NotificationRowView: View {
|
|||||||
client: client,
|
client: client,
|
||||||
routerPath: routerPath,
|
routerPath: routerPath,
|
||||||
showActions: true))
|
showActions: true))
|
||||||
|
.environment(\.isMediaCompact, false)
|
||||||
} else {
|
} else {
|
||||||
StatusRowView(viewModel: .init(status: status,
|
StatusRowView(viewModel: .init(status: status,
|
||||||
client: client,
|
client: client,
|
||||||
@ -167,6 +168,7 @@ struct NotificationRowView: View {
|
|||||||
showActions: false,
|
showActions: false,
|
||||||
textDisabled: true))
|
textDisabled: true))
|
||||||
.lineLimit(4)
|
.lineLimit(4)
|
||||||
|
.environment(\.isMediaCompact, true)
|
||||||
}
|
}
|
||||||
Spacer()
|
Spacer()
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,7 @@ public struct StatusEmbeddedView: View {
|
|||||||
showActions: false))
|
showActions: false))
|
||||||
.accessibilityLabel(status.content.asRawText)
|
.accessibilityLabel(status.content.asRawText)
|
||||||
.environment(\.isCompact, true)
|
.environment(\.isCompact, true)
|
||||||
|
.environment(\.isMediaCompact, true)
|
||||||
.environment(\.isStatusFocused, false)
|
.environment(\.isStatusFocused, false)
|
||||||
}
|
}
|
||||||
Spacer()
|
Spacer()
|
||||||
|
@ -10,7 +10,7 @@ import SwiftUI
|
|||||||
public struct StatusRowMediaPreviewView: View {
|
public struct StatusRowMediaPreviewView: View {
|
||||||
@Environment(\.openWindow) private var openWindow
|
@Environment(\.openWindow) private var openWindow
|
||||||
@Environment(\.extraLeadingInset) private var extraLeadingInset: CGFloat
|
@Environment(\.extraLeadingInset) private var extraLeadingInset: CGFloat
|
||||||
@Environment(\.isCompact) private var isCompact: Bool
|
@Environment(\.isMediaCompact) private var isCompact: Bool
|
||||||
@Environment(\.horizontalSizeClass) private var horizontalSizeClass
|
@Environment(\.horizontalSizeClass) private var horizontalSizeClass
|
||||||
@Environment(SceneDelegate.self) private var sceneDelegate
|
@Environment(SceneDelegate.self) private var sceneDelegate
|
||||||
@Environment(UserPreferences.self) private var preferences
|
@Environment(UserPreferences.self) private var preferences
|
||||||
|
Loading…
x
Reference in New Issue
Block a user