mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-07 04:47:14 +00:00
Fix sender addresses of draft
The sender addresses select menu is now populated with the identities of the selected account *only*. The chosen sender address is also restored from the draft. Fixes #3577
This commit is contained in:
1 parent
7d5255f762
commit
a1e0f2767f
6 files changed
+49
-24
No files matched your search
@@ -250,13 +250,16 @@ static NSArray *infoKeys = nil;
|
||||
|
||||
- (NSString *) from
|
||||
{
|
||||
NSDictionary *identity;
|
||||
NSArray *identities;
|
||||
|
||||
if (!from)
|
||||
{
|
||||
identity = [[context activeUser] primaryIdentity];
|
||||
from = [self _emailFromIdentity: identity];
|
||||
[from retain];
|
||||
identities = [[[self clientObject] mailAccountFolder] identities];
|
||||
if ([identities count])
|
||||
{
|
||||
from = [self _emailFromIdentity: [identities objectAtIndex: 0]];
|
||||
[from retain];
|
||||
}
|
||||
}
|
||||
|
||||
return from;
|
||||
@@ -426,7 +429,7 @@ static NSArray *infoKeys = nil;
|
||||
{
|
||||
if (![_info isNotNull]) return;
|
||||
[self debugWithFormat:@"loading info ..."];
|
||||
[self setValuesForKeysWithDictionary:_info];
|
||||
[self setValuesForKeysWithDictionary: _info];
|
||||
}
|
||||
|
||||
- (NSDictionary *) infoFromRequest
|
||||
@@ -439,6 +442,7 @@ static NSArray *infoKeys = nil;
|
||||
filteredParams = [NSDictionary dictionaryWithObjects: [params objectsForKeys: infoKeys notFoundMarker: [NSNull null]]
|
||||
forKeys: infoKeys];
|
||||
|
||||
[self setFrom: [filteredParams objectForKey: @"from"]];
|
||||
[self setTo: [filteredParams objectForKey: @"to"]];
|
||||
[self setCc: [filteredParams objectForKey: @"cc"]];
|
||||
[self setBcc: [filteredParams objectForKey: @"bcc"]];
|
||||
|
||||
Reference in new issue
Block a user