diff options
author | Andrew Dolgov <[email protected]> | 2015-03-11 09:25:55 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2015-03-11 09:25:55 +0300 |
commit | 9690deb11c02ad6f4442f95dbc29786e0d2bf0ec (patch) | |
tree | 88cbb8e63a131fa40dc3ce9166271f2767430df3 /org.fox.ttrss | |
parent | 1bf843a45120a627360bcde357e82d15d7220e4c (diff) |
clear disk cache on startup
Diffstat (limited to 'org.fox.ttrss')
-rwxr-xr-x | org.fox.ttrss/src/main/AndroidManifest.xml | 4 | ||||
-rwxr-xr-x | org.fox.ttrss/src/main/java/org/fox/ttrss/OnlineActivity.java | 19 |
2 files changed, 11 insertions, 12 deletions
diff --git a/org.fox.ttrss/src/main/AndroidManifest.xml b/org.fox.ttrss/src/main/AndroidManifest.xml index 63dfd827..c7af2f4a 100755 --- a/org.fox.ttrss/src/main/AndroidManifest.xml +++ b/org.fox.ttrss/src/main/AndroidManifest.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.fox.ttrss" - android:versionCode="319" - android:versionName="1.94" > + android:versionCode="320" + android:versionName="1.95" > <uses-sdk android:minSdkVersion="15" diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/OnlineActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/OnlineActivity.java index d9ecaecb..b8da6469 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/OnlineActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/OnlineActivity.java @@ -32,7 +32,7 @@ import com.google.gson.Gson; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.reflect.TypeToken; -import com.nostra13.universalimageloader.cache.disc.impl.LimitedAgeDiscCache; +import com.nostra13.universalimageloader.cache.disc.impl.UnlimitedDiscCache; import com.nostra13.universalimageloader.core.ImageLoader; import com.nostra13.universalimageloader.core.ImageLoaderConfiguration; import com.nostra13.universalimageloader.utils.StorageUtils; @@ -164,15 +164,14 @@ public class OnlineActivity extends CommonActivity { setContentView(R.layout.login); - ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(getApplicationContext()) - .diskCache( - new LimitedAgeDiscCache(new File(StorageUtils.getCacheDirectory(getApplicationContext()), "article-images"), - 2*24*60*60)) // 2 days - .build(); - ImageLoader.getInstance().init(config); - //ImageLoader.getInstance().clearDiskCache(); - - + if (!ImageLoader.getInstance().isInited()) { + ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(getApplicationContext()) + .diskCache( + new UnlimitedDiscCache(new File(StorageUtils.getCacheDirectory(getApplicationContext()), "article-images"))) + .build(); + ImageLoader.getInstance().init(config); + ImageLoader.getInstance().clearDiskCache(); + } //m_pullToRefreshAttacher = PullToRefreshAttacher.get(this); |