Add menu entry for dev tools (to complete existing /devtools command)
This commit is contained in:
parent
8580f46ec1
commit
e511e7e02e
|
@ -57,6 +57,7 @@ class RoomProfileController @Inject constructor(
|
|||
fun onRoomAliasesClicked()
|
||||
fun onRoomPermissionsClicked()
|
||||
fun onRoomIdClicked()
|
||||
fun onRoomDevToolsClicked()
|
||||
fun onUrlInTopicLongClicked(url: String)
|
||||
}
|
||||
|
||||
|
@ -193,7 +194,7 @@ class RoomProfileController @Inject constructor(
|
|||
title = stringProvider.getString(R.string.room_settings_permissions_title),
|
||||
subtitle = stringProvider.getString(R.string.room_settings_permissions_subtitle),
|
||||
dividerColor = dividerColor,
|
||||
divider = true,
|
||||
divider = false,
|
||||
editable = true,
|
||||
action = { callback?.onRoomPermissionsClicked() }
|
||||
)
|
||||
|
@ -204,10 +205,19 @@ class RoomProfileController @Inject constructor(
|
|||
title = stringProvider.getString(R.string.room_settings_room_internal_id),
|
||||
subtitle = roomSummary.roomId,
|
||||
dividerColor = dividerColor,
|
||||
divider = false,
|
||||
divider = true,
|
||||
editable = false,
|
||||
action = { callback?.onRoomIdClicked() }
|
||||
)
|
||||
buildProfileAction(
|
||||
id = "devTools",
|
||||
title = stringProvider.getString(R.string.dev_tools_menu_name),
|
||||
subtitle = roomSummary.roomId,
|
||||
dividerColor = dividerColor,
|
||||
divider = false,
|
||||
editable = true,
|
||||
action = { callback?.onRoomDevToolsClicked() }
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -295,6 +295,10 @@ class RoomProfileFragment @Inject constructor(
|
|||
copyToClipboard(requireContext(), roomProfileArgs.roomId)
|
||||
}
|
||||
|
||||
override fun onRoomDevToolsClicked() {
|
||||
navigator.openDevTools(requireContext(), roomProfileArgs.roomId)
|
||||
}
|
||||
|
||||
override fun onUrlInTopicLongClicked(url: String) {
|
||||
copyToClipboard(requireContext(), url, true)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue