Renaming EdgeToEdgeBottomSheetDialog to E2EBottomSheetDialog

This commit is contained in:
Jays2Kings 2021-04-27 02:35:26 -04:00
parent c9e22d898d
commit 881da13dc9
8 changed files with 17 additions and 15 deletions

View File

@ -22,7 +22,7 @@ import eu.kanade.tachiyomi.util.view.RecyclerWindowInsetsListener
import eu.kanade.tachiyomi.util.view.checkHeightThen
import eu.kanade.tachiyomi.util.view.expand
import eu.kanade.tachiyomi.util.view.updateLayoutParams
import eu.kanade.tachiyomi.widget.EdgeToEdgeBottomSheetDialog
import eu.kanade.tachiyomi.widget.E2EBottomSheetDialog
import kotlin.math.max
import kotlin.math.min
@ -34,7 +34,7 @@ class MaterialMenuSheet(
maxHeight: Int? = null,
showDivider: Boolean = false,
onMenuItemClicked: (MaterialMenuSheet, Int) -> Boolean
) : EdgeToEdgeBottomSheetDialog<BottomMenuSheetBinding>(activity) {
) : E2EBottomSheetDialog<BottomMenuSheetBinding>(activity) {
override fun createBinding(inflater: LayoutInflater) = BottomMenuSheetBinding.inflate(inflater)
private val fastAdapter: FastAdapter<MaterialMenuSheetItem>

View File

@ -24,7 +24,7 @@ import eu.kanade.tachiyomi.util.system.dpToPx
import eu.kanade.tachiyomi.util.view.expand
import eu.kanade.tachiyomi.util.view.updateLayoutParams
import eu.kanade.tachiyomi.util.view.updatePaddingRelative
import eu.kanade.tachiyomi.widget.EdgeToEdgeBottomSheetDialog
import eu.kanade.tachiyomi.widget.E2EBottomSheetDialog
import uy.kohesive.injekt.injectLazy
import java.util.ArrayList
import java.util.Date
@ -38,7 +38,7 @@ class SetCategoriesSheet(
var preselected: Array<Int>,
private val addingToLibrary: Boolean,
val onMangaAdded: (() -> Unit) = { }
) : EdgeToEdgeBottomSheetDialog<SetCategoriesSheetBinding>(activity) {
) : E2EBottomSheetDialog<SetCategoriesSheetBinding>(activity) {
constructor(activity: Activity, manga: Manga, categories: MutableList<Category>, preselected: Array<Int>, addingToLibrary: Boolean, onMangaAdded: () -> Unit) :
this(activity, listOf(manga), categories, preselected, addingToLibrary, onMangaAdded)

View File

@ -12,11 +12,11 @@ import eu.kanade.tachiyomi.databinding.ChapterSortBottomSheetBinding
import eu.kanade.tachiyomi.ui.manga.MangaDetailsController
import eu.kanade.tachiyomi.util.system.dpToPx
import eu.kanade.tachiyomi.util.view.setBottomEdge
import eu.kanade.tachiyomi.widget.EdgeToEdgeBottomSheetDialog
import eu.kanade.tachiyomi.widget.E2EBottomSheetDialog
import kotlin.math.max
class ChaptersSortBottomSheet(controller: MangaDetailsController) :
EdgeToEdgeBottomSheetDialog<ChapterSortBottomSheetBinding>(controller.activity!!) {
E2EBottomSheetDialog<ChapterSortBottomSheetBinding>(controller.activity!!) {
val activity = controller.activity!!

View File

@ -19,11 +19,11 @@ import eu.kanade.tachiyomi.util.system.toast
import eu.kanade.tachiyomi.util.view.RecyclerWindowInsetsListener
import eu.kanade.tachiyomi.util.view.checkHeightThen
import eu.kanade.tachiyomi.util.view.updateLayoutParams
import eu.kanade.tachiyomi.widget.EdgeToEdgeBottomSheetDialog
import eu.kanade.tachiyomi.widget.E2EBottomSheetDialog
import timber.log.Timber
class TrackingBottomSheet(private val controller: MangaDetailsController) :
EdgeToEdgeBottomSheetDialog<TrackingBottomSheetBinding>(controller.activity!!),
E2EBottomSheetDialog<TrackingBottomSheetBinding>(controller.activity!!),
TrackAdapter.OnClickListener,
SetTrackStatusDialog.Listener,
SetTrackChaptersDialog.Listener,

View File

@ -22,13 +22,13 @@ import eu.kanade.tachiyomi.util.system.dpToPx
import eu.kanade.tachiyomi.util.system.toInt
import eu.kanade.tachiyomi.util.system.toast
import eu.kanade.tachiyomi.util.view.setBottomEdge
import eu.kanade.tachiyomi.widget.EdgeToEdgeBottomSheetDialog
import eu.kanade.tachiyomi.widget.E2EBottomSheetDialog
import uy.kohesive.injekt.injectLazy
class MigrationBottomSheetDialog(
activity: Activity,
private val listener: StartMigrationListener
) : EdgeToEdgeBottomSheetDialog<MigrationBottomSheetBinding>(activity) {
) : E2EBottomSheetDialog<MigrationBottomSheetBinding>(activity) {
/**
* Preferences helper.

View File

@ -10,16 +10,15 @@ import androidx.recyclerview.widget.RecyclerView
import com.google.android.material.bottomsheet.BottomSheetBehavior
import eu.davidea.flexibleadapter.FlexibleAdapter
import eu.davidea.flexibleadapter.items.IFlexible
import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.databinding.SourceFilterSheetBinding
import eu.kanade.tachiyomi.util.system.dpToPx
import eu.kanade.tachiyomi.util.view.collapse
import eu.kanade.tachiyomi.util.view.updateLayoutParams
import eu.kanade.tachiyomi.util.view.updatePaddingRelative
import eu.kanade.tachiyomi.widget.EdgeToEdgeBottomSheetDialog
import eu.kanade.tachiyomi.widget.E2EBottomSheetDialog
class SourceFilterSheet(val activity: Activity) :
EdgeToEdgeBottomSheetDialog<SourceFilterSheetBinding>(activity) {
E2EBottomSheetDialog<SourceFilterSheetBinding>(activity) {
private var filterChanged = true

View File

@ -12,8 +12,11 @@ import com.google.android.material.bottomsheet.BottomSheetDialog
import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.util.view.updateLayoutParams
/**
* Edge to Edge BottomSheetDiolag that uses a custom theme and settings to extend pass the nav bar
*/
@Suppress("LeakingThis")
abstract class EdgeToEdgeBottomSheetDialog<VB : ViewBinding>(activity: Activity) :
abstract class E2EBottomSheetDialog<VB : ViewBinding>(activity: Activity) :
BottomSheetDialog(activity, R.style.BottomSheetDialogTheme) {
protected val binding: VB

View File

@ -15,7 +15,7 @@ import eu.kanade.tachiyomi.util.view.expand
import kotlin.math.max
abstract class TabbedBottomSheetDialog(private val activity: Activity) :
EdgeToEdgeBottomSheetDialog<TabbedBottomSheetBinding>(activity) {
E2EBottomSheetDialog<TabbedBottomSheetBinding>(activity) {
override fun createBinding(inflater: LayoutInflater) = TabbedBottomSheetBinding.inflate(inflater)