WilliamKarolDiCioccio / open_local_ui

OpenLocalUI: Native desktop app for Windows, MacOS and Linux. Easily run Large Language Models locally, no complex setups required. Inspired by OpenWebUI's simplicity for LLM use.
MIT License
16 stars 2 forks source link

Do not update state from within dispose method #34

Closed Rossi1337 closed 3 weeks ago

Rossi1337 commented 3 weeks ago

Do not update state from within dispose method. The widget is destroyed anyway so it does not make sense to update it. This fixes random framwork errors logged on the console. The problem here is that mounted == true but the following setState still fails then with a framwork error. As the widget is destroyed and the TextEditingController too there is no need to clear it.

Closes #33

WilliamKarolDiCioccio commented 3 weeks ago

I must admit, I'm an idiot... couldn't notice that no matter how hard I tried

Like if I didn't know or thought it was allowed