forked from hush/SilentDragonAndroid
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
310 B
9 lines
310 B
package cash.z.ecc.android.ext
|
|
|
|
import androidx.fragment.app.Fragment
|
|
|
|
/**
|
|
* A safer alternative to [Fragment.requireContext], as it avoids leaking Fragment or Activity context
|
|
* when Application context is often sufficient.
|
|
*/
|
|
fun Fragment.requireApplicationContext() = requireContext().applicationContext
|
|
|