Skip to content

Commit 24d506f

Browse files
committed
3.0.7
* Default forms are now added to a new observation automatically
1 parent 68cb801 commit 24d506f

File tree

5 files changed

+16
-2
lines changed

5 files changed

+16
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ You can now choose to display and enter coordinates in Latitude Longitude, MGRS,
1717
##### Bug Fixes
1818
* A few lingering dark mode color bugs were tracked down
1919

20+
## 3.0.7
21+
22+
##### Bug Fixes
23+
* Default forms are now added to a new observation automatically
24+
2025
## 3.0.6
2126

2227
##### Bug Fixes

MAGE.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3696,7 +3696,7 @@
36963696
GCC_PREFIX_HEADER = "Mage/MAGE-Prefix.pch";
36973697
INFOPLIST_FILE = "Mage/MAGE-Info.plist";
36983698
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
3699-
MARKETING_VERSION = 3.0.6;
3699+
MARKETING_VERSION = 3.0.7;
37003700
OTHER_LDFLAGS = "$(inherited)";
37013701
PRODUCT_BUNDLE_IDENTIFIER = mil.nga.mage;
37023702
PRODUCT_NAME = MAGE;
@@ -3730,7 +3730,7 @@
37303730
GCC_PREFIX_HEADER = "Mage/MAGE-Prefix.pch";
37313731
INFOPLIST_FILE = "Mage/MAGE-Info.plist";
37323732
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
3733-
MARKETING_VERSION = 3.0.6;
3733+
MARKETING_VERSION = 3.0.7;
37343734
OTHER_LDFLAGS = "$(inherited)";
37353735
PRODUCT_BUNDLE_IDENTIFIER = mil.nga.mage;
37363736
PRODUCT_NAME = MAGE;

Mage/CoreData/Form.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,12 @@ import CoreData
109109
}
110110
}
111111

112+
public var isDefault: Bool {
113+
get {
114+
return json?.json?[FormKey.isDefault.key] as? Bool ?? false
115+
}
116+
}
117+
112118
public var color: String? {
113119
get {
114120
return json?.json?[FormKey.color.key] as? String

Mage/FieldKey.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ public enum FormKey : String {
6464
case min
6565
case max
6666
case style
67+
case isDefault = "default"
6768

6869
var key: String {
6970
return self.rawValue

Mage/ObservationEditCoordinator.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,8 @@ protocol ObservationCommonPropertiesListener: AnyObject {
198198
for _ in 1...eventFormMin {
199199
addFormToObservation(observation: observation, form: eventForm);
200200
}
201+
} else if eventForm.isDefault {
202+
addFormToObservation(observation: observation, form: eventForm);
201203
}
202204
}
203205
}

0 commit comments

Comments
 (0)