diff --git a/bookwyrm/static/js/status_cache.js b/bookwyrm/static/js/status_cache.js index f179aa7d9..1ec72b3cb 100644 --- a/bookwyrm/static/js/status_cache.js +++ b/bookwyrm/static/js/status_cache.js @@ -74,7 +74,7 @@ let StatusCache = new class { // This allows the form to submit in the old fashioned way if there's a problem - if (!trigger || !form) { + if (!trigger || !form || response.headers.get("forceReload")) { return; } @@ -90,12 +90,6 @@ let StatusCache = new class { trigger.removeAttribute('disabled'); }) .then(response => { - if (response.headers.get("forceReload")) { - BookWyrm.addRemoveClass(form, 'is-processing', true); - trigger.setAttribute('disabled', null); - - return location.reload(); - } if (!response.ok) { throw new Error(); diff --git a/bookwyrm/views/reading.py b/bookwyrm/views/reading.py index 75a45f245..a91fa8e7a 100644 --- a/bookwyrm/views/reading.py +++ b/bookwyrm/views/reading.py @@ -102,8 +102,6 @@ class ReadingStatus(View): != desired_shelf.identifier ): return unshelve(request, referer=referer, book_id=book_id) - # don't try to unshelve a read status shelf: it has already been deleted. - return HttpResponse(headers={"forceReload": "true"}) if is_api_request(request): return HttpResponse() diff --git a/bookwyrm/views/shelf/shelf_actions.py b/bookwyrm/views/shelf/shelf_actions.py index 77053f534..3fff92a6a 100644 --- a/bookwyrm/views/shelf/shelf_actions.py +++ b/bookwyrm/views/shelf/shelf_actions.py @@ -101,6 +101,4 @@ def unshelve(request, referer=None, book_id=False): ) shelf_book.raise_not_deletable(request.user) shelf_book.delete() - if bool(referer): - return HttpResponse(headers={"forceReload": "true"}) return redirect(request.headers.get("Referer", "/")) diff --git a/bookwyrm/views/status.py b/bookwyrm/views/status.py index 144408b50..bb69d30c0 100644 --- a/bookwyrm/views/status.py +++ b/bookwyrm/views/status.py @@ -125,10 +125,6 @@ class CreateStatus(View): except Http404: pass - # force page reload if this was triggered from 'move' button - if bool(request.POST.get("shelf")): - return HttpResponse(headers={"forceReload": "true"}) - if is_api_request(request): return HttpResponse() return redirect("/")