diff --git a/Riot/Assets/en.lproj/Vector.strings b/Riot/Assets/en.lproj/Vector.strings index a0a040ef9..24297b0c7 100644 --- a/Riot/Assets/en.lproj/Vector.strings +++ b/Riot/Assets/en.lproj/Vector.strings @@ -378,7 +378,7 @@ "room_recents_conversations_section" = "ROOMS"; "room_recents_no_conversation" = "No rooms"; "room_recents_low_priority_section" = "LOW PRIORITY"; -"room_recents_server_notice_section" = "SYSTEM ALERTS"; +"room_recents_server_notice_section" = "Tchap Announcements"; // Tchap "room_recents_invites_section" = "INVITES"; "room_recents_suggested_rooms_section" = "SUGGESTED ROOMS"; "room_recents_start_chat_with" = "Start chat"; diff --git a/Riot/Assets/fr.lproj/Vector.strings b/Riot/Assets/fr.lproj/Vector.strings index 8685a163d..4f5392ff7 100644 --- a/Riot/Assets/fr.lproj/Vector.strings +++ b/Riot/Assets/fr.lproj/Vector.strings @@ -551,7 +551,7 @@ "settings_labs_room_members_lazy_loading" = "Chargement différé des participants des salons"; "settings_labs_room_members_lazy_loading_error_message" = "Votre serveur d'accueil ne prend pas en charge le chargement différé des participants des salons. Réessayez plus tard."; "room_event_action_view_decrypted_source" = "Voir la source déchiffrée"; -"room_recents_server_notice_section" = "ALERTES SYSTÈME"; +"room_recents_server_notice_section" = "Tchap Annonces"; // Tchap "room_resource_limit_exceeded_message_contact_1" = " Veuillez "; "room_resource_limit_exceeded_message_contact_2_link" = "contacter l’administrateur de votre service"; "room_resource_limit_exceeded_message_contact_3" = " pour continuer à l’utiliser."; diff --git a/Riot/Modules/Common/Recents/DataSources/RecentsDataSource.m b/Riot/Modules/Common/Recents/DataSources/RecentsDataSource.m index 96d0025ce..48add73d5 100644 --- a/Riot/Modules/Common/Recents/DataSources/RecentsDataSource.m +++ b/Riot/Modules/Common/Recents/DataSources/RecentsDataSource.m @@ -255,10 +255,13 @@ - (RecentsDataSourceSections *)makeDataSourceSections [types addObject:@(RecentsDataSourceSectionTypeLowPriority)]; } - if (self.serverNoticeCellDataArray.count > 0) - { - [types addObject:@(RecentsDataSourceSectionTypeServerNotice)]; - } + // Tchap: don't display server notices as separate section. + // Server notices are displayed in the main section "all chats" + // (see modification in `updateConversationFetcher` in `RecentListService` +// if (self.serverNoticeCellDataArray.count > 0) +// { +// [types addObject:@(RecentsDataSourceSectionTypeServerNotice)]; +// } return [[RecentsDataSourceSections alloc] initWithSectionTypes:types.copy]; } diff --git a/Riot/Modules/Common/Recents/Service/MatrixSDK/RecentsListService.swift b/Riot/Modules/Common/Recents/Service/MatrixSDK/RecentsListService.swift index bd8f52ae7..1401abe6c 100644 --- a/Riot/Modules/Common/Recents/Service/MatrixSDK/RecentsListService.swift +++ b/Riot/Modules/Common/Recents/Service/MatrixSDK/RecentsListService.swift @@ -717,7 +717,12 @@ public class RecentsListService: NSObject, RecentsListServiceProtocol { } private func updateConversationFetcher(_ fetcher: MXRoomListDataFetcher, for mode: RecentsDataSourceMode) { - var notDataTypes: MXRoomSummaryDataTypes = mode == .allChats ? [.hidden, .conferenceUser, .invited, .lowPriority, .serverNotice, .space] : [.hidden, .conferenceUser, .direct, .invited, .lowPriority, .serverNotice, .space] + // Tchap: + // don't exclude serverNotice channels from "all chats" group fetcher + // to get server Notices (aka "Tchap Annonces") in the main room list + // to be displayed as classic rooms +// var notDataTypes: MXRoomSummaryDataTypes = mode == .allChats ? [.hidden, .conferenceUser, .invited, .lowPriority, .serverNotice, .space] : [.hidden, .conferenceUser, .direct, .invited, .lowPriority, .serverNotice, .space] + var notDataTypes: MXRoomSummaryDataTypes = mode == .allChats ? [.hidden, .conferenceUser, .invited, .lowPriority, /*.serverNotice,*/ .space] : [.hidden, .conferenceUser, .direct, .invited, .lowPriority, /*.serverNotice,*/ .space] switch mode { case .home: diff --git a/changelog.d/1000.change b/changelog.d/1000.change new file mode 100644 index 000000000..83cb7789f --- /dev/null +++ b/changelog.d/1000.change @@ -0,0 +1 @@ +Afficher le salon "Tchap Annonces" dans le flux normal des salons \ No newline at end of file