Adding new entry "Poll history" into room profile screen

This commit is contained in:
Maxime NATUREL 2022-12-29 16:05:52 +01:00
parent e903dac224
commit cba960fbd7
3 changed files with 12 additions and 0 deletions

View file

@ -2335,6 +2335,7 @@
<item quantity="one">"One person"</item>
<item quantity="other">"%1$d people"</item>
</plurals>
<string name="room_profile_section_more_polls">Poll history</string>
<string name="room_profile_section_more_uploads">Uploads</string>
<string name="room_profile_section_more_leave">Leave Room</string>
<string name="direct_room_profile_section_more_leave">Leave</string>

View file

@ -56,6 +56,7 @@ class RoomProfileController @Inject constructor(
fun onMemberListClicked()
fun onBannedMemberListClicked()
fun onNotificationsClicked()
fun onPollHistoryClicked()
fun onUploadsClicked()
fun createShortcut()
fun onSettingsClicked()
@ -263,6 +264,12 @@ class RoomProfileController @Inject constructor(
action = { callback?.onBannedMemberListClicked() }
)
}
buildProfileAction(
id = "poll_history",
title = stringProvider.getString(R.string.room_profile_section_more_polls),
icon = R.drawable.ic_attachment_poll,
action = { callback?.onPollHistoryClicked() }
)
buildProfileAction(
id = "uploads",
title = stringProvider.getString(R.string.room_profile_section_more_uploads),

View file

@ -269,6 +269,10 @@ class RoomProfileFragment :
roomProfileSharedActionViewModel.post(RoomProfileSharedAction.OpenRoomNotificationSettings)
}
override fun onPollHistoryClicked() {
// TODO navigate to new screen
}
override fun onUploadsClicked() {
roomProfileSharedActionViewModel.post(RoomProfileSharedAction.OpenRoomUploads)
}