commit 07f8ad75dc93e78c6c3a906dc70a7c80ec11d069 parent e934c2bb1140ee8b60288ce85a36cfccd980d5a5 Author: Swift <scoder1747@gmail.com> Date: Wed, 19 Apr 2023 22:02:01 -0400 Adjust attachment images placement when posting Changelog-Changed: Adjust attachment images placement when posting Closes: #979 Diffstat:
M | damus/Views/PostView.swift | | | 11 | +++++++---- |
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/damus/Views/PostView.swift b/damus/Views/PostView.swift @@ -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)