code review
This commit is contained in:
parent
84ef079206
commit
6d023188da
|
@ -117,6 +117,8 @@ class SpaceAddRoomFragment @Inject constructor(
|
||||||
spaceEpoxyController.disabled = !it
|
spaceEpoxyController.disabled = !it
|
||||||
roomEpoxyController.disabled = it
|
roomEpoxyController.disabled = it
|
||||||
views.createNewRoom.text = if (it) getString(R.string.create_space) else getString(R.string.create_new_room)
|
views.createNewRoom.text = if (it) getString(R.string.create_space) else getString(R.string.create_new_room)
|
||||||
|
val title = if (it) getString(R.string.space_add_existing_spaces) else getString(R.string.space_add_existing_rooms_only)
|
||||||
|
views.appBarTitle.text = title
|
||||||
}.disposeOnDestroyView()
|
}.disposeOnDestroyView()
|
||||||
|
|
||||||
views.createNewRoom.debouncedClicks {
|
views.createNewRoom.debouncedClicks {
|
||||||
|
@ -152,14 +154,6 @@ class SpaceAddRoomFragment @Inject constructor(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onResume() {
|
|
||||||
super.onResume()
|
|
||||||
withState(viewModel) { state ->
|
|
||||||
val title = if (state.onlyShowSpaces) getString(R.string.space_add_existing_spaces) else getString(R.string.space_add_existing_rooms_only)
|
|
||||||
views.appBarTitle.text = title
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onPrepareOptionsMenu(menu: Menu) {
|
override fun onPrepareOptionsMenu(menu: Menu) {
|
||||||
super.onPrepareOptionsMenu(menu)
|
super.onPrepareOptionsMenu(menu)
|
||||||
menu.findItem(R.id.spaceAddRoomSaveItem).isVisible = saveNeeded
|
menu.findItem(R.id.spaceAddRoomSaveItem).isVisible = saveNeeded
|
||||||
|
|
Loading…
Reference in New Issue