Skip to content

Commit

Permalink
Remove tailrec as this is not a tailrec function
Browse files Browse the repository at this point in the history
  • Loading branch information
wmontwe committed Jan 9, 2025
1 parent 04b95c6 commit 6fd8261
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ import android.content.Context
import android.content.ContextWrapper

// Source: https://stackoverflow.com/a/58249983
tailrec fun Context.findActivity(): Activity? = this as? Activity
fun Context?.findActivity(): Activity? = this as? Activity
?: (this as? ContextWrapper)?.baseContext?.findActivity()

0 comments on commit 6fd8261

Please sign in to comment.