mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 13:39:22 +03:00
Some array.slice to array.startsWith and cleanup some JavaScript code
This commit is contained in:
parent
3903a37b64
commit
ffcc86805a
8 changed files with 83 additions and 146 deletions
|
|
@ -686,7 +686,7 @@ export class ComposePopupView extends AbstractViewPopup {
|
|||
if (identity && ComposeType.Draft !== msgComposeType && ComposeType.EditAsNew !== msgComposeType) {
|
||||
this.editor(editor => {
|
||||
let signature = identity.signature() || '',
|
||||
isHtml = ':HTML:' === signature.slice(0, 6),
|
||||
isHtml = signature.startsWith(':HTML:'),
|
||||
fromLine = oLastMessage ? emailArrayToStringLineHelper(oLastMessage.from, true) : '';
|
||||
if (fromLine) {
|
||||
signature = signature.replace(/{{FROM-FULL}}/g, fromLine);
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ export class FolderCreatePopupView extends AbstractViewPopup {
|
|||
oItem =>
|
||||
oItem ? (oItem.isSystemFolder() ? oItem.name() + ' ' + oItem.manageFolderSystemName() : oItem.name()) : '',
|
||||
FolderUserStore.namespace
|
||||
? item => FolderUserStore.namespace !== item.fullName.slice(0, FolderUserStore.namespace.length)
|
||||
? item => !item.fullName.startsWith(FolderUserStore.namespace)
|
||||
: null,
|
||||
true
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue