mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 09:39:25 +03:00
Merge pull request #3471 from nextcloud/permissionOnReceiveFiles
Receive files activity: reflect write status
This commit is contained in:
commit
2d02b53176
1 changed files with 10 additions and 0 deletions
|
@ -33,6 +33,7 @@ import android.content.Context;
|
|||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.content.res.Resources.NotFoundException;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
|
@ -784,6 +785,15 @@ public class ReceiveExternalFilesActivity extends FileActivity
|
|||
PorterDuff.Mode.SRC_ATOP);
|
||||
btnChooseFolder.setTextColor(ThemeUtils.fontColor(this));
|
||||
|
||||
if (mFile.canWrite()) {
|
||||
btnChooseFolder.setEnabled(true);
|
||||
ThemeUtils.tintDrawable(btnChooseFolder.getBackground(),
|
||||
ThemeUtils.primaryColor(getAccount(), true, this));
|
||||
} else {
|
||||
btnChooseFolder.setEnabled(false);
|
||||
ThemeUtils.tintDrawable(btnChooseFolder.getBackground(), Color.GRAY);
|
||||
}
|
||||
|
||||
if (getSupportActionBar() != null) {
|
||||
getSupportActionBar().setBackgroundDrawable(new ColorDrawable(
|
||||
ThemeUtils.primaryColor(getAccount(), false, this)));
|
||||
|
|
Loading…
Reference in a new issue