@@ -14,6 +14,7 @@ using Torch.Server.Managers;
|
|||||||
using Torch.Server.ViewModels;
|
using Torch.Server.ViewModels;
|
||||||
using Torch.Views;
|
using Torch.Views;
|
||||||
using VRage.Game.ModAPI;
|
using VRage.Game.ModAPI;
|
||||||
|
using VRage.Serialization;
|
||||||
|
|
||||||
namespace Torch.Server.Views
|
namespace Torch.Server.Views
|
||||||
{
|
{
|
||||||
@@ -143,6 +144,8 @@ namespace Torch.Server.Views
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (w.Checkpoint.PromotedUsers == null)
|
||||||
|
w.Checkpoint.PromotedUsers = new SerializableDictionary<ulong, MyPromoteLevel>();
|
||||||
d.Edit(w.Checkpoint.PromotedUsers.Dictionary);
|
d.Edit(w.Checkpoint.PromotedUsers.Dictionary);
|
||||||
_instanceManager.DedicatedConfig.Administrators = w.Checkpoint.PromotedUsers.Dictionary.Where(k => k.Value >= MyPromoteLevel.Admin).Select(k => k.Key.ToString()).ToList();
|
_instanceManager.DedicatedConfig.Administrators = w.Checkpoint.PromotedUsers.Dictionary.Where(k => k.Value >= MyPromoteLevel.Admin).Select(k => k.Key.ToString()).ToList();
|
||||||
}
|
}
|
||||||
|
@@ -40,6 +40,7 @@ namespace Torch.Server.Views
|
|||||||
private string PreviousSearchQuery = "";
|
private string PreviousSearchQuery = "";
|
||||||
|
|
||||||
private string _description = "Loading data from server, please wait..";
|
private string _description = "Loading data from server, please wait..";
|
||||||
|
private static object _syncLock = new object();
|
||||||
public string CurrentDescription
|
public string CurrentDescription
|
||||||
{
|
{
|
||||||
get { return _description; }
|
get { return _description; }
|
||||||
@@ -55,18 +56,21 @@ namespace Torch.Server.Views
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
var installedPlugins = pluginManager.Plugins;
|
var installedPlugins = pluginManager.Plugins;
|
||||||
|
BindingOperations.EnableCollectionSynchronization(Plugins,_syncLock);
|
||||||
Task.Run(async () =>
|
Task.Run(async () =>
|
||||||
{
|
{
|
||||||
var res = await PluginQuery.Instance.QueryAll();
|
var res = await PluginQuery.Instance.QueryAll();
|
||||||
if (res == null)
|
if (res == null)
|
||||||
return;
|
return;
|
||||||
foreach (var item in res.Plugins.OrderBy(i => i.Name)) {
|
foreach (var item in res.Plugins.OrderBy(i => i.Name)) {
|
||||||
if (installedPlugins.Keys.Contains(Guid.Parse(item.ID)))
|
lock (_syncLock)
|
||||||
item.Installed = true;
|
{
|
||||||
|
if (installedPlugins.Keys.Contains(Guid.Parse(item.ID)))
|
||||||
Plugins.Add(item);
|
item.Installed = true;
|
||||||
PluginsList.Dispatcher.Invoke(() => PluginsList.SelectedIndex = 0);
|
Plugins.Add(item);
|
||||||
PluginsSource.Add(item);
|
PluginsList.Dispatcher.Invoke(() => PluginsList.SelectedIndex = 0);
|
||||||
|
PluginsSource.Add(item);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
CurrentDescription = "Please select a plugin...";
|
CurrentDescription = "Please select a plugin...";
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user