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

建议增加和Glide类似的方式二次监听相同的url方式 #48

Closed
walkthehorizon opened this issue Jan 15, 2019 · 1 comment
Closed

Comments

@walkthehorizon
Copy link

如下
public void addResponseListener(String url, ProgressListener listener) {
List progressListeners;
synchronized (ProgressManager.class) {
progressListeners = mResponseListeners.get(url);
if (progressListeners == null) {
progressListeners = new LinkedList<>();
mResponseListeners.put(url, progressListeners);
}
}
progressListeners.add(listener);
}
,这里我看到接收到相同的url时,直接把之前的progressListeners重新放到监听了,我觉得可以再增加一个方法,逻辑上是先删除之前已有的,再把新的加进去,具体使用哪个让开发者自由选择

@JessYanCoding
Copy link
Owner

JessYanCoding commented Jan 15, 2019

一个就够了,你需要两个逻辑在 ProgressListener 自己分发和选择需要的逻辑就可以了

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

No branches or pull requests

2 participants