Skip to content

loggedIn and loggedOut fire loggingIn and logginOut events #151

Closed
@jankapunkt

Description

@jankapunkt

Describe the bug

  _startLoggingIn() {
    this._reactiveDict.set('_loggingIn', true);
    Data.notify('loggingIn');
  },
  _startLoggingOut() {
    User._isLoggingOut = true;
    Data.notify('loggingOut');
  },
  _endLoggingIn() {
    this._reactiveDict.set('_loggingIn', false);
    Data.notify('loggingIn');
  },
  _endLoggingOut() {
    User._isLoggingOut = false;
    Data.notify('loggingOut');
  },

it's not determinable, at which method the even has fired as they are clearly the same.

Expected behavior
It should be distinguishable at which function the events fired. Proposed change would be to use clear naming:

  _startLoggingIn() {
    this._reactiveDict.set('_loggingIn', true);
    Data.notify('loggingIn');
  },
  _startLoggingOut() {
    User._isLoggingOut = true;
    Data.notify('loggingOut');
  },
  _endLoggingIn() {
    this._reactiveDict.set('_loggingIn', false);
    Data.notify('loggedIn');
  },
  _endLoggingOut() {
    User._isLoggingOut = false;
    Data.notify('loggedOut')
  },

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions