summaryrefslogtreecommitdiff
path: root/alot
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2020-06-01 09:39:00 +0200
committerAnton Khirnov <anton@khirnov.net>2020-07-01 16:38:01 +0200
commitc12540d435aca5ba3139a9aeb02207699b85eb53 (patch)
tree3183932d088307b9efdb2e388511e53e9499f15a /alot
parent1bceeca953cda102923bb67dfbc8488bae5d35cc (diff)
More missed list->set conversions for tags
Diffstat (limited to 'alot')
-rw-r--r--alot/account.py2
-rw-r--r--alot/commands/envelope.py4
-rw-r--r--alot/commands/search.py2
3 files changed, 4 insertions, 4 deletions
diff --git a/alot/account.py b/alot/account.py
index a7e82690..4112ce53 100644
--- a/alot/account.py
+++ b/alot/account.py
@@ -217,7 +217,7 @@ class Account:
self.signature_as_attachment = signature_as_attachment
self.sign_by_default = sign_by_default
self.sent_box = sent_box
- self.sent_tags = sent_tags
+ self.sent_tags = frozenset(sent_tags)
self.draft_box = draft_box
self.draft_tags = draft_tags
self.replied_tags = replied_tags
diff --git a/alot/commands/envelope.py b/alot/commands/envelope.py
index 1502011a..914829eb 100644
--- a/alot/commands/envelope.py
+++ b/alot/commands/envelope.py
@@ -283,7 +283,7 @@ class SendCommand(Command):
errmsg = 'could not store mail: {}'.format(e)
ui.notify(errmsg, priority='error', block=True)
else:
- initial_tags = []
+ initial_tags = frozenset()
if self.envelope is not None:
self.envelope.sending = False
self.envelope.sent_time = datetime.datetime.now()
@@ -307,7 +307,7 @@ class SendCommand(Command):
# add mail to index if maildir path available
if path is not None:
logging.debug('adding new mail to index')
- ui.dbman.add_message(path, account.sent_tags + initial_tags)
+ ui.dbman.add_message(path, account.sent_tags | initial_tags)
await ui.apply_command(globals.FlushCommand())
diff --git a/alot/commands/search.py b/alot/commands/search.py
index 8e959e65..f4e8efdc 100644
--- a/alot/commands/search.py
+++ b/alot/commands/search.py
@@ -208,7 +208,7 @@ class TagCommand(Command):
elif self.action == 'toggle':
if not self.allm:
to_remove = set()
- to_add = ()
+ to_add = set()
for t in tags:
if t in thread.get_tags():
to_remove.add(t)