change order to safely update _followingSeqNum: first save to dht (increment seq) and then save to local storage.

Thanks to Alan Chan.
This commit is contained in:
Miguel Freitas 2014-05-23 14:20:06 -03:00
parent 44461ec8c4
commit c269007abc

View File

@ -301,8 +301,8 @@ function saveFollowingToDht() {
// save following to local storage, dht and json rpc // save following to local storage, dht and json rpc
function saveFollowing(cbFunc, cbArg) { function saveFollowing(cbFunc, cbArg) {
saveFollowingToStorage();
saveFollowingToDht(); saveFollowingToDht();
saveFollowingToStorage();
updateFollowing(cbFunc, cbArg); updateFollowing(cbFunc, cbArg);
} }