mirror of
https://github.com/yattee/yattee.git
synced 2025-10-17 04:48:17 +00:00
Refactor hide shorts
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
import Defaults
|
||||
import SwiftUI
|
||||
|
||||
struct HideShortsButtons: View {
|
||||
@Binding var hide: Bool
|
||||
@Default(.hideShorts) private var hideShorts
|
||||
|
||||
var body: some View {
|
||||
Button {
|
||||
hide.toggle()
|
||||
hideShorts.toggle()
|
||||
} label: {
|
||||
Group {
|
||||
if hide {
|
||||
if hideShorts {
|
||||
Label("Short videos: hidden", systemImage: "bolt.slash.fill")
|
||||
.help("Short videos: hidden")
|
||||
} else {
|
||||
@@ -27,7 +28,7 @@ struct HideShortsButtons: View {
|
||||
struct HideShortsButtons_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
VStack {
|
||||
HideShortsButtons(hide: .constant(true))
|
||||
HideShortsButtons()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user