I have a widget where I need to read some data using makeWebRequest at app start (in a separated API class).
A result field should be displayed in the main view. Because of the asynchronous processing, the view is shown first with a placeholder for the missing field value and should be refreshed when the http-result is ready.
When the web request is ready, I call WatchUi.requestUpdate();
to redrax the main view including the new data.
But if the user already changed the view (SELECT button), anoter view is visible. In this case I don't want to refresh the view because this could cause a reload of the view data including web requests which would slow down the widget usage.
Is is possible to identify the current view (by name or class name) to decide if it should be refreshed with async data or not?