Fix loader handling: only call hide(...) when the loader is shown
Merge pull request #355 from mleduque/IDEX-1689-fix

Fix loader handling: only call hide(...) when the loader is shown