Skip to content

Commit 89df85a

Browse files
author
Michele Longhi
committed
Fixed persistent modifiedColumns for user and other CloudObject
1 parent 843ac9d commit 89df85a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

CloudBoost/CloudUser.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,7 @@ public class CloudUser: CloudObject {
144144
(response: CloudBoostResponse) in
145145
if response.success {
146146
if let doc = response.object as? NSMutableDictionary {
147-
doc["_isModified"] = false
148-
doc["_modifiedColumns"] = nil
147+
self.resetModificationState()
149148
self.document = doc
150149
self.setAsCurrentUser()
151150
}
@@ -376,6 +375,9 @@ public class CloudUser: CloudObject {
376375
}
377376

378377
public func setAsCurrentUser(){
378+
379+
CloudUser.currentUser = self
380+
379381
let def = NSUserDefaults.standardUserDefaults()
380382
let data = NSKeyedArchiver.archivedDataWithRootObject(self.document)
381383
def.setObject(data, forKey: "cb_current_user")

0 commit comments

Comments
 (0)