mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-15 20:37:42 +01:00
feat: transfer styles from non-polymorphic configuration
This commit is contained in:
parent
913b0f157c
commit
e58ebfdfba
3 changed files with 21 additions and 1 deletions
|
|
@ -70,6 +70,23 @@ namespace Dalamud.Interface.Style
|
|||
throw new ArgumentException("Was not a compressed style model.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [TEMPORARY] Transfer old non-polymorphic style models to the new format.
|
||||
/// </summary>
|
||||
public static void TransferOldModels()
|
||||
{
|
||||
var configuration = Service<DalamudConfiguration>.Get();
|
||||
|
||||
if (configuration.SavedStylesOld == null)
|
||||
return;
|
||||
|
||||
configuration.SavedStyles = new List<StyleModel>();
|
||||
configuration.SavedStyles.AddRange(configuration.SavedStylesOld);
|
||||
|
||||
configuration.SavedStylesOld = null;
|
||||
configuration.Save();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Serialize this style model.
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue