From 6383a745ff0da0f44e0fec76d2a40422d7d0fb0b Mon Sep 17 00:00:00 2001 From: NoodleMage Date: Sun, 6 Mar 2016 21:44:21 +0100 Subject: [PATCH] Fixed wrong download filter from commit #33386e2 Fixed another tab not in TabLayout error. Drawable to Vector Removed Filter... Toast --- .../tachiyomi/ui/library/LibraryFragment.kt | 1 - .../tachiyomi/ui/library/LibraryPresenter.kt | 7 +++++-- .../kanade/tachiyomi/ui/manga/MangaActivity.java | 7 +++++++ .../drawable-hdpi/ic_filter_list_white_24dp.png | Bin 111 -> 0 bytes .../drawable-mdpi/ic_filter_list_white_24dp.png | Bin 90 -> 0 bytes .../drawable-xhdpi/ic_filter_list_white_24dp.png | Bin 103 -> 0 bytes .../drawable-xxhdpi/ic_filter_list_white_24dp.png | Bin 107 -> 0 bytes .../ic_filter_list_white_24dp.png | Bin 106 -> 0 bytes app/src/main/res/drawable/ic_filter_list.xml | 9 +++++++++ app/src/main/res/menu/library.xml | 2 +- app/src/main/res/values/strings.xml | 1 - 11 files changed, 22 insertions(+), 5 deletions(-) delete mode 100644 app/src/main/res/drawable-hdpi/ic_filter_list_white_24dp.png delete mode 100644 app/src/main/res/drawable-mdpi/ic_filter_list_white_24dp.png delete mode 100644 app/src/main/res/drawable-xhdpi/ic_filter_list_white_24dp.png delete mode 100644 app/src/main/res/drawable-xxhdpi/ic_filter_list_white_24dp.png delete mode 100644 app/src/main/res/drawable-xxxhdpi/ic_filter_list_white_24dp.png create mode 100644 app/src/main/res/drawable/ic_filter_list.xml diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryFragment.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryFragment.kt index 9288544558..7a0403920d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryFragment.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryFragment.kt @@ -239,7 +239,6 @@ class LibraryFragment : BaseRxFragment(), ActionMode.Callback adapter.notifyDataSetChanged() adapter.refreshRegisteredAdapters() activity.supportInvalidateOptionsMenu(); - ToastUtil.showShort(context, getString(R.string.library_filter_change)) } /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt index 6bc038d238..7e0bf1bf60 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt @@ -166,9 +166,12 @@ class LibraryPresenter : BasePresenter() { // Does it have downloaded chapters. var hasDownloaded = false + var hasUnread = false - // Does it have unread chapters. - val hasUnread = manga.unread > 0 + if (prefFilterUnread) { + // Does it have unread chapters. + hasUnread = manga.unread > 0 + } if (prefFilterDownloaded) { val mangaDir = downloadManager.getAbsoluteMangaDirectory(sourceManager.get(manga.source), manga) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaActivity.java b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaActivity.java index a488a4cb2e..d357b0503b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaActivity.java +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaActivity.java @@ -77,6 +77,13 @@ public class MangaActivity extends BaseRxActivity { adapter = new MangaDetailAdapter(getSupportFragmentManager(), this); viewPager.setAdapter(adapter); + + // Workaround to prevent: Tab belongs to a different TabLayout. + // Internal bug in Support library v23.2.0. + // See https://code.google.com/p/android/issues/detail?id=201827 + for (int j = 0; j < 17; j++) + tabs.newTab(); + tabs.setupWithViewPager(viewPager); if (!isOnline) diff --git a/app/src/main/res/drawable-hdpi/ic_filter_list_white_24dp.png b/app/src/main/res/drawable-hdpi/ic_filter_list_white_24dp.png deleted file mode 100644 index 7e8a6b536bdfcba999ba36bfdba7ca975fd7b68c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 111 zcmeAS@N?(olHy`uVBq!ia0vp^Dj>|k0wldT1B8K;nWu|mh)3t!ix)W=3^&Hr5(PMPpn nt`GJgTe~DWM4fp6nTa diff --git a/app/src/main/res/drawable-xhdpi/ic_filter_list_white_24dp.png b/app/src/main/res/drawable-xhdpi/ic_filter_list_white_24dp.png deleted file mode 100644 index 9416c70ec0a0a230648075ebc449e2000f239d72..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 103 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA0wn)(8}a}tJx>?Mkcif|mkfCs7&s0X{F%+h z&%)%Mop4@>VctnaroRklqT+)Y_}1iWG8C+2XgDPM|LJEjE1*sWPgg&ebxsLQ0G~@6 Ar~m)} diff --git a/app/src/main/res/drawable-xxhdpi/ic_filter_list_white_24dp.png b/app/src/main/res/drawable-xxhdpi/ic_filter_list_white_24dp.png deleted file mode 100644 index 1263ae82e71dfbfd5aba9a11483442542e74ce15..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 107 zcmeAS@N?(olHy`uVBq!ia0vp^9w5vJBp7O^^}Pa8OeH~n!3+##lh0ZJc`BYRjv*C{ z$r6(m{IloyqulHooWQ^35x=C46!WwH>?aa9)4kR*{W|XsGR4!?&t;ucLK6Tv CS{)|< diff --git a/app/src/main/res/drawable-xxxhdpi/ic_filter_list_white_24dp.png b/app/src/main/res/drawable-xxxhdpi/ic_filter_list_white_24dp.png deleted file mode 100644 index cb2207f11fb53879554df5541522fa4ee564e975..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 106 zcmeAS@N?(olHy`uVBq!ia0vp^2_Vb}Bp6OT_L>T$m`Z~Df*BafCZDwc@{~PY978G? zlNE$}nEw3__|Q0Q&OttfcS{V@Ia-)>EuS<8GB8}PYOf6O+;0yu#M9N!Wt~$(6988y B9v1)r diff --git a/app/src/main/res/drawable/ic_filter_list.xml b/app/src/main/res/drawable/ic_filter_list.xml new file mode 100644 index 0000000000..7d435fa2b8 --- /dev/null +++ b/app/src/main/res/drawable/ic_filter_list.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/menu/library.xml b/app/src/main/res/menu/library.xml index 02037e0026..474a8f9128 100644 --- a/app/src/main/res/menu/library.xml +++ b/app/src/main/res/menu/library.xml @@ -5,7 +5,7 @@ Title or author… Selected - Filtering… This source requires you to log in