diff options
author | Andrew Dolgov <[email protected]> | 2013-11-29 17:01:10 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-11-29 17:01:10 +0400 |
commit | 60778d89df0b034bced7b32a928b5379e22c778e (patch) | |
tree | 35d1b7eb38f80a8013b56cf8c48a4b042364f659 /src | |
parent | 2a285be364421498a585d925aa135f60535e63e4 (diff) |
rescan if can't open comic file/dir
Diffstat (limited to 'src')
-rw-r--r-- | src/org/fox/ttcomics/MainActivity.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/org/fox/ttcomics/MainActivity.java b/src/org/fox/ttcomics/MainActivity.java index 7de2f14..c4db1c7 100644 --- a/src/org/fox/ttcomics/MainActivity.java +++ b/src/org/fox/ttcomics/MainActivity.java @@ -215,8 +215,6 @@ public class MainActivity extends CommonActivity { startActivityForResult(intent, 0); - - } else if (file.canRead()) { Intent intent = new Intent(MainActivity.this, ViewComicActivity.class); @@ -225,6 +223,14 @@ public class MainActivity extends CommonActivity { m_fileName = fileName; startActivityForResult(intent, REQUEST_VIEWCOMIC); + } else { + toast(getString(R.string.error_cant_open_file, fileName)); + + ComicListFragment frag = (ComicListFragment) getSupportFragmentManager().findFragmentByTag(FRAG_COMICS_LIST); + + if (frag != null && frag.isAdded()) { + frag.rescan(true); + } } } |