Revert "Get download dir in download mode only"
This reverts commit 241d9daae9.
This commit is contained in:
1 parent
909380f592
commit
b4aa5ec593
2 files changed
+2
-8
No files matched your search
@@ -50,12 +50,13 @@ public final class SpiderDen {
|
||||
@Nullable
|
||||
private static SimpleDiskCache sCache;
|
||||
@Nullable
|
||||
private UniFile mDownloadDir;
|
||||
private final UniFile mDownloadDir;
|
||||
private final long mGid;
|
||||
private volatile int mMode = SpiderQueen.MODE_READ;
|
||||
|
||||
public SpiderDen(GalleryInfo galleryInfo) {
|
||||
mGid = galleryInfo.gid;
|
||||
mDownloadDir = getGalleryDownloadDir(galleryInfo);
|
||||
}
|
||||
|
||||
public static void initialize(Context context) {
|
||||
@@ -152,10 +153,6 @@ public final class SpiderDen {
|
||||
return mDownloadDir != null && mDownloadDir.isDirectory() ? mDownloadDir : null;
|
||||
}
|
||||
|
||||
public void setDownloadDir(UniFile dir) {
|
||||
mDownloadDir = dir;
|
||||
}
|
||||
|
||||
private boolean containInCache(int index) {
|
||||
if (sCache == null) {
|
||||
return false;
|
||||
|
||||
@@ -317,9 +317,6 @@ public final class SpiderQueen implements Runnable {
|
||||
mode = MODE_READ;
|
||||
}
|
||||
|
||||
if (mode == MODE_DOWNLOAD && mSpiderDen.getDownloadDir() == null) {
|
||||
mSpiderDen.setDownloadDir(SpiderDen.getGalleryDownloadDir(mGalleryInfo));
|
||||
}
|
||||
mSpiderDen.setMode(mode);
|
||||
|
||||
// Update download page
|
||||
|
||||
Reference in new issue
Block a user