Skip to content

Commit

Permalink
Merge pull request #4689 from Isira-Seneviratne/Replace
Browse files Browse the repository at this point in the history
refactor: Use replace extension
  • Loading branch information
Isira-Seneviratne authored Sep 4, 2023
2 parents 92ef157 + a9407c3 commit fcad926
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,8 @@ object NavigationHelper {
fun startAudioPlayer(context: Context, minimizeByDefault: Boolean = false) {
val activity = ContextHelper.unwrapActivity(context)
activity.supportFragmentManager.commitNow {
val audioPlayerFragment = AudioPlayerFragment().apply {
arguments = bundleOf(IntentData.minimizeByDefault to minimizeByDefault)
}
replace(R.id.container, audioPlayerFragment)
val args = bundleOf(IntentData.minimizeByDefault to minimizeByDefault)
replace<AudioPlayerFragment>(R.id.container, args = args)
}
}

Expand Down

0 comments on commit fcad926

Please sign in to comment.