Add the duplicate originals review, from the sidebar and from Settings
"Duplicate originals" appears under the trash in the collections sidebar while the catalog holds any, and Settings says how many there are beside the other whole-library passes. Both open one page: every group with its picture and paths, the copy that stays (tap another path to change it), a per-group Include box, what the survivor will gain and any flag, label or face conflict, and why a group was skipped. The summary is the dry run -- "N groups, M files to trash, K skipped" -- and nothing moves until "Check" has read the copies and "Move M copies to trash" is pressed. Both run on workers with progress on the page, in the activity register and, for the move, on the library status line; Stop ends a job between groups. When it ends the grid, the sidebar and the trash are refreshed and the survivors' judgements are written to their sidecars and XMP the way a rating keystroke writes them. The page is paginated at 30 groups, so a redraw decodes 30 thumbnails and previews 30 merges whatever the size of the library. Back and Escape leave it like its own Back button.
This commit is contained in:
@@ -27,6 +27,7 @@ mod collections_ui;
|
||||
#[cfg(test)]
|
||||
mod decoder_seam;
|
||||
mod duplicates;
|
||||
mod duplicates_ui;
|
||||
mod derived_sync;
|
||||
mod develop;
|
||||
mod develop_ui;
|
||||
@@ -1816,6 +1817,30 @@ fn wire_import_and_merge(
|
||||
// through (`dr_plat::imports_supported`).
|
||||
window.set_import_supported(dr_plat::imports_supported());
|
||||
|
||||
// TRACES: FR-CAT-11a
|
||||
// The duplicate originals review. What a consolidation changes is the
|
||||
// grid (copies leave it), the sidebar's collections and trash, and the
|
||||
// count the sidebar and settings show — so that is what it refreshes.
|
||||
{
|
||||
let duplicates = duplicates_ui::DuplicatesController::new(activity.clone());
|
||||
let lib = library.clone();
|
||||
let coll = collections.clone();
|
||||
duplicates_ui::wire(
|
||||
window,
|
||||
duplicates,
|
||||
library.clone(),
|
||||
Rc::new(move |w: &AppWindow| {
|
||||
library_ui::reload(w, &lib);
|
||||
let catalog = lib.catalog();
|
||||
let borrow = catalog.borrow();
|
||||
if let Some(cat) = borrow.as_ref() {
|
||||
collections_ui::refresh_tree(w, &coll, cat);
|
||||
collections_ui::refresh_trash(w, cat);
|
||||
}
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
// TRACES: FR-MRG-1
|
||||
{
|
||||
let merge = merge_ui::MergeController::new(activity.clone());
|
||||
@@ -3418,6 +3443,14 @@ fn back_one_step(w: &AppWindow) -> bool {
|
||||
return true;
|
||||
}
|
||||
|
||||
// TRACES: FR-CAT-11a | FR-UI-5
|
||||
// The duplicates review is a page over whatever view opened it, and its
|
||||
// own Back button knows how to leave it; back takes the same route.
|
||||
if w.get_active_page() == Page::Duplicates {
|
||||
w.global::<Duplicates>().invoke_close();
|
||||
return true;
|
||||
}
|
||||
|
||||
let state = NavState {
|
||||
settings: w.get_active_page() == Page::Settings,
|
||||
launch: w.get_active_view() == View::Launch,
|
||||
|
||||
Reference in New Issue
Block a user