Skip to content

Commit cba960f

Browse files
committed
Adding new entry "Poll history" into room profile screen
1 parent e903dac commit cba960f

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

library/ui-strings/src/main/res/values/strings.xml

+1
Original file line numberDiff line numberDiff line change
@@ -2335,6 +2335,7 @@
23352335
<item quantity="one">"One person"</item>
23362336
<item quantity="other">"%1$d people"</item>
23372337
</plurals>
2338+
<string name="room_profile_section_more_polls">Poll history</string>
23382339
<string name="room_profile_section_more_uploads">Uploads</string>
23392340
<string name="room_profile_section_more_leave">Leave Room</string>
23402341
<string name="direct_room_profile_section_more_leave">Leave</string>

vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileController.kt

+7
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ class RoomProfileController @Inject constructor(
5656
fun onMemberListClicked()
5757
fun onBannedMemberListClicked()
5858
fun onNotificationsClicked()
59+
fun onPollHistoryClicked()
5960
fun onUploadsClicked()
6061
fun createShortcut()
6162
fun onSettingsClicked()
@@ -263,6 +264,12 @@ class RoomProfileController @Inject constructor(
263264
action = { callback?.onBannedMemberListClicked() }
264265
)
265266
}
267+
buildProfileAction(
268+
id = "poll_history",
269+
title = stringProvider.getString(R.string.room_profile_section_more_polls),
270+
icon = R.drawable.ic_attachment_poll,
271+
action = { callback?.onPollHistoryClicked() }
272+
)
266273
buildProfileAction(
267274
id = "uploads",
268275
title = stringProvider.getString(R.string.room_profile_section_more_uploads),

vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileFragment.kt

+4
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,10 @@ class RoomProfileFragment :
269269
roomProfileSharedActionViewModel.post(RoomProfileSharedAction.OpenRoomNotificationSettings)
270270
}
271271

272+
override fun onPollHistoryClicked() {
273+
// TODO navigate to new screen
274+
}
275+
272276
override fun onUploadsClicked() {
273277
roomProfileSharedActionViewModel.post(RoomProfileSharedAction.OpenRoomUploads)
274278
}

0 commit comments

Comments
 (0)