Fix snackbar in feed screen for tablets

This commit is contained in:
Zakhar Timoshenko
2022-08-06 23:57:44 +03:00
parent e545c8b897
commit 8e08b5003e
7 changed files with 74 additions and 14 deletions

View File

@@ -129,14 +129,6 @@ fun Context.getAnimationDuration(@IntegerRes resId: Int): Long {
return (resources.getInteger(resId) * animatorDurationScale).roundToLong()
}
inline fun <reified T> ViewGroup.findChild(): T? {
return children.find { it is T } as? T
}
inline fun <reified T> ViewGroup.findDescendant(): T? {
return descendants.find { it is T } as? T
}
fun isLowRamDevice(context: Context): Boolean {
return context.activityManager?.isLowRamDevice ?: false
}