Add --reverse option to notifications

fixes #151
This commit is contained in:
Ivan Habunek 2020-05-11 13:49:00 +02:00
parent a65470fa9d
commit 3829a57909
No known key found for this signature in database
GPG key ID: CDBD63C43A30BB95
4 changed files with 10 additions and 0 deletions

View file

@ -7,6 +7,7 @@ Changelog
* Fix access to public and tag timelines when on private mastodon instances * Fix access to public and tag timelines when on private mastodon instances
(#168) (#168)
* Add `--reverse` option to `toot notifications` (#151)
* TUI: Add opton to pin/save tag timelines (#163, thanks @dlax) * TUI: Add opton to pin/save tag timelines (#163, thanks @dlax)
**0.26.0 (2020-04-15)** **0.26.0 (2020-04-15)**

View file

@ -2,6 +2,7 @@
date: "TBD" date: "TBD"
changes: changes:
- "Fix access to public and tag timelines when on private mastodon instances (#168)" - "Fix access to public and tag timelines when on private mastodon instances (#168)"
- "Add `--reverse` option to `toot notifications` (#151)"
- "TUI: Add opton to pin/save tag timelines (#163, thanks @dlax)" - "TUI: Add opton to pin/save tag timelines (#163, thanks @dlax)"
0.26.0: 0.26.0:

View file

@ -321,6 +321,9 @@ def notifications(app, user, args):
print_out("<yellow>No notification</yellow>") print_out("<yellow>No notification</yellow>")
return return
if args.reverse:
notifications = reversed(notifications)
print_notifications(notifications) print_notifications(notifications)

View file

@ -238,6 +238,11 @@ READ_COMMANDS = [
"action": 'store_true', "action": 'store_true',
"default": False, "default": False,
}), }),
(["-r", "--reverse"], {
"action": "store_true",
"default": False,
"help": "Reverse the order of the shown notifications (newest on top)",
}),
], ],
require_auth=True, require_auth=True,
), ),