Do not reuse the same cached list in the reader.

captchafix
Floens 11 years ago
parent e9b2fa3a9c
commit 3679fd473b
  1. 6
      Clover/app/src/main/java/org/floens/chan/core/net/ChanReaderRequest.java

@ -56,8 +56,10 @@ public class ChanReaderRequest extends JsonReaderRequest<List<Post>> {
}
ChanReaderRequest request = new ChanReaderRequest(url, listener, errorListener);
request.loadable = loadable;
request.cached = cached;
// Copy the loadable and cached list. The cached array may changed/cleared by other threads.
request.loadable = loadable.copy();
request.cached = new ArrayList<>(cached);
return request;
}

Loading…
Cancel
Save