mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-14 16:25:05 +01:00
hide replacement view when there is no replacement set
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
parent
f7078990d9
commit
74bf9f2e91
@ -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,8 +1154,8 @@ class ChatActivity :
|
||||
binding.outOfOfficeContainer.findViewById<TextView>(R.id.replacement_user_name).text =
|
||||
uiState.userAbsence.replacementUserDisplayName
|
||||
} else {
|
||||
binding.outOfOfficeContainer.findViewById<TextView>(R.id.absenceReplacement).visibility =
|
||||
View.GONE
|
||||
binding.outOfOfficeContainer.findViewById<LinearLayout>(R.id.userAbsenceReplacement)
|
||||
.visibility = View.GONE
|
||||
}
|
||||
binding.outOfOfficeContainer.findViewById<TextView>(R.id.userAbsenceLongMessage).text =
|
||||
uiState.userAbsence.message
|
||||
|
@ -771,6 +771,7 @@ class ChatViewModel @Inject constructor(
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("Detekt.TooGenericExceptionCaught")
|
||||
fun outOfOfficeStatusOfUser(credentials: String, baseUrl: String, userId: String) {
|
||||
viewModelScope.launch {
|
||||
try {
|
||||
|
@ -5,12 +5,19 @@
|
||||
~ SPDX-FileCopyrightText: 2024 Sowjanya Kota <sowjanya.kch@gmail.com>
|
||||
~ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_height="150dp"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/out_of_office_view">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:id="@+id/out_of_office_view"
|
||||
app:layout_constraintHeight_min="0dp"
|
||||
app:layout_constraintHeight_max="150dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@ -45,6 +52,7 @@
|
||||
tools:text="Dec 5, 2024 - Dec 15, 2024"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/userAbsenceReplacement"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
@ -101,4 +109,5 @@
|
||||
tools:text="Hi, I am out of office this week. Please contact ....., ..........write very very very very very very very very very very very very very very very long message..................................................................................................................................if you have any issues."/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</ScrollView>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
Loading…
Reference in New Issue
Block a user