dyn topic fold

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-07-06 12:22:27 +08:00
parent 5e1c73abc1
commit aa03eed92d
13 changed files with 184 additions and 97 deletions

View File

@@ -130,4 +130,16 @@ class DynTopicController
res.toast();
}
}
Future<void> topicFold() async {
final res = await DynamicsHttp.topicFold(topicId: topicId, sortBy: sortBy);
if (res case Success(:final response)) {
if (response?.items case final items? when items.isNotEmpty) {
loadingState.value.data!
..removeLast()
..addAll(items);
loadingState.refresh();
}
}
}
}