From 28c0c48ddd3812a299e719bb75abf009325cf385 Mon Sep 17 00:00:00 2001 From: sowjanyakch Date: Fri, 13 Dec 2024 16:04:45 +0100 Subject: [PATCH] hide replacement view when there is no replacement set Signed-off-by: sowjanyakch --- .../com/nextcloud/talk/chat/ChatActivity.kt | 3 ++- .../main/res/layout/out_of_office_view.xml | 19 ++++++++++++++----- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt b/app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt index 8ab097d09fa..d30127e5dc7 100644 --- a/app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt +++ b/app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt @@ -45,6 +45,7 @@ import android.view.animation.AccelerateDecelerateInterpolator import android.widget.AbsListView import android.widget.FrameLayout import android.widget.ImageView +import android.widget.LinearLayout import android.widget.PopupMenu import android.widget.TextView import androidx.activity.OnBackPressedCallback @@ -1153,7 +1154,7 @@ class ChatActivity : binding.outOfOfficeContainer.findViewById(R.id.replacement_user_name).text = uiState.userAbsence.replacementUserDisplayName } else { - binding.outOfOfficeContainer.findViewById(R.id.absenceReplacement).visibility = + binding.outOfOfficeContainer.findViewById(R.id.userAbsenceReplacement).visibility = View.GONE } binding.outOfOfficeContainer.findViewById(R.id.userAbsenceLongMessage).text = diff --git a/app/src/main/res/layout/out_of_office_view.xml b/app/src/main/res/layout/out_of_office_view.xml index 98c7a885f9f..ed208ee9fc0 100644 --- a/app/src/main/res/layout/out_of_office_view.xml +++ b/app/src/main/res/layout/out_of_office_view.xml @@ -5,12 +5,19 @@ ~ SPDX-FileCopyrightText: 2024 Sowjanya Kota ~ SPDX-License-Identifier: GPL-3.0-or-later --> - + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + - \ No newline at end of file + + \ No newline at end of file