From 9c6486c73e5bd4e63b02e52da1363270f20af209 Mon Sep 17 00:00:00 2001
From: Taras Smakula <tarassmakula@gmail.com>
Date: Tue, 5 Mar 2024 14:04:58 +0200
Subject: [PATCH] Merge update room into single fragment

---
 .../room/update/UpdateRoomDialogFragment.kt   | 116 ++++++---
 .../circle/UpdateCircleDialogFragment.kt      |  80 ------
 .../gallery/UpdateGalleryDialogFragment.kt    |  69 -----
 .../update/group/UpdateGroupDialogFragment.kt |  72 ------
 .../options/TimelineOptionsNavigator.kt       |  18 +-
 .../layout/dialog_fragment_update_circle.xml  | 191 --------------
 .../layout/dialog_fragment_update_gallery.xml | 136 ----------
 .../layout/dialog_fragment_update_group.xml   | 170 -------------
 .../layout/dialog_fragment_update_room.xml    | 235 ++++++++++++++++++
 .../navigation/timeline_options_nav_graph.xml |  52 +---
 core/src/main/res/values/strings.xml          |   8 +-
 11 files changed, 327 insertions(+), 820 deletions(-)
 delete mode 100644 core/src/main/java/org/futo/circles/core/feature/room/update/circle/UpdateCircleDialogFragment.kt
 delete mode 100644 core/src/main/java/org/futo/circles/core/feature/room/update/gallery/UpdateGalleryDialogFragment.kt
 delete mode 100644 core/src/main/java/org/futo/circles/core/feature/room/update/group/UpdateGroupDialogFragment.kt
 delete mode 100644 core/src/main/res/layout/dialog_fragment_update_circle.xml
 delete mode 100644 core/src/main/res/layout/dialog_fragment_update_gallery.xml
 delete mode 100644 core/src/main/res/layout/dialog_fragment_update_group.xml
 create mode 100644 core/src/main/res/layout/dialog_fragment_update_room.xml

diff --git a/core/src/main/java/org/futo/circles/core/feature/room/update/UpdateRoomDialogFragment.kt b/core/src/main/java/org/futo/circles/core/feature/room/update/UpdateRoomDialogFragment.kt
index 1d9439ccd..c4471e910 100644
--- a/core/src/main/java/org/futo/circles/core/feature/room/update/UpdateRoomDialogFragment.kt
+++ b/core/src/main/java/org/futo/circles/core/feature/room/update/UpdateRoomDialogFragment.kt
@@ -1,68 +1,75 @@
 package org.futo.circles.core.feature.room.update
 
-import android.net.Uri
 import android.os.Bundle
-import android.view.LayoutInflater
 import android.view.View
-import android.view.ViewGroup
+import androidx.core.widget.doAfterTextChanged
+import androidx.fragment.app.Fragment
 import androidx.fragment.app.viewModels
-import androidx.viewbinding.ViewBinding
+import androidx.navigation.fragment.navArgs
+import dagger.hilt.android.AndroidEntryPoint
+import org.futo.circles.core.R
+import org.futo.circles.core.base.fragment.BaseFullscreenDialogFragment
+import org.futo.circles.core.base.fragment.HasLoadingState
+import org.futo.circles.core.databinding.DialogFragmentUpdateRoomBinding
+import org.futo.circles.core.extensions.getText
+import org.futo.circles.core.extensions.loadRoomProfileIcon
 import org.futo.circles.core.extensions.observeData
 import org.futo.circles.core.extensions.observeResponse
 import org.futo.circles.core.extensions.onBackPressed
 import org.futo.circles.core.extensions.showSuccess
-import org.futo.circles.core.base.fragment.BaseFullscreenDialogFragment
-import org.futo.circles.core.base.fragment.HasLoadingState
 import org.futo.circles.core.feature.picker.helper.MediaPickerHelper
+import org.futo.circles.core.model.CircleRoomTypeArg
 import org.matrix.android.sdk.api.session.room.model.RoomSummary
 
