This commit is contained in:
Jobobby04 2020-05-25 16:57:51 -04:00
parent 1a1b3342c0
commit 766bf0539d
2 changed files with 0 additions and 28 deletions

View File

@ -10,7 +10,6 @@ import android.view.MenuInflater
import android.view.MenuItem
import android.view.View
import android.view.ViewGroup
import android.view.WindowInsets
import android.view.WindowManager
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.view.ActionMode
@ -796,15 +795,3 @@ class LibraryController(
const val REQUEST_IMAGE_OPEN = 101
}
}
object HeightTopWindowInsetsListener : View.OnApplyWindowInsetsListener {
override fun onApplyWindowInsets(v: View, insets: WindowInsets): WindowInsets {
val topInset = insets.systemWindowInsetTop
v.setPadding(0, topInset, 0, 0)
if (v.layoutParams.height != topInset) {
v.layoutParams.height = topInset
v.requestLayout()
}
return insets
}
}

View File

@ -5,7 +5,6 @@ import android.animation.AnimatorListenerAdapter
import android.app.Activity
import android.content.Intent
import android.os.Bundle
import android.util.Log
import android.view.LayoutInflater
import android.view.Menu
import android.view.MenuInflater
@ -179,11 +178,9 @@ class MangaAllInOneController :
}
override fun createPresenter(): MangaAllInOnePresenter {
Log.d("Adapter", "Tester8")
return MangaAllInOnePresenter(
this, manga!!, source!!, smartSearchConfig
)
Log.d("Adapter", "Tester9")
}
override fun inflateView(inflater: LayoutInflater, container: ViewGroup): View {
@ -201,8 +198,6 @@ class MangaAllInOneController :
.onEach { fetchMangaFromSource(manualFetch = true) }
.launchIn(scope)
Log.d("Controller", "Tester1")
// Init RecyclerView and adapter
adapter = MangaAllInOneAdapter(this, view.context)
@ -211,7 +206,6 @@ class MangaAllInOneController :
binding.recycler.addItemDecoration(DividerItemDecoration(view.context, DividerItemDecoration.VERTICAL))
binding.recycler.setHasFixedSize(true)
adapter?.fastScroller = binding.fastScroller
Log.d("Adapter", "Tester2")
binding.fab.clicks()
.onEach {
@ -239,22 +233,17 @@ class MangaAllInOneController :
binding.actionToolbar.offsetAppbarHeight(activity!!)
binding.fab.offsetAppbarHeight(activity!!)
Log.d("Adapter", "Tester3")
}
private fun getHeader(): MangaAllInOneHolder? {
Log.d("Adapter", "Tester4")
return binding.recycler.findViewHolderForAdapterPosition(0) as? MangaAllInOneHolder
Log.d("Adapter", "Tester5")
}
private fun addMangaHeader() {
Log.d("Adapter", "Tester6")
if (adapter?.scrollableHeaders?.isEmpty() == true) {
adapter?.removeAllScrollableHeaders()
adapter?.addScrollableHeader(presenter.headerItem)
}
Log.d("Adapter", "Tester7")
}
// EXH -->
@ -340,16 +329,12 @@ class MangaAllInOneController :
override fun onNextManga(manga: Manga, source: Source, chapters: List<MangaAllInOneChapterItem>, lastUpdateDate: Date, chapterCount: Float) {
if (manga.initialized) {
// Update view.
Log.d("Controller", "Tester1")
setMangaInfo(manga, source, chapters, lastUpdateDate, chapterCount)
Log.d("Controller", "Tester2")
if (fromSource && !presenter.hasRequested && chapters.isNullOrEmpty()) {
Log.d("Controller", "Tester3")
fetchMangaFromSource(fetchManga = false)
}
} else {
// Initialize manga.
Log.d("Controller", "Tester4")
fetchMangaFromSource()
}
}