Skip to content

Commit 7cdb429

Browse files
notifying user when no name change
1 parent afc9822 commit 7cdb429

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

app/src/main/java/com/amaze/filemanager/utils/MainActivityHelper.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,9 @@ public void rename(
347347
newFile = new HybridFile(mode, newPath, newName, isDirectory);
348348
}
349349
if (oldFile.getSimpleName().equals(newFile.getSimpleName())) {
350+
Toast.makeText(
351+
context, context.getString(R.string.no_changes_while_rename), Toast.LENGTH_SHORT)
352+
.show();
350353
return;
351354
}
352355
final Toast toast =

app/src/main/res/values/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@
284284
<string name="creatingfile">Creating File</string>
285285
<string name="creatingfolder">Creating Folder</string>
286286
<string name="renaming">Renaming</string>
287+
<string name="no_changes_while_rename">No changes were made as the new name matches the old name.</string>
287288
<string name="cant_be_empty">%s cannot be empty</string>
288289
<string name="ip">Address</string>
289290
<string name="connection_name">Connection name</string>

0 commit comments

Comments
 (0)