mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-11 17:48:23 +00:00
Add 50 dp buffer to isScrolledToBottom (#1228)
This commit is contained in:
@@ -4,8 +4,6 @@ import android.content.Context
|
||||
import android.util.TypedValue
|
||||
import androidx.annotation.AttrRes
|
||||
import androidx.annotation.ColorInt
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import kotlin.math.max
|
||||
|
||||
@ColorInt
|
||||
fun Context.getColorFromAttr(
|
||||
@@ -16,6 +14,3 @@ fun Context.getColorFromAttr(
|
||||
theme.resolveAttribute(attrColor, typedValue, resolveRefs)
|
||||
return typedValue.data
|
||||
}
|
||||
|
||||
val RecyclerView.isScrolledToBottom: Boolean
|
||||
get() = max(0, computeVerticalScrollOffset()) + computeVerticalScrollExtent() >= computeVerticalScrollRange()
|
||||
|
Reference in New Issue
Block a user