optimize direct transfer UI and Android queue

This commit is contained in:
zhy200308
2026-08-12 14:06:03 +08:00
parent d7a29e035f
commit 8b3f5c0216
9 changed files with 260 additions and 182 deletions
@@ -0,0 +1,8 @@
package com.qft.optical
/** Move one item while preserving every other item's relative order. */
internal fun <T> moveQueueItem(items: MutableList<T>, from: Int, to: Int): Boolean {
if (from !in items.indices || to !in items.indices || from == to) return false
items.add(to, items.removeAt(from))
return true
}