AmazeFileManager
AmazeFileManager copied to clipboard
Show EditText warning when renaming a folder to its original name
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:
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.
@VishnuSanal @EmmanuelMess I have raised a pr for the above issue can you please have a look.