mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 19:49:20 +03:00
Better keyword/tags/labels handling for #419
This commit is contained in:
parent
df2de7ad66
commit
2defb7ec35
4 changed files with 16 additions and 21 deletions
|
|
@ -24,23 +24,22 @@ ignoredKeywords = [
|
|||
// Mailo
|
||||
'sent',
|
||||
// KMail
|
||||
'$attachment',
|
||||
'$encrypted',
|
||||
'$error',
|
||||
'$ignored',
|
||||
'$invitation',
|
||||
'$queued',
|
||||
'$replied',
|
||||
'$sent',
|
||||
'$signed',
|
||||
'$todo',
|
||||
'$watched',
|
||||
// GMail
|
||||
'$replied',
|
||||
'$attachment',
|
||||
'$notphishing',
|
||||
'junk',
|
||||
'nonjunk',
|
||||
// KMail & GMail
|
||||
'$attachment',
|
||||
'$replied',
|
||||
// Others
|
||||
'$readreceipt'
|
||||
],
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ import { MessageFlagsCache } from 'Common/Cache';
|
|||
import { AppUserStore } from 'Stores/User/App';
|
||||
import { SettingsUserStore } from 'Stores/User/Settings';
|
||||
import { AccountUserStore } from 'Stores/User/Account';
|
||||
import { FolderUserStore } from 'Stores/User/Folder';
|
||||
import { FolderUserStore, isAllowedKeyword } from 'Stores/User/Folder';
|
||||
import { MessageUserStore } from 'Stores/User/Message';
|
||||
import { MessagelistUserStore } from 'Stores/User/Messagelist';
|
||||
import { ThemeStore } from 'Stores/Theme';
|
||||
|
|
@ -529,8 +529,8 @@ export class MailMessageView extends AbstractViewRight {
|
|||
newTag() {
|
||||
let message = currentMessage();
|
||||
if (message) {
|
||||
let keyword = prompt(i18n('MESSAGE/NEW_TAG'), '')?.replace(/\s+/g, '');
|
||||
if (keyword.length) {
|
||||
let keyword = prompt(i18n('MESSAGE/NEW_TAG'), '')?.replace(/[\s\\]+/g, '');
|
||||
if (keyword.length && isAllowedKeyword(keyword)) {
|
||||
message.toggleTag(keyword);
|
||||
FolderUserStore.currentFolder().permanentFlags.push(keyword);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue