1
1
Fork 0

Merge pull request #7884 from MrPetovan/bug/7834-ignore-reload

Restore post reload after (un)ignore
This commit is contained in:
Philipp 2019-12-02 09:40:31 +01:00 committed by GitHub
commit 6531819971
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 7 deletions

View file

@ -649,14 +649,16 @@ function doignore(ident) {
ident = ident.toString();
$('#like-rotator-' + ident).show();
$.get('item/ignore/' + ident, function(data) {
if (data.match(/1/)) {
$('#ignored-' + ident).addClass('ignored');
$('#ignored-' + ident).removeClass('unignored');
if (data === 1) {
$('#ignored-' + ident)
.addClass('ignored')
.removeClass('unignored');
$('#ignore-' + ident).addClass('hidden');
$('#unignore-' + ident).removeClass('hidden');
} else {
$('#ignored-' + ident).addClass('unignored');
$('#ignored-' + ident).removeClass('ignored');
$('#ignored-' + ident)
.addClass('unignored')
.removeClass('ignored');
$('#ignore-' + ident).removeClass('hidden');
$('#unignore-' + ident).addClass('hidden');
}