diff --git a/crates/matrix-sdk-base/src/rooms/mod.rs b/crates/matrix-sdk-base/src/rooms/mod.rs index 9ee1ed230..eb7c0ce43 100644 --- a/crates/matrix-sdk-base/src/rooms/mod.rs +++ b/crates/matrix-sdk-base/src/rooms/mod.rs @@ -112,8 +112,8 @@ pub struct BaseRoomInfo { /// /// We are not interested by all the tags. Some tags are more important than /// others, and this field collects them. - #[serde(skip_serializing_if = "NotableTags::is_empty", default)] - pub(crate) notable_tags: NotableTags, + #[serde(skip_serializing_if = "RoomNotableTags::is_empty", default)] + pub(crate) notable_tags: RoomNotableTags, } impl BaseRoomInfo { @@ -297,14 +297,14 @@ impl BaseRoomInfo { } pub fn handle_notable_tags(&mut self, tags: &Tags) { - let mut notable_tags = NotableTags::empty(); + let mut notable_tags = RoomNotableTags::empty(); if tags.contains_key(&TagName::Favorite) { - notable_tags.insert(NotableTags::FAVOURITE); + notable_tags.insert(RoomNotableTags::FAVOURITE); } if tags.contains_key(&TagName::LowPriority) { - notable_tags.insert(NotableTags::LOW_PRIORITY); + notable_tags.insert(RoomNotableTags::LOW_PRIORITY); } self.notable_tags = notable_tags; @@ -318,7 +318,7 @@ bitflags! { /// others, and this struct describe them. #[repr(transparent)] #[derive(Debug, Default, Clone, Copy, Deserialize, Serialize)] - pub(crate) struct NotableTags: u8 { + pub(crate) struct RoomNotableTags: u8 { /// The `m.favourite` tag. const FAVOURITE = 0b0000_0001; @@ -358,7 +358,7 @@ impl Default for BaseRoomInfo { topic: None, rtc_member: BTreeMap::new(), is_marked_unread: false, - notable_tags: NotableTags::empty(), + notable_tags: RoomNotableTags::empty(), } } } diff --git a/crates/matrix-sdk-base/src/rooms/normal.rs b/crates/matrix-sdk-base/src/rooms/normal.rs index 93e5e1d2d..745d3039b 100644 --- a/crates/matrix-sdk-base/src/rooms/normal.rs +++ b/crates/matrix-sdk-base/src/rooms/normal.rs @@ -58,7 +58,7 @@ use tracing::{debug, field::debug, info, instrument, trace, warn}; use super::{ members::{MemberInfo, MemberRoomInfo}, - BaseRoomInfo, DisplayName, NotableTags, RoomCreateWithCreatorEventContent, RoomMember, + BaseRoomInfo, DisplayName, RoomCreateWithCreatorEventContent, RoomMember, RoomNotableTags, }; #[cfg(feature = "experimental-sliding-sync")] use crate::latest_event::LatestEvent; @@ -733,11 +733,11 @@ impl Room { } pub fn is_favourite(&self) -> bool { - self.inner.read().base_info.notable_tags.contains(NotableTags::FAVOURITE) + self.inner.read().base_info.notable_tags.contains(RoomNotableTags::FAVOURITE) } pub fn is_low_priority(&self) -> bool { - self.inner.read().base_info.notable_tags.contains(NotableTags::LOW_PRIORITY) + self.inner.read().base_info.notable_tags.contains(RoomNotableTags::LOW_PRIORITY) } /// Get the receipt as an `OwnedEventId` and `Receipt` tuple for the given diff --git a/crates/matrix-sdk-base/src/store/migration_helpers.rs b/crates/matrix-sdk-base/src/store/migration_helpers.rs index 9222ff1c4..d86a1fada 100644 --- a/crates/matrix-sdk-base/src/store/migration_helpers.rs +++ b/crates/matrix-sdk-base/src/store/migration_helpers.rs @@ -44,7 +44,7 @@ use crate::{ deserialized_responses::SyncOrStrippedState, rooms::{ normal::{RoomSummary, SyncInfo}, - BaseRoomInfo, NotableTags, + BaseRoomInfo, RoomNotableTags, }, sync::UnreadNotificationsCount, MinimalStateEvent, OriginalMinimalStateEvent, RoomInfo, RoomState, @@ -205,7 +205,7 @@ impl BaseRoomInfoV1 { topic, rtc_member: BTreeMap::new(), is_marked_unread: false, - notable_tags: NotableTags::empty(), + notable_tags: RoomNotableTags::empty(), }) } }