Commit 371eaf41 authored by Filipe de Lima Brito's avatar Filipe de Lima Brito

Merge branch 'develop' of https://github.com/RocketChat/Rocket.Chat.Android into iss268

parents 5e6ad5c8 982d5e4e
...@@ -36,7 +36,7 @@ import hugo.weaving.DebugLog; ...@@ -36,7 +36,7 @@ import hugo.weaving.DebugLog;
*/ */
public class MethodCallHelper { public class MethodCallHelper {
protected static final long TIMEOUT_MS = 4000; protected static final long TIMEOUT_MS = 20000;
protected static final Continuation<String, Task<JSONObject>> CONVERT_TO_JSON_OBJECT = protected static final Continuation<String, Task<JSONObject>> CONVERT_TO_JSON_OBJECT =
task -> Task.forResult(new JSONObject(task.getResult())); task -> Task.forResult(new JSONObject(task.getResult()));
protected static final Continuation<String, Task<JSONArray>> CONVERT_TO_JSON_ARRAY = protected static final Continuation<String, Task<JSONArray>> CONVERT_TO_JSON_ARRAY =
......
...@@ -71,6 +71,11 @@ public class NewMessageObserver extends AbstractModelObserver<RealmMessage> { ...@@ -71,6 +71,11 @@ public class NewMessageObserver extends AbstractModelObserver<RealmMessage> {
realm.createOrUpdateObjectFromJson(RealmMessage.class, new JSONObject() realm.createOrUpdateObjectFromJson(RealmMessage.class, new JSONObject()
.put(RealmMessage.ID, messageId) .put(RealmMessage.ID, messageId)
.put(RealmMessage.SYNC_STATE, SyncState.FAILED))); .put(RealmMessage.SYNC_STATE, SyncState.FAILED)));
} else {
realmHelper.executeTransaction(realm ->
realm.createOrUpdateObjectFromJson(RealmMessage.class, new JSONObject()
.put(RealmMessage.ID, messageId)
.put(RealmMessage.SYNC_STATE, SyncState.SYNCED)));
} }
return null; return null;
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment