mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-12 13:28:33 +00:00
Try HotReload 3.0
This commit is contained in:
parent
b351f685f7
commit
6d1e39c1cc
@ -40,7 +40,7 @@ public static class Constants
|
||||
/// <summary>
|
||||
/// The full path to the Artemis data folder
|
||||
/// </summary>
|
||||
public static readonly string DataFolder = Path.Combine(BaseFolder, "Artemis");
|
||||
public static readonly string DataFolder = Path.Combine(BaseFolder, "Artemis-dev");
|
||||
|
||||
/// <summary>
|
||||
/// The full path to the Artemis logs folder
|
||||
|
||||
@ -16,7 +16,6 @@ using Avalonia.Controls.ApplicationLifetimes;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Avalonia.ReactiveUI;
|
||||
using DryIoc;
|
||||
using HotAvalonia;
|
||||
using ReactiveUI;
|
||||
|
||||
namespace Artemis.UI.Windows;
|
||||
@ -28,8 +27,6 @@ public class App : Application
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
this.EnableHotReload();
|
||||
|
||||
// If Artemis is already running, bring it to foreground and stop this process
|
||||
if (FocusExistingInstance())
|
||||
{
|
||||
|
||||
@ -2,8 +2,10 @@ using System;
|
||||
using Artemis.Core;
|
||||
using Artemis.Storage;
|
||||
using Avalonia;
|
||||
using Avalonia.Logging;
|
||||
using Avalonia.ReactiveUI;
|
||||
using DryIoc;
|
||||
using HotAvalonia;
|
||||
using Serilog;
|
||||
|
||||
namespace Artemis.UI.Windows;
|
||||
@ -36,7 +38,8 @@ internal class Program
|
||||
return AppBuilder.Configure<App>()
|
||||
.UsePlatformDetect()
|
||||
.LogToTrace()
|
||||
.UseReactiveUI();
|
||||
.UseReactiveUI()
|
||||
.UseHotReload();
|
||||
}
|
||||
|
||||
public static void CreateLogger(IContainer container)
|
||||
|
||||
@ -24,11 +24,11 @@ public class SerilogAvaloniaSink : ILogSink
|
||||
|
||||
#if DEBUG
|
||||
// Except with binding errors, ignore anything that is information or lower
|
||||
return (area == "Binding" || logLevel > SerilogLogLevel.Information) && _logger.IsEnabled(logLevel);
|
||||
#else
|
||||
return true;
|
||||
#else
|
||||
// Ignore binding errors in release builds, shoo
|
||||
return area != "Binding" && logLevel > SerilogLogLevel.Information && _logger.IsEnabled(logLevel);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
@ -68,7 +68,7 @@
|
||||
<PackageVersion Include="TextMateSharp.Grammars" Version="1.0.68" />
|
||||
|
||||
<PackageVersion Include="Avalonia.Markup.Xaml.Loader" Version="11.3.0" />
|
||||
<PackageVersion Include="HotAvalonia" Version="2.1.0" />
|
||||
<PackageVersion Include="HotAvalonia.Extensions" Version="2.1.0" />
|
||||
<PackageVersion Include="HotAvalonia" Version="3.0.0" />
|
||||
<PackageVersion Include="HotAvalonia.Extensions" Version="3.0.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
Loading…
x
Reference in New Issue
Block a user