mirror of
https://github.com/nextcloud/android.git
synced 2024-11-28 02:17:43 +03:00
Merge branch 'share_link_show_shared_files' into bug_in_refresh_of_shared_state_when_device_is_rotated
This commit is contained in:
commit
d8eb34aa49
3 changed files with 15 additions and 16 deletions
|
@ -36,6 +36,7 @@ import android.support.v4.app.Fragment;
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
import android.text.InputType;
|
import android.text.InputType;
|
||||||
import android.text.TextWatcher;
|
import android.text.TextWatcher;
|
||||||
|
import android.util.Log;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
@ -832,6 +833,10 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
|
||||||
|
|
||||||
if (success)
|
if (success)
|
||||||
finish();
|
finish();
|
||||||
|
} else {
|
||||||
|
updateAuthStatusIconAndText(result);
|
||||||
|
showAuthStatus();
|
||||||
|
Log_OC.e(TAG, "Access to user name failed: " + result.getLogMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1605,7 +1610,7 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void onSamlDialogSuccess(String sessionCookie){
|
public void onSamlDialogSuccess(String sessionCookie) {
|
||||||
mAuthToken = sessionCookie;
|
mAuthToken = sessionCookie;
|
||||||
|
|
||||||
if (sessionCookie != null && sessionCookie.length() > 0) {
|
if (sessionCookie != null && sessionCookie.length() > 0) {
|
||||||
|
|
|
@ -223,11 +223,7 @@ public class SynchronizeFolderOperation extends RemoteOperation {
|
||||||
Log_OC.d(TAG, "Synchronizing " + mAccount.name + remotePath);
|
Log_OC.d(TAG, "Synchronizing " + mAccount.name + remotePath);
|
||||||
|
|
||||||
if (result.isSuccess()) {
|
if (result.isSuccess()) {
|
||||||
ArrayList<RemoteFile> remotes = new ArrayList<RemoteFile>();
|
synchronizeData(result.getData(), client);
|
||||||
for(Object obj: result.getData()) {
|
|
||||||
remotes.add((RemoteFile) obj);
|
|
||||||
}
|
|
||||||
synchronizeData(remotes, client);
|
|
||||||
if (mConflictsFound > 0 || mFailsInFavouritesFound > 0) {
|
if (mConflictsFound > 0 || mFailsInFavouritesFound > 0) {
|
||||||
result = new RemoteOperationResult(ResultCode.SYNC_CONFLICT); // should be different result, but will do the job
|
result = new RemoteOperationResult(ResultCode.SYNC_CONFLICT); // should be different result, but will do the job
|
||||||
}
|
}
|
||||||
|
@ -260,12 +256,12 @@ public class SynchronizeFolderOperation extends RemoteOperation {
|
||||||
* retrieved.
|
* retrieved.
|
||||||
* @return 'True' when any change was made in the local data, 'false' otherwise.
|
* @return 'True' when any change was made in the local data, 'false' otherwise.
|
||||||
*/
|
*/
|
||||||
private void synchronizeData(ArrayList<RemoteFile> folderAndFiles, OwnCloudClient client) {
|
private void synchronizeData(ArrayList<Object> folderAndFiles, OwnCloudClient client) {
|
||||||
// get 'fresh data' from the database
|
// get 'fresh data' from the database
|
||||||
mLocalFolder = mStorageManager.getFileByPath(mLocalFolder.getRemotePath());
|
mLocalFolder = mStorageManager.getFileByPath(mLocalFolder.getRemotePath());
|
||||||
|
|
||||||
// parse data from remote folder
|
// parse data from remote folder
|
||||||
OCFile remoteFolder = fillOCFile(folderAndFiles.get(0));
|
OCFile remoteFolder = fillOCFile((RemoteFile)folderAndFiles.get(0));
|
||||||
remoteFolder.setParentId(mLocalFolder.getParentId());
|
remoteFolder.setParentId(mLocalFolder.getParentId());
|
||||||
remoteFolder.setFileId(mLocalFolder.getFileId());
|
remoteFolder.setFileId(mLocalFolder.getFileId());
|
||||||
|
|
||||||
|
@ -285,7 +281,7 @@ public class SynchronizeFolderOperation extends RemoteOperation {
|
||||||
OCFile remoteFile = null, localFile = null;
|
OCFile remoteFile = null, localFile = null;
|
||||||
for (int i=1; i<folderAndFiles.size(); i++) {
|
for (int i=1; i<folderAndFiles.size(); i++) {
|
||||||
/// new OCFile instance with the data from the server
|
/// new OCFile instance with the data from the server
|
||||||
remoteFile = fillOCFile(folderAndFiles.get(i));
|
remoteFile = fillOCFile((RemoteFile)folderAndFiles.get(i));
|
||||||
remoteFile.setParentId(mLocalFolder.getFileId());
|
remoteFile.setParentId(mLocalFolder.getFileId());
|
||||||
|
|
||||||
/// retrieve local data for the read file
|
/// retrieve local data for the read file
|
||||||
|
|
|
@ -933,13 +933,7 @@ OCFileListFragment.ContainerActivity, FileDetailFragment.ContainerActivity, OnNa
|
||||||
RemoteOperationResult synchResult = (RemoteOperationResult)intent.getSerializableExtra(FileSyncService.SYNC_RESULT);
|
RemoteOperationResult synchResult = (RemoteOperationResult)intent.getSerializableExtra(FileSyncService.SYNC_RESULT);
|
||||||
|
|
||||||
if (getAccount() != null && accountName.equals(getAccount().name)
|
if (getAccount() != null && accountName.equals(getAccount().name)
|
||||||
&& mStorageManager != null
|
&& mStorageManager != null) {
|
||||||
) {
|
|
||||||
|
|
||||||
/// get the shared files
|
|
||||||
if (isSharedSupported()) {
|
|
||||||
startGetShares();
|
|
||||||
}
|
|
||||||
|
|
||||||
String synchFolderRemotePath = intent.getStringExtra(FileSyncService.SYNC_FOLDER_REMOTE_PATH);
|
String synchFolderRemotePath = intent.getStringExtra(FileSyncService.SYNC_FOLDER_REMOTE_PATH);
|
||||||
|
|
||||||
|
@ -971,6 +965,10 @@ OCFileListFragment.ContainerActivity, FileDetailFragment.ContainerActivity, OnNa
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mRefreshSharesInProgress) {
|
if (!mRefreshSharesInProgress) {
|
||||||
|
/// get the shared files
|
||||||
|
if (isSharedSupported()) {
|
||||||
|
startGetShares();
|
||||||
|
}
|
||||||
setSupportProgressBarIndeterminateVisibility(inProgress);
|
setSupportProgressBarIndeterminateVisibility(inProgress);
|
||||||
} else {
|
} else {
|
||||||
setSupportProgressBarIndeterminateVisibility(true);
|
setSupportProgressBarIndeterminateVisibility(true);
|
||||||
|
|
Loading…
Reference in a new issue