diff options
author | Stefan Niedermann <info@niedermann.it> | 2020-12-21 12:55:14 +0300 |
---|---|---|
committer | Niedermann IT-Dienstleistungen <stefan-niedermann@users.noreply.github.com> | 2020-12-21 13:49:02 +0300 |
commit | df35bd087eda1fb6e0bfc32c6710a94cacfc3cee (patch) | |
tree | bb46a747169cdd5ebfb5938ad4f6654980da96b6 /app/src/main | |
parent | e987d1b5b3501c7e0c132df5da8440df7a2a3804 (diff) |
Enhance editor performance by not always rendering the viewer
Signed-off-by: Stefan Niedermann <info@niedermann.it>
Diffstat (limited to 'app/src/main')
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/ui/card/details/CardDetailsFragment.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/details/CardDetailsFragment.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/details/CardDetailsFragment.java index c00decc50..ba24dd754 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/details/CardDetailsFragment.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/details/CardDetailsFragment.java @@ -148,6 +148,7 @@ public class CardDetailsFragment extends BrandedFragment implements OnDateSetLis binding.descriptionViewer.setVisibility(GONE); binding.descriptionToggle.setImageResource(R.drawable.ic_baseline_eye_24); } else { + binding.descriptionViewer.setMarkdownString(viewModel.getFullCard().getCard().getDescription()); binding.descriptionBar.setOnClickListener(null); binding.descriptionEditor.setVisibility(GONE); binding.descriptionViewer.setVisibility(VISIBLE); @@ -158,7 +159,6 @@ public class CardDetailsFragment extends BrandedFragment implements OnDateSetLis binding.descriptionEditor.getMarkdownString().observe(getViewLifecycleOwner(), (newText) -> { if (viewModel.getFullCard() != null) { viewModel.getFullCard().getCard().setDescription(newText == null ? "" : newText.toString()); - binding.descriptionViewer.setMarkdownString(viewModel.getFullCard().getCard().getDescription()); } else { DeckLog.logError(new IllegalStateException(FullCard.class.getSimpleName() + " was empty when trying to setup description")); } |