jpush / jpush/jpush-react-native

个人小建议

Open
#496 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.4k
Forks
348
PR merge metrics
No merged PRs in 30d

Description

希望类似的addGetRegistrationIdListener的添加监听方法中加入
static removeReceiveExtrasListener (cb) {
if (!listeners[cb]) {
return
}
listeners[cb].remove()
listeners[cb] = null
}`
类似移除方法中的if(!listeners)判断语句,这样可以避免重复加入多个同一监听事件,
因为在我使用的过程中,去加入对应的移除事件,但没有生效,这样导致会重复跳转多次的情况,可以以此来解决该问题
仅仅是个人的小建议

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the addGetRegistrationIdListener-style registration methods and compare their listener checks with removeReceiveExtrasListener, which is shown in the issue. Trace how repeated registration is handled and verify that adding the same listener does not cause repeated callbacks or navigation; the issue provides no file or test path.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.