From 4905652e227b68e1337676754743fdad6ab9a012 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Thu, 26 May 2022 12:23:13 -0700 Subject: [PATCH] Handle stopped reading special case in javascript This should be refactored, but maybe not today --- bookwyrm/static/js/status_cache.js | 1 + .../shelve_button/shelve_button_options.html | 12 ++++++++++-- bookwyrm/templatetags/shelf_tags.py | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/bookwyrm/static/js/status_cache.js b/bookwyrm/static/js/status_cache.js index b19489c1..310b07ae 100644 --- a/bookwyrm/static/js/status_cache.js +++ b/bookwyrm/static/js/status_cache.js @@ -203,6 +203,7 @@ let StatusCache = new (class { .forEach((item) => (item.disabled = false)); next_identifier = next_identifier == "complete" ? "read" : next_identifier; + next_identifier = next_identifier == "stopped-reading-complete" ? "stopped-reading" : next_identifier; // Disable the current state button.querySelector( diff --git a/bookwyrm/templates/snippets/shelve_button/shelve_button_options.html b/bookwyrm/templates/snippets/shelve_button/shelve_button_options.html index 891f5863..53ff80bf 100644 --- a/bookwyrm/templates/snippets/shelve_button/shelve_button_options.html +++ b/bookwyrm/templates/snippets/shelve_button/shelve_button_options.html @@ -14,8 +14,8 @@