mirror of
git://jb55.com/damus
synced 2024-10-06 11:43:21 +00:00
Adjust attachment images placement when posting
Changelog-Changed: Adjust attachment images placement when posting Closes: #979
This commit is contained in:
parent
e934c2bb11
commit
07f8ad75dc
@ -271,11 +271,14 @@ struct PostView: View {
|
||||
}
|
||||
}
|
||||
|
||||
var has_artifacts: Bool {
|
||||
var multiply_factor: CGFloat {
|
||||
if case .quoting = action {
|
||||
return true
|
||||
return 0.4
|
||||
} else if !uploadedMedias.isEmpty {
|
||||
return 0.2
|
||||
} else {
|
||||
return 1.0
|
||||
}
|
||||
return !uploadedMedias.isEmpty
|
||||
}
|
||||
|
||||
func Editor(deviceSize: GeometryProxy) -> some View {
|
||||
@ -285,7 +288,7 @@ struct PostView: View {
|
||||
|
||||
TextEntry
|
||||
}
|
||||
.frame(height: has_artifacts ? deviceSize.size.height*0.4 : deviceSize.size.height)
|
||||
.frame(height: deviceSize.size.height * multiply_factor)
|
||||
.id("post")
|
||||
|
||||
PVImageCarouselView(media: $uploadedMedias, deviceWidth: deviceSize.size.width)
|
||||
|
Loading…
Reference in New Issue
Block a user