/* globals models onVisibilityChanged gAuthenticationModel document $ */
import 'babel-polyfill';

import initSettingsScreen from './settings';

import { Settings, Queue } from './core';

import {
  CardInfoSettings,
  RefreshListSettings,
  RemoveSoldAuctionsSettings,
  RelistAuctionsSettings,
  MinBinSettings,
  ListSizeSettings,
} from './transferlist';

import {
  FutbinSettings,
} from './futbin';

import {
  ClubInfoSettings,
} from './club';

gAuthenticationModel.addListener(
  models.AuthenticationModel.EVENT_AUTHENTICATION_SUCCESSFUL,
  this,
  () => {
    // force full web app layout in any case
    $('body').removeClass('phone').addClass('landscape');

    Queue.getInstance().start();

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

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

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

    initSettingsScreen(settings);
  },
);

@@ -177,24 +177,58 @@
  './core';%0A%0A
+import %7B Logger %7D from '../fut';%0A%0A
 import %7B%0A  C
@@ -595,16 +595,76 @@
 () =%3E %7B%0A
+    // reset the logs at startup%0A    new Logger().reset();%0A%0A
     // f

reset logs at startup