From 334d58df2992455f68560726d9847f28a4dfc696 Mon Sep 17 00:00:00 2001 From: Vic <10308169+VictoriousRaptor@users.noreply.github.com> Date: Thu, 13 Oct 2022 20:14:32 +0800 Subject: [PATCH] Fix json load --- .../UserSettings/CustomShortcutModel.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Flow.Launcher.Infrastructure/UserSettings/CustomShortcutModel.cs b/Flow.Launcher.Infrastructure/UserSettings/CustomShortcutModel.cs index eb10a3fbf..d4dab8461 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/CustomShortcutModel.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/CustomShortcutModel.cs @@ -1,7 +1,4 @@ -using NLog.Time; -using System; -using System.Security.Cryptography.X509Certificates; -using System.Security.RightsManagement; +using System; using System.Text.Json.Serialization; namespace Flow.Launcher.Infrastructure.UserSettings @@ -11,11 +8,14 @@ namespace Flow.Launcher.Infrastructure.UserSettings { public string Key { get; set; } public string Value { get; set; } - public bool CanBeEdited { get; private set; } // Can be edited by user via dialog + + [JsonIgnore] + public bool CanBeEdited { get; private set; } // Can be edited by user from settings window [JsonIgnore] public Func Expand { get; set; } = () => { return ""; }; + [JsonConstructorAttribute] public CustomShortcutModel(string key, string value) { Key = key;