From 9de3da33aa49c450098cdb625267ad77fdec8cd3 Mon Sep 17 00:00:00 2001 From: len Date: Thu, 5 May 2016 20:58:19 +0200 Subject: [PATCH] Fix recent chapters menu button not showing on high dpi screens --- .../kanade/tachiyomi/data/download/DownloadManager.kt | 7 ++----- .../kanade/tachiyomi/ui/recent/RecentChaptersHolder.kt | 2 +- app/src/main/res/layout/item_recent_chapter.xml | 10 +++------- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.kt b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.kt index 2967f1fa81..2a9aae5c12 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadManager.kt @@ -57,15 +57,12 @@ class DownloadManager(private val context: Context, private val sourceManager: S .lift(DynamicConcurrentMergeOperator({ downloadChapter(it) }, threadsSubject)) .onBackpressureBuffer() .observeOn(AndroidSchedulers.mainThread()) - .doOnNext { + .subscribe({ // Delete successful downloads from queue if (it.status == Download.DOWNLOADED) { queue.del(it) } - } - .map { download -> areAllDownloadsFinished() } - .subscribe({ finished -> - if (finished!!) { + if (areAllDownloadsFinished()) { DownloadService.stop(context) } }, { e -> diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/RecentChaptersHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/RecentChaptersHolder.kt index e1e4d20cbb..13cb78fe07 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/RecentChaptersHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/RecentChaptersHolder.kt @@ -40,7 +40,7 @@ class RecentChaptersHolder(view: View, private val adapter: RecentChaptersAdapte // We need to post a Runnable to show the popup to make sure that the PopupMenu is // correctly positioned. The reason being that the view may change position before the // PopupMenu is shown. - itemView.chapterMenu.setOnClickListener { it.post({ showPopupMenu(it) }) } + itemView.chapter_menu.setOnClickListener { it.post({ showPopupMenu(it) }) } } /** diff --git a/app/src/main/res/layout/item_recent_chapter.xml b/app/src/main/res/layout/item_recent_chapter.xml index 60553b72c9..8d515aedc1 100644 --- a/app/src/main/res/layout/item_recent_chapter.xml +++ b/app/src/main/res/layout/item_recent_chapter.xml @@ -76,20 +76,16 @@ android:gravity="center|end" android:paddingBottom="18dp" android:paddingEnd="?android:attr/listPreferredItemPaddingEnd" - android:paddingRight="?android:attr/listPreferredItemPaddingRight" - android:paddingStart="?android:attr/listPreferredItemPaddingStart" - android:paddingLeft="?android:attr/listPreferredItemPaddingLeft"> + android:paddingRight="?android:attr/listPreferredItemPaddingRight"> + android:tint="?android:attr/textColorPrimary" + app:srcCompat="@drawable/ic_more_horiz_black_24dp"/>