From 27e50958453fa801b22a0698e3a9b57ed7badae9 Mon Sep 17 00:00:00 2001 From: Nicolas Buquet Date: Thu, 28 Mar 2024 18:10:55 +0100 Subject: [PATCH 1/4] =?UTF-8?q?Renommer=20la=20section=20"Alertes=20syst?= =?UTF-8?q?=C3=A8me"=20en=20"Tchap=20Annonces"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Riot/Assets/en.lproj/Vector.strings | 2 +- Riot/Assets/fr.lproj/Vector.strings | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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."; From f14c57dee8395549489ef20ad56419a2d432afcc Mon Sep 17 00:00:00 2001 From: Nicolas Buquet Date: Thu, 4 Apr 2024 15:16:46 +0200 Subject: [PATCH 2/4] Ne pas filtrer les events "serverNotice" du fetcher "allChats" --- .../Recents/Service/MatrixSDK/RecentsListService.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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: From 8651599ed0778ea620c7ab13b9221c5da56ba5f2 Mon Sep 17 00:00:00 2001 From: Nicolas Buquet Date: Thu, 4 Apr 2024 15:17:18 +0200 Subject: [PATCH 3/4] =?UTF-8?q?Ne=20pas=20afficher=20la=20section=20"Serve?= =?UTF-8?q?rNotice"=20en=20bas=20d'affichage=20(ils=20sont=20affich=C3=A9s?= =?UTF-8?q?=20parmi=20"allChats")?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Common/Recents/DataSources/RecentsDataSource.m | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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]; } From 0950a772bd5ee1d206e7745e627c686cadf754f3 Mon Sep 17 00:00:00 2001 From: Nicolas Buquet Date: Thu, 4 Apr 2024 15:20:36 +0200 Subject: [PATCH 4/4] Ajout de changelog --- changelog.d/1000.change | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/1000.change 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