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,13 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.IO;
|
||||
using System.Text.Json;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls.ApplicationLifetimes;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using KfChatDotNetGui.Models;
|
||||
using KfChatDotNetGui.ViewModels;
|
||||
using KfChatDotNetGui.Views;
|
||||
using Newtonsoft.Json;
|
||||
using NLog;
|
||||
|
||||
namespace KfChatDotNetGui
|
||||
@@ -27,7 +27,7 @@ namespace KfChatDotNetGui
|
||||
var dataContext = new MainWindowViewModel();
|
||||
if (File.Exists("rooms.json"))
|
||||
{
|
||||
var rooms = JsonConvert.DeserializeObject<RoomSettingsModel>(File.ReadAllText("rooms.json"));
|
||||
var rooms = JsonSerializer.Deserialize<RoomSettingsModel>(File.ReadAllText("rooms.json"));
|
||||
dataContext.RoomList = rooms!.Rooms;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user