Easy mode: Hide encryption status and action in room profile

Change-Id: Ia12cd69a5c4cad5577049020478987fb588932a1
This commit is contained in:
SpiritCroc 2020-11-29 13:31:41 +01:00
parent f23bea23e5
commit 6830ffd3f0
1 changed files with 17 additions and 14 deletions

View File

@ -60,6 +60,7 @@ class RoomProfileController @Inject constructor(
return return
} }
val roomSummary = data.roomSummary() ?: return val roomSummary = data.roomSummary() ?: return
val enableNonSimplifiedMode = !vectorPreferences.simplifiedMode()
// Topic // Topic
roomSummary roomSummary
@ -76,6 +77,7 @@ 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
@ -91,6 +93,7 @@ class RoomProfileController @Inject constructor(
// More // More
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) {