Skip to content
This repository has been archived by the owner on Apr 22, 2021. It is now read-only.

Commit

Permalink
fix: authentication check
Browse files Browse the repository at this point in the history
EA has renamed a variable and it isn't available immediately at startup anymore, so added a slight delay.

resolves #252
  • Loading branch information
Mardaneus86 committed Dec 2, 2020
1 parent 7de2110 commit aa964de
Showing 1 changed file with 23 additions and 21 deletions.
44 changes: 23 additions & 21 deletions app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,30 +52,32 @@ UTViewController.prototype.didPresent = (t) => {
}
};

services.Authentication._oAuthentication.observe(
this,
() => {
// reset the logs at startup
new Logger().reset();
setTimeout(() => {
services.Authentication.oAuthentication.observe(
this,
() => {
// reset the logs at startup
new Logger().reset();

// force full web app layout in any case
$('body').removeClass('phone').addClass('landscape');
// force full web app layout in any case
$('body').removeClass('phone').addClass('landscape');

Queue.getInstance().start();
Queue.getInstance().start();

// get rid of pinEvents when switching tabs
document.removeEventListener('visibilitychange', onVisibilityChanged);
// get rid of pinEvents when switching tabs
document.removeEventListener('visibilitychange', onVisibilityChanged);

const settings = Settings.getInstance();
settings.registerEntry(new RefreshListSettings());
settings.registerEntry(new MinBinSettings());
settings.registerEntry(new CardInfoSettings());
settings.registerEntry(new ListSizeSettings());
settings.registerEntry(new TransferTotalsSettings());
const settings = Settings.getInstance();
settings.registerEntry(new RefreshListSettings());
settings.registerEntry(new MinBinSettings());
settings.registerEntry(new CardInfoSettings());
settings.registerEntry(new ListSizeSettings());
settings.registerEntry(new TransferTotalsSettings());

settings.registerEntry(new FutbinSettings());
settings.registerEntry(new InstantBinConfirmSettings());
settings.registerEntry(new FutbinSettings());
settings.registerEntry(new InstantBinConfirmSettings());

initSettingsScreen(settings);
},
);
initSettingsScreen(settings);
},
);
}, 1000);

0 comments on commit aa964de

Please sign in to comment.