Plugin info - Implemented property changed

Plugins - Improved enable failure detection
Plugins UI - Show an indicator on plugins that failed to enable
Plugins UI - Show a progress indicator on plugins that are enabling
UI - Added reusable Snackbar (not the Dutch kind with kroketten)
This commit is contained in:
Robert committed 2020-06-25 13:25:15 +02:00
1 parent 3e937f6256
commit 8215440fac
18 files changed
+399 -179

No files matched your search

@@ -0,0 +1,34 @@
using Artemis.Storage.Entities.Profile;
using Artemis.Storage.Migrations.Interfaces;
using LiteDB;
namespace Artemis.Storage.Migrations
{
public class M2ProfileEntitiesEnabledMigration : IStorageMigration
{
public int UserVersion => 2;
public void Apply(LiteRepository repository)
{
var profiles = repository.Query<ProfileEntity>().ToList();
foreach (var profileEntity in profiles)
{
foreach (var profileEntityFolder in profileEntity.Folders)
{
profileEntityFolder.Enabled = true;
foreach (var layerEffectEntity in profileEntityFolder.LayerEffects)
layerEffectEntity.Enabled = true;
}
foreach (var profileEntityLayer in profileEntity.Layers)
{
profileEntityLayer.Enabled = true;
foreach (var layerEffectEntity in profileEntityLayer.LayerEffects)
layerEffectEntity.Enabled = true;
}
repository.Upsert(profileEntity);
}
}
}
}