Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP refactor getPokestopMarker to show both rocket + reward #552

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

yw2theorycrafter
Copy link
Contributor

@yw2theorycrafter yw2theorycrafter commented Sep 4, 2021

Continues PR #548

Note: Untested. I just cherry-picked #548 onto develop and went over it once or twice in the text editor. ☠️

  • the candy icon + number placement probably needs tweaking

  • This PR (still) doesn't respect all of the various "no*" config variables.

Comment on lines +2409 to +2425
var hasRocket = item['incident_expiration'] > Date.now();
var hasQuest = item['quest_reward_type'] !== null && lastMidnight < Number(item['quest_timestamp']);

var showRocket = false;
var showQuest = false;
var showLures = false;

//TODO also factor in the "no*" stuff.
if (Store.get(['showQuests']) || Store.get(['showAllPokestops'])){
showQuest = true;
}
if (Store.get(['showRocket']) || Store.get(['showAllPokestops'])){
showRocket = true;
}
if (Store.get(['showLures']) || Store.get(['showAllPokestops'])){
showLures = true;
}
Copy link
Collaborator

@whitewillem whitewillem Sep 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something like this

    var hasRocket = item['incident_expiration'] > Date.now()
    var hasQuest = item['quest_reward_type'] !== null && lastMidnight < Number(item['quest_timestamp'])

    var showRocket = ((!noTeamRocket && Store.get(['showRocket'])) || Store.get(['showAllPokestops']))
    var showQuest = ((!noQuests && Store.get(['showQuests'])) || Store.get(['showAllPokestops']))
    var showLures = ((!noLures && Store.get(['showLures'])) || Store.get(['showAllPokestops']))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants