Skip to content

Commit

Permalink
5* могут включить zomg_ponies/white2
Browse files Browse the repository at this point in the history
  • Loading branch information
maxcom committed Oct 13, 2024
1 parent bdc70ef commit 1fae0e1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/scala/ru/org/linux/user/EditSettingsController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ class EditSettingsController(userDao: UserDao, profileDao: ProfileDao, userServi

val params = new util.HashMap[String, AnyRef]

val nonDeprecatedThemes = Theme.THEMES.asScala.toVector.filterNot(_.isDeprecated).map(_.getId)
val nonDeprecatedThemes = Theme.THEMES.asScala.view.filterNot(_.isDeprecated).map(_.getId).toVector

if (DefaultProfile.getTheme(currentUser.user.getStyle).isDeprecated) {
if (currentUser.user.getScore >= 500) {
params.put("stylesList", Theme.THEMES.asScala.map(_.getId).asJava)
} else if (DefaultProfile.getTheme(currentUser.user.getStyle).isDeprecated) {
params.put("stylesList", (nonDeprecatedThemes :+ currentUser.user.getStyle).asJava)
} else {
params.put("stylesList", nonDeprecatedThemes.asJava)
Expand Down

0 comments on commit 1fae0e1

Please sign in to comment.