mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 23:28:42 +03:00
Merge pull request #3779 from nextcloud/uploadAfterFolderCreation
ReceiveExternalFiles: fix no upload possible after creation new folder
This commit is contained in:
commit
e2ae6298f1
2 changed files with 20 additions and 18 deletions
|
@ -118,6 +118,7 @@ public class CreateFolderOperation extends SyncOperation implements OnRemoteOper
|
|||
newDir.setRemoteId(createdRemoteFolder.getRemoteId());
|
||||
newDir.setModificationTimestamp(System.currentTimeMillis());
|
||||
newDir.setEncrypted(FileStorageUtils.checkEncryptionStatus(newDir, getStorageManager()));
|
||||
newDir.setPermissions(createdRemoteFolder.getPermissions());
|
||||
getStorageManager().saveFile(newDir);
|
||||
|
||||
Log_OC.d(TAG, "Create directory " + mRemotePath + " in Database");
|
||||
|
|
|
@ -59,12 +59,24 @@ import android.widget.ListView;
|
|||
import android.widget.ProgressBar;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.DrawableRes;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.StringRes;
|
||||
import androidx.appcompat.app.ActionBar;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.appcompat.app.AlertDialog.Builder;
|
||||
import androidx.appcompat.widget.SearchView;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.graphics.drawable.DrawableCompat;
|
||||
import androidx.core.view.MenuItemCompat;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import com.nextcloud.client.preferences.AppPreferences;
|
||||
import com.nextcloud.client.preferences.PreferenceManager;
|
||||
import com.owncloud.android.MainApp;
|
||||
import com.owncloud.android.R;
|
||||
import com.owncloud.android.datamodel.OCFile;
|
||||
import com.nextcloud.client.preferences.PreferenceManager;
|
||||
import com.owncloud.android.files.services.FileUploader;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperation;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
|
||||
|
@ -104,20 +116,6 @@ import java.util.List;
|
|||
import java.util.Stack;
|
||||
import java.util.Vector;
|
||||
|
||||
import androidx.annotation.DrawableRes;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.StringRes;
|
||||
import androidx.appcompat.app.ActionBar;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.appcompat.app.AlertDialog.Builder;
|
||||
import androidx.appcompat.widget.SearchView;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.graphics.drawable.DrawableCompat;
|
||||
import androidx.core.view.MenuItemCompat;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
|
||||
/**
|
||||
* This can be used to upload things to an ownCloud instance.
|
||||
*/
|
||||
|
@ -1064,8 +1062,11 @@ public class ReceiveExternalFilesActivity extends FileActivity
|
|||
}
|
||||
|
||||
// tint search event
|
||||
final MenuItem item = menu.findItem(R.id.action_search);
|
||||
SearchView searchView = (SearchView) MenuItemCompat.getActionView(item);
|
||||
final MenuItem searchMenuItem = menu.findItem(R.id.action_search);
|
||||
SearchView searchView = (SearchView) MenuItemCompat.getActionView(searchMenuItem);
|
||||
|
||||
MenuItem newFolderMenuItem = menu.findItem(R.id.action_create_dir);
|
||||
newFolderMenuItem.setEnabled(mFile.canWrite());
|
||||
|
||||
// hacky as no default way is provided
|
||||
int fontColor = ThemeUtils.fontColor(this);
|
||||
|
|
Loading…
Reference in a new issue