Skip to content

Commit

Permalink
Add --reverse option to notifications
Browse files Browse the repository at this point in the history
fixes #151
  • Loading branch information
ihabunek committed May 11, 2020
1 parent a65470f commit 3829a57
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Changelog

* 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)

**0.26.0 (2020-04-15)**
Expand Down
1 change: 1 addition & 0 deletions changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
date: "TBD"
changes:
- "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)"

0.26.0:
Expand Down
3 changes: 3 additions & 0 deletions toot/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,9 @@ def notifications(app, user, args):
print_out("<yellow>No notification</yellow>")
return

if args.reverse:
notifications = reversed(notifications)

print_notifications(notifications)


Expand Down
5 changes: 5 additions & 0 deletions toot/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,11 @@ def editor(value):
"action": 'store_true',
"default": False,
}),
(["-r", "--reverse"], {
"action": "store_true",
"default": False,
"help": "Reverse the order of the shown notifications (newest on top)",
}),
],
require_auth=True,
),
Expand Down

0 comments on commit 3829a57

Please sign in to comment.