From 158be0770bbbb651d32a1618f0449f2b9722c2b9 Mon Sep 17 00:00:00 2001 From: kunfei Date: Fri, 7 Feb 2020 14:19:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...pterDataObserverProxy.kt => AdapterDataObserverHeader.kt} | 5 ++++- .../{ToTopListUpCallback.kt => FirstTopListUpCallback.kt} | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) rename app/src/main/java/io/legado/app/help/{AdapterDataObserverProxy.kt => AdapterDataObserverHeader.kt} (86%) rename app/src/main/java/io/legado/app/help/{ToTopListUpCallback.kt => FirstTopListUpCallback.kt} (94%) diff --git a/app/src/main/java/io/legado/app/help/AdapterDataObserverProxy.kt b/app/src/main/java/io/legado/app/help/AdapterDataObserverHeader.kt similarity index 86% rename from app/src/main/java/io/legado/app/help/AdapterDataObserverProxy.kt rename to app/src/main/java/io/legado/app/help/AdapterDataObserverHeader.kt index 9ef120e15..24f0c0f2b 100644 --- a/app/src/main/java/io/legado/app/help/AdapterDataObserverProxy.kt +++ b/app/src/main/java/io/legado/app/help/AdapterDataObserverHeader.kt @@ -2,7 +2,10 @@ package io.legado.app.help import androidx.recyclerview.widget.RecyclerView -internal class AdapterDataObserverProxy(var adapterDataObserver: RecyclerView.AdapterDataObserver, var headerCount: Int) : RecyclerView.AdapterDataObserver() { +internal class AdapterDataObserverHeader( + var adapterDataObserver: RecyclerView.AdapterDataObserver, + var headerCount: Int +) : RecyclerView.AdapterDataObserver() { override fun onChanged() { adapterDataObserver.onChanged() } diff --git a/app/src/main/java/io/legado/app/help/ToTopListUpCallback.kt b/app/src/main/java/io/legado/app/help/FirstTopListUpCallback.kt similarity index 94% rename from app/src/main/java/io/legado/app/help/ToTopListUpCallback.kt rename to app/src/main/java/io/legado/app/help/FirstTopListUpCallback.kt index 6fdef3dca..a35f0cd8c 100644 --- a/app/src/main/java/io/legado/app/help/ToTopListUpCallback.kt +++ b/app/src/main/java/io/legado/app/help/FirstTopListUpCallback.kt @@ -4,7 +4,7 @@ import androidx.recyclerview.widget.ListUpdateCallback import androidx.recyclerview.widget.RecyclerView import io.legado.app.base.adapter.ItemViewHolder -class ToTopListUpCallback : ListUpdateCallback { +class FirstTopListUpCallback : ListUpdateCallback { var firstInsert = -1 lateinit var adapter: RecyclerView.Adapter