Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
litrik committed Jan 2, 2023
1 parent 0183dac commit 743b615
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ fun AdminPanel(state: AppState) {

SectionTitle(Strings.adminSectionDisplay.toString())
state.displayState.url?.run { Text("${Strings.adminLabelUrl}: $this") }
Column() {
Column {
state.displayState.messages.onEach {
Message(
message = it,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ data class Display(
val bottomHeight: Float,
) {
companion object {
val DEFAULT_BOTTOM_HEIGHT: Float = 6f
const val DEFAULT_BOTTOM_HEIGHT: Float = 6f
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class DisplayRepo(
}

@OptIn(ExperimentalSerializationApi::class)
suspend fun loadDisplay(stream: InputStream) {
fun loadDisplay(stream: InputStream) {
stream.use {
val messages = mutableListOf<Message>()
try {
Expand Down Expand Up @@ -195,7 +195,7 @@ class DisplayRepo(
center = center,
left = left,
bottom = bottom,
bottomHeight = if (left.items.isEmpty() && bottom.items.isEmpty()) 0f else (dto.bottomHeight ?: Display.Companion.DEFAULT_BOTTOM_HEIGHT)
bottomHeight = if (left.items.isEmpty() && bottom.items.isEmpty()) 0f else (dto.bottomHeight ?: Display.DEFAULT_BOTTOM_HEIGHT)
),
messages = messages,
)
Expand Down
2 changes: 1 addition & 1 deletion samples/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Live weather data for Rochester, Minnesota, US, showing temperature in degrees F

## Errors

### [not-json.txt](json.json)
### [not-json.txt](not-json.txt)
Invalid JSON
![Screenshot](not-json.png "Screenshot")

Expand Down

0 comments on commit 743b615

Please sign in to comment.