mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-19 16:13:42 +02:00
Cleaned up various things, mostly removed unnecessary selfs, comments and bad formatting
This commit is contained in:
committed by
Stefan Ceriu
parent
c073dfd95d
commit
eac1401cc1
+3
-14
@@ -17,9 +17,6 @@
|
||||
import SwiftUI
|
||||
|
||||
struct UserSessionListItem: View {
|
||||
|
||||
// MARK: - Constants
|
||||
|
||||
private enum LayoutConstants {
|
||||
static let horizontalPadding: CGFloat = 15
|
||||
static let verticalPadding: CGFloat = 16
|
||||
@@ -27,23 +24,16 @@ struct UserSessionListItem: View {
|
||||
static let avatarRightMargin: CGFloat = 18
|
||||
}
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
// MARK: Private
|
||||
|
||||
@Environment(\.theme) private var theme: ThemeSwiftUI
|
||||
|
||||
// MARK: Public
|
||||
|
||||
let viewData: UserSessionListItemViewData
|
||||
|
||||
var onBackgroundTap: ((String) -> (Void))? = nil
|
||||
|
||||
// MARK: - Body
|
||||
|
||||
var body: some View {
|
||||
Button(action: { onBackgroundTap?(self.viewData.sessionId)
|
||||
}) {
|
||||
Button {
|
||||
onBackgroundTap?(viewData.sessionId)
|
||||
} label: {
|
||||
VStack(alignment: .leading, spacing: LayoutConstants.verticalPadding) {
|
||||
HStack(spacing: LayoutConstants.avatarRightMargin) {
|
||||
DeviceAvatarView(viewData: viewData.deviceAvatarViewData)
|
||||
@@ -74,7 +64,6 @@ struct UserSessionListItem: View {
|
||||
}
|
||||
|
||||
struct UserSessionListPreview: View {
|
||||
|
||||
let userSessionsOverviewService: UserSessionsOverviewServiceProtocol = MockUserSessionsOverviewService()
|
||||
|
||||
var body: some View {
|
||||
|
||||
Reference in New Issue
Block a user