From ff8d57e9f08bcd3b73d65936c0296153b5f4314a Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Wed, 10 Apr 2019 16:49:32 +0200 Subject: [PATCH] Fix selectedIndexPath with generic section indexes --- .../Scenes/Organizer/OrganizerViewController.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Passepartout-iOS/Scenes/Organizer/OrganizerViewController.swift b/Passepartout-iOS/Scenes/Organizer/OrganizerViewController.swift index 88852c25..e738a389 100644 --- a/Passepartout-iOS/Scenes/Organizer/OrganizerViewController.swift +++ b/Passepartout-iOS/Scenes/Organizer/OrganizerViewController.swift @@ -362,12 +362,12 @@ extension OrganizerViewController { switch active.context { case .provider: if let row = providers.index(where: { $0 == active.id }) { - return IndexPath(row: row, section: 0) + return IndexPath(row: row, section: model.index(ofSection: .providers)) } case .host: if let row = hosts.index(where: { $0 == active.id }) { - return IndexPath(row: row, section: 1) + return IndexPath(row: row, section: model.index(ofSection: .hosts)) } } return nil