projects
/
jan-pona-mute.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a4b8710
)
Sort posts before selecting one by number
author
Alex Schroeder
<alex@gnu.org>
Thu, 15 Aug 2019 09:52:39 +0000
(11:52 +0200)
committer
Alex Schroeder
<alex@gnu.org>
Thu, 15 Aug 2019 09:52:39 +0000
(11:52 +0200)
jan-pona-mute.py
patch
|
blob
|
blame
|
history
diff --git
a/jan-pona-mute.py
b/jan-pona-mute.py
index c24b126f223a54427c1852429a4d6deb14e51669..7b7e1151e4b88f3304cd3f0bd02dfb570f04a57e 100755
(executable)
--- a/
jan-pona-mute.py
+++ b/
jan-pona-mute.py
@@
-318,7
+318,8
@@
post again."""
self.show(notification)
self.load(notification.about())
elif self.numbers_refer_to == 'home':
- self.post = self.home[n-1]
+ posts = sorted(self.home, key=lambda x: x.data()["created_at"])
+ self.post = posts[n-1]
else:
print("Internal error: not sure what numbers '%s' refer to." % self.numbers_refer_to)
return