Skip to content

Commit

Permalink
beautified language setting code
Browse files Browse the repository at this point in the history
  • Loading branch information
alex9849 committed Nov 10, 2023
1 parent d89ed07 commit 1319757
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,9 @@ public DefaultFilterSettings fromDto(DefaultFilterDto.Duplex.Detailed dto) {
}

public void setAppearance(AppearanceSettingsDto.Duplex.Detailed settingsDto) {
if(isDemoMode && settingsDto.getLanguage() != Language.en_US) {
throw new IllegalArgumentException("Updating the language is not allowed in demomode!");
}
optionsRepository.setOption("LANGUAGE", settingsDto.getLanguage().name());
}

Expand Down

0 comments on commit 1319757

Please sign in to comment.