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
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
startActivity(Intent(this, RoomDirectoryActivity::class.java))
return true

View file

@ -78,6 +78,8 @@ class PublicRoomsFragment : VectorBaseFragment(), PublicRoomsController.Callback
.disposeOnDestroy()
publicRoomsCreateNewRoom.setOnClickListener {
// TODO homeActivityViewModel.createRoom()
vectorBaseActivity.notImplemented()
}

View file

@ -69,9 +69,12 @@ class RoomDirectoryPickerController(private val stringProvider: StringProvider,
directoryName(roomDirectoryData.displayName)
val description = when {
roomDirectoryData.includeAllNetworks -> stringProvider.getString(R.string.directory_server_all_rooms_on_server, roomDirectoryData.displayName)
"Matrix" == roomDirectoryData.displayName -> stringProvider.getString(R.string.directory_server_native_rooms, roomDirectoryData.displayName)
else -> null
roomDirectoryData.includeAllNetworks ->
stringProvider.getString(R.string.directory_server_all_rooms_on_server, roomDirectoryData.displayName)
"Matrix" == roomDirectoryData.displayName ->
stringProvider.getString(R.string.directory_server_native_rooms, roomDirectoryData.displayName)
else ->
null
}
directoryDescription(description)

View file

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

View file

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

View file

@ -16,9 +16,4 @@
android:id="@+id/tmp_menu_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>

View file

@ -22,4 +22,6 @@
<string name="error_no_network">No network. Please check your Internet connection.</string>
<string name="action_change">"Change"</string>
</resources>