From 4d1623a8127cad1ee938209eb17aac07da28ef42 Mon Sep 17 00:00:00 2001 From: Jay Date: Sun, 9 Feb 2020 15:25:15 -0800 Subject: [PATCH] Removed logic and option for the side drawer :wave: --- .../data/preference/PreferenceKeys.kt | 2 - .../data/preference/PreferencesHelper.kt | 2 - .../browse/BrowseCatalogueController.kt | 12 +- .../ui/catalogue/filter/HeaderItem.kt | 6 +- .../ui/library/LibraryCategoryView.kt | 30 +-- .../tachiyomi/ui/library/LibraryController.kt | 182 +++--------------- .../tachiyomi/ui/library/LibraryPresenter.kt | 37 ++-- .../library/filter/SortFilterBottomSheet.kt | 20 +- .../kanade/tachiyomi/ui/main/MainActivity.kt | 153 +++------------ .../tachiyomi/ui/main/SearchActivity.kt | 4 +- .../ui/manga/chapter/ChaptersController.kt | 5 +- .../ui/manga/info/MangaInfoController.kt | 2 +- .../RecentChaptersController.kt | 1 - .../recently_read/RecentlyReadController.kt | 1 - .../ui/setting/SettingsGeneralController.kt | 30 --- .../ui/setting/SettingsMainController.kt | 1 - .../tachiyomi/util/view/ViewExtensions.kt | 4 +- .../res/drawable/ic_view_list_white_24dp.xml | 3 +- .../drawable/ic_view_module_white_24dp.xml | 3 +- app/src/main/res/layout/library_category.xml | 1 - app/src/main/res/layout/main_activity.xml | 10 - app/src/main/res/menu/library.xml | 29 --- app/src/main/res/values/strings.xml | 6 - 23 files changed, 99 insertions(+), 445 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceKeys.kt b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceKeys.kt index ccc0306a0a..8984b1d386 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceKeys.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceKeys.kt @@ -137,8 +137,6 @@ object PreferenceKeys { const val refreshCoversToo = "refresh_covers_too" - const val useBottomNav = "use_bottom_nav" - @Deprecated("Use the preferences of the source") fun sourceUsername(sourceId: Long) = "pref_source_username_$sourceId" diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt index 84842121c0..ac1cecc1f0 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt @@ -233,8 +233,6 @@ class PreferencesHelper(val context: Context) { fun extensionUpdatesCount() = rxPrefs.getInteger("ext_updates_count", 0) - fun useBottonNav() = rxPrefs.getBoolean(Keys.useBottomNav, true) - fun showRecentUpdates() = rxPrefs.getBoolean("show_recents", false) fun lastExtCheck() = rxPrefs.getLong("last_ext_check", 0) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/browse/BrowseCatalogueController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/browse/BrowseCatalogueController.kt index c05454540e..c71cb6d533 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/browse/BrowseCatalogueController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/browse/BrowseCatalogueController.kt @@ -17,6 +17,7 @@ import com.f2prateek.rx.preferences.Preference import com.google.android.material.snackbar.BaseTransientBottomBar import com.google.android.material.snackbar.Snackbar import com.jakewharton.rxbinding.support.v7.widget.queryTextChangeEvents +import com.jakewharton.rxbinding.view.visible import eu.davidea.flexibleadapter.FlexibleAdapter import eu.davidea.flexibleadapter.items.IFlexible import eu.kanade.tachiyomi.R @@ -294,16 +295,7 @@ open class BrowseCatalogueController(bundle: Bundle) : ) // Setup filters button - menu.findItem(R.id.action_set_filter).apply { - icon.mutate() - if (presenter.sourceFilters.isEmpty()) { - isEnabled = false - icon.alpha = 128 - } else { - isEnabled = true - icon.alpha = 255 - } - } + menu.findItem(R.id.action_set_filter).isVisible = presenter.sourceFilters.isNotEmpty() // Show next display mode menu.findItem(R.id.action_display_mode).apply { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/filter/HeaderItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/filter/HeaderItem.kt index b93538a702..d65d013559 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/filter/HeaderItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/filter/HeaderItem.kt @@ -1,7 +1,6 @@ package eu.kanade.tachiyomi.ui.catalogue.filter import android.annotation.SuppressLint -import com.google.android.material.R import android.view.View import android.widget.TextView import androidx.recyclerview.widget.RecyclerView @@ -9,13 +8,15 @@ import eu.davidea.flexibleadapter.FlexibleAdapter import eu.davidea.flexibleadapter.items.AbstractHeaderItem import eu.davidea.flexibleadapter.items.IFlexible import eu.davidea.viewholders.FlexibleViewHolder +import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.source.model.Filter +import eu.kanade.tachiyomi.util.system.getResourceColor class HeaderItem(val filter: Filter.Header) : AbstractHeaderItem() { @SuppressLint("PrivateResource") override fun getLayoutRes(): Int { - return R.layout.design_navigation_item_subheader + return com.google.android.material.R.layout.design_navigation_item_subheader } override fun createViewHolder(view: View, adapter: FlexibleAdapter>): Holder { @@ -25,6 +26,7 @@ class HeaderItem(val filter: Filter.Header) : AbstractHeaderItem>, holder: Holder, position: Int, payloads: MutableList?) { val view = holder.itemView as TextView view.text = filter.name + view.setTextColor(view.context.getResourceColor(R.attr.actionBarTintColor)) } override fun equals(other: Any?): Boolean { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryView.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryView.kt index 35f907aacc..e4b907e664 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryView.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryView.kt @@ -101,32 +101,16 @@ class LibraryCategoryView @JvmOverloads constructor(context: Context, attrs: Att swipe_refresh.addView(recycler) adapter.fastScroller = fast_scroller - if (!MainActivity.bottomNav) { - fast_scroller.addOnScrollStateChangeListener { - controller.lockFilterBar(it) - } - } - else { - fast_scroller.setIgnoreTouchesOutsideHandle(false) - } val config = resources?.configuration val phoneLandscape = (config?.orientation == Configuration.ORIENTATION_LANDSCAPE && (config.screenLayout.and(Configuration.SCREENLAYOUT_SIZE_MASK)) < Configuration.SCREENLAYOUT_SIZE_LARGE) - if (MainActivity.bottomNav && !phoneLandscape) { + // pad the recycler if the filter bottom sheet is visible + if (!phoneLandscape) { val height = context.resources.getDimensionPixelSize(R.dimen.rounder_radius) + 5.dpToPx recycler.updatePaddingRelative(bottom = height) } - else if (!MainActivity.bottomNav) { - recycler.doOnApplyWindowInsets { v, insets, padding -> - v.updatePaddingRelative(bottom = padding.bottom + insets.systemWindowInsetBottom) - - fast_scroller?.updateLayoutParams { - bottomMargin = insets.systemWindowInsetBottom - } - } - } // Double the distance required to trigger sync swipe_refresh.setDistanceToTriggerSync((2 * 64 * resources.displayMetrics.density).toInt()) @@ -191,14 +175,6 @@ class LibraryCategoryView @JvmOverloads constructor(context: Context, attrs: Att adapter.notifyDataSetChanged() saveDragSort() } - else { - category.mangaSort = ('a' + (it.second - 1)) - if (category.id == 0) - preferences.defaultMangaOrder().set(category.mangaSort.toString()) - else - db.insertCategory(category).asRxObservable().subscribe() - controller.enableReorderItems(category) - } } } } @@ -363,9 +339,7 @@ class LibraryCategoryView @JvmOverloads constructor(context: Context, attrs: Att preferences.defaultMangaOrder().set(mangaIds.joinToString("/")) else db.insertCategory(category).asRxObservable().subscribe() - //justDraggedAndDropped = true controller.onCatSortChanged(category.id) - controller.enableReorderItems(category) } override fun shouldMoveItem(fromPosition: Int, toPosition: Int): Boolean { if (adapter.selectedItemCount > 1) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt index 3850d53828..01cff0c834 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt @@ -75,7 +75,6 @@ class LibraryController( private val preferences: PreferencesHelper = Injekt.get() ) : BaseController(bundle), TabbedController, - SecondaryDrawerController, ActionMode.Callback, ChangeMangaCategoriesDialog.Listener, MigrationInterface, @@ -144,11 +143,6 @@ class LibraryController( */ private var adapter: LibraryAdapter? = null - /** - * Navigation view containing filter/sort/display items. - */ - private var navView: LibraryNavigationView? = null - /** * Drawer listener to allow swipe only for closing the drawer. */ @@ -158,8 +152,6 @@ class LibraryController( var snack: Snackbar? = null - private var reorderMenuItem:MenuItem? = null - private var presenter = LibraryPresenter(this) init { @@ -196,9 +188,9 @@ class LibraryController( library_pager.addOnPageChangeListener(object : ViewPager.OnPageChangeListener { override fun onPageSelected(position: Int) { - enableReorderItems(position) bottom_sheet.lastCategory = adapter?.categories?.getOrNull(position) - bottom_sheet.updateTitle() + if (preferences.librarySortingMode().getOrDefault() == LibrarySort.DRAG_AND_DROP) + bottom_sheet.updateTitle() } override fun onPageScrolled( @@ -216,58 +208,22 @@ class LibraryController( createActionModeIfNeeded() } - if (MainActivity.bottomNav) { - bottom_sheet.onCreate(pager_layout) + bottom_sheet.onCreate(pager_layout) - bottom_sheet.onGroupClicked = { - when (it) { - SortFilterBottomSheet.ACTION_REFRESH -> onRefresh() - SortFilterBottomSheet.ACTION_FILTER -> onFilterChanged() - SortFilterBottomSheet.ACTION_SORT -> onSortChanged() - SortFilterBottomSheet.ACTION_DISPLAY -> reattachAdapter() - SortFilterBottomSheet.ACTION_DOWNLOAD_BADGE -> - presenter.requestDownloadBadgesUpdate() - SortFilterBottomSheet.ACTION_UNREAD_BADGE -> presenter.requestUnreadBadgesUpdate() - SortFilterBottomSheet.ACTION_CAT_SORT -> onCatSortChanged() - } - } - - fab.setOnClickListener { - router.pushController(DownloadController().withFadeTransaction()) + bottom_sheet.onGroupClicked = { + when (it) { + SortFilterBottomSheet.ACTION_REFRESH -> onRefresh() + SortFilterBottomSheet.ACTION_FILTER -> onFilterChanged() + SortFilterBottomSheet.ACTION_SORT -> onSortChanged() + SortFilterBottomSheet.ACTION_DISPLAY -> reattachAdapter() + SortFilterBottomSheet.ACTION_DOWNLOAD_BADGE -> presenter.requestDownloadBadgesUpdate() + SortFilterBottomSheet.ACTION_UNREAD_BADGE -> presenter.requestUnreadBadgesUpdate() + SortFilterBottomSheet.ACTION_CAT_SORT -> onCatSortChanged() } } - else { - bottom_sheet.gone() - shadow.gone() - shadow2.gone() - } - } - fun enableReorderItems(category: Category) { - if (MainActivity.bottomNav) return - adapter?.categories?.getOrNull(library_pager.currentItem)?.mangaSort = category.mangaSort - enableReorderItems(sortType = category.mangaSort) - } - - private fun enableReorderItems(position: Int? = null, sortType: Char? = null) { - if (MainActivity.bottomNav) return - val pos = position ?: library_pager.currentItem - val orderOfCat = sortType ?: adapter?.categories?.getOrNull(pos)?.mangaSort - if (reorderMenuItem?.isVisible != true) return - val subMenu = reorderMenuItem?.subMenu ?: return - if (orderOfCat != null) { - subMenu.setGroupCheckable(R.id.reorder_group, true, true) - when (orderOfCat) { - 'a', 'b' -> subMenu.findItem(R.id.action_alpha_asc)?.isChecked = true - 'c', 'd' -> subMenu.findItem(R.id.action_update_asc)?.isChecked = true - 'e', 'f' -> subMenu.findItem(R.id.action_unread)?.isChecked = true - 'g', 'h' -> subMenu.findItem(R.id.action_last_read)?.isChecked = true - } - subMenu.findItem(R.id.action_reverse)?.isVisible = true - } - else { - subMenu.findItem(R.id.action_reverse)?.isVisible = false - subMenu.setGroupCheckable(R.id.reorder_group, false, false) + fab.setOnClickListener { + router.pushController(DownloadController().withFadeTransaction()) } } @@ -314,40 +270,6 @@ class LibraryController( super.onDetach(view) } - override fun createSecondaryDrawer(drawer: DrawerLayout): ViewGroup? { - if (MainActivity.bottomNav) return null - val view = drawer.inflate(R.layout.library_drawer) as LibraryNavigationView - navView = view - drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED, GravityCompat.END) - - navView?.onGroupClicked = { group, item -> - when (group) { - is LibraryNavigationView.FilterGroup -> onFilterChanged(item) - is LibraryNavigationView.SortGroup -> onSortChanged() - is LibraryNavigationView.DisplayGroup -> reattachAdapter() - is LibraryNavigationView.BadgeGroup -> onDownloadBadgeChanged() - } - } - - drawer.systemUiVisibility = View.SYSTEM_UI_FLAG_LAYOUT_STABLE or - View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN or - View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION - val statusScrim = view.findViewById(R.id.status_bar_scrim) as View - statusScrim.setOnApplyWindowInsetsListener(HeightTopWindowInsetsListener) - view.setOnApplyWindowInsetsListener { _, insets -> - view.recycler.updatePaddingRelative( - bottom = view.recycler.marginBottom + insets.systemWindowInsetBottom, - top = view.recycler.marginTop + insets.systemWindowInsetTop - ) - insets - } - return view - } - - override fun cleanupSecondaryDrawer(drawer: DrawerLayout) { - navView = null - } - override fun configureTabs(tabs: TabLayout) { with(tabs) { tabGravity = TabLayout.GRAVITY_CENTER @@ -423,35 +345,25 @@ class LibraryController( preferences.landscapeColumns() } - private fun onRefresh() { - if (!MainActivity.bottomNav) activity?.invalidateOptionsMenu() - presenter.requestFullUpdate() - } - /** * Called when a filter is changed. */ - private fun onFilterChanged(item: ExtendedNavigationView.Item? = null) { - if (item is ExtendedNavigationView.Item.MultiStateGroup && item.resTitle == R.string.categories) { - if (!MainActivity.bottomNav) activity?.invalidateOptionsMenu() - presenter.requestFullUpdate() - return - } + private fun onFilterChanged() { presenter.requestFilterUpdate() destroyActionModeIfNeeded() - if (!MainActivity.bottomNav) activity?.invalidateOptionsMenu() } - private fun onDownloadBadgeChanged() { - presenter.requestDownloadBadgesUpdate() + private fun onRefresh() { + presenter.getLibrary() + destroyActionModeIfNeeded() } /** * Called when the sorting mode is changed. */ private fun onSortChanged() { - if (!MainActivity.bottomNav) activity?.invalidateOptionsMenu() presenter.requestSortUpdate() + destroyActionModeIfNeeded() } fun onCatSortChanged(id: Int? = null) { @@ -489,27 +401,19 @@ class LibraryController( /** * Destroys the action mode. */ - fun destroyActionModeIfNeeded() { + private fun destroyActionModeIfNeeded() { actionMode?.finish() } override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) { inflater.inflate(R.menu.library, menu) - val reorganizeItem = menu.findItem(R.id.action_reorganize) - reorganizeItem.isVisible = - !MainActivity.bottomNav - preferences.librarySortingMode().getOrDefault() == LibrarySort.DRAG_AND_DROP && - !preferences.hideCategories().getOrDefault() - val config = resources?.configuration val phoneLandscape = (config?.orientation == Configuration.ORIENTATION_LANDSCAPE && (config.screenLayout.and(Configuration.SCREENLAYOUT_SIZE_MASK)) < Configuration.SCREENLAYOUT_SIZE_LARGE) - menu.findItem(R.id.action_library_filter).isVisible = !MainActivity.bottomNav || phoneLandscape - reorderMenuItem = reorganizeItem - enableReorderItems() + menu.findItem(R.id.action_library_filter).isVisible = phoneLandscape val searchItem = menu.findItem(R.id.action_search) val searchView = searchItem.actionView as SearchView @@ -555,7 +459,7 @@ class LibraryController( } override fun onPrepareOptionsMenu(menu: Menu) { - val navView = navView ?: return + val navView = bottom_sheet ?: return val filterItem = menu.findItem(R.id.action_library_filter) @@ -569,15 +473,9 @@ class LibraryController( when (item.itemId) { R.id.action_search -> expandActionViewFromInteraction = true R.id.action_library_filter -> { - if (MainActivity.bottomNav) { - if (bottom_sheet.sheetBehavior?.state != BottomSheetBehavior.STATE_COLLAPSED) - bottom_sheet.sheetBehavior?.state = - BottomSheetBehavior.STATE_COLLAPSED - else - bottom_sheet.sheetBehavior?.state = - BottomSheetBehavior.STATE_EXPANDED - } - else navView?.let { activity?.drawer?.openDrawer(GravityCompat.END) } + if (bottom_sheet.sheetBehavior?.state != BottomSheetBehavior.STATE_COLLAPSED) + bottom_sheet.sheetBehavior?.state = BottomSheetBehavior.STATE_COLLAPSED + else bottom_sheet.sheetBehavior?.state = BottomSheetBehavior.STATE_EXPANDED } R.id.action_edit_categories -> { router.pushController(CategoryController().withFadeTransaction()) @@ -585,31 +483,12 @@ class LibraryController( R.id.action_source_migration -> { router.pushController(MigrationController().withFadeTransaction()) } - R.id.action_alpha_asc -> reOrder(0) - R.id.action_update_asc -> reOrder(1) - R.id.action_unread -> reOrder(2) - R.id.action_last_read -> reOrder(3) - R.id.action_reverse -> reOrder(-1) else -> return super.onOptionsItemSelected(item) } return true } - private fun reOrder(type: Int) { - val modType = if (type == -1) { - val t = (adapter?.categories?.getOrNull(library_pager.currentItem)?.mangaSort - ?.minus('a') ?: 0) + 1 - if (t % 2 != 0) t + 1 - else t - 1 - } - else 2 * type + 1 - adapter?.categories?.getOrNull(library_pager.currentItem)?.id?.let { - reorganizeRelay.call(it to modType) - onSortChanged() - } - } - /** * Invalidates the action mode, forcing it to refresh its content. */ @@ -753,17 +632,6 @@ class LibraryController( .showDialog(router) } - fun lockFilterBar(lock: Boolean) { - val drawer = (navView?.parent as? DrawerLayout) ?: return - if (lock) { - drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED) - drawer.closeDrawers() - } else { - drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED) - drawer.visible() - } - } - private fun deleteMangasFromLibrary() { val mangas = selectedMangas.toList() presenter.removeMangaFromLibrary(mangas) 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 44e5cbdb6a..5dccb65334 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 @@ -115,27 +115,20 @@ class LibraryPresenter( val filterFn: (LibraryItem) -> Boolean = f@ { item -> // Filter when there isn't unread chapters. - if (MainActivity.bottomNav) { - if (filterUnread == STATE_INCLUDE && - (item.manga.unread == 0 || db.getChapters(item.manga).executeAsBlocking() - .size != item.manga.unread)) return@f false - if (filterUnread == STATE_EXCLUDE && - (item.manga.unread == 0 || db.getChapters(item.manga).executeAsBlocking().size == item.manga.unread)) return@f false - if (filterUnread == STATE_REALLY_EXCLUDE && item.manga.unread > 0) return@f false - } - else { - if (filterUnread == STATE_INCLUDE && item.manga.unread == 0) return@f false - if ((filterUnread == STATE_EXCLUDE || filterUnread == STATE_REALLY_EXCLUDE) && item - .manga.unread > 0) return@f false - } + if (filterUnread == STATE_INCLUDE && + (item.manga.unread == 0 || db.getChapters(item.manga).executeAsBlocking() + .size != item.manga.unread)) return@f false + if (filterUnread == STATE_EXCLUDE && + (item.manga.unread == 0 || + db.getChapters(item.manga).executeAsBlocking().size == item.manga.unread)) + return@f false + if (filterUnread == STATE_REALLY_EXCLUDE && item.manga.unread > 0) return@f false - if (MainActivity.bottomNav) { - if (filterMangaType == LibraryManga.MANGA && - item.manga.mangaType() == LibraryManga.MANWHA) - return@f false - if ((filterMangaType == LibraryManga.MANWHA) && - item.manga.mangaType() == LibraryManga.MANGA) return@f false - } + if (filterMangaType == LibraryManga.MANGA && + item.manga.mangaType() == LibraryManga.MANWHA) + return@f false + if ((filterMangaType == LibraryManga.MANWHA) && + item.manga.mangaType() == LibraryManga.MANGA) return@f false if (filterCompleted == STATE_INCLUDE && item.manga.status != SManga.COMPLETED) @@ -479,10 +472,6 @@ class LibraryPresenter( } } - fun requestFullUpdate() { - getLibrary() - } - /** * Returns the common categories for the given list of manga. * diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/filter/SortFilterBottomSheet.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/filter/SortFilterBottomSheet.kt index ad0f52fbdd..d7427b11e4 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/filter/SortFilterBottomSheet.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/filter/SortFilterBottomSheet.kt @@ -260,6 +260,8 @@ class SortFilterBottomSheet @JvmOverloads constructor(context: Context, attrs: A } } + fun hasActiveFilters() = filterItems.any { it.isActivated } + private fun getFilters(): List { val filters = mutableListOf() val categoriesOn = !preferences.hideCategories().getOrDefault() @@ -434,8 +436,8 @@ class SortFilterBottomSheet @JvmOverloads constructor(context: Context, attrs: A popup.show() } - private fun onMainSortClicked(menuId: Int) { - if (menuId == R.id.action_reverse) { + private fun onMainSortClicked(menuId: Int?) { + if (menuId == null) { preferences.librarySortingAscending().set( !preferences.librarySortingAscending().getOrDefault()) } @@ -450,7 +452,7 @@ class SortFilterBottomSheet @JvmOverloads constructor(context: Context, attrs: A } if (sort == preferences.librarySortingMode().getOrDefault()) { if (sort != LibrarySort.DRAG_AND_DROP) - onMainSortClicked(R.id.action_reverse) + onMainSortClicked(null) return } preferences.librarySortingMode().set(sort) @@ -460,9 +462,9 @@ class SortFilterBottomSheet @JvmOverloads constructor(context: Context, attrs: A onGroupClicked(ACTION_SORT) } - private fun onCatSortClicked(menuId: Int) { + private fun onCatSortClicked(menuId: Int?) { val category = lastCategory ?: return - val modType = if (menuId == R.id.action_reverse) { + val modType = if (menuId == null) { val t = (category.mangaSort?.minus('a') ?: 0) + 1 if (t % 2 != 0) t + 1 else t - 1 @@ -475,7 +477,7 @@ class SortFilterBottomSheet @JvmOverloads constructor(context: Context, attrs: A else -> 0 } if (order == category.catSortingMode()) { - onCatSortClicked(R.id.action_reverse) + onCatSortClicked(null) return } (2 * order + 1) @@ -607,10 +609,10 @@ class SortFilterBottomSheet @JvmOverloads constructor(context: Context, attrs: A } updateTitle() } - val filters = getFilters().size - if (filters > 0 && clearButton.parent == null) + val hasFilters = hasActiveFilters() + if (hasFilters && clearButton.parent == null) filter_layout.addView(clearButton, 0) - else if (filters == 0 && clearButton.parent != null) + else if (!hasFilters && clearButton.parent != null) filter_layout.removeView(clearButton) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt index 6f19fb6b21..5f12e25d29 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt @@ -14,11 +14,9 @@ import android.view.View import android.view.ViewGroup import android.webkit.WebView import android.widget.FrameLayout -import android.widget.TextView import androidx.appcompat.content.res.AppCompatResources import androidx.appcompat.graphics.drawable.DrawerArrowDrawable import androidx.biometric.BiometricManager -import androidx.core.graphics.ColorUtils import androidx.core.view.GravityCompat import com.bluelinelabs.conductor.Conductor import com.bluelinelabs.conductor.Controller @@ -54,14 +52,8 @@ import eu.kanade.tachiyomi.ui.recently_read.RecentlyReadController import eu.kanade.tachiyomi.ui.setting.SettingsMainController import eu.kanade.tachiyomi.util.system.getResourceColor import eu.kanade.tachiyomi.util.system.launchUI -import eu.kanade.tachiyomi.util.view.doOnApplyWindowInsets -import eu.kanade.tachiyomi.util.view.gone -import eu.kanade.tachiyomi.util.view.marginBottom -import eu.kanade.tachiyomi.util.view.marginTop import eu.kanade.tachiyomi.util.view.updateLayoutParams import eu.kanade.tachiyomi.util.view.updatePadding -import eu.kanade.tachiyomi.util.view.updatePaddingRelative -import eu.kanade.tachiyomi.util.view.visible import kotlinx.android.synthetic.main.main_activity.* import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.GlobalScope @@ -138,27 +130,6 @@ open class MainActivity : BaseActivity(), DownloadServiceListener { tabAnimator = TabsAnimator(tabs) - // Set behavior of Navigation drawer - nav_view.setNavigationItemSelectedListener { item -> - val id = item.itemId - - val currentRoot = router.backstack.firstOrNull() - if (currentRoot?.tag()?.toIntOrNull() != id) { - when (id) { - R.id.nav_drawer_library -> setRoot(LibraryController(), id) - R.id.nav_drawer_recent_updates -> setRoot(RecentChaptersController(), id) - R.id.nav_drawer_recently_read -> setRoot(RecentlyReadController(), id) - R.id.nav_drawer_catalogues -> setRoot(CatalogueController(), id) - R.id.nav_drawer_extensions -> setRoot(ExtensionController(), id) - R.id.nav_drawer_downloads -> setRoot(DownloadController(), id) - R.id.nav_drawer_settings -> setRoot(SettingsMainController(), id) - } - //navigationView.selectedItemId = id - } - drawer.closeDrawer(GravityCompat.START) - true - } - navigationView.setOnNavigationItemSelectedListener { item -> val id = item.itemId @@ -175,7 +146,6 @@ open class MainActivity : BaseActivity(), DownloadServiceListener { R.id.nav_drawer_catalogues -> setRoot(CatalogueController(), id) R.id.nav_drawer_settings -> setRoot(SettingsMainController(), id) } - nav_view.setCheckedItem(id) } else if (currentRoot.tag()?.toIntOrNull() == id) { when (id) { @@ -198,27 +168,15 @@ open class MainActivity : BaseActivity(), DownloadServiceListener { val container: ViewGroup = findViewById(R.id.controller_container) val content: ViewGroup = findViewById(R.id.main_content) - bottomNav = preferences.useBottonNav().getOrDefault() DownloadService.addListener(this) - content.fitsSystemWindows = !bottomNav - if (!bottomNav) { - container.systemUiVisibility = - View.SYSTEM_UI_FLAG_LAYOUT_STABLE or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION - } content.systemUiVisibility = View.SYSTEM_UI_FLAG_LAYOUT_STABLE or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION - nav_view.doOnApplyWindowInsets { v, _, _ -> - v.updatePaddingRelative( - bottom = v.marginBottom, - top = v.marginTop - ) - } - navigationView.visibility = if (bottomNav) View.VISIBLE else View.GONE updateRecentsIcon() content.setOnApplyWindowInsetsListener { v, insets -> - window.navigationBarColor = + // if device doesn't support light nav bar if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) { + // basically if in landscape on a phone if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && (v.rootWindowInsets.systemWindowInsetLeft > 0 || v.rootWindowInsets.systemWindowInsetRight > 0)) @@ -226,7 +184,11 @@ open class MainActivity : BaseActivity(), DownloadServiceListener { Color.BLACK else Color.argb(179, 0, 0, 0) } - // if the android q+ device has gesture nav, transparent nav bar + else { + getColor(android.R.color.transparent) + } + /* // if the android q+ device has gesture nav, transparent nav bar + // this is here incase some crazy with a notch uses landscape else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && (v.rootWindowInsets.systemWindowInsetBottom != v.rootWindowInsets .tappableElementInsets.bottom)) { @@ -235,19 +197,8 @@ open class MainActivity : BaseActivity(), DownloadServiceListener { // if in landscape with 2/3 button mode, fully opaque nav bar else if (v.rootWindowInsets.systemWindowInsetLeft > 0 || v.rootWindowInsets.systemWindowInsetRight > 0) { - getResourceColor( - if (bottomNav) android.R.attr.colorPrimary - else android.R.attr.colorBackground - ) - } - // if in portrait with 2/3 button mode, translucent nav bar - else { - ColorUtils.setAlphaComponent( - getResourceColor( - if (bottomNav) android.R.attr.colorPrimary - else android.R.attr.colorBackground - ), 179) - } + getResourceColor( android.R.attr.colorPrimary ) + }*/ v.setPadding(insets.systemWindowInsetLeft, insets.systemWindowInsetTop, insets.systemWindowInsetRight, 0) insets @@ -277,7 +228,7 @@ open class MainActivity : BaseActivity(), DownloadServiceListener { right = insets.systemWindowInsetRight ) nav_bar_scrim.updateLayoutParams { - height = if (bottomNav) insets.systemWindowInsetBottom else 0 + height = insets.systemWindowInsetBottom } insets.replaceSystemWindowInsets( 0, insets.systemWindowInsetTop, @@ -330,7 +281,7 @@ open class MainActivity : BaseActivity(), DownloadServiceListener { } fun updateRecentsIcon() { - if (bottomNav) navigationView.menu.findItem(R.id.nav_drawer_recents).icon = + navigationView.menu.findItem(R.id.nav_drawer_recents).icon = AppCompatResources.getDrawable(this, if (preferences.showRecentUpdates().getOrDefault()) R.drawable.ic_update_black_24dp else R.drawable.ic_history_black_24dp) @@ -356,30 +307,22 @@ open class MainActivity : BaseActivity(), DownloadServiceListener { } private fun setExtensionsBadge() { - - val extUpdateText: TextView = nav_view.menu.findItem( - R.id.nav_drawer_extensions - )?.actionView as? TextView ?: return - val updates = preferences.extensionUpdatesCount().getOrDefault() if (updates > 0) { - extUpdateText.text = updates.toString() - extUpdateText.visible() val badge = navigationView.getOrCreateBadge(R.id.nav_drawer_settings) badge.number = updates badge.backgroundColor = getResourceColor(R.attr.badgeColor) badge.badgeTextColor = Color.WHITE } else { - extUpdateText.text = null - extUpdateText.gone() navigationView.removeBadge(R.id.nav_drawer_settings) } } override fun onResume() { super.onResume() - bottomNav = preferences.useBottonNav().getOrDefault() + // setting in case someone comes from the search activity + usingBottomNav = true getExtensionUpdates() DownloadService.callListeners() val useBiometrics = preferences.useBiometrics().getOrDefault() @@ -467,7 +410,6 @@ open class MainActivity : BaseActivity(), DownloadServiceListener { override fun onDestroy() { super.onDestroy() DownloadService.removeListener(this) - nav_view?.setNavigationItemSelectedListener(null) toolbar?.setNavigationOnClickListener(null) } @@ -476,12 +418,8 @@ open class MainActivity : BaseActivity(), DownloadServiceListener { super.onBackPressed() return } - val backstackSize = router.backstackSize if (drawer.isDrawerOpen(GravityCompat.START) || drawer.isDrawerOpen(GravityCompat.END)) { drawer.closeDrawers() - } else if (!bottomNav && backstackSize == 1 && router.getControllerWithTag - ("$startScreenId") == null) { - setSelectedDrawerItem(startScreenId) } else if (!router.handleBack()) { unlocked = false super.onBackPressed() @@ -490,38 +428,26 @@ open class MainActivity : BaseActivity(), DownloadServiceListener { private fun setSelectedDrawerItem(itemId: Int) { if (!isFinishing) { - if (bottomNav) { - if (itemId == R.id.nav_drawer_library || itemId == R.id.nav_drawer_settings) + if (itemId == R.id.nav_drawer_library || + itemId == R.id.nav_drawer_settings || + itemId == R.id.nav_drawer_catalogues) navigationView.selectedItemId = itemId - } - else nav_view.setCheckedItem(itemId) jumpToController(itemId) } } private fun jumpToController(id: Int) { - val currentRoot = router.backstack.firstOrNull() if (currentRoot?.tag()?.toIntOrNull() != id) { when (id) { - R.id.nav_drawer_library -> if (!bottomNav) setRoot(LibraryController(), id) - R.id.nav_drawer_recent_updates -> { - preferences.showRecentUpdates().set(true) - if (bottomNav) navigationView.selectedItemId = R.id.nav_drawer_recents - else setRoot(RecentChaptersController(), id) + R.id.nav_drawer_recent_updates, R.id.nav_drawer_recently_read -> { + preferences.showRecentUpdates().set(id == R.id.nav_drawer_recent_updates) + navigationView.selectedItemId = R.id.nav_drawer_recents updateRecentsIcon() } - R.id.nav_drawer_recently_read -> { - preferences.showRecentUpdates().set(false) - if (bottomNav) navigationView.selectedItemId = R.id.nav_drawer_recents - else setRoot(RecentlyReadController(), id) - updateRecentsIcon() - } - R.id.nav_drawer_catalogues -> setRoot(CatalogueController(), id) R.id.nav_drawer_extensions -> { if (router.backstack.isEmpty()) { navigationView.selectedItemId = R.id.nav_drawer_settings - setRoot(SettingsMainController(), R.id.nav_drawer_settings) router.pushController(RouterTransaction.with(ExtensionController()) .pushChangeHandler(SimpleSwapChangeHandler()) .popChangeHandler(FadeChangeHandler())) @@ -534,24 +460,15 @@ open class MainActivity : BaseActivity(), DownloadServiceListener { if (router.backstackSize > 1) { router.popToRoot() } - - if (bottomNav) { + if (router.backstack.isEmpty()) { navigationView.selectedItemId = R.id.nav_drawer_library - if (router.backstack.firstOrNull()?.controller() is LibraryController) - router.popToRoot() - else - setRoot(LibraryController(), R.id.nav_drawer_library) - router.pushController(DownloadController().withFadeTransaction()) + router.pushController(RouterTransaction.with(DownloadController()) + .pushChangeHandler(SimpleSwapChangeHandler()) + .popChangeHandler(FadeChangeHandler())) } else { - nav_view.setCheckedItem(R.id.nav_drawer_settings) - setRoot(DownloadController(), id) + router.pushController(DownloadController().withFadeTransaction()) } - - } - R.id.nav_drawer_settings -> { - if (!bottomNav) - setRoot(SettingsMainController(), id) } } } @@ -591,19 +508,15 @@ open class MainActivity : BaseActivity(), DownloadServiceListener { if (from is DialogController || to is DialogController) { return } - val showHamburger = router.backstackSize == 1 - drawer.setDrawerLockMode(androidx.drawerlayout.widget.DrawerLayout.LOCK_MODE_LOCKED_CLOSED) - if (showHamburger) { - if (bottomNav) toolbar.navigationIcon = null - else drawer.setDrawerLockMode(androidx.drawerlayout.widget.DrawerLayout.LOCK_MODE_UNLOCKED) + val onRoot = router.backstackSize == 1 + //drawer.setDrawerLockMode(androidx.drawerlayout.widget.DrawerLayout + // .LOCK_MODE_LOCKED_CLOSED) + if (onRoot) { + toolbar.navigationIcon = null } else { - if (bottomNav) toolbar.navigationIcon = drawerArrow - else drawer.setDrawerLockMode( - androidx.drawerlayout.widget.DrawerLayout.LOCK_MODE_LOCKED_CLOSED - ) + toolbar.navigationIcon = drawerArrow } - if (bottomNav) drawerArrow?.progress = 1f - else ObjectAnimator.ofFloat(drawerArrow, "progress", if (showHamburger) 0f else 1f).start() + drawerArrow?.progress = 1f if (from is TabbedController) { from.cleanupTabs(tabs) @@ -639,7 +552,6 @@ open class MainActivity : BaseActivity(), DownloadServiceListener { } override fun downloadStatusChanged(downloading: Boolean) { - if (!bottomNav) return val downloadManager = Injekt.get() val hasQueue = downloading || downloadManager.hasQueue() launchUI { @@ -671,8 +583,7 @@ open class MainActivity : BaseActivity(), DownloadServiceListener { var unlocked = false - var bottomNav = false + var usingBottomNav = true internal set } - } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/main/SearchActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/main/SearchActivity.kt index 641b888b3b..b06364c40b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/main/SearchActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/main/SearchActivity.kt @@ -33,7 +33,7 @@ class SearchActivity: MainActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - bottomNav = false + usingBottomNav = false setContentView(R.layout.search_activity) setSupportActionBar(sToolbar) @@ -189,7 +189,7 @@ class SearchActivity: MainActivity() { override fun onResume() { super.onResume() - bottomNav = false + usingBottomNav = false } override fun handleIntentAction(intent: Intent): Boolean { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersController.kt index 620b46015c..4b7479ade0 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersController.kt @@ -103,9 +103,7 @@ class ChaptersController() : NucleusController(), adapter?.fastScroller = fast_scroller val fabBaseMarginBottom = fab?.marginBottom ?: 0 - recycler.setOnApplyWindowInsetsListener { v, insets -> - if (MainActivity.bottomNav) - return@setOnApplyWindowInsetsListener insets + recycler.doOnApplyWindowInsets { v, insets, _ -> fab?.updateLayoutParams { bottomMargin = fabBaseMarginBottom + insets.systemWindowInsetBottom } @@ -115,7 +113,6 @@ class ChaptersController() : NucleusController(), // offset the recycler by the fab's inset + some inset on top v.updatePaddingRelative(bottom = insets.systemWindowInsetBottom + v.context.resources.getDimensionPixelSize(R.dimen.fab_list_padding)) - insets } swipe_refresh.refreshes().subscribeUntilDestroy { fetchChaptersFromSource() } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoController.kt index 775acab492..17b24e42a6 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoController.kt @@ -205,7 +205,7 @@ class MangaInfoController : NucleusController(), setFullCoverToThumb() } container?.setOnApplyWindowInsetsListener { _, insets -> - if (MainActivity.bottomNav) + if (MainActivity.usingBottomNav) return@setOnApplyWindowInsetsListener insets if (resources?.configuration?.orientation == Configuration.ORIENTATION_LANDSCAPE) { fab_favorite?.updateLayoutParams { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recent_updates/RecentChaptersController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recent_updates/RecentChaptersController.kt index 2ced759925..4762c5b79e 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recent_updates/RecentChaptersController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recent_updates/RecentChaptersController.kt @@ -338,7 +338,6 @@ class RecentChaptersController : NucleusController(), override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) { inflater.inflate(R.menu.recent_updates, menu) - menu.findItem(R.id.action_recents).isVisible = MainActivity.bottomNav } override fun onOptionsItemSelected(item: MenuItem): Boolean { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RecentlyReadController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RecentlyReadController.kt index 1f8febd120..d4bbe7f6bd 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RecentlyReadController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RecentlyReadController.kt @@ -192,7 +192,6 @@ class RecentlyReadController(bundle: Bundle? = null) : BaseController(bundle), override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) { inflater.inflate(R.menu.recently_read, menu) val searchItem = menu.findItem(R.id.action_search) - menu.findItem(R.id.action_recents).isVisible = MainActivity.bottomNav val searchView = searchItem.actionView as SearchView if (query.isNotEmpty()) { searchItem.expandActionView() diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsGeneralController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsGeneralController.kt index b03e7f9fda..a313ed0c7d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsGeneralController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsGeneralController.kt @@ -135,35 +135,5 @@ class SettingsGeneralController : SettingsController() { defaultValue = 0 } } - - switchPreference { - key = Keys.useBottomNav - titleRes = R.string.use_bottom_nav - defaultValue = true - onChange { bottomNav -> - bottomNav as Boolean - if (!bottomNav) { - MaterialDialog(activity!!).title(R.string.switch_to_sidebar) - .message(R.string.switch_to_sidebar_summary) - .positiveButton(R.string.action_switch) { - preferences.useBottonNav().set(bottomNav) - switchNavType(bottomNav) - }.negativeButton(android.R.string.no).show() - false - } - else { - switchNavType(bottomNav) - true - } - - } - } - } - - fun switchNavType(bottomNav: Boolean) { - activity?.recreate() - if (bottomNav) { - (activity as MainActivity).navigationView.selectedItemId = R.id.nav_drawer_settings - } } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsMainController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsMainController.kt index 0d983133ad..510b020081 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsMainController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsMainController.kt @@ -27,7 +27,6 @@ class SettingsMainController : SettingsController() { iconRes = R.drawable.ic_extension_black_24dp iconTint = tintColor titleRes = R.string.label_extensions - isVisible = MainActivity.bottomNav onClick { navigateTo(ExtensionController()) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/view/ViewExtensions.kt b/app/src/main/java/eu/kanade/tachiyomi/util/view/ViewExtensions.kt index 4b363b1eea..1ba78f3807 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/view/ViewExtensions.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/view/ViewExtensions.kt @@ -154,7 +154,7 @@ inline val View.marginLeft: Int object RecyclerWindowInsetsListener : View.OnApplyWindowInsetsListener { override fun onApplyWindowInsets(v: View, insets: WindowInsets): WindowInsets { - if (MainActivity.bottomNav) return insets + if (MainActivity.usingBottomNav) return insets v.setPadding(0,0,0,insets.systemWindowInsetBottom) //v.updatePaddingRelative(bottom = v.paddingBottom + insets.systemWindowInsetBottom) return insets @@ -163,7 +163,7 @@ object RecyclerWindowInsetsListener : View.OnApplyWindowInsetsListener { fun View.doOnApplyWindowInsets(f: (View, WindowInsets, ViewPaddingState) -> Unit) { // Create a snapshot of the view's padding state - if (MainActivity.bottomNav) return + if (MainActivity.usingBottomNav) return val paddingState = createStateForView(this) setOnApplyWindowInsetsListener { v, insets -> f(v, insets, paddingState) diff --git a/app/src/main/res/drawable/ic_view_list_white_24dp.xml b/app/src/main/res/drawable/ic_view_list_white_24dp.xml index 222dc3b35b..63fbbb491b 100644 --- a/app/src/main/res/drawable/ic_view_list_white_24dp.xml +++ b/app/src/main/res/drawable/ic_view_list_white_24dp.xml @@ -2,7 +2,8 @@ android:width="24dp" android:height="24dp" android:viewportWidth="24.0" - android:viewportHeight="24.0"> + android:viewportHeight="24.0" + android:tint="?attr/actionBarTintColor"> diff --git a/app/src/main/res/drawable/ic_view_module_white_24dp.xml b/app/src/main/res/drawable/ic_view_module_white_24dp.xml index aeb72e7b40..1471bc6608 100644 --- a/app/src/main/res/drawable/ic_view_module_white_24dp.xml +++ b/app/src/main/res/drawable/ic_view_module_white_24dp.xml @@ -2,7 +2,8 @@ android:width="24dp" android:height="24dp" android:viewportWidth="24.0" - android:viewportHeight="24.0"> + android:viewportHeight="24.0" + android:tint="?attr/actionBarTintColor"> diff --git a/app/src/main/res/layout/library_category.xml b/app/src/main/res/layout/library_category.xml index eb76505462..40c954d8a8 100644 --- a/app/src/main/res/layout/library_category.xml +++ b/app/src/main/res/layout/library_category.xml @@ -20,6 +20,5 @@ android:layout_height="match_parent" android:layout_gravity="end" app:fastScrollerBubbleEnabled="true" - app:fastScrollerIgnoreTouchesOutsideHandle="true" tools:visibility="visible" /> diff --git a/app/src/main/res/layout/main_activity.xml b/app/src/main/res/layout/main_activity.xml index a21fd11695..9cbf170dcd 100644 --- a/app/src/main/res/layout/main_activity.xml +++ b/app/src/main/res/layout/main_activity.xml @@ -87,15 +87,5 @@ - - diff --git a/app/src/main/res/menu/library.xml b/app/src/main/res/menu/library.xml index b3098e94b5..f3a27a859d 100644 --- a/app/src/main/res/menu/library.xml +++ b/app/src/main/res/menu/library.xml @@ -29,33 +29,4 @@ android:title="@string/label_migration" app:showAsAction="never"/> - - - - - - - - - - - - - - diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 7e0bade948..ad3a6c269b 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -167,12 +167,6 @@ Date format Check for updates Automatically check for new app versions - Use bottom navigation - Switch to navigation drawer? - Navigation drawer is no longer supported by this - version of Tachiyomi and will later be removed. Non-critical bugs and features - relating to it will be ignored. - Switch Display