AmazeFileManager icon indicating copy to clipboard operation
AmazeFileManager copied to clipboard

Show EditText warning when renaming a folder to its original name

Open EmmanuelMess opened this issue 4 months ago • 2 comments

When renaming a folder to its current name, a warning should appear under the EditText, as shown in this image but using the text at R.string.no_changes_while_rename:

Image

EmmanuelMess avatar Jul 03 '26 20:07 EmmanuelMess

I'd like to take this one. I have a local branch with a draft fix:

  • Adds a STATE_WARNING branch to the existing validator lambda in MainFragment.rename(...)(src/main/java/com/amaze/filemanager/ui/fragments/MainFragment.java) that returns R.string.no_changes_while_rename whenever the typed text equals the original f.getName(...). This slots into the pattern already used by mkfile for the hidden-file / .txt-extension warnings, so it renders inline under the EditText via WarnableTextInputLayout — matching your referenced screenshot.
  • No string-resource changes (the existing no_changes_while_while_rename string is reused).
  • I'll keep the existing Toast fallback in MainActivityHelper.rename as a backend safety net (happy to remove it if you'd prefer the purely-inline experience).

@EmmanuelMess Could you assign this to me? I'll open the PR once the branch is ready.

SajalDevX avatar Jul 09 '26 02:07 SajalDevX

@VishnuSanal @EmmanuelMess I have raised a pr for the above issue can you please have a look.

SajalDevX avatar Jul 10 '26 04:07 SajalDevX