Skip to content

Commit

Permalink
Trim edited names
Browse files Browse the repository at this point in the history
  • Loading branch information
andreynovikov committed Feb 26, 2024
1 parent 802f967 commit 08ff65a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
if (Boolean.TRUE.equals(viewModel.editorMode.getValue())) {
Editable text = viewBinding.nameEdit.getText();
if (text != null)
place.name = text.toString();
place.name = text.toString().trim();
text = viewBinding.descriptionEdit.getText();
if (text != null)
place.description = text.toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ public void onChanged(Boolean enabled) {
mFragmentHolder.enableListActionButton(R.drawable.ic_done, v -> {
Editable text = viewBinding.nameEdit.getText();
if (text != null)
track.name = text.toString();
track.name = text.toString().trim();
track.style.color = viewBinding.colorSwatch.getColor();
mListener.onTrackSave(track);
viewModel.editorMode.setValue(false);
Expand Down

0 comments on commit 08ff65a

Please sign in to comment.