This repository was archived by the owner on Feb 20, 2023. It is now read-only.
Footer displays 'login' or 'logout' when suitable.#654
Open
aiden-sobey wants to merge 1 commit into
Open
Conversation
The correct term (login/logout) is now displayed on startup and after logging in or out.
michael-lazar
suggested changes
Feb 26, 2019
| if not self.term.loader.exception: | ||
| self.nav = Navigator(self.content.get) | ||
|
|
||
| def reload_footer(self): |
Owner
There was a problem hiding this comment.
I think this would be a great place to use a property, e.g.
@property
def footer(self):
if self.reddit.user is None:
return docs.FOOTER_SUBREDDIT
else:
return docs.FOOTER_SUBREDDIT_LOGGED_INThen all you would need to do is change the other pages to lowercase, e.g. for the subscription page
footer = docs.FOOTER_SUBSCRIPTIONand update the base class to use self.footer instead of self.FOOTER. I agree that uppercase no longer makes sense, and it was probably a questionable decision when it was added in the first place. If you want to change self.HEADER to lowercase at the same time I'm on board with it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes issue #647
The correct term (login/logout) is now displayed in the footer, respective of if a user is currently logged in or not.
Note: I'm not a big fan of self.FOOTER being capitalised like a constant because.. well, it's not. But changing this broke functionality in the parent class so I decided to keep the diff small. If desired though I can go through and fix this up, the fix will just get a fair bit more complicated.