diff --git a/brutaldon/templates/main/toot_partial.html b/brutaldon/templates/main/toot_partial.html index 389fe3c..8dfd6d2 100644 --- a/brutaldon/templates/main/toot_partial.html +++ b/brutaldon/templates/main/toot_partial.html @@ -5,9 +5,9 @@ {% load static %} {% if active %} -
+
{% else %} -
+
{% endif %}
@@ -132,8 +132,8 @@ ic-delete-from="{% url "delete" toot.id %}" ic-indicator="#toot-spinner-{{toot.id}}" ic-confirm="Really delete that toot?" - ic-target="#main" - ic-select-from-response="#main"> + ic-success-action="fadeOut;remove" + ic-action-target="#toot-{{ toot.id }}"> delete {% endif %} diff --git a/brutaldon/views.py b/brutaldon/views.py index c1e47c4..48d3cd5 100644 --- a/brutaldon/views.py +++ b/brutaldon/views.py @@ -619,7 +619,9 @@ def delete(request, id): return redirect('home') if not request.POST.get('cancel', None): mastodon.status_delete(id) - return redirect(home) + if request.POST.get('ic-request') or request.DELETE.get('ic-request'): + return HttpResponse("") + return redirect(home) else: return render(request, 'main/delete.html', {"toot": toot,