From c12540d435aca5ba3139a9aeb02207699b85eb53 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Mon, 1 Jun 2020 09:39:00 +0200 Subject: More missed list->set conversions for tags --- alot/account.py | 2 +- alot/commands/envelope.py | 4 ++-- alot/commands/search.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'alot') 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) -- cgit v1.2.3