Add a menu item to open the setting in room list and in room (#2171)

This commit is contained in:
Benoit Marty 2020-10-01 17:43:43 +02:00 committed by Benoit Marty
parent f030e098a8
commit 6f2736566e
6 changed files with 23 additions and 1 deletions

View file

@ -11,6 +11,7 @@ Improvements 🙌:
- Small optimisation of scrolling experience in timeline (#2114) - Small optimisation of scrolling experience in timeline (#2114)
- Allow user to reset cross signing if he has no way to recover (#2052) - Allow user to reset cross signing if he has no way to recover (#2052)
- Create home shortcut for any room (#1525) - Create home shortcut for any room (#1525)
- Add a menu item to open the setting in room list and in room (#2171)
Bugfix 🐛: Bugfix 🐛:
- Improve support for image/audio/video/file selection with intent changes (#1376) - Improve support for image/audio/video/file selection with intent changes (#1376)

View file

@ -305,6 +305,10 @@ class HomeActivity : VectorBaseActivity(), ToolbarConfigurable, UnknownDeviceDet
navigator.openRoomsFiltering(this) navigator.openRoomsFiltering(this)
return true return true
} }
R.id.menu_home_setting ->{
navigator.openSettings(this)
return true
}
} }
return super.onOptionsItemSelected(item) return super.onOptionsItemSelected(item)

View file

@ -656,6 +656,10 @@ class RoomDetailFragment @Inject constructor(
roomDetailViewModel.handle(RoomDetailAction.ClearSendQueue) roomDetailViewModel.handle(RoomDetailAction.ClearSendQueue)
true true
} }
R.id.timeline_setting -> {
navigator.openRoomProfile(requireActivity(), roomDetailArgs.roomId)
true
}
R.id.resend_all -> { R.id.resend_all -> {
roomDetailViewModel.handle(RoomDetailAction.ResendAll) roomDetailViewModel.handle(RoomDetailAction.ResendAll)
true true

View file

@ -533,6 +533,7 @@ class RoomDetailViewModel @AssistedInject constructor(
// For now always disable when not in developer mode, worker cancellation is not working properly // For now always disable when not in developer mode, worker cancellation is not working properly
timeline.pendingEventCount() > 0 && vectorPreferences.developerMode() timeline.pendingEventCount() > 0 && vectorPreferences.developerMode()
R.id.resend_all -> state.asyncRoomSummary()?.hasFailedSending == true R.id.resend_all -> state.asyncRoomSummary()?.hasFailedSending == true
R.id.timeline_setting -> true
R.id.clear_all -> state.asyncRoomSummary()?.hasFailedSending == true R.id.clear_all -> state.asyncRoomSummary()?.hasFailedSending == true
R.id.open_matrix_apps -> true R.id.open_matrix_apps -> true
R.id.voice_call, R.id.voice_call,

View file

@ -2,6 +2,12 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android" <menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/menu_home_setting"
android:icon="@drawable/ic_settings_x"
android:title="@string/settings"
app:showAsAction="never" />
<item <item
android:id="@+id/menu_home_suggestion" android:id="@+id/menu_home_suggestion"
android:icon="@drawable/ic_material_bug_report" android:icon="@drawable/ic_material_bug_report"
@ -15,8 +21,8 @@
<item <item
android:id="@+id/menu_home_filter" android:id="@+id/menu_home_filter"
android:icon="@drawable/ic_search" android:icon="@drawable/ic_search"
app:iconTint="?riotx_text_secondary"
android:title="@string/home_filter_placeholder_home" android:title="@string/home_filter_placeholder_home"
app:iconTint="?riotx_text_secondary"
app:showAsAction="always" /> app:showAsAction="always" />
</menu> </menu>

View file

@ -3,6 +3,12 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"> xmlns:tools="http://schemas.android.com/tools">
<item
android:id="@+id/timeline_setting"
android:icon="@drawable/ic_settings_x"
android:title="@string/settings"
app:showAsAction="never" />
<item <item
android:id="@+id/search" android:id="@+id/search"
android:title="@string/search" android:title="@string/search"