Skip to content

Commit

Permalink
Merge pull request #2021 from opensrp/lmh-sync-post
Browse files Browse the repository at this point in the history
Lmh sync post
  • Loading branch information
LZRS authored Apr 6, 2022
2 parents 4f58a52 + ce9d678 commit 669868e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public boolean hasANC() {

@Override
public boolean syncUsingPost() {
return false;
return true;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
import org.smartregister.repository.AllSharedPreferences;
import org.smartregister.view.activity.BaseLoginActivity;

import java.util.HashSet;
import java.util.List;
import java.util.Set;

import static org.smartregister.util.Utils.isEmptyCollection;

Expand All @@ -36,9 +38,10 @@ public String getSyncFilterValue() {
if(StringUtils.isBlank(locationId)) locationId = allSharedPreferences().fetchUserLocalityId(providerId);

List<String> locationIds = LocationHelper.getInstance().locationsFromHierarchy(true, null);

if (!isEmptyCollection(locationIds) && locationIds.contains(locationId)) {
int index = locationIds.indexOf(locationId);
List<String> subLocationIds = locationIds.subList(index, locationIds.size());
Set<String> subLocationIds = new HashSet<>(locationIds.subList(index, locationIds.size()));
return StringUtils.join(subLocationIds, ",");
}
return locationId;
Expand Down Expand Up @@ -115,12 +118,12 @@ public String getOauthClientSecret() {

@Override
public int getConnectTimeout() {
return BuildConfig.MAX_CONNECTION_TIMEOUT * 60000;
return BuildConfig.MAX_CONNECTION_TIMEOUT * 300000;
}

@Override
public int getReadTimeout() {
return BuildConfig.MAX_READ_TIMEOUT * 60000;
return BuildConfig.MAX_READ_TIMEOUT * 300000;
}

@Override
Expand Down

0 comments on commit 669868e

Please sign in to comment.