Changes order to newest first and adds new markers for categories and posts #44

Manually merged
cmccabe merged 2 commits from new-posts into master 2019-12-06 00:51:17 +00:00
Collaborator

This should, if all goes well, close out #31

This PR does the following:

Main

  • Adds a column New to the categories view.
  • When there are new posts/replies for that category the column will have an x in it.
    • This can be optimized. Right now it searches the whole link_data list and gets a count. Really, we just need to find one that is new before we get to posts that are older than the config.USER.lastlogin value. Doing a regular for loop and breaking at either of these conditions would be solid. That said, pythons list comprehensions are quick-ish and are fine for POC. I can update with the faster version if this ends up being desired.
  • On the posts/links view inside a category any post that is new or has a reply that is new since last login will have a * next to the link title/description indicating that it is new.

Sidequest

  • Adds a gitignore that ignores the pycache. It is generally good practice to keep pycache out of version control.
  • Reverses the order of link_data. It was already being sorted. Adding the flag reverse=True lets us get things newest first (it was my understanding that this was the desired view. If not, let me know and I can take this out).
This should, if all goes well, close out #31 This PR does the following: ### Main - Adds a column `New` to the categories view. - When there are new posts/replies for that category the column will have an x in it. - This can be optimized. Right now it searches the whole `link_data` list and gets a count. Really, we just need to find one that is new before we get to posts that are older than the `config.USER.lastlogin` value. Doing a regular for loop and breaking at either of these conditions would be solid. That said, pythons list comprehensions are quick-ish and are fine for POC. I can update with the faster version if this ends up being desired. - On the posts/links view inside a category any post that is new or has a reply that is new since last login will have a `*` next to the link title/description indicating that it is new. ### Sidequest - Adds a gitignore that ignores the pycache. It is generally good practice to keep pycache out of version control. - Reverses the order of `link_data`. It was already being sorted. Adding the flag `reverse=True` lets us get things newest first (it was my understanding that this was the desired view. If not, let me know and I can take this out).
sloum added the
enhancement
label 2019-12-05 05:41:51 +00:00
cmccabe was assigned by sloum 2019-12-05 05:42:50 +00:00
asdf was assigned by sloum 2019-12-05 05:42:51 +00:00
asdf approved these changes 2019-12-05 06:44:07 +00:00
Collaborator

Looks good and works well. Showing newest items first is a good touch.

We should merge this in before my PR and I'll update from there.

Looks good and works well. Showing newest items first is a good touch. We should merge this in before my PR and I'll update from there.
Owner

There is a merge conflict with this one so I’ll need to take some time to figure out how to overcome it.

There is a merge conflict with this one so I’ll need to take some time to figure out how to overcome it.
Collaborator

I'm looking at it now, should have it corrected soon.

I'm looking at it now, should have it corrected soon.
Collaborator

I've made the appropriate changes now so this is ready to be merged.

One thing to note is that the "new" marker for category contents is now displayed on the next line. This is a problem with data.py and not anything in this PR.

I've made the appropriate changes now so this is ready to be merged. One thing to note is that the "new" marker for category contents is now displayed on the next line. This is a problem with `data.py` and not anything in this PR.
cmccabe closed this pull request 2019-12-06 00:51:17 +00:00
Owner

This looks really good now!

This looks really good now!
asdf deleted branch new-posts 2019-12-07 01:52:35 +00:00
Sign in to join this conversation.
No description provided.