mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-16 02:05:06 +08:00
Room settings: rename stuff for genericity
This commit is contained in:
parent
eee6969b02
commit
56b140fcb4
@ -29,7 +29,7 @@ import im.vector.riotx.core.extensions.configureWith
|
||||
import im.vector.riotx.core.platform.VectorBaseFragment
|
||||
import im.vector.riotx.features.home.AvatarRenderer
|
||||
import im.vector.riotx.features.roomprofile.RoomProfileArgs
|
||||
import kotlinx.android.synthetic.main.fragment_room_member_list.*
|
||||
import kotlinx.android.synthetic.main.fragment_room_setting_generic.*
|
||||
import javax.inject.Inject
|
||||
|
||||
class RoomMemberListFragment @Inject constructor(
|
||||
@ -41,12 +41,12 @@ class RoomMemberListFragment @Inject constructor(
|
||||
private val viewModel: RoomMemberListViewModel by fragmentViewModel()
|
||||
private val roomProfileArgs: RoomProfileArgs by args()
|
||||
|
||||
override fun getLayoutResId() = R.layout.fragment_room_member_list
|
||||
override fun getLayoutResId() = R.layout.fragment_room_setting_generic
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
roomMemberListController.callback = this
|
||||
setupToolbar(roomMemberListToolbar)
|
||||
setupToolbar(roomSettingsToolbar)
|
||||
recyclerView.configureWith(roomMemberListController, hasFixedSize = true)
|
||||
}
|
||||
|
||||
@ -66,8 +66,8 @@ class RoomMemberListFragment @Inject constructor(
|
||||
|
||||
private fun renderRoomSummary(state: RoomMemberListViewState) {
|
||||
state.roomSummary()?.let {
|
||||
roomMemberListToolbarTitleView.text = it.displayName
|
||||
avatarRenderer.render(it.toMatrixItem(), roomMemberListToolbarAvatarImageView)
|
||||
roomSettingsToolbarTitleView.text = it.displayName
|
||||
avatarRenderer.render(it.toMatrixItem(), roomSettingsToolbarAvatarImageView)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ import im.vector.riotx.core.extensions.observeEvent
|
||||
import im.vector.riotx.core.platform.VectorBaseFragment
|
||||
import im.vector.riotx.features.home.AvatarRenderer
|
||||
import im.vector.riotx.features.roomprofile.RoomProfileArgs
|
||||
import kotlinx.android.synthetic.main.fragment_room_member_list.*
|
||||
import kotlinx.android.synthetic.main.fragment_room_setting_generic.*
|
||||
import kotlinx.android.synthetic.main.merge_overlay_waiting_view.*
|
||||
import javax.inject.Inject
|
||||
|
||||
@ -44,12 +44,12 @@ class RoomSettingsFragment @Inject constructor(
|
||||
private val viewModel: RoomSettingsViewModel by fragmentViewModel()
|
||||
private val roomProfileArgs: RoomProfileArgs by args()
|
||||
|
||||
override fun getLayoutResId() = R.layout.fragment_room_member_list
|
||||
override fun getLayoutResId() = R.layout.fragment_room_setting_generic
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
controller.callback = this
|
||||
setupToolbar(roomMemberListToolbar)
|
||||
setupToolbar(roomSettingsToolbar)
|
||||
recyclerView.configureWith(controller, hasFixedSize = true)
|
||||
waiting_view_status_text.setText(R.string.please_wait)
|
||||
waiting_view_status_text.isVisible = true
|
||||
@ -77,8 +77,8 @@ class RoomSettingsFragment @Inject constructor(
|
||||
waiting_view.isVisible = state.currentRequest is Loading
|
||||
|
||||
state.roomSummary()?.let {
|
||||
roomMemberListToolbarTitleView.text = it.displayName
|
||||
avatarRenderer.render(it.toMatrixItem(), roomMemberListToolbarAvatarImageView)
|
||||
roomSettingsToolbarTitleView.text = it.displayName
|
||||
avatarRenderer.render(it.toMatrixItem(), roomSettingsToolbarAvatarImageView)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,7 @@
|
||||
android:background="?riotx_header_panel_background">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/roomMemberListToolbar"
|
||||
android:id="@+id/roomSettingsToolbar"
|
||||
style="@style/VectorToolbarStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="?actionBarSize"
|
||||
@ -18,12 +18,12 @@
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/roomMemberListToolbarContentView"
|
||||
android:id="@+id/roomSettingsToolbarContentView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/roomMemberListToolbarAvatarImageView"
|
||||
android:id="@+id/roomSettingsToolbarAvatarImageView"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginTop="8dp"
|
||||
@ -34,7 +34,7 @@
|
||||
tools:src="@tools:sample/avatars" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/roomMemberListToolbarTitleView"
|
||||
android:id="@+id/roomSettingsToolbarTitleView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
@ -45,7 +45,7 @@
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/roomMemberListToolbarAvatarImageView"
|
||||
app:layout_constraintStart_toEndOf="@+id/roomSettingsToolbarAvatarImageView"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="@sample/matrix.json/data/roomName" />
|
||||
|
||||
@ -61,8 +61,8 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/roomMemberListToolbar"
|
||||
tools:listitem="@layout/item_autocomplete_matrix_item" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/roomSettingsToolbar"
|
||||
tools:listitem="@layout/item_profile_action" />
|
||||
|
||||
<include layout="@layout/merge_overlay_waiting_view" />
|
||||
|
Loading…
Reference in New Issue
Block a user