diff --git a/app/src/main/java/io/legado/app/help/AdapterDataObserverHeader.kt b/app/src/main/java/io/legado/app/ui/widget/recycler/HeaderAdapterDataObserver.kt similarity index 93% rename from app/src/main/java/io/legado/app/help/AdapterDataObserverHeader.kt rename to app/src/main/java/io/legado/app/ui/widget/recycler/HeaderAdapterDataObserver.kt index 1aeddeb95..f8e2a0c8c 100644 --- a/app/src/main/java/io/legado/app/help/AdapterDataObserverHeader.kt +++ b/app/src/main/java/io/legado/app/ui/widget/recycler/HeaderAdapterDataObserver.kt @@ -1,8 +1,8 @@ -package io.legado.app.help +package io.legado.app.ui.widget.recycler import androidx.recyclerview.widget.RecyclerView -internal class AdapterDataObserverHeader( +internal class HeaderAdapterDataObserver( private var adapterDataObserver: RecyclerView.AdapterDataObserver, private var headerCount: Int ) : RecyclerView.AdapterDataObserver() { diff --git a/app/src/main/java/io/legado/app/ui/widget/recycler/UpLinearLayoutManager.kt b/app/src/main/java/io/legado/app/ui/widget/recycler/UpLinearLayoutManager.kt index 0df53aba7..0af559c45 100644 --- a/app/src/main/java/io/legado/app/ui/widget/recycler/UpLinearLayoutManager.kt +++ b/app/src/main/java/io/legado/app/ui/widget/recycler/UpLinearLayoutManager.kt @@ -4,12 +4,7 @@ import android.content.Context import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearSmoothScroller -class UpLinearLayoutManager: LinearLayoutManager { - val context: Context - - constructor(context: Context) : super(context) { - this.context = context - } +class UpLinearLayoutManager(val context: Context) : LinearLayoutManager(context) { fun smoothScrollToPosition(position: Int) { smoothScrollToPosition(position, 0)