Skip to content

Commit

Permalink
TopicMenu -> Scala
Browse files Browse the repository at this point in the history
  • Loading branch information
maxcom committed Oct 30, 2024
1 parent 7fca0f0 commit 6a05aa4
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 97 deletions.
97 changes: 0 additions & 97 deletions src/main/java/ru/org/linux/topic/TopicMenu.java

This file was deleted.

29 changes: 29 additions & 0 deletions src/main/scala/ru/org/linux/topic/TopicMenu.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* Copyright 1998-2024 Linux.org.ru
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ru.org.linux.topic

import ru.org.linux.user.Userpic

import javax.annotation.Nullable
import scala.beans.{BeanProperty, BooleanBeanProperty}

case class TopicMenu(@BooleanBeanProperty topicEditable: Boolean, @BooleanBeanProperty tagsEditable: Boolean,
@BooleanBeanProperty resolvable: Boolean, @BooleanBeanProperty commentsAllowed: Boolean,
@BooleanBeanProperty deletable: Boolean, @BooleanBeanProperty undeletable: Boolean,
@BooleanBeanProperty commitable: Boolean, @BeanProperty @Nullable userpic: Userpic,
@BooleanBeanProperty showComments: Boolean) {
@BooleanBeanProperty
val editable: Boolean = tagsEditable || topicEditable
}

0 comments on commit 6a05aa4

Please sign in to comment.