Rename Identity.formattedName to Identity.toString

This commit is contained in:
the-djmaze 2024-10-28 12:01:59 +01:00
parent 64e780e500
commit 1b4bf3b8c3
4 changed files with 6 additions and 6 deletions

View file

@ -40,7 +40,7 @@ export class IdentityModel extends EmailModel /*AbstractModel*/ {
/**
* @returns {string}
*/
formattedName() {
toString() {
const name = this.name,
email = this.email,
label = this.label();

View file

@ -122,7 +122,7 @@ export class UserSettingsGeneral extends AbstractViewSettings {
identityMainDesc: () => {
const identity = IdentityUserStore.main();
return identity ? identity.formattedName() : '---';
return identity ? identity.toString() : '---';
},
editorDefaultTypes: () => {

View file

@ -344,7 +344,7 @@ export class ComposePopupView extends AbstractViewPopup {
IdentityUserStore.map(item => ({
item: item,
optValue: item.id(),
optText: item.formattedName()
optText: item
})),
canBeSentOrSaved: () => !this.sending() && !this.saving()
@ -359,7 +359,7 @@ export class ComposePopupView extends AbstractViewPopup {
currentIdentity: value => {
if (value) {
this.from(value.formattedName());
this.from(value.toString());
this.doEncrypt(value.pgpEncrypt() || SettingsUserStore.pgpEncrypt());
this.doSign(value.pgpSign() || SettingsUserStore.pgpSign());
}
@ -455,7 +455,7 @@ export class ComposePopupView extends AbstractViewPopup {
contactsCommand: self => self.allowContacts
});
this.from(IdentityUserStore()[0].formattedName());
this.from(IdentityUserStore()[0].toString());
}
sentFolder()

View file

@ -57,7 +57,7 @@
<i class="fontastic drag-handle"></i>
</td>
<td class="e-action">
<span class="identity-name" data-bind="text: formattedName()"></span>
<span class="identity-name" data-bind="text: $data"></span>
<span class="identity-default" data-i18n="GLOBAL/DEFAULT"></span>
</td>
<td>