Make sure account display name is never null
This commit is contained in:
parent
b35074315c
commit
91164e04ed
4 changed files with 7 additions and 3 deletions
|
@ -776,6 +776,10 @@ public class Account implements BaseAccount, StoreConfig {
|
|||
this.description = description;
|
||||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
return description != null ? description : getEmail();
|
||||
}
|
||||
|
||||
public synchronized String getName() {
|
||||
return identities.get(0).getName();
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ class ImapBackendFactory(
|
|||
override val transportUriPrefix = "smtp"
|
||||
|
||||
override fun createBackend(account: Account): Backend {
|
||||
val accountName = account.description
|
||||
val accountName = account.displayName
|
||||
val backendStorage = K9BackendStorage(preferences, account, account.localStore)
|
||||
val imapStore = createImapStore(account)
|
||||
val smtpTransport = createSmtpTransport(account)
|
||||
|
|
|
@ -21,7 +21,7 @@ class Pop3BackendFactory(private val context: Context, private val preferences:
|
|||
override val transportUriPrefix = "smtp"
|
||||
|
||||
override fun createBackend(account: Account): Backend {
|
||||
val accountName = account.description
|
||||
val accountName = account.displayName
|
||||
val backendStorage = K9BackendStorage(preferences, account, account.localStore)
|
||||
val pop3Store = createPop3Store(account)
|
||||
val smtpTransport = createSmtpTransport(account)
|
||||
|
|
|
@ -17,7 +17,7 @@ class WebDavBackendFactory(private val preferences: Preferences) : BackendFactor
|
|||
override val transportUriPrefix = "webdav"
|
||||
|
||||
override fun createBackend(account: Account): Backend {
|
||||
val accountName = account.description
|
||||
val accountName = account.displayName
|
||||
val backendStorage = K9BackendStorage(preferences, account, account.localStore)
|
||||
val serverSettings = WebDavStoreUriDecoder.decode(account.storeUri)
|
||||
val webDavStore = createWebDavStore(serverSettings, account)
|
||||
|
|
Loading…
Reference in a new issue