CurrentUser.java fires event every 5 seconds irrespective of whether you are logged in or not.

2 views
Skip to first unread message

DrG

unread,
Jul 14, 2010, 12:03:00 AM7/14/10
to PuzzleBazar-Dev
I have used PuzzleBazar as the core component for my test application
because it has a basic framework which can be customized for my own
presenters etc. I have a question about CurrentUser.java.

The TobBarPresenter users CurrentUser.java as an injected dependency
and as such is present in every stage of the application. A result of
this is that the CurrentUser instance continues to fire the
CurrentUserChangedEvent.fire(eventBus, result.getUser()); whether you
are logged in or not. Therefore every 5 seconds whether you want it
to or not this event is fired.

This is causing problems for me because on logging in I want the
default screen to change and as such a different presenter responds to
this event. Plus I can't see a good reason for this event to continue
firing.

Is this a bug? or is their a reason for its continued firing?

Cheers
Gene

Philippe Beaudoin

unread,
Jul 14, 2010, 12:06:17 AM7/14/10
to puzzleb...@googlegroups.com
Sounds like a bug... I did this polling trick to make sure the client
session is in sync with the server, but I'm not sure it's needed. It
is definitely not needed once the user has logged out.

Please feel free to log an issue on this.

I wish I had more time to spend on PuzzleBazar. :(

Cheers,

Philippe

DrG

unread,
Jul 14, 2010, 12:35:40 AM7/14/10
to PuzzleBazar-Dev
Philippe,

I am only glad that you had the time that you did. It has been a great
help to me.

I have fixed it in my application which uses the same
CurrentUser.java, so if you want to make me a contributor to
puzzlebazar I would be glad to make the amendment. Either way I will
log the issue with a solution.

Cheers
Gene

On Jul 13, 9:06 pm, Philippe Beaudoin <philippe.beaud...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages