Hide the unread dot after previewing an invite. (#3800)

* Hide the unread dot when previewing an invite.

* Remove an invited room ID when accepting/rejecting.

* Remove the unread badge from knocked room cells.

* Update snapshots.

* Address PR comments.

Refactor KnockRequestType to JoinRequestType.
This commit is contained in:
Doug
2025-02-18 12:22:13 +00:00
committed by GitHub
parent 8c07ee35c4
commit d325adb4fc
19 changed files with 250 additions and 97 deletions
@@ -20,6 +20,7 @@ protocol CommonSettingsProtocol {
final class AppSettings {
private enum UserDefaultsKeys: String {
case lastVersionLaunched
case seenInvites
case appLockNumberOfPINAttempts
case appLockNumberOfBiometricAttempts
case timelineStyle
@@ -104,6 +105,11 @@ final class AppSettings {
@UserPreference(key: UserDefaultsKeys.lastVersionLaunched, storageType: .userDefaults(store))
var lastVersionLaunched: String?
/// The Set of room identifiers of invites that the user already saw in the invites list.
/// This Set is being used to implement badges for unread invites.
@UserPreference(key: UserDefaultsKeys.seenInvites, defaultValue: [], storageType: .userDefaults(store))
var seenInvites: Set<String>
/// The default homeserver address used. This is intentionally a string without a scheme
/// so that it can be passed to Rust as a ServerName for well-known discovery.
private(set) var defaultHomeserverAddress = "matrix.org"