mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-02 04:22:04 -04:00
Big update. Replaced Newtonsoft with System.Text.Json where possible, removed Spectre, tried to suppress the pile of compiler warnings I get on the GUI project, and tried to correct an issue where sometimes the session token retrieved is not usable.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text.Json;
|
||||
using System.Threading.Tasks;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
@@ -10,7 +11,6 @@ using Avalonia.Threading;
|
||||
using KfChatDotNetGui.Helpers;
|
||||
using KfChatDotNetGui.Models;
|
||||
using KfChatDotNetGui.ViewModels;
|
||||
using Newtonsoft.Json;
|
||||
using NLog;
|
||||
|
||||
namespace KfChatDotNetGui.Views;
|
||||
@@ -44,7 +44,8 @@ public partial class IdentitySettingsWindow : Window
|
||||
AntiDdosPow = (DataContext as IdentitySettingsWindowViewModel).AntiDdosPow,
|
||||
Username = (DataContext as IdentitySettingsWindowViewModel).Username
|
||||
};
|
||||
File.WriteAllText("settings.json", JsonConvert.SerializeObject(settings, Formatting.Indented));
|
||||
var options = new JsonSerializerOptions { WriteIndented = true };
|
||||
File.WriteAllText("settings.json", JsonSerializer.Serialize(settings, options));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user