-abstract class UpdateRoomDialogFragment(inflate: (LayoutInflater, ViewGroup?, Boolean) -> ViewBinding) :
-    BaseFullscreenDialogFragment(inflate), HasLoadingState {
-
-    abstract val roomId: String
+@AndroidEntryPoint
+class UpdateRoomDialogFragment :
+    BaseFullscreenDialogFragment(DialogFragmentUpdateRoomBinding::inflate), HasLoadingState {
 
-    protected val viewModel by viewModels<UpdateRoomViewModel>()
+    override val fragment: Fragment = this
+    private val args: UpdateRoomDialogFragmentArgs by navArgs()
+    private val viewModel by viewModels<UpdateRoomViewModel>()
+    private val roomId: String get() = args.roomId
+    private val roomType: CircleRoomTypeArg get() = args.type
+    private val mediaPickerHelper = MediaPickerHelper(this)
 
-    abstract val mediaPickerHelper: MediaPickerHelper
-    abstract val successMessageResId: Int
-    abstract fun onCoverImageSelected(uri: Uri)
-    abstract fun setInitialRoomData(room: RoomSummary)
-    abstract fun setUpdateButtonEnabled(isEnabled: Boolean)
-
-    protected fun changeCoverImage() {
-        mediaPickerHelper.showMediaPickerDialog(onImageSelected = { _, uri ->
-            viewModel.setImageUri(uri)
-        })
-    }
-
-    protected fun onInputRoomDataChanged(
-        name: String,
-        topic: String? = null,
-        isPublic: Boolean = false
-    ) {
-        viewModel.handleRoomDataUpdate(name, topic ?: "", isPublic)
-    }
-
-    protected fun updateRoom(
-        name: String,
-        topic: String? = null,
-        isPublic: Boolean = false
-    ) {
-        viewModel.update(name, topic ?: "", isPublic)
+    private val binding by lazy {
+        getBinding() as DialogFragmentUpdateRoomBinding
     }
 
     override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
         super.onViewCreated(view, savedInstanceState)
+        setupViews()
         setupObservers()
     }
 
+    private fun setupViews() {
+        with(binding) {
+            ivCover.setOnClickListener { changeCoverImage() }
+            btnChangeIcon.setOnClickListener { changeCoverImage() }
+            tilName.editText?.doAfterTextChanged {
+                it?.let { onInputDataChanged() }
+            }
+            binding.circleTypeGroup.setOnCheckedChangeListener { _, _ ->
+                onInputDataChanged()
+            }
+            tilTopic.editText?.doAfterTextChanged {
+                it?.let { onInputDataChanged() }
+            }
+            btnSave.setOnClickListener {
+                viewModel.update(tilName.getText(), tilTopic.getText(), isPublicRulesSelected())
+                startLoading(btnSave)
+            }
+        }
+    }
+
     private fun setupObservers() {
         viewModel.selectedImageLiveData.observeData(this) {
-            onCoverImageSelected(it)
+            binding.ivCover.setImageURI(it)
+            onInputDataChanged()
         }
         viewModel.updateGroupResponseLiveData.observeResponse(this,
             success = {
-                showSuccess(getString(successMessageResId))
+                showSuccess(getString(R.string.updated))
                 onBackPressed()
             }
         )
@@ -70,7 +77,36 @@ abstract class UpdateRoomDialogFragment(inflate: (LayoutInflater, ViewGroup?, Bo
             it?.let { setInitialRoomData(it) }
         }
         viewModel.isRoomDataChangedLiveData.observeData(this) {
-            setUpdateButtonEnabled(it)
+            binding.btnSave.isEnabled = it
         }
     }
+
+    private fun setInitialRoomData(room: RoomSummary) {
+        binding.ivCover.loadRoomProfileIcon(room.avatarUrl, room.displayName)
+        binding.tilName.editText?.setText(room.displayName)
+        binding.tilTopic.editText?.setText(room.topic)
+        val isCircleShared = viewModel.isCircleShared(roomId)
+        binding.btnPrivate.isChecked = !isCircleShared
+        binding.btnPublic.isChecked = isCircleShared
+    }
+
+    private fun isPublicRulesSelected(): Boolean {
+        val checkedId = binding.circleTypeGroup.checkedRadioButtonId
+        return checkedId == binding.btnPublic.id
+    }
+
+    private fun changeCoverImage() {
+        mediaPickerHelper.showMediaPickerDialog(onImageSelected = { _, uri ->
+            viewModel.setImageUri(uri)
+        })
+    }
+
+    private fun onInputDataChanged() {
+        viewModel.handleRoomDataUpdate(
+            binding.tilName.getText(),
+            binding.tilTopic.getText(),
+            isPublicRulesSelected()
+        )
+    }
+
 }
\ No newline at end of file
diff --git a/core/src/main/java/org/futo/circles/core/feature/room/update/circle/UpdateCircleDialogFragment.kt b/core/src/main/java/org/futo/circles/core/feature/room/update/circle/UpdateCircleDialogFragment.kt
deleted file mode 100644
index 85a9b7beb..000000000
--- a/core/src/main/java/org/futo/circles/core/feature/room/update/circle/UpdateCircleDialogFragment.kt
+++ /dev/null
@@ -1,80 +0,0 @@
-package org.futo.circles.core.feature.room.update.circle
-
-import android.net.Uri
-import android.os.Bundle
-import android.view.View
-import androidx.core.widget.doAfterTextChanged
-import androidx.fragment.app.Fragment
-import androidx.navigation.fragment.navArgs
-import dagger.hilt.android.AndroidEntryPoint
-import org.futo.circles.core.R
-import org.futo.circles.core.databinding.DialogFragmentUpdateCircleBinding
-import org.futo.circles.core.extensions.getText
-import org.futo.circles.core.extensions.loadRoomProfileIcon
-import org.futo.circles.core.feature.picker.helper.MediaPickerHelper
-import org.futo.circles.core.feature.room.update.UpdateRoomDialogFragment
-import org.matrix.android.sdk.api.session.room.model.RoomSummary
-
-@AndroidEntryPoint
-class UpdateCircleDialogFragment :
-    UpdateRoomDialogFragment(DialogFragmentUpdateCircleBinding::inflate) {
-
-    private val args: UpdateCircleDialogFragmentArgs by navArgs()
-    override val roomId: String get() = args.roomId
-    override val fragment: Fragment = this
-    override val mediaPickerHelper = MediaPickerHelper(this)
-    override val successMessageResId: Int = R.string.circle_updated
-
-    private val binding by lazy {
-        getBinding() as DialogFragmentUpdateCircleBinding
-    }
-
-    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
-        super.onViewCreated(view, savedInstanceState)
-        setupViews()
-    }
-
-    override fun onCoverImageSelected(uri: Uri) {
-        binding.ivCover.setImageURI(uri)
-        onInputDataChanged()
-    }
-
-    override fun setInitialRoomData(room: RoomSummary) {
-        binding.ivCover.loadRoomProfileIcon(room.avatarUrl, room.displayName)
-        binding.tilName.editText?.setText(room.displayName)
-        val isCircleShared = viewModel.isCircleShared(roomId)
-        binding.btnPrivate.isChecked = !isCircleShared
-        binding.btnPublic.isChecked = isCircleShared
-    }
-
-    override fun setUpdateButtonEnabled(isEnabled: Boolean) {
-        binding.btnSave.isEnabled = isEnabled
-    }
-
-    private fun setupViews() {
-        with(binding) {
-            ivCover.setOnClickListener { changeCoverImage() }
-            btnChangeIcon.setOnClickListener { changeCoverImage() }
-            tilName.editText?.doAfterTextChanged {
-                it?.let { onInputDataChanged() }
-            }
-            binding.circleTypeGroup.setOnCheckedChangeListener { _, _ ->
-                onInputDataChanged()
-            }
-            btnSave.setOnClickListener {
-                updateRoom(tilName.getText(), null, isPublicRulesSelected())
-                startLoading(btnSave)
-            }
-        }
-    }
-
-    private fun isPublicRulesSelected(): Boolean {
-        val checkedId = binding.circleTypeGroup.checkedRadioButtonId
-        return checkedId == binding.btnPublic.id
-
-    }
-
-    private fun onInputDataChanged() {
-        onInputRoomDataChanged(binding.tilName.getText(), null, isPublicRulesSelected())
-    }
-}
\ No newline at end of file
diff --git a/core/src/main/java/org/futo/circles/core/feature/room/update/gallery/UpdateGalleryDialogFragment.kt b/core/src/main/java/org/futo/circles/core/feature/room/update/gallery/UpdateGalleryDialogFragment.kt
deleted file mode 100644
index 1b30b1792..000000000
--- a/core/src/main/java/org/futo/circles/core/feature/room/update/gallery/UpdateGalleryDialogFragment.kt
+++ /dev/null
@@ -1,69 +0,0 @@
-package org.futo.circles.core.feature.room.update.gallery
-
-
-import android.net.Uri
-import android.os.Bundle
-import android.view.View
-import androidx.core.widget.doAfterTextChanged
-import androidx.fragment.app.Fragment
-import androidx.navigation.fragment.navArgs
-import dagger.hilt.android.AndroidEntryPoint
-import org.futo.circles.core.R
-import org.futo.circles.core.databinding.DialogFragmentUpdateGalleryBinding
-import org.futo.circles.core.extensions.getText
-import org.futo.circles.core.extensions.loadRoomProfileIcon
-import org.futo.circles.core.feature.picker.helper.MediaPickerHelper
-import org.futo.circles.core.feature.room.update.UpdateRoomDialogFragment
-import org.matrix.android.sdk.api.session.room.model.RoomSummary
-
-@AndroidEntryPoint
-class UpdateGalleryDialogFragment :
-    UpdateRoomDialogFragment(DialogFragmentUpdateGalleryBinding::inflate) {
-
-    private val args: UpdateGalleryDialogFragmentArgs by navArgs()
-    override val roomId: String get() = args.roomId
-    override val fragment: Fragment = this
-    override val mediaPickerHelper = MediaPickerHelper(this)
-    override val successMessageResId: Int = R.string.gallery_updated
-
-    private val binding by lazy {
-        getBinding() as DialogFragmentUpdateGalleryBinding
-    }
-
-    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
-        super.onViewCreated(view, savedInstanceState)
-        setupViews()
-    }
-
-    override fun onCoverImageSelected(uri: Uri) {
-        binding.ivCover.setImageURI(uri)
-        onInputDataChanged()
-    }
-
-    override fun setInitialRoomData(room: RoomSummary) {
-        binding.ivCover.loadRoomProfileIcon(room.avatarUrl, room.displayName)
-        binding.tilName.editText?.setText(room.displayName)
-    }
-
-    override fun setUpdateButtonEnabled(isEnabled: Boolean) {
-        binding.btnSave.isEnabled = isEnabled
-    }
-
-    private fun setupViews() {
-        with(binding) {
-            ivCover.setOnClickListener { changeCoverImage() }
-            btnChangeIcon.setOnClickListener { changeCoverImage() }
-            tilName.editText?.doAfterTextChanged {
-                it?.let { onInputDataChanged() }
-            }
-            btnSave.setOnClickListener {
-                updateRoom(tilName.getText())
-                startLoading(btnSave)
-            }
-        }
-    }
-
-    private fun onInputDataChanged() {
-        onInputRoomDataChanged(binding.tilName.getText())
-    }
-}
\ No newline at end of file
diff --git a/core/src/main/java/org/futo/circles/core/feature/room/update/group/UpdateGroupDialogFragment.kt b/core/src/main/java/org/futo/circles/core/feature/room/update/group/UpdateGroupDialogFragment.kt
deleted file mode 100644
index 5ee6308ba..000000000
--- a/core/src/main/java/org/futo/circles/core/feature/room/update/group/UpdateGroupDialogFragment.kt
+++ /dev/null
@@ -1,72 +0,0 @@
-package org.futo.circles.core.feature.room.update.group
-
-import android.net.Uri
-import android.os.Bundle
-import android.view.View
-import androidx.core.widget.doAfterTextChanged
-import androidx.fragment.app.Fragment
-import androidx.navigation.fragment.navArgs
-import dagger.hilt.android.AndroidEntryPoint
-import org.futo.circles.core.R
-import org.futo.circles.core.databinding.DialogFragmentUpdateGroupBinding
-import org.futo.circles.core.extensions.getText
-import org.futo.circles.core.extensions.loadRoomProfileIcon
-import org.futo.circles.core.feature.picker.helper.MediaPickerHelper
-import org.futo.circles.core.feature.room.update.UpdateRoomDialogFragment
-import org.matrix.android.sdk.api.session.room.model.RoomSummary
-
-@AndroidEntryPoint
-class UpdateGroupDialogFragment :
-    UpdateRoomDialogFragment(DialogFragmentUpdateGroupBinding::inflate) {
-
-    private val args: UpdateGroupDialogFragmentArgs by navArgs()
-    override val roomId: String get() = args.roomId
-    override val fragment: Fragment = this
-    override val mediaPickerHelper = MediaPickerHelper(this)
-    override val successMessageResId: Int = R.string.group_updated
-
-    private val binding by lazy {
-        getBinding() as DialogFragmentUpdateGroupBinding
-    }
-
-    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
-        super.onViewCreated(view, savedInstanceState)
-        setupViews()
-    }
-
-    override fun onCoverImageSelected(uri: Uri) {
-        binding.ivCover.setImageURI(uri)
-        onInputDataChanged()
-    }
-
-    override fun setInitialRoomData(room: RoomSummary) {
-        binding.ivCover.loadRoomProfileIcon(room.avatarUrl, room.displayName)
-        binding.tilName.editText?.setText(room.displayName)
-        binding.tilTopic.editText?.setText(room.topic)
-    }
-
-    override fun setUpdateButtonEnabled(isEnabled: Boolean) {
-        binding.btnSave.isEnabled = isEnabled
-    }
-
-    private fun setupViews() {
-        with(binding) {
-            ivCover.setOnClickListener { changeCoverImage() }
-            btnChangeIcon.setOnClickListener { changeCoverImage() }
-            tilName.editText?.doAfterTextChanged {
-                it?.let { onInputDataChanged() }
-            }
-            tilTopic.editText?.doAfterTextChanged {
-                it?.let { onInputDataChanged() }
-            }
-            btnSave.setOnClickListener {
-                updateRoom(tilName.getText(), tilTopic.getText())
-                startLoading(btnSave)
-            }
-        }
-    }
-
-    private fun onInputDataChanged() {
-        onInputRoomDataChanged(binding.tilName.getText(), binding.tilTopic.getText())
-    }
-}
\ No newline at end of file
diff --git a/core/src/main/java/org/futo/circles/core/feature/timeline/options/TimelineOptionsNavigator.kt b/core/src/main/java/org/futo/circles/core/feature/timeline/options/TimelineOptionsNavigator.kt
index df8f90896..09be0bc5e 100644
--- a/core/src/main/java/org/futo/circles/core/feature/timeline/options/TimelineOptionsNavigator.kt
+++ b/core/src/main/java/org/futo/circles/core/feature/timeline/options/TimelineOptionsNavigator.kt
@@ -15,20 +15,12 @@ class TimelineOptionsNavigator(private val fragment: TimelineOptionsDialogFragme
     }
 
     fun navigateToUpdateRoom(roomId: String, type: CircleRoomTypeArg) {
-        val destination = when (type) {
-            CircleRoomTypeArg.Circle -> TimelineOptionsDialogFragmentDirections.toUpdateCircleDialogFragment(
-                roomId
-            )
-
-            CircleRoomTypeArg.Group -> TimelineOptionsDialogFragmentDirections.toUpdateGroupDialogFragment(
-                roomId
-            )
-
-            CircleRoomTypeArg.Photo -> TimelineOptionsDialogFragmentDirections.toUpdateGalleryDialogFragment(
-                roomId
+        fragment.findNavController().navigateSafe(
+            TimelineOptionsDialogFragmentDirections.toUpdateRoomDialogFragment(
+                roomId,
+                type
             )
-        }
-        fragment.findNavController().navigateSafe(destination)
+        )
     }
 
     fun navigateToManageMembers(timelineId: String, type: CircleRoomTypeArg) {
diff --git a/core/src/main/res/layout/dialog_fragment_update_circle.xml b/core/src/main/res/layout/dialog_fragment_update_circle.xml
deleted file mode 100644
index d3881234a..000000000
--- a/core/src/main/res/layout/dialog_fragment_update_circle.xml
+++ /dev/null
@@ -1,191 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent">
-
-
-    <com.google.android.material.appbar.MaterialToolbar
-        android:id="@+id/toolbar"
-        android:layout_width="0dp"
-        android:layout_height="?attr/actionBarSize"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="parent"
-        app:navigationIcon="?attr/homeAsUpIndicator"
-        app:title="@string/configure_circle"
-        app:titleCentered="true"
-        app:titleMarginEnd="72dp">
-
-        <org.futo.circles.core.view.LoadingButton
-            android:id="@+id/btnSave"
-            android:layout_width="56dp"
-            android:layout_height="match_parent"
-            android:layout_gravity="end"
-            android:layout_marginVertical="8dp"
-            android:layout_marginEnd="8dp"
-            android:enabled="false"
-            android:text="@string/save"
-            android:textSize="13sp"
-            app:textPadding="1dp" />
-
-    </com.google.android.material.appbar.MaterialToolbar>
-
-
-    <View
-        android:id="@+id/toolbarDivider"
-        android:layout_width="0dp"
-        android:layout_height="@dimen/divider_height"
-        android:background="@color/divider_color"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@id/toolbar" />
-
-
-    <androidx.constraintlayout.widget.Guideline
-        android:id="@+id/guidelineStart"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:orientation="vertical"
-        app:layout_constraintGuide_begin="8dp" />
-
-    <androidx.constraintlayout.widget.Guideline
-        android:id="@+id/guidelineEnd"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:orientation="vertical"
-        app:layout_constraintGuide_end="8dp" />
-
-    <com.google.android.material.imageview.ShapeableImageView
-        android:id="@+id/ivCover"
-        android:layout_width="@dimen/group_icon_size"
-        android:layout_height="@dimen/group_icon_size"
-        android:layout_marginTop="16dp"
-        android:clickable="true"
-        android:focusable="true"
-        android:scaleType="centerCrop"
-        android:src="@drawable/add_image_placeholder"
-        app:layout_constraintEnd_toEndOf="@id/guidelineEnd"
-        app:layout_constraintStart_toStartOf="@id/guidelineStart"
-        app:layout_constraintTop_toBottomOf="@id/toolbarDivider"
-        app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.App.GroupIconRadius" />
-
-    <com.google.android.material.button.MaterialButton
-        android:id="@+id/btnChangeIcon"
-        style="@style/NegativeButtonStyle"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="8dp"
-        android:maxHeight="40dp"
-        android:text="@string/change_icon"
-        android:textSize="12sp"
-        app:icon="@drawable/ic_create"
-        app:layout_constraintEnd_toEndOf="@id/guidelineEnd"
-        app:layout_constraintStart_toStartOf="@id/guidelineStart"
-        app:layout_constraintTop_toBottomOf="@+id/ivCover" />
-
-    <TextView
-        android:id="@+id/tvNameHeader"
-        style="@style/headline"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="16dp"
-        app:layout_constraintEnd_toEndOf="@id/guidelineEnd"
-        app:layout_constraintStart_toStartOf="@id/guidelineStart"
-        app:layout_constraintTop_toBottomOf="@id/btnChangeIcon"
-        tools:text="@string/circle_name" />
-
-    <com.google.android.material.textfield.TextInputLayout
-        android:id="@+id/tilName"
-        style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="8dp"
-        app:hintEnabled="false"
-        app:layout_constraintEnd_toEndOf="@id/guidelineEnd"
-        app:layout_constraintStart_toStartOf="@id/guidelineStart"
-        app:layout_constraintTop_toBottomOf="@id/tvNameHeader">
-
-        <com.google.android.material.textfield.TextInputEditText
-            android:id="@+id/etName"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:imeOptions="actionNext"
-            android:inputType="text"
-            android:maxLines="1"
-            android:padding="12dp" />
-
-    </com.google.android.material.textfield.TextInputLayout>
-
-    <TextView
-        android:id="@+id/tvTypeHeader"
-        style="@style/headline"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="16dp"
-        android:text="@string/circle_type"
-        app:layout_constraintEnd_toEndOf="@id/guidelineEnd"
-        app:layout_constraintStart_toStartOf="@id/guidelineStart"
-        app:layout_constraintTop_toBottomOf="@+id/tilName" />
-
-    <RadioGroup
-        android:id="@+id/circleTypeGroup"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="8dp"
-        android:orientation="vertical"
-        app:layout_constraintEnd_toEndOf="@id/guidelineEnd"
-        app:layout_constraintStart_toStartOf="@id/guidelineStart"
-        app:layout_constraintTop_toBottomOf="@id/tvTypeHeader">
-
-        <com.google.android.material.radiobutton.MaterialRadioButton
-            android:id="@+id/btnPublic"
-            android:layout_width="wrap_content"
-            android:layout_height="36dp"
-            android:text="@string/public_type"
-            android:textAppearance="@style/body" />
-
-        <TextView
-            android:id="@+id/tvOpenHint"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginStart="32dp"
-            android:text="@string/public_circle_explanation" />
-
-        <com.google.android.material.radiobutton.MaterialRadioButton
-            android:id="@+id/btnPrivate"
-            android:layout_width="wrap_content"
-            android:layout_height="36dp"
-            android:layout_marginTop="8dp"
-            android:checked="true"
-            android:text="@string/private_type"
-            android:textAppearance="@style/body" />
-
-        <TextView
-            android:id="@+id/tvClosedHint"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginStart="32dp"
-            android:text="@string/private_circle_explanation" />
-
-    </RadioGroup>
-
-
-    <TextView
-        android:id="@+id/tvEncryptionWarning"
-        style="@style/footNote"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="16dp"
-        android:drawablePadding="8dp"
-        android:gravity="center_vertical"
-        android:text="@string/circle_encryption_warning"
-        android:textColor="@color/yellow"
-        app:drawableStartCompat="@drawable/ic_info"
-        app:drawableTint="@color/yellow"
-        app:layout_constraintEnd_toEndOf="@id/guidelineEnd"
-        app:layout_constraintStart_toStartOf="@id/guidelineStart"
-        app:layout_constraintTop_toBottomOf="@id/circleTypeGroup" />
-
-</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
diff --git a/core/src/main/res/layout/dialog_fragment_update_gallery.xml b/core/src/main/res/layout/dialog_fragment_update_gallery.xml
deleted file mode 100644
index af7b91b00..000000000
--- a/core/src/main/res/layout/dialog_fragment_update_gallery.xml
+++ /dev/null
@@ -1,136 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent">
-
-
-    <com.google.android.material.appbar.MaterialToolbar
-        android:id="@+id/toolbar"
-        android:layout_width="0dp"
-        android:layout_height="?attr/actionBarSize"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="parent"
-        app:navigationIcon="?attr/homeAsUpIndicator"
-        app:title="@string/configure_gallery"
-        app:titleCentered="true"
-        app:titleMarginEnd="72dp">
-
-        <org.futo.circles.core.view.LoadingButton
-            android:id="@+id/btnSave"
-            android:layout_width="56dp"
-            android:layout_height="match_parent"
-            android:layout_gravity="end"
-            android:layout_marginVertical="8dp"
-            android:layout_marginEnd="8dp"
-            android:enabled="false"
-            android:text="@string/save"
-            android:textSize="13sp"
-            app:textPadding="1dp" />
-
-    </com.google.android.material.appbar.MaterialToolbar>
-
-
-    <View
-        android:id="@+id/toolbarDivider"
-        android:layout_width="0dp"
-        android:layout_height="@dimen/divider_height"
-        android:background="@color/divider_color"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@id/toolbar" />
-
-
-    <androidx.constraintlayout.widget.Guideline
-        android:id="@+id/guidelineStart"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:orientation="vertical"
-        app:layout_constraintGuide_begin="8dp" />
-
-    <androidx.constraintlayout.widget.Guideline
-        android:id="@+id/guidelineEnd"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:orientation="vertical"
-        app:layout_constraintGuide_end="8dp" />
-
-    <com.google.android.material.imageview.ShapeableImageView
-        android:id="@+id/ivCover"
-        android:layout_width="@dimen/group_icon_size"
-        android:layout_height="@dimen/group_icon_size"
-        android:layout_marginTop="16dp"
-        android:clickable="true"
-        android:focusable="true"
-        android:scaleType="centerCrop"
-        android:src="@drawable/add_image_placeholder"
-        app:layout_constraintEnd_toEndOf="@id/guidelineEnd"
-        app:layout_constraintStart_toStartOf="@id/guidelineStart"
-        app:layout_constraintTop_toBottomOf="@id/toolbarDivider"
-        app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.App.GroupIconRadius" />
-
-    <com.google.android.material.button.MaterialButton
-        android:id="@+id/btnChangeIcon"
-        style="@style/NegativeButtonStyle"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="8dp"
-        android:maxHeight="40dp"
-        android:text="@string/change_icon"
-        android:textSize="12sp"
-        app:icon="@drawable/ic_create"
-        app:layout_constraintEnd_toEndOf="@id/guidelineEnd"
-        app:layout_constraintStart_toStartOf="@id/guidelineStart"
-        app:layout_constraintTop_toBottomOf="@+id/ivCover" />
-
-    <TextView
-        android:id="@+id/tvNameHeader"
-        style="@style/headline"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="16dp"
-        android:text="@string/gallery_name"
-        app:layout_constraintEnd_toEndOf="@id/guidelineEnd"
-        app:layout_constraintStart_toStartOf="@id/guidelineStart"
-        app:layout_constraintTop_toBottomOf="@id/btnChangeIcon" />
-
-    <com.google.android.material.textfield.TextInputLayout
-        android:id="@+id/tilName"
-        style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="8dp"
-        app:hintEnabled="false"
-        app:layout_constraintEnd_toEndOf="@id/guidelineEnd"
-        app:layout_constraintStart_toStartOf="@id/guidelineStart"
-        app:layout_constraintTop_toBottomOf="@id/tvNameHeader">
-
-        <com.google.android.material.textfield.TextInputEditText
-            android:id="@+id/etName"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:imeOptions="actionNext"
-            android:inputType="text"
-            android:maxLines="1"
-            android:padding="12dp" />
-
-    </com.google.android.material.textfield.TextInputLayout>
-
-    <TextView
-        android:id="@+id/tvEncryptionWarning"
-        style="@style/footNote"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="16dp"
-        android:drawablePadding="8dp"
-        android:gravity="center_vertical"
-        android:text="@string/gallery_encryption_warning"
-        android:textColor="@color/yellow"
-        app:drawableStartCompat="@drawable/ic_info"
-        app:drawableTint="@color/yellow"
-        app:layout_constraintEnd_toEndOf="@id/guidelineEnd"
-        app:layout_constraintStart_toStartOf="@id/guidelineStart"
-        app:layout_constraintTop_toBottomOf="@id/tilName" />
-
-</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
diff --git a/core/src/main/res/layout/dialog_fragment_update_group.xml b/core/src/main/res/layout/dialog_fragment_update_group.xml
deleted file mode 100644
index 81c56e407..000000000
--- a/core/src/main/res/layout/dialog_fragment_update_group.xml
+++ /dev/null
@@ -1,170 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent">
-
-
-    <com.google.android.material.appbar.MaterialToolbar
-        android:id="@+id/toolbar"
-        android:layout_width="0dp"
-        android:layout_height="?attr/actionBarSize"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="parent"
-        app:navigationIcon="?attr/homeAsUpIndicator"
-        app:title="@string/configure_group"
-        app:titleCentered="true"
-        app:titleMarginEnd="72dp">
-
-        <org.futo.circles.core.view.LoadingButton
-            android:id="@+id/btnSave"
-            android:layout_width="56dp"
-            android:layout_height="match_parent"
-            android:layout_gravity="end"
-            android:layout_marginVertical="8dp"
-            android:layout_marginEnd="8dp"
-            android:enabled="false"
-            android:text="@string/save"
-            android:textSize="13sp"
-            app:textPadding="1dp" />
-
-    </com.google.android.material.appbar.MaterialToolbar>
-
-
-    <View
-        android:id="@+id/toolbarDivider"
-        android:layout_width="0dp"
-        android:layout_height="@dimen/divider_height"
-        android:background="@color/divider_color"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@id/toolbar" />
-
-
-    <androidx.constraintlayout.widget.Guideline
-        android:id="@+id/guidelineStart"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:orientation="vertical"
-        app:layout_constraintGuide_begin="8dp" />
-
-    <androidx.constraintlayout.widget.Guideline
-        android:id="@+id/guidelineEnd"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:orientation="vertical"
-        app:layout_constraintGuide_end="8dp" />
-
-    <com.google.android.material.imageview.ShapeableImageView
-        android:id="@+id/ivCover"
-        android:layout_width="@dimen/group_icon_size"
-        android:layout_height="@dimen/group_icon_size"
-        android:layout_marginTop="16dp"
-        android:clickable="true"
-        android:focusable="true"
-        android:scaleType="centerCrop"
-        android:src="@drawable/add_image_placeholder"
-        app:layout_constraintEnd_toEndOf="@id/guidelineEnd"
-        app:layout_constraintStart_toStartOf="@id/guidelineStart"
-        app:layout_constraintTop_toBottomOf="@id/toolbarDivider"
-        app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.App.GroupIconRadius" />
-
-    <com.google.android.material.button.MaterialButton
-        android:id="@+id/btnChangeIcon"
-        style="@style/NegativeButtonStyle"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="8dp"
-        android:maxHeight="40dp"
-        android:text="@string/change_icon"
-        android:textSize="12sp"
-        app:icon="@drawable/ic_create"
-        app:layout_constraintEnd_toEndOf="@id/guidelineEnd"
-        app:layout_constraintStart_toStartOf="@id/guidelineStart"
-        app:layout_constraintTop_toBottomOf="@+id/ivCover" />
-
-    <TextView
-        android:id="@+id/tvNameHeader"
-        style="@style/headline"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="16dp"
-        android:text="@string/group_name"
-        app:layout_constraintEnd_toEndOf="@id/guidelineEnd"
-        app:layout_constraintStart_toStartOf="@id/guidelineStart"
-        app:layout_constraintTop_toBottomOf="@id/btnChangeIcon" />
-
-    <com.google.android.material.textfield.TextInputLayout
-        android:id="@+id/tilName"
-        style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="8dp"
-        app:hintEnabled="false"
-        app:layout_constraintEnd_toEndOf="@id/guidelineEnd"
-        app:layout_constraintStart_toStartOf="@id/guidelineStart"
-        app:layout_constraintTop_toBottomOf="@id/tvNameHeader">
-
-        <com.google.android.material.textfield.TextInputEditText
-            android:id="@+id/etName"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:imeOptions="actionNext"
-            android:inputType="text"
-            android:maxLines="1"
-            android:padding="12dp" />
-
-    </com.google.android.material.textfield.TextInputLayout>
-
-    <TextView
-        android:id="@+id/tvTopicHeader"
-        style="@style/headline"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="16dp"
-        android:text="@string/group_topic"
-        app:layout_constraintEnd_toEndOf="@id/guidelineEnd"
-        app:layout_constraintStart_toStartOf="@id/guidelineStart"
-        app:layout_constraintTop_toBottomOf="@id/tilName" />
-
-    <com.google.android.material.textfield.TextInputLayout
-        android:id="@+id/tilTopic"
-        style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="8dp"
-        app:hintEnabled="false"
-        app:layout_constraintEnd_toEndOf="@id/guidelineEnd"
-        app:layout_constraintStart_toStartOf="@id/guidelineStart"
-        app:layout_constraintTop_toBottomOf="@id/tvTopicHeader">
-
-        <com.google.android.material.textfield.TextInputEditText
-            android:id="@+id/etTopic"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:imeOptions="actionDone"
-            android:inputType="text"
-            android:maxLines="1"
-            android:padding="12dp" />
-
-    </com.google.android.material.textfield.TextInputLayout>
-
-
-    <TextView
-        android:id="@+id/tvEncryptionWarning"
-        style="@style/footNote"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="16dp"
-        android:drawablePadding="8dp"
-        android:gravity="center_vertical"
-        android:text="@string/group_encryption_warning"
-        android:textColor="@color/yellow"
-        app:drawableStartCompat="@drawable/ic_info"
-        app:drawableTint="@color/yellow"
-        app:layout_constraintEnd_toEndOf="@id/guidelineEnd"
-        app:layout_constraintStart_toStartOf="@id/guidelineStart"
-        app:layout_constraintTop_toBottomOf="@id/tilTopic" />
-
-</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
diff --git a/core/src/main/res/layout/dialog_fragment_update_room.xml b/core/src/main/res/layout/dialog_fragment_update_room.xml
new file mode 100644
index 000000000..d5a978bf2
--- /dev/null
+++ b/core/src/main/res/layout/dialog_fragment_update_room.xml
@@ -0,0 +1,235 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:fillViewport="true"
+    android:orientation="vertical">
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical">
+
+
+        <com.google.android.material.appbar.MaterialToolbar
+            android:id="@+id/toolbar"
+            android:layout_width="match_parent"
+            android:layout_height="?attr/actionBarSize"
+            app:layout_constraintEnd_toEndOf="parent"
+            app:layout_constraintStart_toStartOf="parent"
+            app:layout_constraintTop_toTopOf="parent"
+            app:navigationIcon="?attr/homeAsUpIndicator"
+            app:titleCentered="true"
+            app:titleMarginEnd="72dp">
+
+            <org.futo.circles.core.view.LoadingButton
+                android:id="@+id/btnSave"
+                android:layout_width="56dp"
+                android:layout_height="match_parent"
+                android:layout_gravity="end"
+                android:layout_marginVertical="8dp"
+                android:layout_marginEnd="8dp"
+                android:enabled="false"
+                android:text="@string/save"
+                android:textSize="13sp"
+                app:textPadding="1dp" />
+
+        </com.google.android.material.appbar.MaterialToolbar>
+
+
+        <View
+            android:id="@+id/toolbarDivider"
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/divider_height"
+            android:background="@color/divider_color"
+            app:layout_constraintEnd_toEndOf="parent"
+            app:layout_constraintStart_toStartOf="parent"
+            app:layout_constraintTop_toBottomOf="@id/toolbar" />
+
+
+        <com.google.android.material.imageview.ShapeableImageView
+            android:id="@+id/ivCover"
+            android:layout_width="@dimen/group_icon_size"
+            android:layout_height="@dimen/group_icon_size"
+            android:layout_gravity="center_horizontal"
+            android:layout_marginTop="16dp"
+            android:clickable="true"
+            android:focusable="true"
+            android:scaleType="centerCrop"
+            android:src="@drawable/add_image_placeholder"
+            app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.App.GroupIconRadius" />
+
+        <com.google.android.material.button.MaterialButton
+            android:id="@+id/btnChangeIcon"
+            style="@style/NegativeButtonStyle"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center_horizontal"
+            android:layout_marginTop="8dp"
+            android:maxHeight="40dp"
+            android:text="@string/change_icon"
+            android:textSize="12sp"
+            app:icon="@drawable/ic_create" />
+
+        <TextView
+            android:id="@+id/tvNameHeader"
+            style="@style/headline"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginHorizontal="8dp"
+            android:layout_marginTop="16dp"
+            tools:text="Room name" />
+
+        <com.google.android.material.textfield.TextInputLayout
+            android:id="@+id/tilName"
+            style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginHorizontal="8dp"
+            android:layout_marginTop="8dp"
+            app:hintEnabled="false">
+
+            <com.google.android.material.textfield.TextInputEditText
+                android:id="@+id/etName"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:imeOptions="actionNext"
+                android:inputType="textCapSentences"
+                android:maxLines="1"
+                android:padding="12dp" />
+
+        </com.google.android.material.textfield.TextInputLayout>
+
+        <TextView
+            android:id="@+id/tvTopicHeader"
+            style="@style/headline"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginHorizontal="8dp"
+            android:layout_marginTop="16dp"
+            android:text="@string/group_topic_optional" />
+
+        <com.google.android.material.textfield.TextInputLayout
+            android:id="@+id/tilTopic"
+            style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginHorizontal="8dp"
+            android:layout_marginTop="8dp"
+            app:hintEnabled="false">
+
+            <com.google.android.material.textfield.TextInputEditText
+                android:id="@+id/etTopic"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:imeOptions="actionDone"
+                android:inputType="text"
+                android:maxLines="1"
+                android:padding="12dp" />
+
+        </com.google.android.material.textfield.TextInputLayout>
+
+
+        <TextView
+            android:id="@+id/tvTypeHeader"
+            style="@style/headline"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginHorizontal="8dp"
+            android:layout_marginTop="16dp"
+            android:text="@string/circle_type" />
+
+        <RadioGroup
+            android:id="@+id/circleTypeGroup"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginHorizontal="8dp"
+            android:layout_marginTop="8dp"
+            android:orientation="horizontal"
+            app:layout_constraintEnd_toEndOf="@id/guidelineEnd"
+            app:layout_constraintStart_toStartOf="@id/guidelineStart"
+            app:layout_constraintTop_toBottomOf="@id/tvTypeHeader">
+
+            <com.google.android.material.radiobutton.MaterialRadioButton
+                android:id="@+id/btnPublic"
+                android:layout_width="match_parent"
+                android:layout_weight="0.5"
+                android:paddingVertical="12dp"
+                android:text="@string/public_type"
+                android:textAppearance="@style/body" />
+
+
+            <com.google.android.material.radiobutton.MaterialRadioButton
+                android:id="@+id/btnPrivate"
+                android:layout_width="match_parent"
+                android:layout_weight="0.5"
+                android:checked="true"
+                android:paddingVertical="12dp"
+                android:text="@string/private_type"
+                android:textAppearance="@style/body" />
+
+        </RadioGroup>
+
+        <LinearLayout
+            android:id="@+id/lCircleTypeExplanation"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginHorizontal="8dp"
+            android:orientation="horizontal">
+
+            <TextView
+                android:id="@+id/tvPublicHint"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_weight="0.5"
+                android:text="@string/public_circle_explanation" />
+
+            <TextView
+                android:id="@+id/tvPrivateHint"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_weight="0.5"
+                android:text="@string/private_circle_explanation" />
+
+        </LinearLayout>
+
+
+        <TextView
+            android:id="@+id/tvRoleHeader"
+            style="@style/headline"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginHorizontal="8dp"
+            android:layout_marginTop="16dp"
+            android:text="@string/default_user_role" />
+
+
+        <Spinner
+            android:id="@+id/spUserRole"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginHorizontal="8dp"
+            android:layout_marginTop="8dp" />
+
+
+        <TextView
+            android:id="@+id/tvEncryptionWarning"
+            style="@style/footNote"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginHorizontal="8dp"
+            android:layout_marginTop="16dp"
+            android:drawablePadding="8dp"
+            android:gravity="center_vertical"
+            android:text="@string/encryption_warning"
+            android:textColor="@color/yellow"
+            app:drawableStartCompat="@drawable/ic_info"
+            app:drawableTint="@color/yellow"
+            app:layout_constraintEnd_toEndOf="@id/guidelineEnd"
+            app:layout_constraintStart_toStartOf="@id/guidelineStart"
+            app:layout_constraintTop_toBottomOf="@id/circleTypeGroup" />
+
+    </LinearLayout>
+</ScrollView>
\ No newline at end of file
diff --git a/core/src/main/res/navigation/timeline_options_nav_graph.xml b/core/src/main/res/navigation/timeline_options_nav_graph.xml
index 8829ce69f..c22b90960 100644
--- a/core/src/main/res/navigation/timeline_options_nav_graph.xml
+++ b/core/src/main/res/navigation/timeline_options_nav_graph.xml
@@ -52,37 +52,21 @@
         </action>
 
         <action
-            android:id="@+id/to_updateCircleDialogFragment"
-            app:destination="@id/updateCircleDialogFragment">
+            android:id="@+id/to_updateRoomDialogFragment"
+            app:destination="@id/updateRoomDialogFragment">
 
             <argument
                 android:name="roomId"
                 app:argType="string"
                 app:nullable="false" />
 
-        </action>
-
-        <action
-            android:id="@+id/to_updateGroupDialogFragment"
-            app:destination="@id/updateGroupDialogFragment">
-
             <argument
-                android:name="roomId"
-                app:argType="string"
+                android:name="type"
+                app:argType="org.futo.circles.core.model.CircleRoomTypeArg"
                 app:nullable="false" />
 
         </action>
 
-        <action
-            android:id="@+id/to_updateGalleryDialogFragment"
-            app:destination="@id/updateGalleryDialogFragment">
-
-            <argument
-                android:name="roomId"
-                app:argType="string"
-                app:nullable="false" />
-
-        </action>
 
         <action
             android:id="@+id/to_inviteMembersDialogFragment"
@@ -145,40 +129,22 @@
 
     </dialog>
     <dialog
-        android:id="@+id/updateCircleDialogFragment"
-        android:name="org.futo.circles.core.feature.room.update.circle.UpdateCircleDialogFragment"
-        tools:layout="@layout/dialog_fragment_update_circle">
+        android:id="@+id/updateRoomDialogFragment"
+        android:name="org.futo.circles.core.feature.room.update.UpdateRoomDialogFragment"
+        tools:layout="@layout/dialog_fragment_update_room">
 
         <argument
             android:name="roomId"
             app:argType="string"
             app:nullable="false" />
 
-    </dialog>
-
-    <dialog
-        android:id="@+id/updateGalleryDialogFragment"
-        android:name="org.futo.circles.core.feature.room.update.gallery.UpdateGalleryDialogFragment"
-        tools:layout="@layout/dialog_fragment_update_gallery">
-
         <argument
-            android:name="roomId"
-            app:argType="string"
+            android:name="type"
+            app:argType="org.futo.circles.core.model.CircleRoomTypeArg"
             app:nullable="false" />
 
     </dialog>
 
-    <dialog
-        android:id="@+id/updateGroupDialogFragment"
-        android:name="org.futo.circles.core.feature.room.update.group.UpdateGroupDialogFragment"
-        tools:layout="@layout/dialog_fragment_update_group">
-
-        <argument
-            android:name="roomId"
-            app:argType="string"
-            app:nullable="false" />
-
-    </dialog>
     <dialog
         android:id="@+id/inviteMembersDialogFragment"
         android:name="org.futo.circles.core.feature.room.invite.InviteMembersDialogFragment"
diff --git a/core/src/main/res/values/strings.xml b/core/src/main/res/values/strings.xml
index 6318eb90f..3e63a6711 100644
--- a/core/src/main/res/values/strings.xml
+++ b/core/src/main/res/values/strings.xml
@@ -119,15 +119,13 @@
     <string name="configure_circle">Configure circle</string>
     <string name="invite_followers">Invite followers</string>
     <string name="select_another_admin_message">You must select another member as an \"Admin\" to be able to leave this room.</string>
-    <string name="group_updated">Group updated</string>
-    <string name="circle_updated">Circle updated</string>
-    <string name="gallery_updated">Gallery updated</string>
+    <string name="updated">Updated</string>
     <string name="last_updated_formatter">Last updated %s</string>
     <string name="delete_gallery_message">Are you sure you want to remove this gallery?</string>
     <string name="accept">Accept</string>
     <string name="decline">Decline</string>
     <string name="invited_by_format">Invited by %s</string>
-    <string name="circle_encryption_warning">NOTE: Circle name and cover image are not encrypted</string>
+    <string name="encryption_warning">NOTE: name and cover image are not encrypted</string>
     <string name="name">name</string>
     <string name="create_new_room_format">Create new %s</string>
     <string name="circle_type">Circle type</string>
@@ -137,9 +135,7 @@
     <string name="private_type">Private</string>
     <string name="private_circle_explanation">Accessible only by invitation</string>
     <string name="gallery_name">Gallery name</string>
-    <string name="gallery_encryption_warning">NOTE: Gallery name and cover image are not encrypted</string>
     <string name="group_name">Group name</string>
-    <string name="group_encryption_warning">NOTE: Group name, topic and cover image are not encrypted</string>
     <string name="group_topic">Group topic</string>
     <string name="remove_from_this_circle_but_do_not_unfollow">Remove from this circle, but do not unfollow</string>
     <string name="unfollow_completely_remove_from_all_circles">Unfollow completely (remove from all circles)</string>
-- 
GitLab