My app has a few icons that users can tap to get new data. It saves offline copies because sometimes they have to work in areas that have poor/no signal. The code is mostly like this in each one:
Concurrent(
Set(gblLoadingOverlay,true), // 1 - display loading visual
Refresh('Re-Fueling Logs'); // 2a - refresh SharePoint list
ClearCollect(colFuel, // 2b - collect data
SortByColumns(
Filter('Re-Fueling Logs',DriverEmail=gblUserProfile.email),
"DateandTime",
SortOrder.Descending
)
)
);
Set(gblLoadingOverlay,false);
SaveData(colFuel,"colFuelDataFile")
For mobile users, this only works on the first press. After that, the icon becomes unusable. I tried turning off "Auto disable on select", and while that made the icon visually responsive on successive taps, it wouldn't run any of the OnSelect code. Having the SaveData line switch places with the line above it causes it to be stuck on the loading visual for minutes of time even though it clearly isn't doing anything (the trailing dots at the top go away), and placing it after ClearCollect in the Concurrent function has the same effect. The data it's downloading isn't very large either: for the user I'm testing with, it pulls 25 rows from a 251-row table, each row having 30 columns (most of which are blank or hold no data longer than 19 characters). The only thing that fixes the issue is removing SaveData, but that isn't ideal given the use case.
What should I do?