Эх сурвалжийг харах

proof of concept: use conductor with BottomSheetDialog

two approaches are added with this commit (just for testing):

1.for conversationOperationAddFavorite
- replace UI in ConversationOperationDialog
- push another controller via method in ConversationsListController (makes no sense here, but will be useful for other cases)

2. for conversationOperationRemoveFavorite
- hide UI
- introduce another conductor router for dialog
- push new Controller with new router
- fetchData in old controller

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Marcel Hibbe 3 жил өмнө
parent
commit
aedede9ffd

+ 12 - 1
app/src/main/java/com/nextcloud/talk/controllers/ConversationsListController.java

@@ -71,6 +71,7 @@ import com.nextcloud.talk.api.NcApi;
 import com.nextcloud.talk.application.NextcloudTalkApplication;
 import com.nextcloud.talk.application.NextcloudTalkApplication;
 import com.nextcloud.talk.controllers.base.BaseController;
 import com.nextcloud.talk.controllers.base.BaseController;
 import com.nextcloud.talk.controllers.bottomsheet.EntryMenuController;
 import com.nextcloud.talk.controllers.bottomsheet.EntryMenuController;
+import com.nextcloud.talk.controllers.bottomsheet.OperationsMenuController;
 import com.nextcloud.talk.events.BottomSheetLockEvent;
 import com.nextcloud.talk.events.BottomSheetLockEvent;
 import com.nextcloud.talk.events.EventStatus;
 import com.nextcloud.talk.events.EventStatus;
 import com.nextcloud.talk.interfaces.ConversationMenuInterface;
 import com.nextcloud.talk.interfaces.ConversationMenuInterface;
@@ -469,7 +470,7 @@ public class ConversationsListController extends BaseController implements Searc
     }
     }
 
 
     @SuppressLint("LongLogTag")
     @SuppressLint("LongLogTag")
-    private void fetchData(boolean fromBottomSheet) {
+    public void fetchData(boolean fromBottomSheet) {
         dispose(null);
         dispose(null);
 
 
         isRefreshing = true;
         isRefreshing = true;
@@ -1248,6 +1249,16 @@ public class ConversationsListController extends BaseController implements Searc
         }
         }
     }
     }
 
 
