flasher: fix flash bounds not resetting on disconnect

This commit is contained in:
Konstantin Pereiaslov 2026-09-21 00:44:55 -05:00
parent 2b61e7fc37
commit 7478babf16
No known key found for this signature in database
GPG key ID: 24D1843DE7F39196

View file

@ -353,6 +353,7 @@ const PhoneFlasher: Component = () => {
setPhoneInfo(undefined);
setConnBaudrate(0);
setAreas([]);
setFlashBounds({ addr: 0, size: 0 });
setStatus(undefined);
});
};
@ -399,6 +400,7 @@ const PhoneFlasher: Component = () => {
return;
try {
setConnBaudrate(await serial.flasher.getBaudrate().catch(() => 0));
setFlashBounds(await serial.flasher.getFullFlashInfo());
const areas = await serial.flasher.getMemAreas();
setAreas(areas);
if (areas.length) {