Fix search and border on status screen

This commit is contained in:
Marcin Czachurski 2023-09-17 08:27:45 +02:00
parent 3171022870
commit 4daad7dec7
2 changed files with 6 additions and 4 deletions

View File

@ -8,7 +8,7 @@ import Foundation
extension Bool {
var asString: String {
return self == true ? "true" : "false"
return self == true ? "1" : "0"
}
}

View File

@ -69,8 +69,8 @@ struct ImagesCarousel: View {
}
var body: some View {
HStack {
Spacer()
HStack(spacing: 0) {
Spacer(minLength: 0)
TabView(selection: $selected) {
ForEach(attachments, id: \.id) { attachment in
ImageCarouselPicture(attachment: attachment) { (attachment, imageData) in
@ -86,6 +86,7 @@ struct ImagesCarousel: View {
.tag(attachment.id)
}
}
.padding(0)
.frame(height: self.imageHeight)
.tabViewStyle(PageTabViewStyle())
.onChange(of: selected, perform: { index in
@ -98,8 +99,9 @@ struct ImagesCarousel: View {
self.description = attachment.description
}
})
Spacer()
Spacer(minLength: 0)
}
.padding(0)
.onAppear {
self.selected = self.attachments.first?.id ?? String.empty()
}