diff options
author | desperateCoder <echotodevnull@gmail.com> | 2020-07-12 21:24:19 +0300 |
---|---|---|
committer | desperateCoder <echotodevnull@gmail.com> | 2020-07-12 21:24:19 +0300 |
commit | df166f42e6375b9de043cf2d0c504ffa6afa66f2 (patch) | |
tree | c062ee064514985da1267417f71ca47430796bd5 | |
parent | 9f836e9dcaa31af211e1eac46898e7cb196419b0 (diff) |
#455 use right server
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/SyncManager.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/SyncManager.java b/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/SyncManager.java index c7a9fba9e..bad6f80db 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/SyncManager.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/SyncManager.java @@ -513,7 +513,11 @@ public class SyncManager { } if (serverAdapter.hasInternetConnection()) { Account targetAccount = dataBaseAdapter.getAccountByIdDirectly(targetAccountId); - new SyncHelper(serverAdapter, dataBaseAdapter, null) + ServerAdapter serverAdapterToUse = this.serverAdapter; + if (originAccountId != targetAccountId) { + serverAdapterToUse = new ServerAdapter(appContext, targetAccount.getName()); + } + new SyncHelper(serverAdapterToUse, dataBaseAdapter, null) .setResponseCallback(new IResponseCallback<Boolean>(targetAccount) { @Override public void onResponse(Boolean response) { |