Skip to content

Commit e0cac80

Browse files
authored
Feature/weight/main (#78)
* chore: tuist version * chore * chore * refactor * refactor * Feature/weight/add target (#74) * feat: WeightDomain * feat: add weight target * change graph * repository * GetWeightsWithoutDuplicatesUsecase * MockData * Add TestCase * chore * feat: WeightRepositoryImpl * request permission * fetch weights from healthkit * SubscribeWeightsUsecase * SubscribeWeightsUsecaseTest * PostWeightUsecase * feat: GetWeightsRangeUsecase * update readme * chore * feat: WeightLineChartView * feat: WeightLineChartViewModel * feat: preview * feat: add background color * feat: selected date * chore: comment * feat: selectedDate -> viewModel * feat: SearchWeightFromDateUsecase * feat: selectedWeight * feat: main thread * feat: mark * Feature/weight/linechartview refactor (#75) * refactor * feat: WeightListViewModel * feat: weightlistview * chore * register DI * assemble weight * weight navigation * weight coordinator * navigation * register scheme * add physical button * feat: weightsection * feat: GroupWeightsByGroupUsecase * feat: add date * feat: prepare sections * Feature/weight/section (#76) * refactor * feat: WeightSectionView * feat: listview * fix bug * chore * change test * refactor * feat: FilterWeightsOneYearRangeUsecase * feat: only shows 1 year data in graph * feat: applicationDataBinding * fetch exercises * add debounce * fetch friends * fetch * empty case ui * add button * feat: WeightAddView * feat: add weight add view navigation * Feature/weight/add date (#77) * feat: GetRecentWeightUsecase * feat: WeightAddView * feat: weight add view * Feature/weight/fix (#79) * fix initial x * fix: infinity width
1 parent 09f079e commit e0cac80

File tree

80 files changed

+1463
-491
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+1463
-491
lines changed
File renamed without changes.

Derived/Sources/TuistAssets+App.swift

+9-19
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
// MARK: - Asset Catalogs
2020

2121
// swiftlint:disable identifier_name line_length nesting type_body_length type_name
22-
public enum AppAsset {
22+
public enum AppAsset: Sendable {
2323
public enum Assets {
2424
public static let accentColor = AppColors(name: "AccentColor")
2525
public static let splash = AppImages(name: "Splash")
@@ -31,8 +31,8 @@ public enum AppAsset {
3131

3232
// MARK: - Implementation Details
3333

34-
public final class AppColors {
35-
public fileprivate(set) var name: String
34+
public final class AppColors: Sendable {
35+
public let name: String
3636

3737
#if os(macOS)
3838
public typealias Color = NSColor
@@ -41,27 +41,17 @@ public final class AppColors {
4141
#endif
4242

4343
@available(iOS 11.0, tvOS 11.0, watchOS 4.0, macOS 10.13, visionOS 1.0, *)
44-
public private(set) lazy var color: Color = {
44+
public var color: Color {
4545
guard let color = Color(asset: self) else {
4646
fatalError("Unable to load color asset named \(name).")
4747
}
4848
return color
49-
}()
49+
}
5050

5151
#if canImport(SwiftUI)
52-
private var _swiftUIColor: Any? = nil
5352
@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, visionOS 1.0, *)
54-
public private(set) var swiftUIColor: SwiftUI.Color {
55-
get {
56-
if self._swiftUIColor == nil {
57-
self._swiftUIColor = SwiftUI.Color(asset: self)
58-
}
59-
60-
return self._swiftUIColor as! SwiftUI.Color
61-
}
62-
set {
63-
self._swiftUIColor = newValue
64-
}
53+
public var swiftUIColor: SwiftUI.Color {
54+
return SwiftUI.Color(asset: self)
6555
}
6656
#endif
6757

@@ -94,8 +84,8 @@ public extension SwiftUI.Color {
9484
}
9585
#endif
9686

97-
public struct AppImages {
98-
public fileprivate(set) var name: String
87+
public struct AppImages: Sendable {
88+
public let name: String
9989

10090
#if os(macOS)
10191
public typealias Image = NSImage

Derived/Sources/TuistAssets+Auth.swift

+9-19
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
// MARK: - Asset Catalogs
2020

2121
// swiftlint:disable identifier_name line_length nesting type_body_length type_name
22-
public enum AuthAsset {
22+
public enum AuthAsset: Sendable {
2323
public enum Assets {
2424
public static let accentColor = AuthColors(name: "AccentColor")
2525
public static let splash = AuthImages(name: "Splash")
@@ -31,8 +31,8 @@ public enum AuthAsset {
3131

3232
// MARK: - Implementation Details
3333

34-
public final class AuthColors {
35-
public fileprivate(set) var name: String
34+
public final class AuthColors: Sendable {
35+
public let name: String
3636

3737
#if os(macOS)
3838
public typealias Color = NSColor
@@ -41,27 +41,17 @@ public final class AuthColors {
4141
#endif
4242

4343
@available(iOS 11.0, tvOS 11.0, watchOS 4.0, macOS 10.13, visionOS 1.0, *)
44-
public private(set) lazy var color: Color = {
44+
public var color: Color {
4545
guard let color = Color(asset: self) else {
4646
fatalError("Unable to load color asset named \(name).")
4747
}
4848
return color
49-
}()
49+
}
5050

5151
#if canImport(SwiftUI)
52-
private var _swiftUIColor: Any? = nil
5352
@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, visionOS 1.0, *)
54-
public private(set) var swiftUIColor: SwiftUI.Color {
55-
get {
56-
if self._swiftUIColor == nil {
57-
self._swiftUIColor = SwiftUI.Color(asset: self)
58-
}
59-
60-
return self._swiftUIColor as! SwiftUI.Color
61-
}
62-
set {
63-
self._swiftUIColor = newValue
64-
}
53+
public var swiftUIColor: SwiftUI.Color {
54+
return SwiftUI.Color(asset: self)
6555
}
6656
#endif
6757

@@ -94,8 +84,8 @@ public extension SwiftUI.Color {
9484
}
9585
#endif
9686

97-
public struct AuthImages {
98-
public fileprivate(set) var name: String
87+
public struct AuthImages: Sendable {
88+
public let name: String
9989

10090
#if os(macOS)
10191
public typealias Image = NSImage

Derived/Sources/TuistAssets+Common.swift

+9-19
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
// MARK: - Asset Catalogs
2020

2121
// swiftlint:disable identifier_name line_length nesting type_body_length type_name
22-
public enum CommonAsset {
22+
public enum CommonAsset: Sendable {
2323
public enum Assets {
2424
public static let accentColor = CommonColors(name: "AccentColor")
2525
public static let splash = CommonImages(name: "Splash")
@@ -31,8 +31,8 @@ public enum CommonAsset {
3131

3232
// MARK: - Implementation Details
3333

34-
public final class CommonColors {
35-
public fileprivate(set) var name: String
34+
public final class CommonColors: Sendable {
35+
public let name: String
3636

3737
#if os(macOS)
3838
public typealias Color = NSColor
@@ -41,27 +41,17 @@ public final class CommonColors {
4141
#endif
4242

4343
@available(iOS 11.0, tvOS 11.0, watchOS 4.0, macOS 10.13, visionOS 1.0, *)
44-
public private(set) lazy var color: Color = {
44+
public var color: Color {
4545
guard let color = Color(asset: self) else {
4646
fatalError("Unable to load color asset named \(name).")
4747
}
4848
return color
49-
}()
49+
}
5050

5151
#if canImport(SwiftUI)
52-
private var _swiftUIColor: Any? = nil
5352
@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, visionOS 1.0, *)
54-
public private(set) var swiftUIColor: SwiftUI.Color {
55-
get {
56-
if self._swiftUIColor == nil {
57-
self._swiftUIColor = SwiftUI.Color(asset: self)
58-
}
59-
60-
return self._swiftUIColor as! SwiftUI.Color
61-
}
62-
set {
63-
self._swiftUIColor = newValue
64-
}
53+
public var swiftUIColor: SwiftUI.Color {
54+
return SwiftUI.Color(asset: self)
6555
}
6656
#endif
6757

@@ -94,8 +84,8 @@ public extension SwiftUI.Color {
9484
}
9585
#endif
9686

97-
public struct CommonImages {
98-
public fileprivate(set) var name: String
87+
public struct CommonImages: Sendable {
88+
public let name: String
9989

10090
#if os(macOS)
10191
public typealias Image = NSImage

Derived/Sources/TuistAssets+DgWidget.swift

+7-17
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@
1919
// MARK: - Asset Catalogs
2020

2121
// swiftlint:disable identifier_name line_length nesting type_body_length type_name
22-
public enum DgWidgetAsset {
22+
public enum DgWidgetAsset: Sendable {
2323
public static let accentColor = DgWidgetColors(name: "AccentColor")
2424
public static let widgetBackground = DgWidgetColors(name: "WidgetBackground")
2525
}
2626
// swiftlint:enable identifier_name line_length nesting type_body_length type_name
2727

2828
// MARK: - Implementation Details
2929

30-
public final class DgWidgetColors {
31-
public fileprivate(set) var name: String
30+
public final class DgWidgetColors: Sendable {
31+
public let name: String
3232

3333
#if os(macOS)
3434
public typealias Color = NSColor
@@ -37,27 +37,17 @@ public final class DgWidgetColors {
3737
#endif
3838

3939
@available(iOS 11.0, tvOS 11.0, watchOS 4.0, macOS 10.13, visionOS 1.0, *)
40-
public private(set) lazy var color: Color = {
40+
public var color: Color {
4141
guard let color = Color(asset: self) else {
4242
fatalError("Unable to load color asset named \(name).")
4343
}
4444
return color
45-
}()
45+
}
4646

4747
#if canImport(SwiftUI)
48-
private var _swiftUIColor: Any? = nil
4948
@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, visionOS 1.0, *)
50-
public private(set) var swiftUIColor: SwiftUI.Color {
51-
get {
52-
if self._swiftUIColor == nil {
53-
self._swiftUIColor = SwiftUI.Color(asset: self)
54-
}
55-
56-
return self._swiftUIColor as! SwiftUI.Color
57-
}
58-
set {
59-
self._swiftUIColor = newValue
60-
}
49+
public var swiftUIColor: SwiftUI.Color {
50+
return SwiftUI.Color(asset: self)
6151
}
6252
#endif
6353

Derived/Sources/TuistAssets+Exercise.swift

+9-19
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
// MARK: - Asset Catalogs
2020

2121
// swiftlint:disable identifier_name line_length nesting type_body_length type_name
22-
public enum ExerciseAsset {
22+
public enum ExerciseAsset: Sendable {
2323
public enum Assets {
2424
public static let accentColor = ExerciseColors(name: "AccentColor")
2525
public static let splash = ExerciseImages(name: "Splash")
@@ -31,8 +31,8 @@ public enum ExerciseAsset {
3131

3232
// MARK: - Implementation Details
3333

34-
public final class ExerciseColors {
35-
public fileprivate(set) var name: String
34+
public final class ExerciseColors: Sendable {
35+
public let name: String
3636

3737
#if os(macOS)
3838
public typealias Color = NSColor
@@ -41,27 +41,17 @@ public final class ExerciseColors {
4141
#endif
4242

4343
@available(iOS 11.0, tvOS 11.0, watchOS 4.0, macOS 10.13, visionOS 1.0, *)
44-
public private(set) lazy var color: Color = {
44+
public var color: Color {
4545
guard let color = Color(asset: self) else {
4646
fatalError("Unable to load color asset named \(name).")
4747
}
4848
return color
49-
}()
49+
}
5050

5151
#if canImport(SwiftUI)
52-
private var _swiftUIColor: Any? = nil
5352
@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, visionOS 1.0, *)
54-
public private(set) var swiftUIColor: SwiftUI.Color {
55-
get {
56-
if self._swiftUIColor == nil {
57-
self._swiftUIColor = SwiftUI.Color(asset: self)
58-
}
59-
60-
return self._swiftUIColor as! SwiftUI.Color
61-
}
62-
set {
63-
self._swiftUIColor = newValue
64-
}
53+
public var swiftUIColor: SwiftUI.Color {
54+
return SwiftUI.Color(asset: self)
6555
}
6656
#endif
6757

@@ -94,8 +84,8 @@ public extension SwiftUI.Color {
9484
}
9585
#endif
9686

97-
public struct ExerciseImages {
98-
public fileprivate(set) var name: String
87+
public struct ExerciseImages: Sendable {
88+
public let name: String
9989

10090
#if os(macOS)
10191
public typealias Image = NSImage

Derived/Sources/TuistAssets+Friend.swift

+9-19
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
// MARK: - Asset Catalogs
2020

2121
// swiftlint:disable identifier_name line_length nesting type_body_length type_name
22-
public enum FriendAsset {
22+
public enum FriendAsset: Sendable {
2323
public enum Assets {
2424
public static let accentColor = FriendColors(name: "AccentColor")
2525
public static let splash = FriendImages(name: "Splash")
@@ -31,8 +31,8 @@ public enum FriendAsset {
3131

3232
// MARK: - Implementation Details
3333

34-
public final class FriendColors {
35-
public fileprivate(set) var name: String
34+
public final class FriendColors: Sendable {
35+
public let name: String
3636

3737
#if os(macOS)
3838
public typealias Color = NSColor
@@ -41,27 +41,17 @@ public final class FriendColors {
4141
#endif
4242

4343
@available(iOS 11.0, tvOS 11.0, watchOS 4.0, macOS 10.13, visionOS 1.0, *)
44-
public private(set) lazy var color: Color = {
44+
public var color: Color {
4545
guard let color = Color(asset: self) else {
4646
fatalError("Unable to load color asset named \(name).")
4747
}
4848
return color
49-
}()
49+
}
5050

5151
#if canImport(SwiftUI)
52-
private var _swiftUIColor: Any? = nil
5352
@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, visionOS 1.0, *)
54-
public private(set) var swiftUIColor: SwiftUI.Color {
55-
get {
56-
if self._swiftUIColor == nil {
57-
self._swiftUIColor = SwiftUI.Color(asset: self)
58-
}
59-
60-
return self._swiftUIColor as! SwiftUI.Color
61-
}
62-
set {
63-
self._swiftUIColor = newValue
64-
}
53+
public var swiftUIColor: SwiftUI.Color {
54+
return SwiftUI.Color(asset: self)
6555
}
6656
#endif
6757

@@ -94,8 +84,8 @@ public extension SwiftUI.Color {
9484
}
9585
#endif
9686

97-
public struct FriendImages {
98-
public fileprivate(set) var name: String
87+
public struct FriendImages: Sendable {
88+
public let name: String
9989

10090
#if os(macOS)
10191
public typealias Image = NSImage

0 commit comments

Comments
 (0)