Remove unused fragment param

This commit is contained in:
tzugen 2023-06-01 23:21:43 +02:00
parent e35a33edde
commit 3bd3607220
No known key found for this signature in database
GPG Key ID: 61E9C34BC10EC930
2 changed files with 3 additions and 4 deletions

View File

@ -46,7 +46,7 @@ class DownloadHandler(
var successString: String? = null
// Launch the Job
executeTaskWithToast(fragment, {
executeTaskWithToast({
val tracksToDownload: List<Track> = tracks
?: getTracksFromServer(isArtist, id!!, isDirectory, name, isShare)
@ -104,7 +104,7 @@ class DownloadHandler(
) {
var successString: String? = null
// Launch the Job
executeTaskWithToast(fragment, {
executeTaskWithToast({
val songs: MutableList<Track> =
getTracksFromServer(isArtist, id, isDirectory, name, isShare)

View File

@ -31,7 +31,6 @@ object CoroutinePatterns {
}
fun CoroutineScope.executeTaskWithToast(
fragment: Fragment,
task: suspend CoroutineScope.() -> Unit,
successString: () -> String?
): Job {
@ -63,7 +62,7 @@ fun CoroutineScope.executeTaskWithModalDialog(
successString: () -> String
) {
// Create the job
val job = executeTaskWithToast(fragment, task, successString)
val job = executeTaskWithToast(task, successString)
// Create the dialog
val builder = InfoDialog.Builder(fragment.requireContext())