dynamic bottom sheet header for room config

This commit is contained in:
AndyScherzinger 2018-06-21 15:47:21 +02:00
parent 1a63b355a8
commit 066e0702d7
No known key found for this signature in database
GPG Key ID: 6CADC7E3523C308B
2 changed files with 13 additions and 1 deletions

View File

@ -123,7 +123,18 @@ public class CallMenuController extends BaseController implements FlexibleAdapte
menuItems = new ArrayList<>();
if (menuType.equals(MenuType.REGULAR)) {
if (room.displayName != null && room.displayName.length()>0) {
menuItems.add(new MenuItem(
getResources().getString(
R.string.nc_configure_named_room, room.displayName), 0, null)
);
} else if (room.name != null && room.name.length()>0) {
menuItems.add(new MenuItem(getResources().getString(
R.string.nc_configure_named_room, room.name), 0, null)
);
} else {
menuItems.add(new MenuItem(getResources().getString(R.string.nc_configure_room), 0, null));
}
if (room.isNameEditable()) {
menuItems.add(new MenuItem(getResources().getString(R.string.nc_rename), 2, getResources().getDrawable(R.drawable

View File

@ -85,6 +85,7 @@
<!-- Room menu -->
<string name="nc_start_conversation">Start a conversation</string>
<string name="nc_configure_room">Configure room</string>
<string name="nc_configure_named_room">Configure room %1$s</string>
<string name="nc_leave">Leave conversation</string>
<string name="nc_rename">Rename conversation</string>
<string name="nc_set_password">Set a password</string>