mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-14 07:55:28 +00:00
fix(preferences): Fix language list sorting on preferences page
This commit is contained in:
@@ -659,15 +659,6 @@ static const NSString *kJwtKey = @"jwt";
|
||||
return [self labelForKey: [self language]];
|
||||
}
|
||||
|
||||
NSComparisonResult languageSort(id el1, id el2, void *context)
|
||||
{
|
||||
NSString *t1, *t2;
|
||||
|
||||
t1 = [context labelForKey: el1];
|
||||
t2 = [context labelForKey: el2];
|
||||
|
||||
return [t1 compare: t2 options: NSCaseInsensitiveSearch];
|
||||
}
|
||||
|
||||
- (NSArray *) languages
|
||||
{
|
||||
|
||||
@@ -1129,12 +1129,13 @@ static NSArray *reminderValues = nil;
|
||||
userCanChangePassword];
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Used by wox template
|
||||
//
|
||||
- (NSArray *) languages
|
||||
{
|
||||
return [[SOGoSystemDefaults sharedSystemDefaults] supportedLanguages];
|
||||
return [[[SOGoSystemDefaults sharedSystemDefaults] supportedLanguages] sortedArrayUsingFunction: languageSort context: self];
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user