Fix for reading events from realm
This commit is contained in:
parent
3dfef5fccc
commit
3124e7251d
@ -1080,7 +1080,7 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_ENTITLEMENTS = AutoCat/AutoCat.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 86;
|
||||
CURRENT_PROJECT_VERSION = 87;
|
||||
DEVELOPMENT_TEAM = 46DTTB8X4S;
|
||||
INFOPLIST_FILE = AutoCat/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||
@ -1105,7 +1105,7 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_ENTITLEMENTS = AutoCat/AutoCat.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 86;
|
||||
CURRENT_PROJECT_VERSION = 87;
|
||||
DEVELOPMENT_TEAM = 46DTTB8X4S;
|
||||
INFOPLIST_FILE = AutoCat/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||
|
||||
@ -217,7 +217,7 @@ class CheckController: UIViewController, UITableViewDelegate, UITextFieldDelegat
|
||||
do {
|
||||
let realm = try Realm()
|
||||
if let dbVehicle = realm.object(ofType: Vehicle.self, forPrimaryKey: numberNormalized), dbVehicle.unrecognized {
|
||||
events.append(contentsOf: dbVehicle.events)
|
||||
events.append(contentsOf: dbVehicle.events.map { $0.clone() })
|
||||
}
|
||||
} catch {
|
||||
print(error)
|
||||
|
||||
@ -31,7 +31,7 @@ class RealmSectionedDataSource<Item,Cell>: NSObject, UITableViewDataSource
|
||||
case .initial:
|
||||
self.reload(animated: false)
|
||||
case .update(_, _, _, _):
|
||||
self.reload(animated: true)
|
||||
self.reload(animated: false)
|
||||
case .error(let err):
|
||||
print("Realm observer error: \(err)")
|
||||
}
|
||||
|
||||
@ -49,7 +49,6 @@ public class AudioRecord: Object, Identifiable, Differentiable, Cloneable {
|
||||
public func getAddedDate() -> TimeInterval {
|
||||
if self.identifier == 0 {
|
||||
self.identifier = self.addedDate
|
||||
print("getAddedDate: \(self.identifier)")
|
||||
}
|
||||
|
||||
return self.addedDate
|
||||
|
||||
Loading…
Reference in New Issue
Block a user