fix: paste

This commit is contained in:
Kagura 2024-10-20 15:11:23 +08:00
parent de105d7cb7
commit c77338948e
4 changed files with 4 additions and 4 deletions

View file

@ -170,7 +170,7 @@ class document_page : AppCompatActivity() {
}
val name = uri.path?.split('/')?.last() ?: "somePastedItem"
val ext = name.split('.').last()
if (!"$ext.".matches(regex)) {
if (!".$ext".matches(regex)) {
Toast.makeText(this, getString(R.string.error_nothing_to_paste), Toast.LENGTH_SHORT)
.show()
return@showItemAlert

View file

@ -151,7 +151,7 @@ class music_page : AppCompatActivity() {
}
val name = uri.path?.split('/')?.last() ?: "somePastedItem"
val ext = name.split('.').last()
if (!"$ext.".matches(MusicLister.regex)) {
if (!".$ext".matches(MusicLister.regex)) {
Toast.makeText(this, getString(R.string.error_nothing_to_paste), Toast.LENGTH_SHORT)
.show()
return@showItemAlert

View file

@ -152,7 +152,7 @@ class picture_page : AppCompatActivity() {
}
val name = uri.path?.split('/')?.last() ?: "somePastedItem"
val ext = name.split('.').last()
if (!"$ext.".matches(ImageLister.regex)) {
if (!".$ext".matches(ImageLister.regex)) {
Toast.makeText(this, getString(R.string.error_nothing_to_paste), Toast.LENGTH_SHORT)
.show()
return@showItemAlert

View file

@ -151,7 +151,7 @@ class video_page : AppCompatActivity() {
}
val name = uri.path?.split('/')?.last() ?: "somePastedItem"
val ext = name.split('.').last()
if (!"$ext.".matches(VideoLister.regex)) {
if (!".$ext".matches(VideoLister.regex)) {
Toast.makeText(this, getString(R.string.error_nothing_to_paste), Toast.LENGTH_SHORT)
.show()
return@showItemAlert