Theme Viewer + Theme Updater (#2952)

This commit is contained in:
Joe Milazzo
2024-05-13 17:00:13 -05:00
committed by GitHub
parent 24302d4fcc
commit 38e7c1c131
35 changed files with 4563 additions and 284 deletions
+3 -2
View File
@@ -122,9 +122,10 @@ public class UsersController : BaseApiController
existingPreferences.PdfScrollMode = preferencesDto.PdfScrollMode;
existingPreferences.PdfSpreadMode = preferencesDto.PdfSpreadMode;
if (existingPreferences.Theme.Id != preferencesDto.Theme?.Id)
if (preferencesDto.Theme != null && existingPreferences.Theme.Id != preferencesDto.Theme?.Id)
{
existingPreferences.Theme = preferencesDto.Theme ?? await _unitOfWork.SiteThemeRepository.GetDefaultTheme();
var theme = await _unitOfWork.SiteThemeRepository.GetTheme(preferencesDto.Theme!.Id);
existingPreferences.Theme = theme ?? await _unitOfWork.SiteThemeRepository.GetDefaultTheme();
}