Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1000 tchap annonces ameliorer la presentation #1007

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading