Skip to content

Commit

Permalink
Fix create with plain edit -> direct edit flow
Browse files Browse the repository at this point in the history
Signed-off-by: Álvaro Brey <[email protected]>
  • Loading branch information
AlvaroBrey committed Mar 7, 2023
1 parent 9dba0d4 commit 07890ed
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,6 @@ public void changeMode(@NonNull Mode mode, boolean reloadNote) {
launchExistingNote(getAccountId(), getNoteId(), getString(R.string.pref_value_mode_preview), reloadNote);
break;
case DIRECT_EDIT:
// TODO deal with note not created yet on server (e.g. when creating a new note in edit mode and switching to direct edit)
launchExistingNote(getAccountId(), getNoteId(), getString(R.string.pref_value_mode_direct_edit), reloadNote);
break;
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
ExtendedFabUtil.toggleExtendedOnLongClick(directEditingButton);
directEditingButton.setOnClickListener(v -> {
if (listener != null) {
listener.changeMode(NoteFragmentListener.Mode.DIRECT_EDIT, true);
listener.changeMode(NoteFragmentListener.Mode.DIRECT_EDIT, false);
}
});
} else {
Expand Down

0 comments on commit 07890ed

Please sign in to comment.