mirror of
https://github.com/rmcrackan/Libation.git
synced 2026-01-08 05:48:25 -05:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
012d94a146 | ||
|
|
22bd1ed121 | ||
|
|
c832f26b08 | ||
|
|
efd73d334e | ||
|
|
0db3ee6fd7 |
@@ -2,7 +2,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<Version>10.0.0.1</Version>
|
||||
<Version>10.0.2.1</Version>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Octokit" Version="5.0.2" />
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace DtoImporterService
|
||||
|
||||
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)
|
||||
{
|
||||
|
||||
@@ -9,6 +9,7 @@ using Avalonia.Styling;
|
||||
using Dinah.Core.StepRunner;
|
||||
using LibationAvalonia.Dialogs;
|
||||
using LibationAvalonia.Views;
|
||||
using LibationFileManager;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
@@ -29,8 +30,11 @@ namespace LibationAvalonia
|
||||
private static readonly IBrush FlashColor = Brushes.DodgerBlue;
|
||||
private readonly MainWindow MainForm;
|
||||
private readonly AsyncStepSequence sequence = new();
|
||||
private readonly bool AutoScan;
|
||||
public Walkthrough(MainWindow mainForm)
|
||||
{
|
||||
AutoScan = Configuration.Instance.AutoScan;
|
||||
Configuration.Instance.AutoScan = false;
|
||||
MainForm = mainForm;
|
||||
sequence[nameof(ShowAccountDialog)] = () => UIThread.InvokeAsync(ShowAccountDialog);
|
||||
sequence[nameof(ShowSettingsDialog)] = () => UIThread.InvokeAsync(ShowSettingsDialog);
|
||||
@@ -40,7 +44,11 @@ namespace LibationAvalonia
|
||||
sequence[nameof(ShowTourComplete)] = () => UIThread.InvokeAsync(ShowTourComplete);
|
||||
}
|
||||
|
||||
public async Task RunAsync() => await sequence.RunAsync();
|
||||
public async Task RunAsync()
|
||||
{
|
||||
await sequence.RunAsync();
|
||||
Configuration.Instance.AutoScan = AutoScan;
|
||||
}
|
||||
|
||||
private async Task<bool> ShowAccountDialog()
|
||||
{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using ApplicationServices;
|
||||
using AudibleUtilities;
|
||||
using Dinah.Core.StepRunner;
|
||||
using LibationFileManager;
|
||||
using LibationWinForms.Dialogs;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -24,8 +25,11 @@ namespace LibationWinForms
|
||||
private static readonly Color FlashColor = Color.DodgerBlue;
|
||||
private readonly Form1 MainForm;
|
||||
private readonly AsyncStepSequence sequence = new();
|
||||
private readonly bool AutoScan;
|
||||
public Walkthrough(Form1 form1)
|
||||
{
|
||||
AutoScan = Configuration.Instance.AutoScan;
|
||||
Configuration.Instance.AutoScan = false;
|
||||
MainForm = form1;
|
||||
sequence[nameof(ShowAccountDialog)] = ShowAccountDialog;
|
||||
sequence[nameof(ShowSettingsDialog)] = ShowSettingsDialog;
|
||||
@@ -35,7 +39,11 @@ namespace LibationWinForms
|
||||
sequence[nameof(ShowTourComplete)] = ShowTourComplete;
|
||||
}
|
||||
|
||||
public async Task RunAsync() => await sequence.RunAsync();
|
||||
public async Task RunAsync()
|
||||
{
|
||||
await sequence.RunAsync();
|
||||
Configuration.Instance.AutoScan = AutoScan;
|
||||
}
|
||||
|
||||
private async Task<bool> ShowAccountDialog()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user