From f119de43b78f6eeffad5cdd8170d0a744a01a2f6 Mon Sep 17 00:00:00 2001 From: ericdecanini Date: Wed, 17 Aug 2022 21:12:08 +0200 Subject: [PATCH] Adds explore rooms option to new chat bottom sheet --- .../home/room/list/home/NewChatBottomSheet.kt | 6 +++- vector/src/main/res/drawable/ic_chat.xml | 10 ++++++ vector/src/main/res/drawable/ic_room_add.xml | 10 ++++++ .../src/main/res/drawable/ic_room_explore.xml | 14 +++++++++ .../layout/fragment_new_chat_bottom_sheet.xml | 31 +++++++++++++++---- 5 files changed, 64 insertions(+), 7 deletions(-) create mode 100644 vector/src/main/res/drawable/ic_chat.xml create mode 100644 vector/src/main/res/drawable/ic_room_add.xml create mode 100644 vector/src/main/res/drawable/ic_room_explore.xml diff --git a/vector/src/main/java/im/vector/app/features/home/room/list/home/NewChatBottomSheet.kt b/vector/src/main/java/im/vector/app/features/home/room/list/home/NewChatBottomSheet.kt index 93558f0d9d..05b86f7393 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/list/home/NewChatBottomSheet.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/list/home/NewChatBottomSheet.kt @@ -45,7 +45,11 @@ class NewChatBottomSheet @Inject constructor() : BottomSheetDialogFragment() { } binding.createRoom.setOnClickListener { - navigator.openCreateRoom(requireActivity(), "") + navigator.openCreateRoom(requireActivity()) + } + + binding.exploreRooms.setOnClickListener { + navigator.openRoomDirectory(requireContext()) } } diff --git a/vector/src/main/res/drawable/ic_chat.xml b/vector/src/main/res/drawable/ic_chat.xml new file mode 100644 index 0000000000..fb10eae9c9 --- /dev/null +++ b/vector/src/main/res/drawable/ic_chat.xml @@ -0,0 +1,10 @@ + + + diff --git a/vector/src/main/res/drawable/ic_room_add.xml b/vector/src/main/res/drawable/ic_room_add.xml new file mode 100644 index 0000000000..8404ff2181 --- /dev/null +++ b/vector/src/main/res/drawable/ic_room_add.xml @@ -0,0 +1,10 @@ + + + diff --git a/vector/src/main/res/drawable/ic_room_explore.xml b/vector/src/main/res/drawable/ic_room_explore.xml new file mode 100644 index 0000000000..9811a09054 --- /dev/null +++ b/vector/src/main/res/drawable/ic_room_explore.xml @@ -0,0 +1,14 @@ + + + + diff --git a/vector/src/main/res/layout/fragment_new_chat_bottom_sheet.xml b/vector/src/main/res/layout/fragment_new_chat_bottom_sheet.xml index 266f5d7213..af6f00cb9f 100644 --- a/vector/src/main/res/layout/fragment_new_chat_bottom_sheet.xml +++ b/vector/src/main/res/layout/fragment_new_chat_bottom_sheet.xml @@ -1,31 +1,50 @@ + android:textColor="?vctr_content_primary" + android:textSize="16sp" + app:drawableStartCompat="@drawable/ic_chat" /> + android:textColor="?vctr_content_primary" + android:textSize="16sp" + app:drawableStartCompat="@drawable/ic_room_add" /> + +