Skip to content

Commit

Permalink
Sort items by date, not by their subjects.
Browse files Browse the repository at this point in the history
  • Loading branch information
lamby committed May 10, 2021
1 parent aab285e commit 46e5b71
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tickle-me-email
Expand Up @@ -242,7 +242,7 @@ class Command:
for x in self.get_field("Subject", criterion)
]

for x in sorted(subjects):
for x in subjects:
print(" \xe2\x80\xa2 {}".format(x))

return
Expand Down Expand Up @@ -281,7 +281,7 @@ class Command:
# No messages
return

for x in sorted(self.get_field("Subject")):
for x in self.get_field("Subject"):
print(x.replace("\n", " ").replace("\r", " "))

def handle_sent(self):
Expand Down Expand Up @@ -602,7 +602,7 @@ class Command:
def get_messages(self, criterion="ALL"):
self.log.debug("Searching for messages matching %r", criterion)

response = self.imap.search(None, criterion)
response = self.imap.sort('DATE', 'UTF-8', criterion)

self.check_response(response, "Error searching for messages")

Expand Down

0 comments on commit 46e5b71

Please sign in to comment.