public async Task<CfanModule> TooManyModsProvide(TooManyModsProvideKraken kraken)
{
//We want LMtHIT to be the last user selection. If we alter this handling a too many provides
// it needs to be reset so a potential second too many provides doesn't use the wrong mod.
GUIMod mod;
TaskCompletionSource<CfanModule> task = new TaskCompletionSource<CfanModule>();
Util.Invoke(this, () =>
{
UpdateProvidedModsDialog(kraken, task);
m_TabController.ShowTab("ChooseProvidedModsTabPage", 3);
m_TabController.SetTabLock(true);
});
var module = await task.Task;
if (module == null)
{
last_mod_to_have_install_toggled.TryPeek(out mod);
MarkModForInstall(mod.Identifier,uncheck:true);
}
Util.Invoke(this, () =>
{
m_TabController.SetTabLock(false);
m_TabController.HideTab("ChooseProvidedModsTabPage");
m_TabController.ShowTab("ManageModsTabPage");
});
if(module!=null)
MarkModForInstall(module.identifier);
last_mod_to_have_install_toggled.TryPop(out mod);
return module;
}
}