mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-15 08:45:04 +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.AbsListView
|
||||||
import android.widget.FrameLayout
|
import android.widget.FrameLayout
|
||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
|
import android.widget.LinearLayout
|
||||||
import android.widget.PopupMenu
|
import android.widget.PopupMenu
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import androidx.activity.OnBackPressedCallback
|
import androidx.activity.OnBackPressedCallback
|
||||||
@ -1153,8 +1154,8 @@ class ChatActivity :
|
|||||||
binding.outOfOfficeContainer.findViewById<TextView>(R.id.replacement_user_name).text =
|
binding.outOfOfficeContainer.findViewById<TextView>(R.id.replacement_user_name).text =
|
||||||
uiState.userAbsence.replacementUserDisplayName
|
uiState.userAbsence.replacementUserDisplayName
|
||||||
} else {
|
} else {
|
||||||
binding.outOfOfficeContainer.findViewById<TextView>(R.id.absenceReplacement).visibility =
|
binding.outOfOfficeContainer.findViewById<LinearLayout>(R.id.userAbsenceReplacement)
|
||||||
View.GONE
|
.visibility = View.GONE
|
||||||
}
|
}
|
||||||
binding.outOfOfficeContainer.findViewById<TextView>(R.id.userAbsenceLongMessage).text =
|
binding.outOfOfficeContainer.findViewById<TextView>(R.id.userAbsenceLongMessage).text =
|
||||||
uiState.userAbsence.message
|
uiState.userAbsence.message
|
||||||
|
@ -771,6 +771,7 @@ class ChatViewModel @Inject constructor(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("Detekt.TooGenericExceptionCaught")
|
||||||
fun outOfOfficeStatusOfUser(credentials: String, baseUrl: String, userId: String) {
|
fun outOfOfficeStatusOfUser(credentials: String, baseUrl: String, userId: String) {
|
||||||
viewModelScope.launch {
|
viewModelScope.launch {
|
||||||
try {
|
try {
|
||||||
|
@ -5,12 +5,19 @@
|
|||||||
~ SPDX-FileCopyrightText: 2024 Sowjanya Kota <sowjanya.kch@gmail.com>
|
~ SPDX-FileCopyrightText: 2024 Sowjanya Kota <sowjanya.kch@gmail.com>
|
||||||
~ SPDX-License-Identifier: GPL-3.0-or-later
|
~ SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
-->
|
-->
|
||||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_height="150dp"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
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
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -45,6 +52,7 @@
|
|||||||
tools:text="Dec 5, 2024 - Dec 15, 2024"/>
|
tools:text="Dec 5, 2024 - Dec 15, 2024"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/userAbsenceReplacement"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
@ -102,3 +110,4 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
Loading…
Reference in New Issue
Block a user