diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/RecentChaptersFragment.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/RecentChaptersFragment.kt index 535564901..3737170ba 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/RecentChaptersFragment.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/RecentChaptersFragment.kt @@ -123,9 +123,6 @@ class RecentChaptersFragment : BaseRxFragment(), Action adapter = RecentChaptersAdapter(this) recycler.adapter = adapter - // Set swipe refresh listener - swipe_refresh.setOnRefreshListener { fetchChapters() } - // Update toolbar text setToolbarTitle(R.string.label_recent_updates) } @@ -316,28 +313,4 @@ class RecentChaptersFragment : BaseRxFragment(), Action (childFragmentManager.findFragmentByTag(DeletingChaptersDialog.TAG) as? DialogFragment)?.dismiss() } - /** - * Called when swipe refresh activated. - */ - fun fetchChapters() { - swipe_refresh.isRefreshing = true - presenter.fetchChaptersFromSource() - } - - /** - * Called after refresh is completed - */ - fun onFetchChaptersDone() { - swipe_refresh.isRefreshing = false - } - - /** - * Called when something went wrong while refreshing - * @param error information on what went wrong - */ - fun onFetchChaptersError(error: Throwable) { - swipe_refresh.isRefreshing = false - context.toast(error.message) - } - } \ No newline at end of file diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/RecentChaptersPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/RecentChaptersPresenter.kt index e8f0d0889..cc4aaadbf 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/RecentChaptersPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/RecentChaptersPresenter.kt @@ -65,11 +65,7 @@ class RecentChaptersPresenter : BasePresenter() { fragment.onNextMangaChapters(chapters) // Update download status updateChapterStatus(convertToMangaChaptersList(chapters)) - // Stop refresh - fragment.onFetchChaptersDone() - - }, - { fragment, error -> fragment.onFetchChaptersError(error) } + } ) // Used to update download status @@ -346,8 +342,5 @@ class RecentChaptersPresenter : BasePresenter() { chapter.status = Download.NOT_DOWNLOADED } - fun fetchChaptersFromSource() { - start(GET_RECENT_CHAPTERS) - } } \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_recent_chapters.xml b/app/src/main/res/layout/fragment_recent_chapters.xml index 9fe931a69..7e290ae7c 100644 --- a/app/src/main/res/layout/fragment_recent_chapters.xml +++ b/app/src/main/res/layout/fragment_recent_chapters.xml @@ -5,20 +5,11 @@ android:layout_height="match_parent" android:orientation="vertical"> - - - - - - + tools:listitem="@layout/item_recent_chapter"/> \ No newline at end of file