Add normal preview support

This commit is contained in:
seven332 committed 2016-03-22 17:01:58 +08:00
1 parent 6659fefc21
commit 2c4daa447e
15 files changed
+380 -158

No files matched your search

@@ -36,7 +36,6 @@ import com.hippo.ehviewer.client.EhClient;
import com.hippo.ehviewer.client.EhCookieStore;
import com.hippo.ehviewer.client.EhEngine;
import com.hippo.ehviewer.client.data.GalleryDetail;
import com.hippo.ehviewer.client.data.LargePreviewSet;
import com.hippo.ehviewer.download.DownloadManager;
import com.hippo.ehviewer.spider.SpiderDen;
import com.hippo.ehviewer.ui.CommonOperations;
@@ -75,8 +74,6 @@ public class EhApplication extends SceneApplication implements Thread.UncaughtEx
private BitmapHelper mBitmapHelper;
private Conaco<Bitmap> mConaco;
private LruCache<Long, GalleryDetail> mGalleryDetailCache;
private LruCache<String, LargePreviewSet> mLargePreviewSetCache;
private LruCache<Long, Integer> mPreviewPagesCache;
private SimpleDiskCache mSpiderInfoCache;
private DownloadManager mDownloadManager;
@@ -131,12 +128,6 @@ public class EhApplication extends SceneApplication implements Thread.UncaughtEx
if (null != mGalleryDetailCache) {
mGalleryDetailCache.evictAll();
}
if (null != mLargePreviewSetCache) {
mLargePreviewSetCache.evictAll();
}
if (null != mPreviewPagesCache) {
mPreviewPagesCache.evictAll();
}
}
@Override
@@ -269,26 +260,6 @@ public class EhApplication extends SceneApplication implements Thread.UncaughtEx
return application.mGalleryDetailCache;
}
@NonNull
public static LruCache<String, LargePreviewSet> getLargePreviewSetCache(@NonNull Context context) {
EhApplication application = ((EhApplication) context.getApplicationContext());
if (application.mLargePreviewSetCache == null) {
// Max size 50, 3 min timeout
application.mLargePreviewSetCache = new LruCache<>(50);
}
return application.mLargePreviewSetCache;
}
@NonNull
public static LruCache<Long, Integer> getPreviewPagesCache(@NonNull Context context) {
EhApplication application = ((EhApplication) context.getApplicationContext());
if (application.mPreviewPagesCache == null) {
// Max size 50, 3 min timeout
application.mPreviewPagesCache = new LruCache<>(50);
}
return application.mPreviewPagesCache;
}
@NonNull
public static SimpleDiskCache getSpiderInfoCache(@NonNull Context context) {
EhApplication application = ((EhApplication) context.getApplicationContext());