@Override public void onRetry() { setAccountData(userId, type, params, callback); } }));
/** * Triggers a request to update the userIds to ignore * * @param userIds the userIds to ignore * @param callback the callback */ private void updateUsers(List<String> userIds, ApiCallback<Void> callback) { Map<String, Object> ignoredUsersDict = new HashMap<>(); for (String userId : userIds) { ignoredUsersDict.put(userId, new HashMap<>()); } Map<String, Object> params = new HashMap<>(); params.put(AccountDataElement.ACCOUNT_DATA_KEY_IGNORED_USERS, ignoredUsersDict); mAccountDataRestClient.setAccountData(getMyUserId(), AccountDataElement.ACCOUNT_DATA_TYPE_IGNORED_USER_LIST, params, callback); }
mAccountDataRestClient.setAccountData(getMyUserId(), AccountDataElement.ACCOUNT_DATA_TYPE_PREVIEW_URLS, params, new ApiCallback<Void>() { @Override public void onSuccess(Void info) {
Log.d(LOG_TAG, "## addUserWidget()"); mAccountDataRestClient.setAccountData(getMyUserId(), AccountDataElement.ACCOUNT_DATA_TYPE_WIDGETS, params, new ApiCallback<Void>() { @Override public void onSuccess(Void info) {
/** * Store and upload the provided direct chat rooms map. * * @param directChatRoomsMap the direct chats map * @param callback the asynchronous callback */ public void setDirectChatRoomsMap(Map<String, List<String>> directChatRoomsMap, ApiCallback<Void> callback) { Log.d(LOG_TAG, "## setDirectChatRoomsMap()"); IMXStore store = getStore(); if (null != store) { // update the store value // do not wait the server request echo to update the store store.setDirectChatRoomsDict(directChatRoomsMap); } else { Log.e(LOG_TAG, "## setDirectChatRoomsMap() : null store"); } mLocalDirectChatRoomIdsList = null; // Upload the new map mAccountDataRestClient.setAccountData(getMyUser().user_id, AccountDataElement.ACCOUNT_DATA_TYPE_DIRECT_MESSAGES, directChatRoomsMap, callback); }
mAccountDataRestClient.setAccountData(mCredentials.userId, AccountDataElement.ACCOUNT_DATA_TYPE_DIRECT_MESSAGES, updatedDirectChatRoomsDict, new ApiCallback<Void>() { @Override