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
}
val roomSummary = data.roomSummary() ?: return
val enableNonSimplifiedMode = !vectorPreferences.simplifiedMode()
// Topic
roomSummary
@ -76,6 +77,7 @@ class RoomProfileController @Inject constructor(
}
// Security
if (enableNonSimplifiedMode) {
buildProfileSection(stringProvider.getString(R.string.room_profile_section_security))
val learnMoreSubtitle = if (roomSummary.isEncrypted) {
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
buildProfileSection(stringProvider.getString(R.string.room_profile_section_more))
}
buildProfileAction(
id = "settings",
title = stringProvider.getString(if (roomSummary.isDirect) {