Compare commits

..
Author SHA1 Message Date
bd1d73e692
fix crash on startup 2026-09-24 22:00:01 -04:00
c7b89b8e56
small cleanups 2026-09-24 20:59:18 -04:00
2 changed files with 11 additions and 7 deletions

View file

@ -57,12 +57,15 @@ class ClientController extends AsyncNotifier<int> {
for (final MapEntry(:key, :value) in env.entries) {
final keyPtr = key.toNativeUtf8().cast<Char>();
final valuePtr = value.toNativeUtf8().cast<Char>();
try {
GomuksSetEnv(keyPtr, valuePtr);
} finally {
calloc
..free(keyPtr)
..free(valuePtr);
}
}
}
debugPrint("Initializing Gomuks...");
final handle = await Isolate.run(() {
@ -107,8 +110,9 @@ class ClientController extends AsyncNotifier<int> {
return json;
} finally {
calloc.free(bufferPointer.ref.base);
calloc.free(bufferPointer);
calloc
..free(bufferPointer.ref.base)
..free(bufferPointer);
}
}

View file

@ -71,7 +71,7 @@ final class ChatScroll<T>({
if (position.extentAfter <= topThreshold) {
await loadOlder();
} else if (position.extentBefore <= bottomThreshold) {
onReachedBottom();
await onReachedBottom();
}
}