Added an option to reverse the timeline

Added the (in my opinion) mission option to reverse the timeline by Adding a command and reversing the entries before they get printed out.
This commit is contained in:
Waweic 2018-07-25 20:40:59 +02:00
parent 5871916f8e
commit d910cf9420
2 changed files with 8 additions and 0 deletions

View file

@ -24,6 +24,9 @@ def timeline(app, user, args):
else:
items = api.timeline_home(app, user)
if args.reverse:
items = reversed(items)
print_timeline(items)

View file

@ -156,6 +156,11 @@ READ_COMMANDS = [
"default": False,
"help": "Show only statuses from local instance (public and tag timelines only).",
}),
(["-r", "--reverse"], {
"action": "store_true",
"default": False,
"help": "Reverse the order of the shown timeline (to new posts at the bottom)",
}),
],
require_auth=True,
),