Update app/src/main/java/com/owncloud/android/ui/dialog/RenameFileDialogFragment.kt

Co-authored-by: Tom <70907959+ZetaTom@users.noreply.github.com>
Signed-off-by: Tobias Kaminsky <tobias@nextcloud.com>
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
Tobias Kaminsky 2024-10-24 09:48:14 +02:00 committed by tobiasKaminsky
parent 9e45aedc7a
commit dc1d5dfa19
No known key found for this signature in database
GPG key ID: 0E00D4D47D0C5AF7
2 changed files with 3 additions and 3 deletions

View file

@ -197,8 +197,8 @@ class RenameFileDialogFragment : DialogFragment(), DialogInterface.OnClickListen
override fun afterTextChanged(s: Editable) = Unit override fun afterTextChanged(s: Editable) = Unit
private fun checkExtensionRenamed(newFileName: String): Boolean { private fun checkExtensionRenamed(newFileName: String): Boolean {
mTargetFile?.fileName?.let { mTargetFile?.fileName?.let { previousFileName ->
val previousExtension = File(it).extension val previousExtension = File(previousFileName).extension
val newExtension = File(newFileName).extension val newExtension = File(newFileName).extension
return previousExtension != newExtension return previousExtension != newExtension

View file

@ -1273,5 +1273,5 @@
<string name="two_way_sync_activity_title">Internal two way sync</string> <string name="two_way_sync_activity_title">Internal two way sync</string>
<string name="two_way_sync_activity_disable_all_button_title">Disable for all folders</string> <string name="two_way_sync_activity_disable_all_button_title">Disable for all folders</string>
<string name="oc_file_list_adapter_offline_operation_remove_description_text">Pending Remove Operation</string> <string name="oc_file_list_adapter_offline_operation_remove_description_text">Pending Remove Operation</string>
<string name="warn_rename_extension">Renaming extension might make the file unusable</string> <string name="warn_rename_extension">Changing the extension might cause this file to open in a different application</string>
</resources> </resources>