mirror of https://github.com/KokaKiwi/BarInsta
fix fetching duplication
This commit is contained in:
parent
bf9dcacd40
commit
e32002fac8
|
@ -17,12 +17,14 @@ public class PostFetcher {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void fetch() {
|
public void fetch() {
|
||||||
|
if (!fetching) {
|
||||||
fetching = true;
|
fetching = true;
|
||||||
postFetchService.fetch(result -> {
|
postFetchService.fetch(result -> {
|
||||||
fetching = false;
|
fetching = false;
|
||||||
fetchListener.onResult(result);
|
fetchListener.onResult(result);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void reset() {
|
public void reset() {
|
||||||
postFetchService.reset();
|
postFetchService.reset();
|
||||||
|
|
Loading…
Reference in New Issue