Skip to content

Commit

Permalink
Move synced state bitmask position
Browse files Browse the repository at this point in the history
Moved the bitmask position for the synced state. It's now grouped with errored and busy states.
  • Loading branch information
danschultz committed Aug 15, 2011
1 parent f19f10f commit d52186b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/mesh/model/Entity.as
Expand Up @@ -53,12 +53,6 @@ package mesh.model
*/
public static const DIRTY:int = 0x00001;

/**
* The generic lifecycle state for when the changes have been synced with the
* backend.
*/
public static const SYNCED:int = 0x00002;

/**
* The generic lifecycle state for when there's an error after a commit.
*/
Expand All @@ -69,6 +63,12 @@ package mesh.model
*/
public static const BUSY:int = 0x02000;

/**
* The generic lifecycle state for when the changes have been synced with the
* backend.
*/
public static const SYNCED:int = 0x04000;

private var _associations:Object = {};
private var _aggregates:Aggregates = new Aggregates(this);

Expand Down
5 changes: 5 additions & 0 deletions src/mesh/model/Store.as
Expand Up @@ -151,6 +151,11 @@ package mesh.model
entity.storeKey = generateStoreKey();
entity.store = this;
entity.addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, handleEntityPropertyChange);

if (entity.isDirty) {
_changes.add(entity);
}

_index.add(entity);
}

Expand Down

0 comments on commit d52186b

Please sign in to comment.