Skip to content
This repository has been archived by the owner on Aug 17, 2020. It is now read-only.

Pokemon disapearing #41

Closed
LaurensvanVliet opened this issue Jul 31, 2016 · 5 comments · Fixed by #46
Closed

Pokemon disapearing #41

LaurensvanVliet opened this issue Jul 31, 2016 · 5 comments · Fixed by #46

Comments

@LaurensvanVliet
Copy link

LaurensvanVliet commented Jul 31, 2016

Pokemon is disappearing after you catch a other pokemon

@JFouts
Copy link

JFouts commented Jul 31, 2016

This is happening because there is a new timer created every time the GameManagerViewModel is initialized. Basically every time you view a new screen and then go back to the map. It needs to track the timer that it has already created for refreshing the map rather than making a new one.
If two timers try to refresh the map too soon after one another the second timer will result in the map being cleared.

@JFouts
Copy link

JFouts commented Jul 31, 2016

There also seems to be some issues with _stopUpdatingMap not getting reset to false after a pokemon escapes.

@ST-Apps
Copy link
Owner

ST-Apps commented Jul 31, 2016

Unfortunately there is never more than 1 Pokemon in my area, and I've been soft-banned so I can't really test it.

@JFouts pushed an update right now, can you please tell me if the issue that you saw with the timer/_stopUpdatingMap is still there?

ST-Apps added a commit that referenced this issue Jul 31, 2016
Don't create a new update timer if one already exists, #41
@JFouts
Copy link

JFouts commented Jul 31, 2016

@ST-Apps So your change fixed the issue with pokemon running causing refreshes to stop.
Not sure why "mode == NavigationMode.New" did not take care of it, but it was still calling Init on every navigation.

I just checked if the timer exists and didn't create a new one if it was already there.

@ST-Apps
Copy link
Owner

ST-Apps commented Jul 31, 2016

Great, hopefully this will finally solve the issue.

@JFouts I'm adding your name to credits later (only if you wish, ofc!) because you're really helping :)

Repository owner locked and limited conversation to collaborators Jul 31, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants