TF-2464 Add sender name as title notification in iOS
Signed-off-by: dab246 <tdvu@linagora.com> (cherry picked from commit 7f54c0366e30f131b506a4b6e841b36a66d18087)
This commit is contained in:
@@ -6,4 +6,11 @@ struct Email: Codable {
|
||||
let preview: String?
|
||||
let from: [EmailAddress]?
|
||||
let receivedAt: String?
|
||||
|
||||
func getSenderName() -> String? {
|
||||
if (from == nil || from?.isEmpty == true) {
|
||||
return nil
|
||||
}
|
||||
return from?.first?.name ?? from?.first?.email
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user