diff options
author | Stefan Niedermann <info@niedermann.it> | 2020-05-09 18:08:17 +0300 |
---|---|---|
committer | Stefan Niedermann <info@niedermann.it> | 2020-05-09 18:08:17 +0300 |
commit | d4a25e9ef04bbebda8324bb8d059a3b7717f6989 (patch) | |
tree | f773ee243042d62e3dfa1388a39f46f9e2d36f15 /app/src/main/java/it/niedermann/nextcloud/deck/ui/card/EditActivity.java | |
parent | 11f7cbe73274e6bbfda2a05c12e9a735b31707d2 (diff) |
#423 Handle too old server version
- ArchivedBoardsActivity
Diffstat (limited to 'app/src/main/java/it/niedermann/nextcloud/deck/ui/card/EditActivity.java')
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/ui/card/EditActivity.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/EditActivity.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/EditActivity.java index fe2753d54..b9271cab8 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/EditActivity.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/EditActivity.java @@ -103,13 +103,11 @@ public class EditActivity extends BrandedActivity { } final long boardId = args.getLong(BUNDLE_KEY_BOARD_ID); - viewModel.setSupportedVersion(account.getServerDeckVersionAsObject().isSupported(this)); - observeOnce(syncManager.getFullBoardById(account.getId(), boardId), EditActivity.this, (fullBoard -> { viewModel.setCanEdit(fullBoard.getBoard().isPermissionEdit()); invalidateOptionsMenu(); if (viewModel.isCreateMode()) { - viewModel.initializeNewCard(account, boardId, args.getLong(BUNDLE_KEY_STACK_ID)); + viewModel.initializeNewCard(account, boardId, args.getLong(BUNDLE_KEY_STACK_ID), account.getServerDeckVersionAsObject().isSupported(this)); String title = args.getString(BUNDLE_KEY_TITLE); if (!TextUtils.isEmpty(title)) { if (title.length() > viewModel.getAccount().getServerDeckVersionAsObject().getCardTitleMaxLength()) { @@ -122,7 +120,7 @@ public class EditActivity extends BrandedActivity { setupTitle(); } else { observeOnce(syncManager.getCardByLocalId(account.getId(), cardId), EditActivity.this, (fullCard) -> { - viewModel.initializeExistingCard(account, boardId, fullCard); + viewModel.initializeExistingCard(account, boardId, fullCard, account.getServerDeckVersionAsObject().isSupported(this)); setupViewPager(); setupTitle(); }); |