File tree Expand file tree Collapse file tree
app/src/main/java/ru/mesh/foss/app Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ import androidx.compose.foundation.BorderStroke
55import androidx.compose.foundation.background
66import androidx.compose.foundation.border
77import androidx.compose.foundation.Canvas
8+ import androidx.compose.foundation.rememberScrollState
9+ import androidx.compose.foundation.verticalScroll
810import androidx.compose.foundation.gestures.detectDragGestures
911import androidx.compose.foundation.gestures.detectTapGestures
1012import androidx.compose.foundation.layout.*
@@ -204,7 +206,10 @@ private fun MatchColumn(
204206 onRemove : (MatchNode ) -> Unit ,
205207 modifier : Modifier = Modifier ,
206208) {
207- Column (modifier, verticalArrangement = Arrangement .spacedBy(8 .dp)) {
209+ Column (
210+ modifier.heightIn(max = 360 .dp).verticalScroll(rememberScrollState()),
211+ verticalArrangement = Arrangement .spacedBy(8 .dp)
212+ ) {
208213 nodes.forEach { node ->
209214 val index = links.entries.indexOfFirst { if (node.source) it.key == node.id else it.value == node.id }
210215 val tint by animateColorAsState(
Original file line number Diff line number Diff line change @@ -327,7 +327,12 @@ class CdzNativeActivity : AppCompatActivity() {
327327 if (task.optLong(" id" ) > 0L ) out + = task
328328 }
329329 }
330- return out .sortedBy { it.optInt(" task_order" ) }
330+ val sorted = out .mapIndexed { index, task -> index to task }
331+ .sortedWith(compareBy({ it.second.optInt(" task_order" , Int .MAX_VALUE ) }, { it.first }))
332+ .map { it.second }
333+ val orderLog = sorted.joinToString(" ," ) { it.optInt(" task_order" ).toString() }
334+ MeshLog .log(" CDZ" , " порядок заданий=$orderLog " )
335+ return sorted
331336 }
332337
333338 private fun taskId (index : Int ): Long = tasks.getOrNull(index)?.optLong(" id" ) ? : 0L
You can’t perform that action at this time.
0 commit comments