Skip to content

Commit

Permalink
(web) Show time for messages of yesterday
Browse files Browse the repository at this point in the history
Fixes #4599
  • Loading branch information
cgx committed Nov 22, 2018
1 parent 4069158 commit 6737aa3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions NEWS
Expand Up @@ -4,6 +4,7 @@
Enhancements
- [web] show source addressbook of matching contacts in appointment editor (#4579)
- [web] improve display of keyboard shortcuts
- [web] show time for messages of yesterday (#4599)

Bug fixes
- [sogo-tool] fixed "manage-acl unsubscribe" command (#4591)
Expand Down
7 changes: 3 additions & 4 deletions UI/MailerUI/UIxMailListActions.m
Expand Up @@ -126,14 +126,13 @@ - (NSString *) messageDate
else if ([now dayOfCommonEra] - [messageDate dayOfCommonEra] == 1)
{
// Yesterday
return [self labelForKey: @"Yesterday" inContext: context];
return [NSString stringWithFormat: @"%@ %@",
[self labelForKey: @"Yesterday" inContext: context],
[dateFormatter formattedTime: messageDate]];
}
else if ([now dayOfCommonEra] - [messageDate dayOfCommonEra] < 7)
{
// Same week
WOResourceManager *resMgr = [[WOApplication application] resourceManager];
NSString *language = [[[context activeUser] userDefaults] language];
NSDictionary *locale = [resMgr localeForLanguageNamed: language];
return [[locale objectForKey: NSWeekDayNameArray] objectAtIndex: [messageDate dayOfWeek]];
}
else
Expand Down

0 comments on commit 6737aa3

Please sign in to comment.