ensure buttons won't overlap

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2023-02-08 10:59:45 +01:00
parent ddc5c06d71
commit 5dfbb83375
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
2 changed files with 5 additions and 2 deletions

View file

@ -689,7 +689,7 @@ class ChatController(args: Bundle) :
if (layoutManager!!.findFirstCompletelyVisibleItemPosition() > 0) {
binding?.scrollDownButton?.visibility = View.VISIBLE
} else {
binding?.scrollDownButton?.visibility = View.INVISIBLE
binding?.scrollDownButton?.visibility = View.GONE
}
if (newMessagesCount != 0 && layoutManager != null) {
@ -2446,6 +2446,7 @@ class ChatController(args: Bundle) :
if (!shouldAddNewMessagesNotice && !shouldScroll) {
if (!binding?.popupBubbleView?.isShown!!) {
newMessagesCount = 1
binding?.scrollDownButton?.visibility = View.GONE
binding?.popupBubbleView?.show()
} else if (binding?.popupBubbleView?.isShown!!) {
newMessagesCount++

View file

@ -105,8 +105,10 @@
android:layout_marginEnd="64dp"
android:layout_marginBottom="16dp"
android:minHeight="@dimen/min_size_clickable_area"
android:layout_toStartOf="@+id/scrollDownButton"
android:text="@string/nc_new_messages"
app:background="@color/colorPrimary"
android:ellipsize="middle"
app:cornerRadius="@dimen/button_corner_radius"
app:icon="@drawable/ic_baseline_arrow_downward_24px" />
@ -123,7 +125,7 @@
android:contentDescription="@string/scroll_to_bottom"
android:paddingStart="@dimen/standard_padding"
android:paddingEnd="@dimen/standard_padding"
android:visibility="visible"
android:visibility="gone"
app:cornerRadius="@dimen/button_corner_radius"
app:icon="@drawable/ic_keyboard_double_arrow_down"
app:iconPadding="0dp"