From 2993b3cf12ba2aaad22cae24ddc2923c813ec4b5 Mon Sep 17 00:00:00 2001 From: jhavens1566 Date: Wed, 18 Sep 2024 21:59:22 -0600 Subject: [PATCH] fix: unable to edit from preview mode When direct edit is enabled and note opening behavior is set to either plain edit mode or plain preview the note cannot be edited from the preview fragment. This is because of visibility settings of the two FABs not being set properly. Signed-off-by: jhavens1566 --- .../owncloud/notes/edit/SearchableBaseNoteFragment.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/it/niedermann/owncloud/notes/edit/SearchableBaseNoteFragment.java b/app/src/main/java/it/niedermann/owncloud/notes/edit/SearchableBaseNoteFragment.java index 12d0cf2d..c1da9942 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/edit/SearchableBaseNoteFragment.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/edit/SearchableBaseNoteFragment.java @@ -87,8 +87,11 @@ public abstract class SearchableBaseNoteFragment extends BaseNoteFragment { super.onViewCreated(view, savedInstanceState); checkDirectEditingAvailable(); if (isDirectEditEnabled()) { + ExtendedFloatingActionButton edit = getNormalEditButton(); + if (edit != null) edit.setVisibility(View.GONE); final ExtendedFloatingActionButton directEditingButton = getDirectEditingButton(); directEditingButton.setExtended(false); + directEditingButton.setVisibility(View.VISIBLE); ExtendedFabUtil.toggleExtendedOnLongClick(directEditingButton); directEditingButton.setOnClickListener(v -> { if (listener != null) {