Re-arrange room profile
- Show encryption status also in easy mode again - Move encryption action down - it's a one-time action and not important enough to show prevalent on top - Hide encryption action if permission missing - TODO: hide encryption action when it's a public room (it's already hidden on room creation in that case) Change-Id: I544704191fd7e3573ef35fa9de2f7023a01c4a04
This commit is contained in:
parent
3cb5f6087c
commit
d6ea5648b6
|
@ -77,7 +77,6 @@ class RoomProfileController @Inject constructor(
|
||||||
}
|
}
|
||||||
|
|
||||||
// Security
|
// Security
|
||||||
if (enableNonSimplifiedMode) {
|
|
||||||
buildProfileSection(stringProvider.getString(R.string.room_profile_section_security))
|
buildProfileSection(stringProvider.getString(R.string.room_profile_section_security))
|
||||||
val learnMoreSubtitle = if (roomSummary.isEncrypted) {
|
val learnMoreSubtitle = if (roomSummary.isEncrypted) {
|
||||||
if (roomSummary.isDirect) R.string.direct_room_profile_encrypted_subtitle else R.string.room_profile_encrypted_subtitle
|
if (roomSummary.isDirect) R.string.direct_room_profile_encrypted_subtitle else R.string.room_profile_encrypted_subtitle
|
||||||
|
@ -89,13 +88,11 @@ class RoomProfileController @Inject constructor(
|
||||||
centered(false)
|
centered(false)
|
||||||
text(stringProvider.getString(learnMoreSubtitle))
|
text(stringProvider.getString(learnMoreSubtitle))
|
||||||
}
|
}
|
||||||
buildEncryptionAction(data.actionPermissions, roomSummary)
|
// SC: Move down in the list, this one-time action is not important to enough to show this prevalent at the top
|
||||||
}
|
//buildEncryptionAction(data.actionPermissions, roomSummary)
|
||||||
|
|
||||||
// More | category header only if displaying other sections above
|
// More
|
||||||
if (enableNonSimplifiedMode || roomSummary.topic.isNotEmpty()) {
|
|
||||||
buildProfileSection(stringProvider.getString(R.string.room_profile_section_more))
|
buildProfileSection(stringProvider.getString(R.string.room_profile_section_more))
|
||||||
}
|
|
||||||
buildProfileAction(
|
buildProfileAction(
|
||||||
id = "settings",
|
id = "settings",
|
||||||
title = stringProvider.getString(if (roomSummary.isDirect) {
|
title = stringProvider.getString(if (roomSummary.isDirect) {
|
||||||
|
@ -151,6 +148,9 @@ class RoomProfileController @Inject constructor(
|
||||||
action = { callback?.createShortcut() }
|
action = { callback?.createShortcut() }
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
if (enableNonSimplifiedMode) {
|
||||||
|
buildEncryptionAction(data.actionPermissions, roomSummary)
|
||||||
|
}
|
||||||
buildProfileAction(
|
buildProfileAction(
|
||||||
id = "leave",
|
id = "leave",
|
||||||
title = stringProvider.getString(if (roomSummary.isDirect) {
|
title = stringProvider.getString(if (roomSummary.isDirect) {
|
||||||
|
@ -193,6 +193,7 @@ class RoomProfileController @Inject constructor(
|
||||||
editable = false,
|
editable = false,
|
||||||
action = { callback?.onEnableEncryptionClicked() }
|
action = { callback?.onEnableEncryptionClicked() }
|
||||||
)
|
)
|
||||||
|
/* SC: disable useless button
|
||||||
} else {
|
} else {
|
||||||
buildProfileAction(
|
buildProfileAction(
|
||||||
id = "enableEncryption",
|
id = "enableEncryption",
|
||||||
|
@ -202,6 +203,7 @@ class RoomProfileController @Inject constructor(
|
||||||
divider = false,
|
divider = false,
|
||||||
editable = false
|
editable = false
|
||||||
)
|
)
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue