Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

yotta / pictogram

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 60
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Closed
Open
Issue #213 opened May 15, 2017 by Jose Antonio@jlrufian 
  • New issue
New issue

Se reciben mensajes WS scene al salir de colecciones

  1. Entrar a las colecciones de un estudiante
  2. Salir a la lista de estudiantes
  3. Desde la tablet o otra sesion web modificar algún elemento de la escena activa del estudiante del punto 1
  4. En el dashboard salen mensajes conforme a que se ha actualizado los datos de la escena, con su consiguiente llamada a la api recargando.

Esto sucede porque las variables se guardan en el scope y al cambiar de sección en la web, el scope sigue siendo el mismo, además se siguen recibiendo mensajes por WS de la room scene.

  • Jose Antonio @jlrufian

    assigned to @amontejo

    May 16, 2017

    assigned to @amontejo

    assigned to @amontejo
    Toggle commit list
  • Arturo Montejo Ráez @amontejo

    added To Do label

    May 22, 2017

    added To Do label

    added ~29 label
    Toggle commit list
  • Arturo Montejo Ráez @amontejo commented May 27, 2017
    Owner

    Solucionado añadiendo al final de collections.js lo siguiente:

      // unsubscribe sockets when leaving
      $rootScope.$on('$stateChangeStart',
        function(event, toState, toParams, fromState, fromParams) {
          io.socket.off('scene');
          io.socket.off('vocabulary');
        }
      );
    

    Sencillamente, desctivamos listeners a esos eventos del socket al abandonar las colecciones.

    Edited May 27, 2017 by Arturo Montejo Ráez
    Solucionado añadiendo al final de collections.js lo siguiente: ```javascript // unsubscribe sockets when leaving $rootScope.$on('$stateChangeStart', function(event, toState, toParams, fromState, fromParams) { io.socket.off('scene'); io.socket.off('vocabulary'); } ); ``` Sencillamente, desctivamos listeners a esos eventos del socket al abandonar las colecciones.
  • Arturo Montejo Ráez @amontejo

    closed

    May 27, 2017

    closed

    closed
    Toggle commit list
  • Arturo Montejo Ráez @amontejo

    mentioned in commit a531b792

    May 27, 2017

    mentioned in commit a531b792

    mentioned in commit a531b7927509e6dcc38b4e91f1bf40f2d8e5527c
    Toggle commit list
  • Write
  • Preview
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
No due date
2
Labels
To Do bug
Assign labels
  • View labels
2
2 participants
Reference: yotta/pictogram#213