diff --git a/Classes/Dialogs/ServerDialog.m b/Classes/Dialogs/ServerDialog.m index d05e2147..43ef8319 100644 --- a/Classes/Dialogs/ServerDialog.m +++ b/Classes/Dialogs/ServerDialog.m @@ -352,6 +352,14 @@ - (void)deleteChannel:(id)sender [self reloadChannelTable]; } +- (void)sortChannels:(id)sender { + [_config.channels sortUsingComparator:^NSComparisonResult(IRCChannelConfig* _Nonnull ch1, IRCChannelConfig* _Nonnull ch2) { + NSComparisonResult* result = [ch1.name compare:ch2.name options:NSCaseInsensitiveSearch]; + return result; + }]; + [self reloadChannelTable]; +} + #pragma mark - Ignore Actions - (void)addIgnore:(id)sender diff --git a/English.lproj/ServerDialog.xib b/English.lproj/ServerDialog.xib index 69d35908..d0a8d688 100644 --- a/English.lproj/ServerDialog.xib +++ b/English.lproj/ServerDialog.xib @@ -1,8 +1,8 @@ - - + + - + @@ -627,7 +627,7 @@ - + @@ -708,9 +708,9 @@ - + - + @@ -750,6 +750,17 @@ + - @@ -832,7 +843,7 @@ -