From f1ce202f808612b0f416820ff573c8919b83f845 Mon Sep 17 00:00:00 2001 From: Alfonso Grillo Date: Fri, 18 Nov 2022 15:50:03 +0100 Subject: [PATCH] Remove duplicate code --- Riot/Modules/Home/AllChats/AllChatsViewController.swift | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Riot/Modules/Home/AllChats/AllChatsViewController.swift b/Riot/Modules/Home/AllChats/AllChatsViewController.swift index 4cda2df1a9..d9d82b3244 100644 --- a/Riot/Modules/Home/AllChats/AllChatsViewController.swift +++ b/Riot/Modules/Home/AllChats/AllChatsViewController.swift @@ -1102,10 +1102,7 @@ extension AllChatsViewController: SplitViewMasterViewControllerProtocol { private extension MXSpaceService { var rootSpacesNotificationCount: UInt { - rootSpaces.reduce(0) { partialResult, space in - let count = notificationCounter.notificationState(forSpaceWithId: space.spaceId)?.allCount ?? 0 - return partialResult + count - } + notificationCounter.notificationState(forAllSpacesExcept: nil).allCount } var rootSpacesHaveHighlightNotification: Bool {