Skip to content

Commit

Permalink
Merge pull request #1007 from tchapgouv/1000-tchap-annonces-ameliorer…
Browse files Browse the repository at this point in the history
…-la-presentation

1000 tchap annonces ameliorer la presentation
  • Loading branch information
NicolasBuquet authored Apr 4, 2024
2 parents 07b7f8d + 0950a77 commit ca6ee32
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Riot/Assets/en.lproj/Vector.strings
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion Riot/Assets/fr.lproj/Vector.strings
Original file line number Diff line number Diff line change
Expand Up @@ -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.";
Expand Down
11 changes: 7 additions & 4 deletions Riot/Modules/Common/Recents/DataSources/RecentsDataSource.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions changelog.d/1000.change
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Afficher le salon "Tchap Annonces" dans le flux normal des salons

0 comments on commit ca6ee32

Please sign in to comment.