fix: paste
This commit is contained in:
parent
eacb4abddd
commit
de105d7cb7
3 changed files with 6 additions and 3 deletions
|
@ -25,6 +25,7 @@ import com.dazuoye.filemanager.fileSystem.adapters.MusicModel
|
||||||
import com.dazuoye.filemanager.compose.SearchActivity
|
import com.dazuoye.filemanager.compose.SearchActivity
|
||||||
import com.dazuoye.filemanager.fileSystem.CutHelper
|
import com.dazuoye.filemanager.fileSystem.CutHelper
|
||||||
import com.dazuoye.filemanager.fileSystem.byTypeFileLister.DocumentLister
|
import com.dazuoye.filemanager.fileSystem.byTypeFileLister.DocumentLister
|
||||||
|
import com.dazuoye.filemanager.fileSystem.byTypeFileLister.MusicLister
|
||||||
import com.dazuoye.filemanager.fileSystem.byTypeFileLister.MusicLister.Companion.instance
|
import com.dazuoye.filemanager.fileSystem.byTypeFileLister.MusicLister.Companion.instance
|
||||||
import com.dazuoye.filemanager.utils.AlertHelper
|
import com.dazuoye.filemanager.utils.AlertHelper
|
||||||
import com.dazuoye.filemanager.utils.ClipHelper
|
import com.dazuoye.filemanager.utils.ClipHelper
|
||||||
|
@ -150,7 +151,7 @@ class music_page : AppCompatActivity() {
|
||||||
}
|
}
|
||||||
val name = uri.path?.split('/')?.last() ?: "somePastedItem"
|
val name = uri.path?.split('/')?.last() ?: "somePastedItem"
|
||||||
val ext = name.split('.').last()
|
val ext = name.split('.').last()
|
||||||
if (!"$ext.".matches(DocumentLister.regex)) {
|
if (!"$ext.".matches(MusicLister.regex)) {
|
||||||
Toast.makeText(this, getString(R.string.error_nothing_to_paste), Toast.LENGTH_SHORT)
|
Toast.makeText(this, getString(R.string.error_nothing_to_paste), Toast.LENGTH_SHORT)
|
||||||
.show()
|
.show()
|
||||||
return@showItemAlert
|
return@showItemAlert
|
||||||
|
|
|
@ -24,6 +24,7 @@ import com.dazuoye.filemanager.fileSystem.adapters.ImageModel
|
||||||
import com.dazuoye.filemanager.compose.SearchActivity
|
import com.dazuoye.filemanager.compose.SearchActivity
|
||||||
import com.dazuoye.filemanager.fileSystem.CutHelper
|
import com.dazuoye.filemanager.fileSystem.CutHelper
|
||||||
import com.dazuoye.filemanager.fileSystem.byTypeFileLister.DocumentLister
|
import com.dazuoye.filemanager.fileSystem.byTypeFileLister.DocumentLister
|
||||||
|
import com.dazuoye.filemanager.fileSystem.byTypeFileLister.ImageLister
|
||||||
import com.dazuoye.filemanager.fileSystem.byTypeFileLister.ImageLister.Companion.instance
|
import com.dazuoye.filemanager.fileSystem.byTypeFileLister.ImageLister.Companion.instance
|
||||||
import com.dazuoye.filemanager.utils.AlertHelper
|
import com.dazuoye.filemanager.utils.AlertHelper
|
||||||
import com.dazuoye.filemanager.utils.ClipHelper
|
import com.dazuoye.filemanager.utils.ClipHelper
|
||||||
|
@ -151,7 +152,7 @@ class picture_page : AppCompatActivity() {
|
||||||
}
|
}
|
||||||
val name = uri.path?.split('/')?.last() ?: "somePastedItem"
|
val name = uri.path?.split('/')?.last() ?: "somePastedItem"
|
||||||
val ext = name.split('.').last()
|
val ext = name.split('.').last()
|
||||||
if (!"$ext.".matches(DocumentLister.regex)) {
|
if (!"$ext.".matches(ImageLister.regex)) {
|
||||||
Toast.makeText(this, getString(R.string.error_nothing_to_paste), Toast.LENGTH_SHORT)
|
Toast.makeText(this, getString(R.string.error_nothing_to_paste), Toast.LENGTH_SHORT)
|
||||||
.show()
|
.show()
|
||||||
return@showItemAlert
|
return@showItemAlert
|
||||||
|
|
|
@ -24,6 +24,7 @@ import com.dazuoye.filemanager.fileSystem.adapters.VideoModel
|
||||||
import com.dazuoye.filemanager.compose.SearchActivity
|
import com.dazuoye.filemanager.compose.SearchActivity
|
||||||
import com.dazuoye.filemanager.fileSystem.CutHelper
|
import com.dazuoye.filemanager.fileSystem.CutHelper
|
||||||
import com.dazuoye.filemanager.fileSystem.byTypeFileLister.DocumentLister
|
import com.dazuoye.filemanager.fileSystem.byTypeFileLister.DocumentLister
|
||||||
|
import com.dazuoye.filemanager.fileSystem.byTypeFileLister.VideoLister
|
||||||
import com.dazuoye.filemanager.fileSystem.byTypeFileLister.VideoLister.Companion.instance
|
import com.dazuoye.filemanager.fileSystem.byTypeFileLister.VideoLister.Companion.instance
|
||||||
import com.dazuoye.filemanager.utils.AlertHelper
|
import com.dazuoye.filemanager.utils.AlertHelper
|
||||||
import com.dazuoye.filemanager.utils.ClipHelper
|
import com.dazuoye.filemanager.utils.ClipHelper
|
||||||
|
@ -150,7 +151,7 @@ class video_page : AppCompatActivity() {
|
||||||
}
|
}
|
||||||
val name = uri.path?.split('/')?.last() ?: "somePastedItem"
|
val name = uri.path?.split('/')?.last() ?: "somePastedItem"
|
||||||
val ext = name.split('.').last()
|
val ext = name.split('.').last()
|
||||||
if (!"$ext.".matches(DocumentLister.regex)) {
|
if (!"$ext.".matches(VideoLister.regex)) {
|
||||||
Toast.makeText(this, getString(R.string.error_nothing_to_paste), Toast.LENGTH_SHORT)
|
Toast.makeText(this, getString(R.string.error_nothing_to_paste), Toast.LENGTH_SHORT)
|
||||||
.show()
|
.show()
|
||||||
return@showItemAlert
|
return@showItemAlert
|
||||||
|
|
Loading…
Reference in a new issue