use current account

wrong nc14 check
This commit is contained in:
tobiasKaminsky 2018-05-23 13:37:56 +02:00 committed by AndyScherzinger
parent 256bd6baa2
commit 56ab910e41
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B

View file

@ -352,12 +352,12 @@ public abstract class DrawerActivity extends ToolbarActivity implements DisplayU
navigationView.getMenu().removeItem(R.id.nav_videos);
}
if (getAccount() != null) {
FileDataStorageManager storageManager = new FileDataStorageManager(getAccount(), getContentResolver());
OCCapability capability = storageManager.getCapability(getAccount().name);
if (account != null) {
FileDataStorageManager storageManager = new FileDataStorageManager(account, getContentResolver());
OCCapability capability = storageManager.getCapability(account.name);
if (ownCloudVersion.compareTo(OwnCloudVersion.nextcloud_14) < 0 &&
(capability.getFilesUndelete().isFalse() || capability.getFilesUndelete().isUnknown())) {
if (ownCloudVersion.compareTo(OwnCloudVersion.nextcloud_14) < 0 ||
capability.getFilesUndelete().isFalse() || capability.getFilesUndelete().isUnknown()) {
navigationView.getMenu().removeItem(R.id.nav_trashbin);
}
}