refactored and condensed technical documentation and comments across the codebase to improve readability

This commit is contained in:
2026-07-06 23:17:06 +02:00
parent c48f5ef215
commit a19b67eb84
27 changed files with 99 additions and 193 deletions
@@ -114,12 +114,8 @@ class _ChatTextfieldState extends State<ChatTextfield> {
@override
void dispose() {
// Clear the published bar height only after this unmount completes. Setting
// the shared notifier synchronously here fires its listener (the download
// tray's AnimatedBuilder → setState) while the element tree is locked during
// teardown, throwing "setState() called when widget tree was locked".
// Running it at the end of the frame lets the reset land once the tree is
// writable again; a newly opened chat re-publishes its own height afterwards.
// Defer to end-of-frame: resetting the shared notifier synchronously during
// teardown fires setState while the tree is locked ("widget tree was locked").
WidgetsBinding.instance.addPostFrameCallback(
(_) => downloadChipBottomObstruction.value = 0,
);