From 87cf5b473f057731fa428580b4fbece0b34d3bd5 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Thu, 30 Jul 2020 15:13:15 -0400 Subject: [PATCH] feat(web): support desktop notifications, add global inbox polling Fixes #1234, fixes #3382, fixes #4295 --- UI/MailerUI/UIxMailListActions.m | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/UI/MailerUI/UIxMailListActions.m b/UI/MailerUI/UIxMailListActions.m index b1813a8fb..3fcda8919 100644 --- a/UI/MailerUI/UIxMailListActions.m +++ b/UI/MailerUI/UIxMailListActions.m @@ -361,13 +361,14 @@ NSDictionary *urlParams, *sortingAttributes; SOGoUser *activeUser; SOGoUserSettings *us; - BOOL asc; + BOOL asc, dry; request = [context request]; urlParams = [[request contentAsString] objectFromJSONString]; sortingAttributes = [urlParams objectForKey: @"sortingAttributes"]; sort = [[sortingAttributes objectForKey: @"sort"] uppercaseString]; asc = [[sortingAttributes objectForKey: @"asc"] boolValue]; + dry = [[sortingAttributes objectForKey: @"dry"] boolValue]; activeUser = [context activeUser]; module = @"Mail"; @@ -378,13 +379,13 @@ { if ([sort isEqualToString: [self defaultSortKey]] && !asc) { - if (moduleSettings) + if (moduleSettings && !dry) { [moduleSettings removeObjectForKey: @"SortingState"]; [us synchronize]; } } - else + else if (!dry) { // Save the sorting state in the user settings if (!moduleSettings) @@ -454,7 +455,8 @@ searchString = [NSString stringWithFormat: @"(%@ doesContain: '%@')", searchBy, searchInput]; searchQualifier = [EOQualifier qualifierWithQualifierFormat: searchString]; - [searchArray addObject: searchQualifier]; + if (searchQualifier) + [searchArray addObject: searchQualifier]; } else { @@ -759,7 +761,7 @@ folder = [self clientObject]; - noHeaders = [[[requestContent objectForKey: @"sortingAttributes"] objectForKey:@"noHeaders"] boolValue]; + noHeaders = [[[requestContent objectForKey: @"sortingAttributes"] objectForKey: @"noHeaders"] boolValue]; data = [self getUIDsInFolder: folder withHeaders: !noHeaders];