From e49d0377bd889b7c4ee463ec0386b5484ffc4b99 Mon Sep 17 00:00:00 2001 From: Shun Kashiwa Date: Sun, 15 Sep 2024 21:59:38 -0700 Subject: [PATCH] ui adjustment --- Svadilfari/UI/Components/HomeListItem.swift | 8 ++++---- SvadilfariTests/UserDefaultsTest.swift | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Svadilfari/UI/Components/HomeListItem.swift b/Svadilfari/UI/Components/HomeListItem.swift index c5512d1..074e16d 100644 --- a/Svadilfari/UI/Components/HomeListItem.swift +++ b/Svadilfari/UI/Components/HomeListItem.swift @@ -16,15 +16,15 @@ struct HomeListItem: View { var imageColor: Color = Color.accentColor var body: some View { - HStack(spacing: 0) { - self.image.foregroundColor(self.imageColor).padding(.trailing, 8) + Label { VStack(alignment: .leading, spacing: 4) { Text(self.title) .font(.body) Text(self.description).font(.caption).foregroundColor(.secondary) } - Spacer() - }.listRowInsets(Self.listRowInsets) + } icon: { + self.image.foregroundColor(self.imageColor) + } } } diff --git a/SvadilfariTests/UserDefaultsTest.swift b/SvadilfariTests/UserDefaultsTest.swift index bcc4c7d..8ad5f1f 100644 --- a/SvadilfariTests/UserDefaultsTest.swift +++ b/SvadilfariTests/UserDefaultsTest.swift @@ -24,12 +24,13 @@ class UserDefaultsTest: XCTestCase { func testDefault() throws { UserDefaults.setInitialData(defaults: self.ud) XCTAssertEqual(self.ud.isFirstLaunch, true) - XCTAssertEqual(self.ud.icloudSyncEnabled, true) + XCTAssertEqual(self.ud.icloudSyncEnabled, false) } func testAlreadyLaunched() throws { self.ud.isFirstLaunch = false UserDefaults.setInitialData(defaults: self.ud) + XCTAssertEqual(self.ud.isFirstLaunch, false) XCTAssertEqual(self.ud.icloudSyncEnabled, false) }