Skip to content

Commit

Permalink
renamed callback parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
anggrayudi committed Jun 17, 2024
1 parent a4c54ee commit bd102b6
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 77 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ class MainActivity : AppCompatActivity() {
}
Toast.makeText(this, "Copying...", Toast.LENGTH_SHORT).show()
ioScope.launch {
sources.copyTo(applicationContext, targetFolder, callback = createMultipleFileCallback())
sources.copyTo(applicationContext, targetFolder, onConflict = createMultipleFileCallback())
.onCompletion {
if (it is CancellationException) {
// maybe you want to show to the user that the operation was cancelled
Expand Down Expand Up @@ -336,7 +336,7 @@ class MainActivity : AppCompatActivity() {
}
Toast.makeText(this, "Moving...", Toast.LENGTH_SHORT).show()
ioScope.launch {
sources.moveTo(applicationContext, targetFolder, callback = createMultipleFileCallback())
sources.moveTo(applicationContext, targetFolder, onConflict = createMultipleFileCallback())
.onCompletion {
if (it is CancellationException) {
// maybe you want to show to the user that the operation was cancelled
Expand Down Expand Up @@ -403,7 +403,7 @@ class MainActivity : AppCompatActivity() {
}
Toast.makeText(this, "Copying...", Toast.LENGTH_SHORT).show()
ioScope.launch {
folder.copyFolderTo(applicationContext, targetFolder, false, callback = createFolderCallback())
folder.copyFolderTo(applicationContext, targetFolder, false, onConflict = createFolderCallback())
.onCompletion {
if (it is CancellationException) {
// maybe you want to show to the user that the operation was cancelled
Expand Down Expand Up @@ -451,7 +451,7 @@ class MainActivity : AppCompatActivity() {
}
Toast.makeText(this, "Moving...", Toast.LENGTH_SHORT).show()
ioScope.launch {
folder.moveFolderTo(applicationContext, targetFolder, false, callback = createFolderCallback())
folder.moveFolderTo(applicationContext, targetFolder, false, onConflict = createFolderCallback())
.onCompletion {
if (it is CancellationException) {
// maybe you want to show to the user that the operation was cancelled
Expand Down Expand Up @@ -513,7 +513,7 @@ class MainActivity : AppCompatActivity() {
val targetFolder = binding.layoutCopyFileTargetFolder.tvFilePath.tag as DocumentFile
Toast.makeText(this, "Copying...", Toast.LENGTH_SHORT).show()
ioScope.launch {
file.copyFileTo(applicationContext, targetFolder, callback = createFileCallback())
file.copyFileTo(applicationContext, targetFolder, onConflict = createFileCallback())
.onCompletion {
if (it is CancellationException) {
// maybe you want to show to the user that the operation was cancelled
Expand Down Expand Up @@ -565,7 +565,7 @@ class MainActivity : AppCompatActivity() {
var tvStatus: TextView? = null
var progressBar: ProgressBar? = null

file.moveFileTo(applicationContext, targetFolder, callback = createFileCallback())
file.moveFileTo(applicationContext, targetFolder, onConflict = createFileCallback())
.onCompletion {
if (it is CancellationException) {
// maybe you want to show to the user that the operation was cancelled
Expand Down
Loading

0 comments on commit bd102b6

Please sign in to comment.