Skip to content

Commit 140ba5d

Browse files
yashwanthgajjiEmmanuelMess
authored andcommitted
notifying user when no name change
1 parent 9a91e87 commit 140ba5d

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
@@ -346,6 +346,9 @@ public void rename(
346346
newFile = new HybridFile(mode, newPath, newName, isDirectory);
347347
}
348348
if (oldFile.getSimpleName().equals(newFile.getSimpleName())) {
349+
Toast.makeText(
350+
context, context.getString(R.string.no_changes_while_rename), Toast.LENGTH_SHORT)
351+
.show();
349352
return;
350353
}
351354
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)