mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Merge pull request #642 from jhdxr/master
move disabled plugins to the bottom of the list
This commit is contained in:
commit
9c8cbdd0e6
1 changed files with 12 additions and 4 deletions
|
|
@ -744,14 +744,22 @@ namespace Wox
|
||||||
|
|
||||||
private void OnPluginTabSelected()
|
private void OnPluginTabSelected()
|
||||||
{
|
{
|
||||||
var plugins = new CompositeCollection
|
var plugins = PluginManager.AllPlugins;
|
||||||
|
//move all disabled to bottom
|
||||||
|
plugins.Sort(delegate (PluginPair a, PluginPair b)
|
||||||
|
{
|
||||||
|
int res = _settings.PluginSettings.Plugins[a.Metadata.ID].Disabled ? 1 : 0;
|
||||||
|
res += _settings.PluginSettings.Plugins[b.Metadata.ID].Disabled ? -1 : 0;
|
||||||
|
return res;
|
||||||
|
});
|
||||||
|
|
||||||
|
PluginsListBox.ItemsSource = new CompositeCollection
|
||||||
{
|
{
|
||||||
new CollectionContainer
|
new CollectionContainer
|
||||||
{
|
{
|
||||||
Collection = PluginManager.AllPlugins
|
Collection = plugins
|
||||||
}
|
}
|
||||||
};
|
}; ;
|
||||||
PluginsListBox.ItemsSource = plugins;
|
|
||||||
PluginsListBox.SelectedIndex = 0;
|
PluginsListBox.SelectedIndex = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue