mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-07-23 12:00:13 +08:00
opt dyn/reply text menu
Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
@@ -68,4 +68,12 @@ extension ListExt<T> on List<T> {
|
||||
T getOrFirst(int index) {
|
||||
return getOrNull(index) ?? first;
|
||||
}
|
||||
|
||||
void insertOrAdd(int index, T element) {
|
||||
if (length <= index) {
|
||||
add(element);
|
||||
} else {
|
||||
insert(index, element);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user