From 396150ce9597d22d26fb4f9fe680d5c81e950d1f Mon Sep 17 00:00:00 2001 From: wutschel Date: Sat, 3 Feb 2024 09:44:17 +0100 Subject: [PATCH] Sort settings array before displaying --- XBMC Remote/SettingsValuesViewController.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/XBMC Remote/SettingsValuesViewController.m b/XBMC Remote/SettingsValuesViewController.m index f0ad6058e..ccfdafba1 100644 --- a/XBMC Remote/SettingsValuesViewController.m +++ b/XBMC Remote/SettingsValuesViewController.m @@ -567,7 +567,10 @@ - (UITableViewCell*)tableView:(UITableView*)tableView cellForRowAtIndexPath:(NSI else { delimiter = [NSString stringWithFormat:@"%@ ", delimiter]; } - cellText = [self.detailItem[@"value"] componentsJoinedByString:delimiter]; + NSArray *settingsArray = self.detailItem[@"value"]; + NSSortDescriptor *descriptor = [[NSSortDescriptor alloc] initWithKey:nil ascending:YES]; + settingsArray = [settingsArray sortedArrayUsingDescriptors:@[descriptor]]; + cellText = [settingsArray componentsJoinedByString:delimiter]; } else { cellText = [NSString stringWithFormat:@"%@", self.detailItem[@"value"]];