Don't use server time for syncing users

pull/14/head
Sam Bosley 13 years ago
parent 06adf4594b
commit 278480895f

@ -778,12 +778,12 @@ public final class ActFmSyncService {
return result.optInt("time", 0); return result.optInt("time", 0);
} }
public int fetchUsers(int serverTime) throws JSONException, IOException { public int fetchUsers() throws JSONException, IOException {
if (!checkForToken()) if (!checkForToken())
return 0; return 0;
JSONObject result = actFmInvoker.invoke("user_list", JSONObject result = actFmInvoker.invoke("user_list",
"token", token, "modified_after", serverTime); "token", token);
JSONArray users = result.getJSONArray("list"); JSONArray users = result.getJSONArray("list");
HashSet<Long> ids = new HashSet<Long>(); HashSet<Long> ids = new HashSet<Long>();
if (users.length() > 0) if (users.length() > 0)

@ -194,7 +194,7 @@ public class ActFmSyncV2Provider extends SyncV2Provider {
public void run() { public void run() {
int time = Preferences.getInt(LAST_USERS_FETCH_TIME, 0); int time = Preferences.getInt(LAST_USERS_FETCH_TIME, 0);
try { try {
time = actFmSyncService.fetchUsers(time); time = actFmSyncService.fetchUsers();
Preferences.setInt(LAST_USERS_FETCH_TIME, time); Preferences.setInt(LAST_USERS_FETCH_TIME, time);
} catch (JSONException e) { } catch (JSONException e) {
handler.handleException("actfm-sync", e, e.toString()); //$NON-NLS-1$ handler.handleException("actfm-sync", e, e.toString()); //$NON-NLS-1$

Loading…
Cancel
Save