Don't clear preview on blacklist — just re-search
Blacklisting a tag or post no longer clears the preview of an unrelated post. The search reloads and the blacklisted post simply disappears from the grid.
This commit is contained in:
parent
396c008e9f
commit
e515c19d05
@ -1320,12 +1320,10 @@ class BooruApp(QMainWindow):
|
|||||||
tag = action.text()
|
tag = action.text()
|
||||||
self._db.add_blacklisted_tag(tag)
|
self._db.add_blacklisted_tag(tag)
|
||||||
self._db.set_setting("blacklist_enabled", "1")
|
self._db.set_setting("blacklist_enabled", "1")
|
||||||
self._preview.clear()
|
|
||||||
self._status.showMessage(f"Blacklisted: {tag}")
|
self._status.showMessage(f"Blacklisted: {tag}")
|
||||||
self._do_search()
|
self._do_search()
|
||||||
elif action == bl_post_action:
|
elif action == bl_post_action:
|
||||||
self._db.add_blacklisted_post(post.file_url)
|
self._db.add_blacklisted_post(post.file_url)
|
||||||
self._preview.clear()
|
|
||||||
self._status.showMessage(f"Post #{post.id} blacklisted")
|
self._status.showMessage(f"Post #{post.id} blacklisted")
|
||||||
self._do_search()
|
self._do_search()
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user