Merge pull request #481 from Flow-Launcher/everythingplugin_backwards_compatibility

Add backwards compatibility for Everything plugin v1.4.9
This commit is contained in:
Jeremy Wu 2021-06-21 23:10:19 +10:00 committed by GitHub
commit b31fddd449
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 1 deletions

View file

@ -7,9 +7,9 @@ using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Flow.Launcher.Infrastructure; using Flow.Launcher.Infrastructure;
using Flow.Launcher.Infrastructure.Logger; using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Infrastructure.Storage;
using Flow.Launcher.Infrastructure.UserSettings; using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin; using Flow.Launcher.Plugin;
using ISavable = Flow.Launcher.Plugin.ISavable;
namespace Flow.Launcher.Core.Plugin namespace Flow.Launcher.Core.Plugin
{ {
@ -51,6 +51,7 @@ namespace Flow.Launcher.Core.Plugin
var savable = plugin.Plugin as ISavable; var savable = plugin.Plugin as ISavable;
savable?.Save(); savable?.Save();
} }
API.SavePluginSettings(); API.SavePluginSettings();
} }

View file

@ -0,0 +1,8 @@
using System;
namespace Flow.Launcher.Infrastructure.Storage
{
[Obsolete("Deprecated as of Flow Launcher v1.8.0, on 2021.06.21. " +
"This is used only for Everything plugin v1.4.9 or below backwards compatibility")]
public interface ISavable : Plugin.ISavable { }
}

View file

@ -87,4 +87,8 @@ namespace Flow.Launcher.Infrastructure.Storage
File.WriteAllText(FilePath, serialized); File.WriteAllText(FilePath, serialized);
} }
} }
[Obsolete("Deprecated as of Flow Launcher v1.8.0, on 2021.06.21. " +
"This is used only for Everything plugin v1.4.9 or below backwards compatibility")]
public class JsonStrorage<T> : JsonStorage<T> where T : new() { }
} }

View file

@ -22,3 +22,4 @@ namespace Flow.Launcher.Infrastructure.Storage
} }
} }
} }

View file

@ -20,6 +20,7 @@ using Flow.Launcher.Plugin.SharedCommands;
using Flow.Launcher.Storage; using Flow.Launcher.Storage;
using Flow.Launcher.Infrastructure.Logger; using Flow.Launcher.Infrastructure.Logger;
using System.Threading.Channels; using System.Threading.Channels;
using ISavable = Flow.Launcher.Plugin.ISavable;
namespace Flow.Launcher.ViewModel namespace Flow.Launcher.ViewModel
{ {