fix: hide duplicate info when train and loco both match

This commit is contained in:
Nedifinita
2025-08-01 17:51:24 +08:00
parent 4cad3679a9
commit 4e97dcafd7

View File

@@ -780,14 +780,14 @@ fun MergedTrainRecordItem(
when { when {
latestTrain.isNotEmpty() && latestTrain != "<NUL>" && latestTrain.isNotEmpty() && latestTrain != "<NUL>" &&
recordTrain.isNotEmpty() && recordTrain != "<NUL>" && recordTrain.isNotEmpty() && recordTrain != "<NUL>" &&
latestTrain == recordTrain -> { latestTrain == recordTrain && latestLoco != recordLoco -> {
if (recordLoco.isNotEmpty() && recordLoco != "<NUL>") { if (recordLoco.isNotEmpty() && recordLoco != "<NUL>") {
"${recordItem.locoType}-${recordLoco}" "${recordItem.locoType}-${recordLoco}"
} else null } else null
} }
latestLoco.isNotEmpty() && latestLoco != "<NUL>" && latestLoco.isNotEmpty() && latestLoco != "<NUL>" &&
recordLoco.isNotEmpty() && recordLoco != "<NUL>" && recordLoco.isNotEmpty() && recordLoco != "<NUL>" &&
latestLoco == recordLoco -> { latestLoco == recordLoco && latestTrain != recordTrain -> {
if (recordTrain.isNotEmpty() && recordTrain != "<NUL>") { if (recordTrain.isNotEmpty() && recordTrain != "<NUL>") {
recordTrain recordTrain
} else null } else null