mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-08-01 08:05:55 +10:00
fix los init localization
This commit is contained in:
@@ -73,6 +73,7 @@ class _LineOfSightMapScreenState extends State<LineOfSightMapScreen> {
|
|||||||
bool _showMarkerLabels = true;
|
bool _showMarkerLabels = true;
|
||||||
bool _didReceivePositionUpdate = false;
|
bool _didReceivePositionUpdate = false;
|
||||||
int _losRequestNonce = 0;
|
int _losRequestNonce = 0;
|
||||||
|
bool _initialLosScheduled = false;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
@@ -83,7 +84,16 @@ class _LineOfSightMapScreenState extends State<LineOfSightMapScreen> {
|
|||||||
_end = widget.candidates[1];
|
_end = widget.candidates[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_runLos();
|
_scheduleInitialRun();
|
||||||
|
}
|
||||||
|
|
||||||
|
void _scheduleInitialRun() {
|
||||||
|
if (_initialLosScheduled) return;
|
||||||
|
_initialLosScheduled = true;
|
||||||
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
|
if (!mounted) return;
|
||||||
|
_runLos();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
Reference in New Issue
Block a user