In my sencha touch app whenever I call an Ajax request I set a loading mask on the screen until some response is sent back but lets say I have more than one Ajax request executing at the same time, I see multiple loading masks. How do I stop this from happening. I tried to put a check like
if(Ext.Viewport.getMasked()){
//bypass
}
else {
Ext.Viewport.setMasked({
xtype: 'loadmask'
});
}
But this not seem to work and when request is completed I do this
Ext.Viewport.unmask();
But my problem is that I see two masks if e.g. two requests are running parallely. Is there is a way to prevent this from happening.
I am using Sencha touch 2.3.0