Revert "add unbookmark-on-save setting"
This reverts commit 08f99a61011532202b22d05750416aa1e754f9c9.
This commit is contained in:
parent
08f99a6101
commit
9cc294a16a
@ -152,7 +152,6 @@ _DEFAULTS = {
|
||||
"library_dir": "",
|
||||
"infinite_scroll": "0",
|
||||
"library_filename_template": "",
|
||||
"unbookmark_on_save": "0",
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -514,18 +514,6 @@ class PostActionsController:
|
||||
bm_grid._thumbs[bm_idx].set_saved_locally(True)
|
||||
if self._app._stack.currentIndex() == 2:
|
||||
self._app._library_view.refresh()
|
||||
# Auto-remove bookmark on save if the setting is on
|
||||
if self._app._db.get_setting_bool("unbookmark_on_save"):
|
||||
site_id = self._app._site_combo.currentData()
|
||||
if site_id and 0 <= index < len(self._app._posts):
|
||||
post = self._app._posts[index]
|
||||
if self._app._db.is_bookmarked(site_id, post.id):
|
||||
self._app._db.remove_bookmark(site_id, post.id)
|
||||
if 0 <= index < len(thumbs):
|
||||
thumbs[index].set_bookmarked(False)
|
||||
self._app._preview.update_bookmark_state(False)
|
||||
if self._app._stack.currentIndex() == 1:
|
||||
self._app._bookmarks_view.refresh()
|
||||
self._app._popout_ctrl.update_state()
|
||||
|
||||
def on_batch_progress(self, current: int, total: int, post_id: int) -> None:
|
||||
@ -548,15 +536,6 @@ class PostActionsController:
|
||||
def on_batch_done(self, msg: str) -> None:
|
||||
self._app._status.showMessage(msg)
|
||||
self._app._popout_ctrl.update_state()
|
||||
# Auto-remove bookmarks for bulk saves if the setting is on
|
||||
if "Saved" in msg and self._app._db.get_setting_bool("unbookmark_on_save"):
|
||||
site_id = self._app._site_combo.currentData()
|
||||
if site_id:
|
||||
for i, p in enumerate(self._app._posts):
|
||||
if self._app._db.is_bookmarked(site_id, p.id) and self.is_post_saved(p.id):
|
||||
self._app._db.remove_bookmark(site_id, p.id)
|
||||
if i < len(self._app._grid._thumbs):
|
||||
self._app._grid._thumbs[i].set_bookmarked(False)
|
||||
if self._app._stack.currentIndex() == 1:
|
||||
self._app._bookmarks_view.refresh()
|
||||
if self._app._stack.currentIndex() == 2:
|
||||
|
||||
@ -187,11 +187,6 @@ class SettingsDialog(QDialog):
|
||||
self._infinite_scroll.setChecked(self._db.get_setting_bool("infinite_scroll"))
|
||||
form.addRow("", self._infinite_scroll)
|
||||
|
||||
# Unbookmark on save
|
||||
self._unbookmark_on_save = QCheckBox("Remove bookmark when saved to library")
|
||||
self._unbookmark_on_save.setChecked(self._db.get_setting_bool("unbookmark_on_save"))
|
||||
form.addRow("", self._unbookmark_on_save)
|
||||
|
||||
# Slideshow monitor
|
||||
from PySide6.QtWidgets import QApplication
|
||||
self._monitor_combo = QComboBox()
|
||||
@ -784,7 +779,6 @@ class SettingsDialog(QDialog):
|
||||
self._db.set_setting("preload_thumbnails", "1" if self._preload.isChecked() else "0")
|
||||
self._db.set_setting("prefetch_mode", self._prefetch_combo.currentText())
|
||||
self._db.set_setting("infinite_scroll", "1" if self._infinite_scroll.isChecked() else "0")
|
||||
self._db.set_setting("unbookmark_on_save", "1" if self._unbookmark_on_save.isChecked() else "0")
|
||||
self._db.set_setting("slideshow_monitor", self._monitor_combo.currentText())
|
||||
self._db.set_setting("library_dir", self._library_dir.text().strip())
|
||||
self._db.set_setting("library_filename_template", self._library_filename_template.text().strip())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user