new: server tag

This commit is contained in:
lollipopkit
2023-05-30 22:44:45 +08:00
parent 92ffed6541
commit 472a441c8e
23 changed files with 239 additions and 112 deletions

View File

@@ -19,4 +19,16 @@ extension StringOrderX on StringOrder {
if (index == -1) return;
this[index] = newId;
}
int index(String id) {
return indexOf(id);
}
void moveById(String oid, String nid, StoreProperty property) {
final index = indexOf(oid);
if (index == -1) return;
final newIndex = indexOf(nid);
if (newIndex == -1) return;
move(index, newIndex, property);
}
}