diff --git a/README.md b/README.md index eb3aeb0..d17d2b0 100644 --- a/README.md +++ b/README.md @@ -258,3 +258,4 @@ thanks to: * ~vilmibm, packaging help and gopher support * ~sanqui, the bug swatter * ~sinacutie, for css updates +* ~epicmorphism, for fixing pagination scrolling diff --git a/ttbp/config/__init__.py b/ttbp/config/__init__.py index 8d97601..9a9d5d2 100644 --- a/ttbp/config/__init__.py +++ b/ttbp/config/__init__.py @@ -87,7 +87,7 @@ ___________________________________________________________ | ____ ____ ____ _ ____ ____ _ _ ____ _ _ _ ____ | | |___ |___ |___ | [__ |___ |\ | | __ | |\ | |___ | | | |___ |___ |___ ___] |___ | \| |__] | | \| |___ | -| ver 0.12.1 | +| ver 0.12.2 | |__________________________________________________________| '''.lstrip() # ~ u n s t a b l e e x p e r i m e n t a l b r a n c h ~ @@ -309,5 +309,19 @@ version 0.9.3 features: thanks for those of your who've written me with feedback! keep feelin' together <3 +""", + "0.12.2":""" +~[version 0.12.2 update]~ + + bug fix: ~epicmorphism helped out with fixing the pagination bug! now, when + you scroll through a list of entries, it'll correctly return you to the + page you were on if you open and close an item. thanks so much, friend <3 + + thanks to everyone writing me with feedback; i've been real busy lately, + and i might not get to making improvements or responding to mail for a + while :( + + feel on! + ~endo """ } diff --git a/ttbp/ttbp.py b/ttbp/ttbp.py index 8eafeb0..8a5c35e 100644 --- a/ttbp/ttbp.py +++ b/ttbp/ttbp.py @@ -51,7 +51,7 @@ from . import chatter from . import gopher from . import util -__version__ = "0.12.1" +__version__ = "0.12.2" __author__ = "endorphant press to return to feels list.\n\n".format(user=metas[choice][5], date=metas[choice][4])) show_entry(metas[choice][0]) redraw(prompt) - return list_entries(metas, entries, prompt) + return list_entries(metas, entries, prompt, page) else: redraw() @@ -1434,26 +1437,27 @@ def subscription_manager(subs, intro=""): redraw(top+intro) return subscription_manager(subs, intro) -def unsubscribe_handler(subs, prompt): +def unsubscribe_handler(subs, prompt, page=0): ''' displays a list of currently subscribed users and toggles deletion. ''' subs.sort() - choice = menu_handler(subs, "pick a pal to unsubscribe (or 'q' to cancel): ", 15, SETTINGS.get("rainbows", False), "list of townies recording feels:") + ans = menu_handler(subs, "pick a pal to unsubscribe (or 'q' to cancel): ", 15, page, SETTINGS.get("rainbows", False), "list of townies recording feels:") - if choice is not False: + if ans is not False: + (page,choice) = ans townie = subs[choice] subs.remove(townie) save_subs(subs) redraw("{townie} removed! \n\n> {prompt}".format(townie=townie, prompt=prompt)) - return unsubscribe_handler(subs, prompt) + return unsubscribe_handler(subs, prompt, page) else: redraw() return subs -def subscribe_handler(subs, prompt): +def subscribe_handler(subs, prompt, page=0): ''' displays a list of all users not subscribed to and toggles adding, returning the subs list when finished. @@ -1467,14 +1471,15 @@ def subscribe_handler(subs, prompt): candidates.sort() - choice = menu_handler(candidates, "pick a townie to add to your subscriptions (or 'q' to cancel): ", 15, SETTINGS.get("rainbows", False), "list of townies recording feels:") + ans = menu_handler(candidates, "pick a townie to add to your subscriptions (or 'q' to cancel): ", 15, page, SETTINGS.get("rainbows", False), "list of townies recording feels:") - if choice is not False: + if ans is not False: + (page, choice) = ans townie = candidates[choice] subs.append(townie) save_subs(subs) redraw("{townie} added! \n\n> {prompt}".format(townie=townie, prompt=prompt)) - return subscribe_handler(subs, prompt) + return subscribe_handler(subs, prompt, page) else: redraw() return subs @@ -1902,6 +1907,10 @@ something strange happened to you during this update. # version 0.12.1 patch notes print(config.UPDATES["0.12.1"]) + if z < 2: + # version 0.12.2 patch notes + print(config.UPDATES["0.12.2"]) + confirm = "" while confirm not in ("x", "", "X", ""):