Commit 27cbab6c authored by Jack Darlington's avatar Jack Darlington

Fixes for READ/UNREAD

parent 015d82ae
...@@ -495,7 +495,8 @@ def create_admin_user(): ...@@ -495,7 +495,8 @@ def create_admin_user():
user.nickname = "admin" user.nickname = "admin"
user.role = ROLE_USER + ROLE_ADMIN + ROLE_DOWNLOAD + ROLE_UPLOAD + ROLE_EDIT + ROLE_PASSWD user.role = ROLE_USER + ROLE_ADMIN + ROLE_DOWNLOAD + ROLE_UPLOAD + ROLE_EDIT + ROLE_PASSWD
user.sidebar_view = DETAIL_RANDOM + SIDEBAR_LANGUAGE + SIDEBAR_SERIES + SIDEBAR_CATEGORY + SIDEBAR_HOT + \ user.sidebar_view = DETAIL_RANDOM + SIDEBAR_LANGUAGE + SIDEBAR_SERIES + SIDEBAR_CATEGORY + SIDEBAR_HOT + \
SIDEBAR_RANDOM + SIDEBAR_AUTHOR + SIDEBAR_BEST_RATED SIDEBAR_RANDOM + SIDEBAR_AUTHOR + SIDEBAR_BEST_RATED + SIDEBAR_READ_AND_UNREAD
user.password = generate_password_hash(DEFAULT_PASS) user.password = generate_password_hash(DEFAULT_PASS)
......
...@@ -2084,6 +2084,8 @@ def new_user(): ...@@ -2084,6 +2084,8 @@ def new_user():
content.sidebar_view += ub.SIDEBAR_CATEGORY content.sidebar_view += ub.SIDEBAR_CATEGORY
if "show_hot" in to_save: if "show_hot" in to_save:
content.sidebar_view += ub.SIDEBAR_HOT content.sidebar_view += ub.SIDEBAR_HOT
if "show_read_and_unread" in to_save:
content.sidebar_view += ub.SIDEBAR_READ_AND_UNREAD
if "show_best_rated" in to_save: if "show_best_rated" in to_save:
content.sidebar_view += ub.SIDEBAR_BEST_RATED content.sidebar_view += ub.SIDEBAR_BEST_RATED
if "show_author" in to_save: if "show_author" in to_save:
...@@ -2231,6 +2233,11 @@ def edit_user(user_id): ...@@ -2231,6 +2233,11 @@ def edit_user(user_id):
elif "show_best_rated" not in to_save and content.show_best_rated_books(): elif "show_best_rated" not in to_save and content.show_best_rated_books():
content.sidebar_view -= ub.SIDEBAR_BEST_RATED content.sidebar_view -= ub.SIDEBAR_BEST_RATED
if "show_read_and_unread" in to_save:
content.sidebar_view += ub.SIDEBAR_READ_AND_UNREAD
elif "show_read_and_unread" not in to_save and content.show_read_and_unread():
content.sidebar_view += ub.SIDEBAR_READ_AND_UNREAD
if "show_author" in to_save and not content.show_author(): if "show_author" in to_save and not content.show_author():
content.sidebar_view += ub.SIDEBAR_AUTHOR content.sidebar_view += ub.SIDEBAR_AUTHOR
elif "show_author" not in to_save and content.show_author(): elif "show_author" not in to_save and content.show_author():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment