mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-06 03:50:19 +02:00
code cleanup
This commit is contained in:
parent
56eae4a345
commit
bc984b0cbb
2 changed files with 4 additions and 13 deletions
|
@ -192,8 +192,10 @@ public class NetworkBookInfoActivity extends Activity implements NetworkView.Eve
|
|||
if (cover instanceof NetworkImage) {
|
||||
final NetworkImage img = (NetworkImage) cover;
|
||||
final NetworkView networkView = NetworkView.Instance();
|
||||
if (networkView.isInitialized() && networkView.isCoverLoading(img.Url)) {
|
||||
networkView.addCoverSynchronizationRunnable(img.Url, new Runnable() {
|
||||
//if (networkView.isInitialized() && networkView.isCoverLoading(img.Url)) {
|
||||
if (networkView.isInitialized()) {
|
||||
//networkView.addCoverSynchronizationRunnable(img.Url, new Runnable() {
|
||||
networkView.performCoverSynchronization(img, new Runnable() {
|
||||
public void run() {
|
||||
img.synchronizeFast();
|
||||
final ZLAndroidImageData data = mgr.getImageData(img);
|
||||
|
|
|
@ -250,17 +250,6 @@ class NetworkView {
|
|||
});
|
||||
}
|
||||
|
||||
public final boolean isCoverLoading(String coverUrl) {
|
||||
return myOnCoverSyncRunnables.containsKey(coverUrl);
|
||||
}
|
||||
|
||||
public void addCoverSynchronizationRunnable(String coverUrl, Runnable finishRunnable) {
|
||||
final LinkedList<Runnable> runnables = myOnCoverSyncRunnables.get(coverUrl);
|
||||
if (runnables != null && finishRunnable != null) {
|
||||
runnables.add(finishRunnable);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Open Network URL in browser
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue