Skip to content

Commit 7e236d3

Browse files
Fix: use _trash_service.compute_restore_reload_action in _refresh_restored_album
Agent-Logs-Url: https://github.com/OliverZhaohaibin/iPhotron-LocalPhotoAlbumManager/sessions/bcfdc994-3582-4913-a421-6f53e3ca80ca Co-authored-by: OliverZhaohaibin <160622109+OliverZhaohaibin@users.noreply.github.com>
1 parent 896e2a3 commit 7e236d3

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/iPhoto/gui/services/library_update_service.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -442,15 +442,15 @@ def _on_finished(path: Path, succeeded: bool) -> None:
442442
current_album = self._current_album_getter()
443443
current_root = current_album.root if current_album is not None else None
444444

445-
# Delegate reload decision to the application-layer reload service.
446-
action = self._reload_service.compute_restore_reload_action(
445+
# Delegate reload decision to the trash service.
446+
should_reload, should_reload_as_lib, _ = self._trash_service.compute_restore_reload_action(
447447
path, current_root, library_root
448448
)
449449

450-
if action.should_reload_current:
450+
if should_reload:
451451
force_reload = self._move_aftercare.consume_forced_reload(path)
452452
self.assetReloadRequested.emit(current_root, False, force_reload)
453-
elif action.should_reload_as_library:
453+
elif should_reload_as_lib:
454454
self.assetReloadRequested.emit(current_root, False, False)
455455

456456
def _on_error(path: Path, message: str) -> None:

0 commit comments

Comments
 (0)