Code quality

This commit is contained in:
Benoit Marty 2019-05-27 13:57:07 +02:00
parent 14611d1f7b
commit 39f69a6c3b
7 changed files with 11 additions and 16 deletions

View File

@ -139,11 +139,6 @@ class HomeActivity : VectorBaseActivity(), ToolbarConfigurable {
} }
// TODO Temporary code here to create a room // TODO Temporary code here to create a room
R.id.tmp_menu_create_room -> { R.id.tmp_menu_create_room -> {
homeActivityViewModel.createRoom()
return true
}
// TODO Temporary code here to open room directory
R.id.tmp_menu_open_room_directory -> {
// Start Activity for now // Start Activity for now
startActivity(Intent(this, RoomDirectoryActivity::class.java)) startActivity(Intent(this, RoomDirectoryActivity::class.java))
return true return true

View File

@ -78,6 +78,8 @@ class PublicRoomsFragment : VectorBaseFragment(), PublicRoomsController.Callback
.disposeOnDestroy() .disposeOnDestroy()


publicRoomsCreateNewRoom.setOnClickListener { publicRoomsCreateNewRoom.setOnClickListener {
// TODO homeActivityViewModel.createRoom()

vectorBaseActivity.notImplemented() vectorBaseActivity.notImplemented()
} }



View File

@ -69,9 +69,12 @@ class RoomDirectoryPickerController(private val stringProvider: StringProvider,
directoryName(roomDirectoryData.displayName) directoryName(roomDirectoryData.displayName)


val description = when { val description = when {
roomDirectoryData.includeAllNetworks -> stringProvider.getString(R.string.directory_server_all_rooms_on_server, roomDirectoryData.displayName) roomDirectoryData.includeAllNetworks ->
"Matrix" == roomDirectoryData.displayName -> stringProvider.getString(R.string.directory_server_native_rooms, roomDirectoryData.displayName) stringProvider.getString(R.string.directory_server_all_rooms_on_server, roomDirectoryData.displayName)
else -> null "Matrix" == roomDirectoryData.displayName ->
stringProvider.getString(R.string.directory_server_native_rooms, roomDirectoryData.displayName)
else ->
null
} }


directoryDescription(description) directoryDescription(description)

View File

@ -93,7 +93,7 @@
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:text="Change" /> android:text="@string/action_change" />




</RelativeLayout> </RelativeLayout>

View File

@ -12,8 +12,6 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
app:layout_constraintBottom_toTopOf="@+id/itemPublicRoomBottomSeparator" app:layout_constraintBottom_toTopOf="@+id/itemPublicRoomBottomSeparator"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"

View File

@ -16,9 +16,4 @@
android:id="@+id/tmp_menu_create_room" android:id="@+id/tmp_menu_create_room"
android:title="@string/room_recents_create_room" /> android:title="@string/room_recents_create_room" />


<!-- TODO Temporary code -->
<item
android:id="@+id/tmp_menu_open_room_directory"
android:title="Open room directory" />

</menu> </menu>

View File

@ -22,4 +22,6 @@


<string name="error_no_network">No network. Please check your Internet connection.</string> <string name="error_no_network">No network. Please check your Internet connection.</string>


<string name="action_change">"Change"</string>

</resources> </resources>