Fix library scan bug
This commit is contained in:
parent
6aaf4f63d1
commit
0db3ee6fd7
@ -54,7 +54,7 @@ namespace DtoImporterService
|
|||||||
|
|
||||||
foreach (var item in uniqueImportItems.Values)
|
foreach (var item in uniqueImportItems.Values)
|
||||||
{
|
{
|
||||||
if (qtyNew == 0 && existingEntries.TryGetValue(item.DtoItem.ProductId, out LibraryBook existing))
|
if (existingEntries.TryGetValue(item.DtoItem.ProductId, out LibraryBook existing))
|
||||||
{
|
{
|
||||||
if (existing.Account != item.AccountId)
|
if (existing.Account != item.AccountId)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -9,6 +9,7 @@ using Avalonia.Styling;
|
|||||||
using Dinah.Core.StepRunner;
|
using Dinah.Core.StepRunner;
|
||||||
using LibationAvalonia.Dialogs;
|
using LibationAvalonia.Dialogs;
|
||||||
using LibationAvalonia.Views;
|
using LibationAvalonia.Views;
|
||||||
|
using LibationFileManager;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@ -31,6 +32,8 @@ namespace LibationAvalonia
|
|||||||
private readonly AsyncStepSequence sequence = new();
|
private readonly AsyncStepSequence sequence = new();
|
||||||
public Walkthrough(MainWindow mainForm)
|
public Walkthrough(MainWindow mainForm)
|
||||||
{
|
{
|
||||||
|
var autoscan = Configuration.Instance.AutoScan;
|
||||||
|
Configuration.Instance.AutoScan = false;
|
||||||
MainForm = mainForm;
|
MainForm = mainForm;
|
||||||
sequence[nameof(ShowAccountDialog)] = () => UIThread.InvokeAsync(ShowAccountDialog);
|
sequence[nameof(ShowAccountDialog)] = () => UIThread.InvokeAsync(ShowAccountDialog);
|
||||||
sequence[nameof(ShowSettingsDialog)] = () => UIThread.InvokeAsync(ShowSettingsDialog);
|
sequence[nameof(ShowSettingsDialog)] = () => UIThread.InvokeAsync(ShowSettingsDialog);
|
||||||
@ -38,6 +41,7 @@ namespace LibationAvalonia
|
|||||||
sequence[nameof(ShowSearching)] = () => UIThread.InvokeAsync(ShowSearching);
|
sequence[nameof(ShowSearching)] = () => UIThread.InvokeAsync(ShowSearching);
|
||||||
sequence[nameof(ShowQuickFilters)] = () => UIThread.InvokeAsync(ShowQuickFilters);
|
sequence[nameof(ShowQuickFilters)] = () => UIThread.InvokeAsync(ShowQuickFilters);
|
||||||
sequence[nameof(ShowTourComplete)] = () => UIThread.InvokeAsync(ShowTourComplete);
|
sequence[nameof(ShowTourComplete)] = () => UIThread.InvokeAsync(ShowTourComplete);
|
||||||
|
Configuration.Instance.AutoScan = autoscan;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task RunAsync() => await sequence.RunAsync();
|
public async Task RunAsync() => await sequence.RunAsync();
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
using ApplicationServices;
|
using ApplicationServices;
|
||||||
using AudibleUtilities;
|
using AudibleUtilities;
|
||||||
using Dinah.Core.StepRunner;
|
using Dinah.Core.StepRunner;
|
||||||
|
using LibationFileManager;
|
||||||
using LibationWinForms.Dialogs;
|
using LibationWinForms.Dialogs;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@ -26,6 +27,8 @@ namespace LibationWinForms
|
|||||||
private readonly AsyncStepSequence sequence = new();
|
private readonly AsyncStepSequence sequence = new();
|
||||||
public Walkthrough(Form1 form1)
|
public Walkthrough(Form1 form1)
|
||||||
{
|
{
|
||||||
|
var autoscan = Configuration.Instance.AutoScan;
|
||||||
|
Configuration.Instance.AutoScan = false;
|
||||||
MainForm = form1;
|
MainForm = form1;
|
||||||
sequence[nameof(ShowAccountDialog)] = ShowAccountDialog;
|
sequence[nameof(ShowAccountDialog)] = ShowAccountDialog;
|
||||||
sequence[nameof(ShowSettingsDialog)] = ShowSettingsDialog;
|
sequence[nameof(ShowSettingsDialog)] = ShowSettingsDialog;
|
||||||
@ -33,6 +36,7 @@ namespace LibationWinForms
|
|||||||
sequence[nameof(ShowSearching)] = ShowSearching;
|
sequence[nameof(ShowSearching)] = ShowSearching;
|
||||||
sequence[nameof(ShowQuickFilters)] = ShowQuickFilters;
|
sequence[nameof(ShowQuickFilters)] = ShowQuickFilters;
|
||||||
sequence[nameof(ShowTourComplete)] = ShowTourComplete;
|
sequence[nameof(ShowTourComplete)] = ShowTourComplete;
|
||||||
|
Configuration.Instance.AutoScan = autoscan;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task RunAsync() => await sequence.RunAsync();
|
public async Task RunAsync() => await sequence.RunAsync();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user