mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Display an icon in the room header for rooms with shared history (#5016)
* feat: Display an icon in the room header for rooms with shared history * fix: Apply suggestions from code review - Simplifies `isRoomHistoryShared` expressions using type inferrence. - Adds failure messages to unit test. Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com> * fix: Remove extension method in favour of field on configuration. * fix: Distinguish between `shared` and `worldReadable` icons. * refactor: Use `RoomHistorySharingState` enum with extension methods --------- Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// Copyright 2026 Element Creations Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial.
|
||||
// Please see LICENSE files in the repository root for full details.
|
||||
//
|
||||
|
||||
/// Enumeration of the two possible cases in which history sharing under MSC4268 is enabled. These
|
||||
/// variants implicitly assume that the feature flag, `enableKeyShareOnInvite`, is set.
|
||||
enum RoomHistorySharingState: Equatable {
|
||||
/// The feature flag is set, and the room history visibility is set to `shared`.
|
||||
case shared
|
||||
/// The feature flag is set, and the room history visibility is set to `world_readable`.
|
||||
case worldReadable
|
||||
}
|
||||
Reference in New Issue
Block a user