Fix asynchronous order of events for "mark all as read" button

This commit is contained in:
Oliver Walters 2022-03-20 19:36:52 +11:00
parent 5f98cdf3c7
commit 9cc2cc5683
2 changed files with 6 additions and 2 deletions

View File

@ -10,7 +10,7 @@
{% endblock %}
{% block actions %}
<div class='btn btn-secondary' type='button' id='mark-all' title='{% trans "Mark all as read" %}'>
<div class='btn btn-outline-secondary' type='button' id='mark-all' title='{% trans "Mark all as read" %}'>
<span class='fa fa-bookmark'></span> {% trans "Mark all as read" %}
</div>
<div class='btn btn-secondary' type='button' id='inbox-refresh' title='{% trans "Refresh Pending Notifications" %}'>

View File

@ -126,8 +126,12 @@ $("#mark-all").on('click', function() {
{
read: false,
},
{
success: function(response) {
updateNotificationTables();
}
}
);
updateNotificationTables();
});
loadNotificationTable("#history-table", {