Skip to content

Commit

Permalink
chore: Create a method to return a callback
Browse files Browse the repository at this point in the history
  • Loading branch information
tevincent committed Dec 3, 2024
1 parent 538887f commit c125000
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,15 @@ fun FilesDetailsScreen(
)
}

private fun getOnFileRemoveCallback(
withFileDelete: Boolean,
importFilesViewModel: ImportFilesViewModel,
): ((String) -> Unit)? {
return if (withFileDelete) {
{ importFilesViewModel.removeFileByUid(it) }
} else null
}

@Composable
private fun FilesDetailsScreen(
title: String = "",
Expand Down

0 comments on commit c125000

Please sign in to comment.