fix: p4k close

This commit is contained in:
xkeyC 2025-12-04 16:18:51 +08:00
parent e1ed30b6e6
commit f3fab62291

View File

@ -51,12 +51,10 @@ class Unp4kCModel extends _$Unp4kCModel {
final loadStartTime = DateTime.now();
// 使 Rust API P4K
await unp4k_api.p4KOpen(p4KPath: gameP4kPath);
state = state.copyWith(endMessage: S.current.tools_unp4k_msg_reading2);
//
final p4kFiles = await unp4k_api.p4KGetAllFiles();
final files = <String, AppUnp4kP4kItemData>{};
@ -102,7 +100,6 @@ class Unp4kCModel extends _$Unp4kCModel {
}
ref.onDispose(() async {
state = state.copyWith(fs: null);
try {
await unp4k_api.p4KClose();
} catch (e) {