@Override
  public void dismissDialogs() {
    super.dismissDialogs();

    if (adapter != null) {
      adapter.dismissDialogs();
    }
  }
  @Override
  public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);

    setRetainInstance(true);

    if (Engine.instance().isStarted()
        && ConfigurationManager.instance().getBoolean(Constants.PREF_KEY_NETWORK_USE_UPNP)) {
      UPnPManager.instance().resume();
    }

    setupAdapter();

    if (getActivity() instanceof AbstractActivity) {
      ((AbstractActivity) getActivity()).addRefreshable(this);
    }
  }