mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 19:36:28 +00:00
Core - Removed OriginalFileName from icon since it's irrelevant
This commit is contained in:
1 parent
e1f0ccbcc1
commit
3a6171726c
4 files changed
+10
-25
No files matched your search
@@ -187,7 +187,7 @@ internal class ProfileService : IProfileService
|
||||
|
||||
using Stream? stream = _profileCategoryRepository.GetProfileIconStream(profileConfiguration.Entity.FileIconId);
|
||||
if (stream != null)
|
||||
profileConfiguration.Icon.SetIconByStream(profileConfiguration.Entity.IconOriginalFileName, stream);
|
||||
profileConfiguration.Icon.SetIconByStream(stream);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
@@ -197,11 +197,8 @@ internal class ProfileService : IProfileService
|
||||
return;
|
||||
|
||||
using Stream? stream = profileConfiguration.Icon.GetIconStream();
|
||||
if (stream != null && profileConfiguration.Icon.OriginalFileName != null)
|
||||
{
|
||||
profileConfiguration.Entity.IconOriginalFileName = profileConfiguration.Icon.OriginalFileName;
|
||||
if (stream != null)
|
||||
_profileCategoryRepository.SaveProfileIconStream(profileConfiguration.Entity, stream);
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
@@ -441,8 +438,11 @@ internal class ProfileService : IProfileService
|
||||
profileConfiguration = new ProfileConfiguration(category, profileEntity.Name, "Import");
|
||||
}
|
||||
|
||||
if (exportModel.ProfileImage != null && exportModel.ProfileConfigurationEntity?.IconOriginalFileName != null)
|
||||
profileConfiguration.Icon.SetIconByStream(exportModel.ProfileConfigurationEntity.IconOriginalFileName, exportModel.ProfileImage);
|
||||
if (exportModel.ProfileImage != null)
|
||||
{
|
||||
profileConfiguration.Icon.SetIconByStream(exportModel.ProfileImage);
|
||||
SaveProfileConfigurationIcon(profileConfiguration);
|
||||
}
|
||||
|
||||
profileConfiguration.Entity.ProfileId = profileEntity.Id;
|
||||
category.AddProfileConfiguration(profileConfiguration, 0);
|
||||
@@ -450,7 +450,7 @@ internal class ProfileService : IProfileService
|
||||
List<Module> modules = _pluginManagementService.GetFeaturesOfType<Module>();
|
||||
profileConfiguration.LoadModules(modules);
|
||||
SaveProfileCategory(category);
|
||||
|
||||
|
||||
return profileConfiguration;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user