fix: Sort by name selected networks

Resolves: https://gitlab.steamware.net/eqn/eqn.ios/-/issues/11
This commit is contained in:
Andrea Busi
2020-08-28 09:28:58 +02:00
parent 6e1a982188
commit 4fbbb8e4fc
@@ -186,8 +186,7 @@ typedef NS_ENUM(NSInteger, RowIdentifier) {
cell.titleLabel.text = setting.title;
if (indexPath.row == RowIdentifierRetiSismiche) {
NSString *values = [[EQNNotificeReteSismiche center].listaEnti componentsJoinedByString:@", "];
cell.valuesLabel.text = values;
cell.valuesLabel.text = [self stringOfSelectedNetworks];
}
return cell;
@@ -269,4 +268,11 @@ typedef NS_ENUM(NSInteger, RowIdentifier) {
[self setupView];
}
- (NSString *)stringOfSelectedNetworks
{
NSArray *networks = [EQNNotificeReteSismiche center].listaEnti;
networks = [networks sortedArrayUsingSelector:@selector(localizedCaseInsensitiveCompare:)];
return [networks componentsJoinedByString:@", "];
}
@end