+
+    public void pushSomeOtherController(Bundle bundle) {
+
+        getRouter().pushController(
+            RouterTransaction.with(new OperationsMenuController(bundle))
+                .pushChangeHandler(new HorizontalChangeHandler())
+                .popChangeHandler(new HorizontalChangeHandler()));
+
+    }
+
     @Override
     @Override
     public AppBarLayoutType getAppBarLayoutType() {
     public AppBarLayoutType getAppBarLayoutType() {
         return AppBarLayoutType.SEARCH_BAR;
         return AppBarLayoutType.SEARCH_BAR;

+ 167 - 168
app/src/main/java/com/nextcloud/talk/ui/dialog/ConversationOperationDialog.kt

@@ -9,9 +9,10 @@ import androidx.work.Data
 import androidx.work.OneTimeWorkRequest
 import androidx.work.OneTimeWorkRequest
 import androidx.work.WorkManager
 import androidx.work.WorkManager
 import autodagger.AutoInjector
 import autodagger.AutoInjector
+import com.bluelinelabs.conductor.Conductor
+import com.bluelinelabs.conductor.Router
 import com.bluelinelabs.conductor.RouterTransaction
 import com.bluelinelabs.conductor.RouterTransaction
 import com.bluelinelabs.conductor.changehandler.HorizontalChangeHandler
 import com.bluelinelabs.conductor.changehandler.HorizontalChangeHandler
-import com.bluelinelabs.conductor.changehandler.VerticalChangeHandler
 import com.google.android.material.bottomsheet.BottomSheetBehavior
 import com.google.android.material.bottomsheet.BottomSheetBehavior
 import com.google.android.material.bottomsheet.BottomSheetDialog
 import com.google.android.material.bottomsheet.BottomSheetDialog
 import com.nextcloud.talk.R
 import com.nextcloud.talk.R
@@ -41,6 +42,9 @@ class ConversationOperationDialog(
     val conversation: Conversation
     val conversation: Conversation
 ) : BottomSheetDialog(activity) {
 ) : BottomSheetDialog(activity) {
 
 
+    private var dialogRouter: Router? = null
+
+
     private lateinit var binding: DialogConversationOperationsBinding
     private lateinit var binding: DialogConversationOperationsBinding
 
 
     @Inject
     @Inject
@@ -132,173 +136,168 @@ class ConversationOperationDialog(
     }
     }
 
 
     private fun initClickListeners() {
     private fun initClickListeners() {
-        // // val credentials = ApiUtils.getCredentials(currentUser.username, currentUser.token)
-        // // val apiVersion = ApiUtils.getConversationApiVersion(currentUser, intArrayOf(ApiUtils.APIv4, ApiUtils.APIv1))
-        //
-        // binding.conversationOperationAddFavorite.setOnClickListener {
-        //     // TODO: this weird KEY_OPERATION_CODE stuff came from CallMenuController.
-        //     //  CallMenuController was replaced with the class you're in here.
-        //     //  This KEY_OPERATION_CODE stuff still needs to be deleted/rewritten in the classes where it's passed to.
-        //
-        //     val bundle = Bundle()
-        //     bundle.putParcelable(KEY_ROOM, Parcels.wrap(conversation))
-        //     bundle.putInt(KEY_OPERATION_CODE, 98)
-        //
-        //     // controller.router.pushController(
-        //     //     RouterTransaction.with(OperationsMenuController(bundle))
-        //     //         .pushChangeHandler(HorizontalChangeHandler())
-        //     //         .popChangeHandler(HorizontalChangeHandler())
-        //     // )
-        //
-        //
-        //
-        //     // var view = activity.layoutInflater.inflate(R.layout.bottom_sheet, null, true)
-        //     // controller.getChildRouter((view as ViewGroup?)!!).setRoot(
-        //     //     RouterTransaction.with(OperationsMenuController(bundle))
-        //     //         .popChangeHandler(VerticalChangeHandler())
-        //     //         .pushChangeHandler(VerticalChangeHandler())
-        //     // )
-        //
-        //
-        //
-        //     // dismiss()
-        // }
-        //
-        // binding.conversationOperationRemoveFavorite.setOnClickListener {
-        //     // TODO: this weird KEY_OPERATION_CODE stuff came from CallMenuController.
-        //     //  CallMenuController was replaced with the class you're in here.
-        //     //  This KEY_OPERATION_CODE stuff still needs to be deleted/rewritten in the classes where it's passed to.
-        //
-        //     val bundle = Bundle()
-        //     bundle.putParcelable(KEY_ROOM, Parcels.wrap(conversation))
-        //     bundle.putInt(KEY_OPERATION_CODE, 97)
-        //
-        //     controller.router.pushController(
-        //         RouterTransaction.with(OperationsMenuController(bundle))
-        //             .pushChangeHandler(HorizontalChangeHandler())
-        //             .popChangeHandler(HorizontalChangeHandler())
-        //     )
-        //
-        //     dismiss()
-        // }
-        //
-        // binding.conversationOperationClearPassword.setOnClickListener {
-        //     conversation.setPassword("")
-        // }
-        //
-        // binding.conversationOperationLeave.setOnClickListener {
-        //     val dataBuilder = Data.Builder()
-        //     dataBuilder.putString(KEY_ROOM_TOKEN, conversation.getToken())
-        //     dataBuilder.putLong(KEY_INTERNAL_USER_ID, currentUser.id)
-        //     val data = dataBuilder.build()
-        //
-        //     val leaveConversationWorker =
-        //         OneTimeWorkRequest.Builder(LeaveConversationWorker::class.java).setInputData(
-        //             data
-        //         ).build()
-        //     WorkManager.getInstance().enqueue(leaveConversationWorker)
-        //
-        //     dismiss()
-        // }
-        //
-        // binding.conversationOperationDelete.setOnClickListener {
-        //     if (!TextUtils.isEmpty(conversation.getToken())) {
-        //         val bundle = Bundle()
-        //         bundle.putLong(KEY_INTERNAL_USER_ID, currentUser.id)
-        //         bundle.putParcelable(KEY_ROOM, Parcels.wrap(conversation))
-        //
-        //         controller.openLovelyDialogWithIdAndBundle(
-        //             ConversationsListController.ID_DELETE_CONVERSATION_DIALOG,
-        //             bundle
-        //         )
-        //     }
-        //
-        //     dismiss()
-        // }
-        //
-        // binding.conversationOperationMakePublic.setOnClickListener {
-        //     // TODO: this weird KEY_OPERATION_CODE stuff came from CallMenuController.
-        //     //  CallMenuController was replaced with the class you're in here.
-        //     //  This KEY_OPERATION_CODE stuff still needs to be deleted/rewritten in the classes where it's passed to.
-        //
-        //     val bundle = Bundle()
-        //     bundle.putParcelable(KEY_ROOM, Parcels.wrap(conversation))
-        //     bundle.putInt(KEY_OPERATION_CODE, 3)
-        //
-        //     controller.router.pushController(
-        //         RouterTransaction.with(OperationsMenuController(bundle))
-        //             .pushChangeHandler(HorizontalChangeHandler())
-        //             .popChangeHandler(HorizontalChangeHandler())
-        //     )
-        // }
-        //
-        // binding.conversationOperationMakePrivate.setOnClickListener {
-        //     // TODO: this weird KEY_OPERATION_CODE stuff came from CallMenuController.
-        //     //  CallMenuController was replaced with the class you're in here.
-        //     //  This KEY_OPERATION_CODE stuff still needs to be deleted/rewritten in the classes where it's passed to.
-        //
-        //     val bundle = Bundle()
-        //     bundle.putParcelable(KEY_ROOM, Parcels.wrap(conversation))
-        //     bundle.putInt(KEY_OPERATION_CODE, 8)
-        //
-        //     controller.router.pushController(
-        //         RouterTransaction.with(OperationsMenuController(bundle))
-        //             .pushChangeHandler(HorizontalChangeHandler())
-        //             .popChangeHandler(HorizontalChangeHandler())
-        //     )
-        // }
-        //
-        // binding.conversationOperationClearPassword.setOnClickListener {
-        //     // TODO: this weird KEY_OPERATION_CODE stuff came from CallMenuController.
-        //     //  CallMenuController was replaced with the class you're in here.
-        //     //  This KEY_OPERATION_CODE stuff still needs to be deleted/rewritten in the classes where it's passed to.
-        //
-        //     val bundle = Bundle()
-        //     bundle.putParcelable(KEY_ROOM, Parcels.wrap(conversation))
-        //     bundle.putInt(KEY_OPERATION_CODE, 5)
-        //
-        //     controller.router.pushController(
-        //         RouterTransaction.with(OperationsMenuController(bundle))
-        //             .pushChangeHandler(HorizontalChangeHandler())
-        //             .popChangeHandler(HorizontalChangeHandler())
-        //     )
-        // }
-        //
-        // binding.conversationOperationRename.setOnClickListener {
-        //     // TODO: this weird KEY_OPERATION_CODE stuff came from CallMenuController.
-        //     //  CallMenuController was replaced with the class you're in here.
-        //     //  This KEY_OPERATION_CODE stuff still needs to be deleted/rewritten in the classes where it's passed to.
-        //
-        //     val bundle = Bundle()
-        //     bundle.putParcelable(KEY_ROOM, Parcels.wrap(conversation))
-        //     bundle.putInt(KEY_OPERATION_CODE, 2)
-        //
-        //     controller.router.pushController(
-        //         RouterTransaction.with(EntryMenuController(bundle))
-        //             .pushChangeHandler(HorizontalChangeHandler())
-        //             .popChangeHandler(HorizontalChangeHandler())
-        //     )
-        // }
-        //
-        // binding.conversationOperationSetPassword.setOnClickListener {
-        //     // TODO: this weird KEY_OPERATION_CODE stuff came from CallMenuController.
-        //     //  CallMenuController was replaced with the class you're in here.
-        //     //  This KEY_OPERATION_CODE stuff still needs to be deleted/rewritten in the classes where it's passed to.
-        //
-        //     val bundle = Bundle()
-        //     bundle.putParcelable(KEY_ROOM, Parcels.wrap(conversation))
-        //     bundle.putInt(KEY_OPERATION_CODE, 6)
-        //
-        //     controller.router.pushController(
-        //         RouterTransaction.with(EntryMenuController(bundle))
-        //             .pushChangeHandler(HorizontalChangeHandler())
-        //             .popChangeHandler(HorizontalChangeHandler())
-        //     )
-        // }
-        //
-        // binding.conversationOperationShareLink.setOnClickListener {
-        //     // TODO share by intent
-        // }
+        // val credentials = ApiUtils.getCredentials(currentUser.username, currentUser.token)
+        // val apiVersion = ApiUtils.getConversationApiVersion(currentUser, intArrayOf(ApiUtils.APIv4, ApiUtils.APIv1))
+
+        binding.conversationOperationAddFavorite.setOnClickListener {
+
+            binding.textEditWrapper.visibility = View.VISIBLE
+            binding.operationItemsLayout.visibility = View.GONE
+
+
+            // TODO: this weird KEY_OPERATION_CODE stuff came from CallMenuController.
+            //  CallMenuController was replaced with the class you're in here.
+            //  This KEY_OPERATION_CODE stuff still needs to be deleted/rewritten in the classes where it's passed to.
+
+            val bundle = Bundle()
+            bundle.putParcelable(KEY_ROOM, Parcels.wrap(conversation))
+            bundle.putInt(KEY_OPERATION_CODE, 98)
+
+            dismiss()
+
+            // just a test
+            controller.pushSomeOtherController(bundle)
+
+        }
+
+        binding.conversationOperationRemoveFavorite.setOnClickListener {
+            // TODO: this weird KEY_OPERATION_CODE stuff came from CallMenuController.
+            //  CallMenuController was replaced with the class you're in here.
+            //  This KEY_OPERATION_CODE stuff still needs to be deleted/rewritten in the classes where it's passed to.
+            val bundle = Bundle()
+            bundle.putParcelable(KEY_ROOM, Parcels.wrap(conversation))
+            bundle.putInt(KEY_OPERATION_CODE, 97)
+
+            binding.operationItemsLayout.visibility = View.GONE
+
+            dialogRouter = Conductor.attachRouter(activity, binding.root, null)
+
+            dialogRouter!!.pushController(
+                RouterTransaction.with(OperationsMenuController(bundle))
+                    .pushChangeHandler(HorizontalChangeHandler())
+                    .popChangeHandler(HorizontalChangeHandler())
+            )
+
+            controller.fetchData(false)
+        }
+
+        binding.conversationOperationClearPassword.setOnClickListener {
+            conversation.setPassword("")
+        }
+
+        binding.conversationOperationLeave.setOnClickListener {
+            val dataBuilder = Data.Builder()
+            dataBuilder.putString(KEY_ROOM_TOKEN, conversation.getToken())
+            dataBuilder.putLong(KEY_INTERNAL_USER_ID, currentUser.id)
+            val data = dataBuilder.build()
+
+            val leaveConversationWorker =
+                OneTimeWorkRequest.Builder(LeaveConversationWorker::class.java).setInputData(
+                    data
+                ).build()
+            WorkManager.getInstance().enqueue(leaveConversationWorker)
+
+            dismiss()
+        }
+
+        binding.conversationOperationDelete.setOnClickListener {
+            if (!TextUtils.isEmpty(conversation.getToken())) {
+                val bundle = Bundle()
+                bundle.putLong(KEY_INTERNAL_USER_ID, currentUser.id)
+                bundle.putParcelable(KEY_ROOM, Parcels.wrap(conversation))
+
+                controller.openLovelyDialogWithIdAndBundle(
+                    ConversationsListController.ID_DELETE_CONVERSATION_DIALOG,
+                    bundle
+                )
+            }
+
+            dismiss()
+        }
+
+        binding.conversationOperationMakePublic.setOnClickListener {
+            // TODO: this weird KEY_OPERATION_CODE stuff came from CallMenuController.
+            //  CallMenuController was replaced with the class you're in here.
+            //  This KEY_OPERATION_CODE stuff still needs to be deleted/rewritten in the classes where it's passed to.
+
+            val bundle = Bundle()
+            bundle.putParcelable(KEY_ROOM, Parcels.wrap(conversation))
+            bundle.putInt(KEY_OPERATION_CODE, 3)
+
+            controller.router.pushController(
+                RouterTransaction.with(OperationsMenuController(bundle))
+                    .pushChangeHandler(HorizontalChangeHandler())
+                    .popChangeHandler(HorizontalChangeHandler())
+            )
+        }
+
+        binding.conversationOperationMakePrivate.setOnClickListener {
+            // TODO: this weird KEY_OPERATION_CODE stuff came from CallMenuController.
+            //  CallMenuController was replaced with the class you're in here.
+            //  This KEY_OPERATION_CODE stuff still needs to be deleted/rewritten in the classes where it's passed to.
+
+            val bundle = Bundle()
+            bundle.putParcelable(KEY_ROOM, Parcels.wrap(conversation))
+            bundle.putInt(KEY_OPERATION_CODE, 8)
+
+            controller.router.pushController(
+                RouterTransaction.with(OperationsMenuController(bundle))
+                    .pushChangeHandler(HorizontalChangeHandler())
+                    .popChangeHandler(HorizontalChangeHandler())
+            )
+        }
+
+        binding.conversationOperationClearPassword.setOnClickListener {
+            // TODO: this weird KEY_OPERATION_CODE stuff came from CallMenuController.
+            //  CallMenuController was replaced with the class you're in here.
+            //  This KEY_OPERATION_CODE stuff still needs to be deleted/rewritten in the classes where it's passed to.
+
+            val bundle = Bundle()
+            bundle.putParcelable(KEY_ROOM, Parcels.wrap(conversation))
+            bundle.putInt(KEY_OPERATION_CODE, 5)
+
+            controller.router.pushController(
+                RouterTransaction.with(OperationsMenuController(bundle))
+                    .pushChangeHandler(HorizontalChangeHandler())
+                    .popChangeHandler(HorizontalChangeHandler())
+            )
+        }
+
+        binding.conversationOperationRename.setOnClickListener {
+            // TODO: this weird KEY_OPERATION_CODE stuff came from CallMenuController.
+            //  CallMenuController was replaced with the class you're in here.
+            //  This KEY_OPERATION_CODE stuff still needs to be deleted/rewritten in the classes where it's passed to.
+
+            val bundle = Bundle()
+            bundle.putParcelable(KEY_ROOM, Parcels.wrap(conversation))
+            bundle.putInt(KEY_OPERATION_CODE, 2)
+
+            controller.router.pushController(
+                RouterTransaction.with(EntryMenuController(bundle))
+                    .pushChangeHandler(HorizontalChangeHandler())
+                    .popChangeHandler(HorizontalChangeHandler())
+            )
+        }
+
+        binding.conversationOperationSetPassword.setOnClickListener {
+            // TODO: this weird KEY_OPERATION_CODE stuff came from CallMenuController.
+            //  CallMenuController was replaced with the class you're in here.
+            //  This KEY_OPERATION_CODE stuff still needs to be deleted/rewritten in the classes where it's passed to.
+
+            val bundle = Bundle()
+            bundle.putParcelable(KEY_ROOM, Parcels.wrap(conversation))
+            bundle.putInt(KEY_OPERATION_CODE, 6)
+
+            controller.router.pushController(
+                RouterTransaction.with(EntryMenuController(bundle))
+                    .pushChangeHandler(HorizontalChangeHandler())
+                    .popChangeHandler(HorizontalChangeHandler())
+            )
+        }
+
+        binding.conversationOperationShareLink.setOnClickListener {
+            // TODO share by intent
+        }
     }
     }
 
 
     override fun onStart() {
     override fun onStart() {

+ 349 - 308
app/src/main/res/layout/dialog_conversation_operations.xml

@@ -10,337 +10,378 @@
     android:paddingEnd="@dimen/standard_padding"
     android:paddingEnd="@dimen/standard_padding"
     android:paddingBottom="@dimen/standard_half_padding">
     android:paddingBottom="@dimen/standard_half_padding">
 
 
-    <TextView
-        android:id="@+id/conversation_operation_header"
-        android:layout_width="wrap_content"
-        android:layout_height="@dimen/bottom_sheet_item_height"
-        android:gravity="start|center_vertical"
-        android:textColor="@color/medium_emphasis_text_dark_background"
-        android:textSize="@dimen/bottom_sheet_text_size"
-        tools:text="conversation name"/>
-
     <LinearLayout
     <LinearLayout
-        android:id="@+id/conversation_operation_remove_favorite"
         android:layout_width="match_parent"
         android:layout_width="match_parent"
-        android:layout_height="@dimen/bottom_sheet_item_height"
-        android:gravity="center_vertical"
-        android:orientation="horizontal"
-        tools:ignore="UseCompoundDrawables">
-
-        <ImageView
+        android:layout_height="wrap_content"
+        android:id="@+id/text_edit_wrapper"
+        android:orientation="vertical"
+        android:visibility="gone"
+        tools:visibility="visible">
+
+        <TextView
+            android:id="@+id/text_edit"
             android:layout_width="wrap_content"
             android:layout_width="wrap_content"
+            android:layout_height="@dimen/bottom_sheet_item_height"
+            android:gravity="start|center_vertical"
+            android:textColor="@color/medium_emphasis_text_dark_background"
+            android:textSize="@dimen/bottom_sheet_text_size"
+            android:text="aaaaaaaaaaa"
+            tools:text="conversation name"/>
+
+        <EditText
+            android:id="@+id/Id"
+            android:layout_width="fill_parent"
             android:layout_height="wrap_content"
             android:layout_height="wrap_content"
-            android:contentDescription="@null"
-            android:src="@drawable/ic_star_border_black_24dp"
-            app:tint="@color/grey_600" />
+            android:text="joooo"
+            android:textColor="@color/white"
+            android:background="@android:color/transparent" >
+        </EditText>
 
 
-        <androidx.appcompat.widget.AppCompatTextView
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_gravity="start|center_vertical"
-            android:paddingStart="@dimen/standard_double_padding"
-            android:paddingEnd="@dimen/zero"
-            android:text="@string/nc_remove_from_favorites"
-            android:textAlignment="viewStart"
-            android:textColor="@color/high_emphasis_text_dark_background"
-            android:textSize="@dimen/bottom_sheet_text_size" />
-    </LinearLayout>
 
 
-    <LinearLayout
-        android:id="@+id/conversation_operation_add_favorite"
-        android:layout_width="match_parent"
-        android:layout_height="@dimen/bottom_sheet_item_height"
-        android:gravity="center_vertical"
-        android:orientation="horizontal"
-        tools:ignore="UseCompoundDrawables">
-
-        <ImageView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:contentDescription="@null"
-            android:src="@drawable/ic_star_black_24dp"
-            app:tint="@color/grey_600" />
-
-        <androidx.appcompat.widget.AppCompatTextView
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_gravity="start|center_vertical"
-            android:paddingStart="@dimen/standard_double_padding"
-            android:paddingEnd="@dimen/zero"
-            android:text="@string/nc_add_to_favorites"
-            android:textAlignment="viewStart"
-            android:textColor="@color/high_emphasis_text_dark_background"
-            android:textSize="@dimen/bottom_sheet_text_size" />
     </LinearLayout>
     </LinearLayout>
 
 
-    <LinearLayout
-        android:id="@+id/conversation_operation_mark_as_read"
-        android:layout_width="match_parent"
-        android:layout_height="@dimen/bottom_sheet_item_height"
-        android:gravity="center_vertical"
-        android:orientation="horizontal"
-        tools:ignore="UseCompoundDrawables">
-
-        <ImageView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:contentDescription="@null"
-            android:src="@drawable/ic_eye"
-            app:tint="@color/grey_600" />
-
-        <androidx.appcompat.widget.AppCompatTextView
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_gravity="start|center_vertical"
-            android:paddingStart="@dimen/standard_double_padding"
-            android:paddingEnd="@dimen/zero"
-            android:text="@string/nc_mark_as_read"
-            android:textAlignment="viewStart"
-            android:textColor="@color/high_emphasis_text_dark_background"
-            android:textSize="@dimen/bottom_sheet_text_size" />
-    </LinearLayout>
 
 
     <LinearLayout
     <LinearLayout
-        android:id="@+id/conversation_operation_rename"
         android:layout_width="match_parent"
         android:layout_width="match_parent"
-        android:layout_height="@dimen/bottom_sheet_item_height"
-        android:gravity="center_vertical"
-        android:orientation="horizontal"
-        tools:ignore="UseCompoundDrawables">
+        android:layout_height="wrap_content"
+        android:id="@+id/operation_items_layout"
+        android:orientation="vertical">
 
 
-        <ImageView
+        <TextView
+            android:id="@+id/conversation_operation_header"
             android:layout_width="wrap_content"
             android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:contentDescription="@null"
-            android:src="@drawable/ic_pencil_grey600_24dp"
-            app:tint="@color/grey_600" />
-
-        <androidx.appcompat.widget.AppCompatTextView
+            android:layout_height="@dimen/bottom_sheet_item_height"
+            android:gravity="start|center_vertical"
+            android:textColor="@color/medium_emphasis_text_dark_background"
+            android:textSize="@dimen/bottom_sheet_text_size"
+            tools:text="conversation name"/>
+
+        <LinearLayout
+            android:id="@+id/conversation_operation_remove_favorite"
             android:layout_width="match_parent"
             android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_gravity="start|center_vertical"
-            android:paddingStart="@dimen/standard_double_padding"
-            android:paddingEnd="@dimen/zero"
-            android:text="@string/nc_rename"
-            android:textAlignment="viewStart"
-            android:textColor="@color/high_emphasis_text_dark_background"
-            android:textSize="@dimen/bottom_sheet_text_size" />
-    </LinearLayout>
-
-    <LinearLayout
-        android:id="@+id/conversation_operation_make_public"
-        android:layout_width="match_parent"
-        android:layout_height="@dimen/bottom_sheet_item_height"
-        android:gravity="center_vertical"
-        android:orientation="horizontal"
-        tools:ignore="UseCompoundDrawables">
-
-        <ImageView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:contentDescription="@null"
-            android:src="@drawable/ic_link_grey600_24px"
-            app:tint="@color/grey_600" />
-
-        <androidx.appcompat.widget.AppCompatTextView
+            android:layout_height="@dimen/bottom_sheet_item_height"
+            android:gravity="center_vertical"
+            android:orientation="horizontal"
+            tools:ignore="UseCompoundDrawables">
+
+            <ImageView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:contentDescription="@null"
+                android:src="@drawable/ic_star_border_black_24dp"
+                app:tint="@color/grey_600" />
+
+            <androidx.appcompat.widget.AppCompatTextView
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_gravity="start|center_vertical"
+                android:paddingStart="@dimen/standard_double_padding"
+                android:paddingEnd="@dimen/zero"
+                android:text="@string/nc_remove_from_favorites"
+                android:textAlignment="viewStart"
+                android:textColor="@color/high_emphasis_text_dark_background"
+                android:textSize="@dimen/bottom_sheet_text_size" />
+        </LinearLayout>
+
+        <LinearLayout
+            android:id="@+id/conversation_operation_add_favorite"
             android:layout_width="match_parent"
             android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_gravity="start|center_vertical"
-            android:paddingStart="@dimen/standard_double_padding"
-            android:paddingEnd="@dimen/zero"
-            android:text="@string/nc_make_call_public"
-            android:textAlignment="viewStart"
-            android:textColor="@color/high_emphasis_text_dark_background"
-            android:textSize="@dimen/bottom_sheet_text_size" />
-    </LinearLayout>
-
-    <LinearLayout
-        android:id="@+id/conversation_operation_change_password"
-        android:layout_width="match_parent"
-        android:layout_height="@dimen/bottom_sheet_item_height"
-        android:gravity="center_vertical"
-        android:orientation="horizontal"
-        tools:ignore="UseCompoundDrawables">
-
-        <ImageView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:contentDescription="@null"
-            android:src="@drawable/ic_lock_grey600_24px"
-            app:tint="@color/grey_600" />
-
-        <androidx.appcompat.widget.AppCompatTextView
+            android:layout_height="@dimen/bottom_sheet_item_height"
+            android:gravity="center_vertical"
+            android:orientation="horizontal"
+            tools:ignore="UseCompoundDrawables">
+
+            <ImageView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:contentDescription="@null"
+                android:src="@drawable/ic_star_black_24dp"
+                app:tint="@color/grey_600" />
+
+            <androidx.appcompat.widget.AppCompatTextView
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_gravity="start|center_vertical"
+                android:paddingStart="@dimen/standard_double_padding"
+                android:paddingEnd="@dimen/zero"
+                android:text="@string/nc_add_to_favorites"
+                android:textAlignment="viewStart"
+                android:textColor="@color/high_emphasis_text_dark_background"
+                android:textSize="@dimen/bottom_sheet_text_size" />
+        </LinearLayout>
+
+        <LinearLayout
+            android:id="@+id/conversation_operation_mark_as_read"
             android:layout_width="match_parent"
             android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_gravity="start|center_vertical"
-            android:paddingStart="@dimen/standard_double_padding"
-            android:paddingEnd="@dimen/zero"
-            android:text="@string/nc_change_password"
-            android:textAlignment="viewStart"
-            android:textColor="@color/high_emphasis_text_dark_background"
-            android:textSize="@dimen/bottom_sheet_text_size" />
-    </LinearLayout>
-
-    <LinearLayout
-        android:id="@+id/conversation_operation_clear_password"
-        android:layout_width="match_parent"
-        android:layout_height="@dimen/bottom_sheet_item_height"
-        android:gravity="center_vertical"
-        android:orientation="horizontal"
-        tools:ignore="UseCompoundDrawables">
-
-        <ImageView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:contentDescription="@null"
-            android:src="@drawable/ic_lock_open_grey600_24dp"
-            app:tint="@color/grey_600" />
-
-        <androidx.appcompat.widget.AppCompatTextView
+            android:layout_height="@dimen/bottom_sheet_item_height"
+            android:gravity="center_vertical"
+            android:orientation="horizontal"
+            tools:ignore="UseCompoundDrawables">
+
+            <ImageView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:contentDescription="@null"
+                android:src="@drawable/ic_eye"
+                app:tint="@color/grey_600" />
+
+            <androidx.appcompat.widget.AppCompatTextView
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_gravity="start|center_vertical"
+                android:paddingStart="@dimen/standard_double_padding"
+                android:paddingEnd="@dimen/zero"
+                android:text="@string/nc_mark_as_read"
+                android:textAlignment="viewStart"
+                android:textColor="@color/high_emphasis_text_dark_background"
+                android:textSize="@dimen/bottom_sheet_text_size" />
+        </LinearLayout>
+
+        <LinearLayout
+            android:id="@+id/conversation_operation_rename"
             android:layout_width="match_parent"
             android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_gravity="start|center_vertical"
-            android:paddingStart="@dimen/standard_double_padding"
-            android:paddingEnd="@dimen/zero"
-            android:text="@string/nc_clear_password"
-            android:textAlignment="viewStart"
-            android:textColor="@color/high_emphasis_text_dark_background"
-            android:textSize="@dimen/bottom_sheet_text_size" />
-    </LinearLayout>
-
-    <LinearLayout
-        android:id="@+id/conversation_operation_set_password"
-        android:layout_width="match_parent"
-        android:layout_height="@dimen/bottom_sheet_item_height"
-        android:gravity="center_vertical"
-        android:orientation="horizontal"
-        tools:ignore="UseCompoundDrawables">
-
-        <ImageView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:contentDescription="@null"
-            android:src="@drawable/ic_lock_plus_grey600_24dp"
-            app:tint="@color/grey_600" />
-
-        <androidx.appcompat.widget.AppCompatTextView
+            android:layout_height="@dimen/bottom_sheet_item_height"
+            android:gravity="center_vertical"
+            android:orientation="horizontal"
+            tools:ignore="UseCompoundDrawables">
+
+            <ImageView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:contentDescription="@null"
+                android:src="@drawable/ic_pencil_grey600_24dp"
+                app:tint="@color/grey_600" />
+
+            <androidx.appcompat.widget.AppCompatTextView
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_gravity="start|center_vertical"
+                android:paddingStart="@dimen/standard_double_padding"
+                android:paddingEnd="@dimen/zero"
+                android:text="@string/nc_rename"
+                android:textAlignment="viewStart"
+                android:textColor="@color/high_emphasis_text_dark_background"
+                android:textSize="@dimen/bottom_sheet_text_size" />
+        </LinearLayout>
+
+        <LinearLayout
+            android:id="@+id/conversation_operation_make_public"
             android:layout_width="match_parent"
             android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_gravity="start|center_vertical"
-            android:paddingStart="@dimen/standard_double_padding"
-            android:paddingEnd="@dimen/zero"
-            android:text="@string/nc_set_password"
-            android:textAlignment="viewStart"
-            android:textColor="@color/high_emphasis_text_dark_background"
-            android:textSize="@dimen/bottom_sheet_text_size" />
-    </LinearLayout>
-
-    <LinearLayout
-        android:id="@+id/conversation_operation_delete"
-        android:layout_width="match_parent"
-        android:layout_height="@dimen/bottom_sheet_item_height"
-        android:gravity="center_vertical"
-        android:orientation="horizontal"
-        tools:ignore="UseCompoundDrawables">
-
-        <ImageView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:contentDescription="@null"
-            android:src="@drawable/ic_delete_grey600_24dp"
-            app:tint="@color/grey_600" />
-
-        <androidx.appcompat.widget.AppCompatTextView
+            android:layout_height="@dimen/bottom_sheet_item_height"
+            android:gravity="center_vertical"
+            android:orientation="horizontal"
+            tools:ignore="UseCompoundDrawables">
+
+            <ImageView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:contentDescription="@null"
+                android:src="@drawable/ic_link_grey600_24px"
+                app:tint="@color/grey_600" />
+
+            <androidx.appcompat.widget.AppCompatTextView
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_gravity="start|center_vertical"
+                android:paddingStart="@dimen/standard_double_padding"
+                android:paddingEnd="@dimen/zero"
+                android:text="@string/nc_make_call_public"
+                android:textAlignment="viewStart"
+                android:textColor="@color/high_emphasis_text_dark_background"
+                android:textSize="@dimen/bottom_sheet_text_size" />
+        </LinearLayout>
+
+        <LinearLayout
+            android:id="@+id/conversation_operation_change_password"
             android:layout_width="match_parent"
             android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_gravity="start|center_vertical"
-            android:paddingStart="@dimen/standard_double_padding"
-            android:paddingEnd="@dimen/zero"
-            android:text="@string/nc_delete_call"
-            android:textAlignment="viewStart"
-            android:textColor="@color/high_emphasis_text_dark_background"
-            android:textSize="@dimen/bottom_sheet_text_size" />
-    </LinearLayout>
-
-    <LinearLayout
-        android:id="@+id/conversation_operation_share_link"
-        android:layout_width="match_parent"
-        android:layout_height="@dimen/bottom_sheet_item_height"
-        android:gravity="center_vertical"
-        android:orientation="horizontal"
-        tools:ignore="UseCompoundDrawables">
-
-        <ImageView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:contentDescription="@null"
-            android:src="@drawable/ic_link_grey600_24px"
-            app:tint="@color/grey_600" />
-
-        <androidx.appcompat.widget.AppCompatTextView
+            android:layout_height="@dimen/bottom_sheet_item_height"
+            android:gravity="center_vertical"
+            android:orientation="horizontal"
+            tools:ignore="UseCompoundDrawables">
+
+            <ImageView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:contentDescription="@null"
+                android:src="@drawable/ic_lock_grey600_24px"
+                app:tint="@color/grey_600" />
+
+            <androidx.appcompat.widget.AppCompatTextView
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_gravity="start|center_vertical"
+                android:paddingStart="@dimen/standard_double_padding"
+                android:paddingEnd="@dimen/zero"
+                android:text="@string/nc_change_password"
+                android:textAlignment="viewStart"
+                android:textColor="@color/high_emphasis_text_dark_background"
+                android:textSize="@dimen/bottom_sheet_text_size" />
+        </LinearLayout>
+
+        <LinearLayout
+            android:id="@+id/conversation_operation_clear_password"
             android:layout_width="match_parent"
             android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_gravity="start|center_vertical"
-            android:paddingStart="@dimen/standard_double_padding"
-            android:paddingEnd="@dimen/zero"
-            android:text="@string/nc_share_link"
-            android:textAlignment="viewStart"
-            android:textColor="@color/high_emphasis_text_dark_background"
-            android:textSize="@dimen/bottom_sheet_text_size" />
-    </LinearLayout>
-
-    <LinearLayout
-        android:id="@+id/conversation_operation_make_private"
-        android:layout_width="match_parent"
-        android:layout_height="@dimen/bottom_sheet_item_height"
-        android:gravity="center_vertical"
-        android:orientation="horizontal"
-        tools:ignore="UseCompoundDrawables">
-
-        <ImageView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:contentDescription="@null"
-            android:src="@drawable/ic_group_grey600_24px"
-            app:tint="@color/grey_600" />
-
-        <androidx.appcompat.widget.AppCompatTextView
+            android:layout_height="@dimen/bottom_sheet_item_height"
+            android:gravity="center_vertical"
+            android:orientation="horizontal"
+            tools:ignore="UseCompoundDrawables">
+
+            <ImageView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:contentDescription="@null"
+                android:src="@drawable/ic_lock_open_grey600_24dp"
+                app:tint="@color/grey_600" />
+
+            <androidx.appcompat.widget.AppCompatTextView
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_gravity="start|center_vertical"
+                android:paddingStart="@dimen/standard_double_padding"
+                android:paddingEnd="@dimen/zero"
+                android:text="@string/nc_clear_password"
+                android:textAlignment="viewStart"
+                android:textColor="@color/high_emphasis_text_dark_background"
+                android:textSize="@dimen/bottom_sheet_text_size" />
+        </LinearLayout>
+
+        <LinearLayout
+            android:id="@+id/conversation_operation_set_password"
             android:layout_width="match_parent"
             android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_gravity="start|center_vertical"
-            android:paddingStart="@dimen/standard_double_padding"
-            android:paddingEnd="@dimen/zero"
-            android:text="@string/nc_make_call_private"
-            android:textAlignment="viewStart"
-            android:textColor="@color/high_emphasis_text_dark_background"
-            android:textSize="@dimen/bottom_sheet_text_size" />
-    </LinearLayout>
+            android:layout_height="@dimen/bottom_sheet_item_height"
+            android:gravity="center_vertical"
+            android:orientation="horizontal"
+            tools:ignore="UseCompoundDrawables">
+
+            <ImageView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:contentDescription="@null"
+                android:src="@drawable/ic_lock_plus_grey600_24dp"
+                app:tint="@color/grey_600" />
+
+            <androidx.appcompat.widget.AppCompatTextView
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_gravity="start|center_vertical"
+                android:paddingStart="@dimen/standard_double_padding"
+                android:paddingEnd="@dimen/zero"
+                android:text="@string/nc_set_password"
+                android:textAlignment="viewStart"
+                android:textColor="@color/high_emphasis_text_dark_background"
+                android:textSize="@dimen/bottom_sheet_text_size" />
+        </LinearLayout>
+
+        <LinearLayout
+            android:id="@+id/conversation_operation_delete"
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/bottom_sheet_item_height"
+            android:gravity="center_vertical"
+            android:orientation="horizontal"
+            tools:ignore="UseCompoundDrawables">
+
+            <ImageView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:contentDescription="@null"
+                android:src="@drawable/ic_delete_grey600_24dp"
+                app:tint="@color/grey_600" />
+
+            <androidx.appcompat.widget.AppCompatTextView
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_gravity="start|center_vertical"
+                android:paddingStart="@dimen/standard_double_padding"
+                android:paddingEnd="@dimen/zero"
+                android:text="@string/nc_delete_call"
+                android:textAlignment="viewStart"
+                android:textColor="@color/high_emphasis_text_dark_background"
+                android:textSize="@dimen/bottom_sheet_text_size" />
+        </LinearLayout>
+
+        <LinearLayout
+            android:id="@+id/conversation_operation_share_link"
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/bottom_sheet_item_height"
+            android:gravity="center_vertical"
+            android:orientation="horizontal"
+            tools:ignore="UseCompoundDrawables">
+
+            <ImageView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:contentDescription="@null"
+                android:src="@drawable/ic_link_grey600_24px"
+                app:tint="@color/grey_600" />
+
+            <androidx.appcompat.widget.AppCompatTextView
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_gravity="start|center_vertical"
+                android:paddingStart="@dimen/standard_double_padding"
+                android:paddingEnd="@dimen/zero"
+                android:text="@string/nc_share_link"
+                android:textAlignment="viewStart"
+                android:textColor="@color/high_emphasis_text_dark_background"
+                android:textSize="@dimen/bottom_sheet_text_size" />
+        </LinearLayout>
+
+        <LinearLayout
+            android:id="@+id/conversation_operation_make_private"
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/bottom_sheet_item_height"
+            android:gravity="center_vertical"
+            android:orientation="horizontal"
+            tools:ignore="UseCompoundDrawables">
+
+            <ImageView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:contentDescription="@null"
+                android:src="@drawable/ic_group_grey600_24px"
+                app:tint="@color/grey_600" />
+
+            <androidx.appcompat.widget.AppCompatTextView
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_gravity="start|center_vertical"
+                android:paddingStart="@dimen/standard_double_padding"
+                android:paddingEnd="@dimen/zero"
+                android:text="@string/nc_make_call_private"
+                android:textAlignment="viewStart"
+                android:textColor="@color/high_emphasis_text_dark_background"
+                android:textSize="@dimen/bottom_sheet_text_size" />
+        </LinearLayout>
+
+        <LinearLayout
+            android:id="@+id/conversation_operation_leave"
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/bottom_sheet_item_height"
+            android:gravity="center_vertical"
+            android:orientation="horizontal"
+            tools:ignore="UseCompoundDrawables">
+
+            <ImageView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:contentDescription="@null"
+                android:src="@drawable/ic_exit_to_app_black_24dp"
+                app:tint="@color/grey_600" />
+
+            <androidx.appcompat.widget.AppCompatTextView
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_gravity="start|center_vertical"
+                android:paddingStart="@dimen/standard_double_padding"
+                android:paddingEnd="@dimen/zero"
+                android:text="@string/nc_leave"
+                android:textAlignment="viewStart"
+                android:textColor="@color/high_emphasis_text_dark_background"
+                android:textSize="@dimen/bottom_sheet_text_size" />
+        </LinearLayout>
 
 
-    <LinearLayout
-        android:id="@+id/conversation_operation_leave"
-        android:layout_width="match_parent"
-        android:layout_height="@dimen/bottom_sheet_item_height"
-        android:gravity="center_vertical"
-        android:orientation="horizontal"
-        tools:ignore="UseCompoundDrawables">
+    </LinearLayout>
 
 
-        <ImageView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:contentDescription="@null"
-            android:src="@drawable/ic_exit_to_app_black_24dp"
-            app:tint="@color/grey_600" />
 
 
-        <androidx.appcompat.widget.AppCompatTextView
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_gravity="start|center_vertical"
-            android:paddingStart="@dimen/standard_double_padding"
-            android:paddingEnd="@dimen/zero"
-            android:text="@string/nc_leave"
-            android:textAlignment="viewStart"
-            android:textColor="@color/high_emphasis_text_dark_background"
-            android:textSize="@dimen/bottom_sheet_text_size" />
-    </LinearLayout>
 
 
 </LinearLayout>
 </LinearLayout>