From 4de375902f95759e159e5c7c024cea1263c88b3c Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Wed, 23 Mar 2011 21:59:22 +0000 Subject: [PATCH] See ChangeLog Monotone-Parent: ddf277f21cd816fe481bf94c7ec4b59815233bf7 Monotone-Revision: 01007adc666a7e8c89a42c0f76d28007c766519c Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2011-03-23T21:59:22 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 5 +++++ UI/MailerUI/UIxMailListActions.m | 9 ++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3d05fc45e..f3fb1e0b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-03-24 Francis Lachapelle + + * UI/MailerUI/UIxMailListActions.m (-imap4SortOrdering): verify + that the sort is defined when rollbacking to the user's settings. + 2011-03-23 Ludovic Marcotte * SoObjects/Appointments/SOGoAppointmentObject.m (-PUTAction:): diff --git a/UI/MailerUI/UIxMailListActions.m b/UI/MailerUI/UIxMailListActions.m index ee59114e7..1860ac02d 100644 --- a/UI/MailerUI/UIxMailListActions.m +++ b/UI/MailerUI/UIxMailListActions.m @@ -384,10 +384,13 @@ else if (moduleSettings) { NSArray *sortState = [moduleSettings objectForKey: @"SortingState"]; - sort = [[sortState objectAtIndex: 0] uppercaseString]; - asc = [[sortState objectAtIndex: 1] boolValue]; + if ([sortState count]) + { + sort = [[sortState objectAtIndex: 0] uppercaseString]; + asc = [[sortState objectAtIndex: 1] boolValue]; + } } - else + if (![sort length]) sort = [self defaultSortKey]; // Construct and return the final IMAP ordering constraint