mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-10-31 14:27:57 +01:00 
			
		
		
		
	Fix last chapter and last updated info
This commit is contained in:
		| @@ -246,15 +246,6 @@ class MangaAllInOneController : | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     fun updateHeader() { | ||||
|         // binding.swipeRefresh?.isRefreshing = presenter.isLoading | ||||
|         adapter?.updateDataSet(presenter.chapters) | ||||
|         addMangaHeader() | ||||
|         activity?.invalidateOptionsMenu() | ||||
|     } | ||||
|  | ||||
|     fun refreshAdapter() = adapter?.notifyDataSetChanged() | ||||
|  | ||||
|     // EXH --> | ||||
|     override fun openSmartSearch() { | ||||
|         val smartSearchConfig = SourceController.SmartSearchConfig(presenter.manga.title, presenter.manga.id!!) | ||||
| @@ -371,6 +362,10 @@ class MangaAllInOneController : | ||||
|         val adapter = adapter ?: return | ||||
|         adapter.updateDataSet(chapters) | ||||
|         addMangaHeader() | ||||
|         adapter.recyclerView?.post { | ||||
|             setChapterCount(chapterCount) | ||||
|             setLastUpdateDate(lastUpdateDate) | ||||
|         } | ||||
|  | ||||
|         if (selectedItems.isNotEmpty()) { | ||||
|             adapter.clearSelection() // we need to start from a clean state, index may have changed | ||||
| @@ -522,11 +517,11 @@ class MangaAllInOneController : | ||||
|         router.pushController(GlobalSearchController(query).withFadeTransaction()) | ||||
|     } | ||||
|  | ||||
|     fun setChapterCount(count: Float) { | ||||
|     private fun setChapterCount(count: Float) { | ||||
|         getHeader()?.setChapterCount(count) | ||||
|     } | ||||
|  | ||||
|     fun setLastUpdateDate(date: Date) { | ||||
|     private fun setLastUpdateDate(date: Date) { | ||||
|         getHeader()?.setLastUpdateDate(date) | ||||
|     } | ||||
|  | ||||
|   | ||||
| @@ -1,7 +1,6 @@ | ||||
| package eu.kanade.tachiyomi.ui.manga | ||||
|  | ||||
| import android.content.Context | ||||
| import android.util.Log | ||||
| import android.view.View | ||||
| import androidx.core.content.ContextCompat | ||||
| import com.bumptech.glide.load.engine.DiskCacheStrategy | ||||
|   | ||||
| @@ -67,9 +67,9 @@ class MangaAllInOnePresenter( | ||||
|     var chapters: List<MangaAllInOneChapterItem> = emptyList() | ||||
|         private set | ||||
|  | ||||
|     lateinit var lastUpdateDate: Date | ||||
|     private var lastUpdateDate: Date = Date(0L) | ||||
|  | ||||
|     var chapterCount: Float = 0F | ||||
|     private var chapterCount: Float = 0F | ||||
|  | ||||
|     private val scope = CoroutineScope(Job() + Dispatchers.Default) | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user