Merge pull request #6511 from vector-im/feature/rooms-in-space-default

Fixes inconsistent rooms in home behaviour
This commit is contained in:
Adam Brown 2022-07-12 13:25:58 +01:00 committed by GitHub
commit a5bf25f2b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 10 deletions

1
changelog.d/6510.bugfix Normal file
View File

@ -0,0 +1 @@
Fixes inconsistency with rooms within spaces showing or disappearing from home

View File

@ -158,7 +158,6 @@ class VectorPreferences @Inject constructor(
private const val SETTINGS_ENABLE_SEND_VOICE_FEATURE_PREFERENCE_KEY = "SETTINGS_ENABLE_SEND_VOICE_FEATURE_PREFERENCE_KEY" private const val SETTINGS_ENABLE_SEND_VOICE_FEATURE_PREFERENCE_KEY = "SETTINGS_ENABLE_SEND_VOICE_FEATURE_PREFERENCE_KEY"
const val SETTINGS_LABS_ALLOW_EXTENDED_LOGS = "SETTINGS_LABS_ALLOW_EXTENDED_LOGS" const val SETTINGS_LABS_ALLOW_EXTENDED_LOGS = "SETTINGS_LABS_ALLOW_EXTENDED_LOGS"
const val SETTINGS_LABS_SPACES_HOME_AS_ORPHAN = "SETTINGS_LABS_SPACES_HOME_AS_ORPHAN"
const val SETTINGS_LABS_AUTO_REPORT_UISI = "SETTINGS_LABS_AUTO_REPORT_UISI" const val SETTINGS_LABS_AUTO_REPORT_UISI = "SETTINGS_LABS_AUTO_REPORT_UISI"
const val SETTINGS_PREF_SPACE_SHOW_ALL_ROOM_IN_HOME = "SETTINGS_PREF_SPACE_SHOW_ALL_ROOM_IN_HOME" const val SETTINGS_PREF_SPACE_SHOW_ALL_ROOM_IN_HOME = "SETTINGS_PREF_SPACE_SHOW_ALL_ROOM_IN_HOME"
@ -1020,20 +1019,12 @@ class VectorPreferences @Inject constructor(
} }
} }
private fun labsSpacesOnlyOrphansInHome(): Boolean {
return defaultPrefs.getBoolean(SETTINGS_LABS_SPACES_HOME_AS_ORPHAN, false)
}
fun labsAutoReportUISI(): Boolean { fun labsAutoReportUISI(): Boolean {
return defaultPrefs.getBoolean(SETTINGS_LABS_AUTO_REPORT_UISI, false) return defaultPrefs.getBoolean(SETTINGS_LABS_AUTO_REPORT_UISI, false)
} }
fun prefSpacesShowAllRoomInHome(): Boolean { fun prefSpacesShowAllRoomInHome(): Boolean {
return defaultPrefs.getBoolean( return defaultPrefs.getBoolean(SETTINGS_PREF_SPACE_SHOW_ALL_ROOM_IN_HOME, false)
SETTINGS_PREF_SPACE_SHOW_ALL_ROOM_IN_HOME,
// migration of old property
!labsSpacesOnlyOrphansInHome()
)
} }
/* /*