Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
Bump mimetypes nuget
  • Loading branch information
bcssov committed Oct 29, 2022
1 parent 90f3db4 commit 183b563
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 25 deletions.
10 changes: 2 additions & 8 deletions src/IronyModManager.IO/Mods/Exporter/SQLiteExporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -696,10 +696,7 @@ static string formatPosition(int position)
toInsert.Add(mapMod(item, pos));
pos++;
}
if (toInsert.Count > 0)
{
await con.InsertAllAsync(toInsert, transaction: transaction, trace: trace);
}
await con.InsertAllAsync(toInsert, transaction: transaction, trace: trace);
}
else
{
Expand Down Expand Up @@ -788,10 +785,7 @@ Models.Paradox.v4.PlaysetsMods mapMod(Models.Paradox.v4.Mods mod, int position)
toInsert.Add(mapMod(item, pos));
pos++;
}
if (toInsert.Count > 0)
{
await con.InsertAllAsync(toInsert, transaction: transaction, trace: trace);
}
await con.InsertAllAsync(toInsert, transaction: transaction, trace: trace);
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion src/IronyModManager.Shared/IronyModManager.Shared.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
</PackageReference>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Nito.AsyncEx" Version="5.1.2" />
<PackageReference Include="PommaLabs.MimeTypes" Version="2.7.0" />
<PackageReference Include="PommaLabs.MimeTypes" Version="2.7.1" />
<PackageReference Include="SlimMessageBus.Host.Memory" Version="1.21.0" />
<PackageReference Include="SmartFormat" Version="3.2.0" />
<PackageReference Include="StrongNamer" Version="0.2.5" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Created : 03-03-2020
//
// Last Modified By : Mario
// Last Modified On : 10-28-2022
// Last Modified On : 10-29-2022
// ***********************************************************************
// <copyright file="CollectionModsControlViewModel.cs" company="Mario">
// Mario
Expand Down Expand Up @@ -2348,27 +2348,24 @@ protected virtual void SubscribeToMods()
{
var needsSave = false;
var selectedMods = SelectedMods.ToList();
if (selectedMods != null)
if (s.Value)
{
if (s.Value)
if (!selectedMods.Contains(s.Sender))
{
if (!selectedMods.Contains(s.Sender))
selectedMods.Add(s.Sender);
if (!string.IsNullOrWhiteSpace(SelectedModCollection?.Name))
{
selectedMods.Add(s.Sender);
if (!string.IsNullOrWhiteSpace(SelectedModCollection?.Name))
{
SaveState();
}
needsSave = true;
SaveState();
}
needsSave = true;
}
else
}
else
{
if (selectedMods.Contains(s.Sender))
{
if (selectedMods.Contains(s.Sender))
{
selectedMods.Remove(s.Sender);
needsSave = true;
}
selectedMods.Remove(s.Sender);
needsSave = true;
}
}
if (!string.IsNullOrWhiteSpace(SelectedModCollection?.Name) && needsSave)
Expand Down

0 comments on commit 183b563

Please sign in to comment.