Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.

Commit

Permalink
Clear old File
Browse files Browse the repository at this point in the history
  • Loading branch information
z-chu committed Sep 12, 2017
1 parent 04b0551 commit 8b7ad06
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import android.support.annotation.Nullable;

import com.youshibi.app.AppRouter;
import com.youshibi.app.BuildConfig;
import com.youshibi.app.base.BaseActivity;
import com.youshibi.app.data.prefs.PreferencesHelper;
import com.youshibi.app.util.FileUtil;
Expand All @@ -22,10 +21,8 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// TODO: 16-11-23 一些UI逻辑、检查缓存版本(更新后缓存是否还可用)
if (PreferencesHelper.getInstance().isFirstStartApp()) {
if (BuildConfig.VERSION_CODE == 2) {
FileUtil.clearFileWithPath(getFilesDir().getPath());
FileUtil.clearFileWithPath(getCacheDir().getPath());
}
FileUtil.clearFileWithPath(getFilesDir().getPath());
FileUtil.clearFileWithPath(getCacheDir().getPath());
PreferencesHelper.getInstance().setFirstStartApp(false);
}
if (isLogin()) {
Expand Down

0 comments on commit 8b7ad06

Please sign in to comment.