Skip to content

Commit 2b4abf1

Browse files
committed
add click listeners - open status
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
1 parent 7573b08 commit 2b4abf1

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

app/src/main/java/com/nextcloud/talk/ui/dialog/ChooseAccountDialogFragment.kt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ class ChooseAccountDialogFragment : DialogFragment() {
205205
}
206206
if (isStatusAvailable) {
207207
TextButton(
208-
onClick = { },
208+
onClick = { openStatus() },
209209
enabled = status != null,
210210
modifier = Modifier.fillMaxWidth()
211211
) {
@@ -327,6 +327,15 @@ class ChooseAccountDialogFragment : DialogFragment() {
327327
dismiss()
328328
}
329329

330+
private fun openStatus() {
331+
dismiss()
332+
status?.let {
333+
val setStatusDialog = SetStatusDialogFragment.newInstance(it)
334+
setStatusDialog.show(parentFragmentManager, "fragment_set_status")
335+
} ?: Log.w(TAG, "status was null")
336+
}
337+
338+
330339

331340
@Composable
332341
private fun StatusIndicator(modifier: Modifier = Modifier) {

0 commit comments

Comments
 (0)