File tree 3 files changed +15
-6
lines changed
3 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 817
817
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
818
818
CODE_SIGN_ENTITLEMENTS = "KlockWork-iOS/KlockWork_iOS.entitlements";
819
819
CODE_SIGN_STYLE = Automatic;
820
- CURRENT_PROJECT_VERSION = 15 ;
820
+ CURRENT_PROJECT_VERSION = 16 ;
821
821
DEAD_CODE_STRIPPING = YES;
822
822
DEVELOPMENT_ASSET_PATHS = "\"KlockWork-iOS/Preview Content\"";
823
823
DEVELOPMENT_TEAM = 6DT7L2N5X6;
859
859
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
860
860
CODE_SIGN_ENTITLEMENTS = "KlockWork-iOS/KlockWork_iOS.entitlements";
861
861
CODE_SIGN_STYLE = Automatic;
862
- CURRENT_PROJECT_VERSION = 15 ;
862
+ CURRENT_PROJECT_VERSION = 16 ;
863
863
DEAD_CODE_STRIPPING = YES;
864
864
DEVELOPMENT_ASSET_PATHS = "\"KlockWork-iOS/Preview Content\"";
865
865
DEVELOPMENT_TEAM = 6DT7L2N5X6;
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ extension RecordFilter {
71
71
if self . records. count > 0 {
72
72
let sortedRecords = Array ( self . records)
73
73
. sliced ( by: [ . year, . month, . day] , for: \. timestamp!)
74
- . sorted ( by: { $0. key < $1. key} )
74
+ . sorted ( by: { $0. key > $1. key} )
75
75
let grouped = Dictionary ( grouping: sortedRecords, by: { $0. key} )
76
76
77
77
for group in grouped {
Original file line number Diff line number Diff line change @@ -537,9 +537,11 @@ extension Tabs.Content {
537
537
Rectangle ( )
538
538
. foregroundStyle ( Color . fromStored ( self . entity. project? . colour ?? Theme . rowColourAsDouble) )
539
539
. frame ( width: 15 )
540
- Rectangle ( )
541
- . foregroundStyle ( Color . fromStored ( self . entity. colour ?? Theme . rowColourAsDouble) )
542
- . frame ( width: 15 )
540
+ if self . records. isEmpty {
541
+ Rectangle ( )
542
+ . foregroundStyle ( Color . fromStored ( self . entity. colour ?? Theme . rowColourAsDouble) )
543
+ . frame ( width: 15 )
544
+ }
543
545
544
546
HStack ( spacing: 0 ) {
545
547
if self . records. isEmpty {
@@ -994,6 +996,7 @@ extension Tabs.Content {
994
996
}
995
997
996
998
struct SingleTaskChecklistItem : View {
999
+ @EnvironmentObject private var state : AppState
997
1000
public let task : LogTask
998
1001
@State private var isCompleted : Bool = false
999
1002
@State private var isCancelled : Bool = false
@@ -1038,12 +1041,18 @@ extension Tabs.Content {
1038
1041
private func actionOnSave( ) -> Void {
1039
1042
if self . isCompleted {
1040
1043
self . task. completedDate = Date ( )
1044
+
1045
+ // Create a record indicating when the task was completed
1046
+ CoreDataTasks ( moc: self . state. moc) . complete ( self . task)
1041
1047
} else {
1042
1048
self . task. completedDate = nil
1043
1049
}
1044
1050
1045
1051
if self . isCancelled {
1046
1052
self . task. cancelledDate = Date ( )
1053
+
1054
+ // Create a record indicating when the task was cancelled
1055
+ CoreDataTasks ( moc: self . state. moc) . cancel ( self . task)
1047
1056
} else {
1048
1057
self . task. cancelledDate = nil
1049
1058
}
You can’t perform that action at this time.
0 commit comments