From d87c1cb5b95eff1a011d62b474fd336763207d0b Mon Sep 17 00:00:00 2001 From: Jay Date: Sun, 15 Mar 2020 23:12:37 -0700 Subject: [PATCH] Fixing build for last commit --- .../kanade/tachiyomi/network/CloudflareInterceptor.kt | 1 - .../kanade/tachiyomi/ui/library/DisplayBottomSheet.kt | 1 - .../kanade/tachiyomi/ui/library/LibraryHeaderItem.kt | 1 - .../tachiyomi/ui/library/LibraryListController.kt | 1 - .../java/eu/kanade/tachiyomi/ui/main/MainActivity.kt | 10 +++++----- .../tachiyomi/ui/manga/ChaptersSortBottomSheet.kt | 1 - .../kanade/tachiyomi/ui/manga/TrackingBottomSheet.kt | 1 - .../tachiyomi/ui/recently_read/RecentlyReadAdapter.kt | 2 +- .../tachiyomi/ui/recently_read/RecentlyReadHolder.kt | 4 +--- .../eu/kanade/tachiyomi/util/view/ViewExtensions.kt | 4 ++-- 10 files changed, 9 insertions(+), 17 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/network/CloudflareInterceptor.kt b/app/src/main/java/eu/kanade/tachiyomi/network/CloudflareInterceptor.kt index 570121c46a..fd2264aecb 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/network/CloudflareInterceptor.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/network/CloudflareInterceptor.kt @@ -2,7 +2,6 @@ package eu.kanade.tachiyomi.network import android.annotation.SuppressLint import android.content.Context -import android.os.Build import android.os.Handler import android.os.Looper import android.webkit.WebSettings diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/DisplayBottomSheet.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/DisplayBottomSheet.kt index d35346049c..be3ec89045 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/DisplayBottomSheet.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/DisplayBottomSheet.kt @@ -1,6 +1,5 @@ package eu.kanade.tachiyomi.ui.library -import android.os.Build import android.os.Bundle import android.view.View import android.view.ViewGroup diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryHeaderItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryHeaderItem.kt index 8104445f0d..4eaef458b8 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryHeaderItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryHeaderItem.kt @@ -1,7 +1,6 @@ package eu.kanade.tachiyomi.ui.library import android.graphics.drawable.Drawable -import android.os.Build import android.view.View import android.widget.ImageView import android.widget.TextView diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryListController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryListController.kt index 84b0d4bae6..df5e783b6d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryListController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryListController.kt @@ -5,7 +5,6 @@ import android.animation.AnimatorSet import android.animation.ValueAnimator import android.app.Activity import android.graphics.Rect -import android.os.Build import android.os.Bundle import android.util.TypedValue import android.view.LayoutInflater diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt index ad59412727..62581cbf25 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt @@ -63,9 +63,6 @@ import eu.kanade.tachiyomi.util.view.gone import eu.kanade.tachiyomi.util.view.updateLayoutParams import eu.kanade.tachiyomi.util.view.updatePadding import eu.kanade.tachiyomi.util.view.visible -import java.util.Date -import java.util.concurrent.TimeUnit -import kotlin.math.abs import kotlinx.android.synthetic.main.main_activity.* import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.GlobalScope @@ -73,6 +70,9 @@ import kotlinx.coroutines.delay import kotlinx.coroutines.launch import timber.log.Timber import uy.kohesive.injekt.injectLazy +import java.util.Date +import java.util.concurrent.TimeUnit +import kotlin.math.abs open class MainActivity : BaseActivity(), DownloadServiceListener { @@ -223,8 +223,8 @@ open class MainActivity : BaseActivity(), DownloadServiceListener { // if device doesn't support light nav bar window.navigationBarColor = if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) { // basically if in landscape on a phone - if (v.rootWindowInsets.systemWindowInsetLeft > 0 || v.rootWindowInsets.systemWindowInsetRight > 0)) // For lollipop, draw opaque nav bar + if (v.rootWindowInsets.systemWindowInsetLeft > 0 || v.rootWindowInsets.systemWindowInsetRight > 0) Color.BLACK else Color.argb(179, 0, 0, 0) } @@ -232,7 +232,7 @@ open class MainActivity : BaseActivity(), DownloadServiceListener { getColor(android.R.color.transparent) }*/ // if the android q+ device has gesture nav, transparent nav bar - // this is here incase some crazy with a notch uses landscape + // this is here in case some crazy with a notch uses landscape else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && (v.rootWindowInsets.systemWindowInsetBottom != v.rootWindowInsets.tappableElementInsets.bottom)) { getColor(android.R.color.transparent) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/ChaptersSortBottomSheet.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/ChaptersSortBottomSheet.kt index fcf4a56b8c..d8b464464e 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/ChaptersSortBottomSheet.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/ChaptersSortBottomSheet.kt @@ -1,6 +1,5 @@ package eu.kanade.tachiyomi.ui.manga -import android.os.Build import android.os.Bundle import android.view.View import android.view.ViewGroup diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/TrackingBottomSheet.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/TrackingBottomSheet.kt index a12bc96f44..dde04130f7 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/TrackingBottomSheet.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/TrackingBottomSheet.kt @@ -2,7 +2,6 @@ package eu.kanade.tachiyomi.ui.manga import android.content.Intent import android.net.Uri -import android.os.Build import android.os.Bundle import android.view.View import android.view.ViewGroup diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RecentlyReadAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RecentlyReadAdapter.kt index 1b3f35df02..e7feabbd32 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RecentlyReadAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RecentlyReadAdapter.kt @@ -5,10 +5,10 @@ import eu.davidea.flexibleadapter.items.IFlexible import eu.kanade.tachiyomi.data.preference.PreferencesHelper import eu.kanade.tachiyomi.data.preference.getOrDefault import eu.kanade.tachiyomi.source.SourceManager -import uy.kohesive.injekt.injectLazy import java.text.DateFormat import java.text.DecimalFormat import java.text.DecimalFormatSymbols +import uy.kohesive.injekt.injectLazy /** * Adapter of RecentlyReadHolder. diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RecentlyReadHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RecentlyReadHolder.kt index 7478d0c272..7491bf3f6a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RecentlyReadHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RecentlyReadHolder.kt @@ -1,6 +1,5 @@ package eu.kanade.tachiyomi.ui.recently_read -import android.view.MotionEvent import android.view.View import com.bumptech.glide.load.engine.DiskCacheStrategy import eu.kanade.tachiyomi.R @@ -8,9 +7,8 @@ import eu.kanade.tachiyomi.data.database.models.MangaChapterHistory import eu.kanade.tachiyomi.data.glide.GlideApp import eu.kanade.tachiyomi.ui.base.holder.BaseFlexibleViewHolder import eu.kanade.tachiyomi.util.lang.toTimestampString -import kotlinx.android.synthetic.main.recently_read_item.* import java.util.Date -import kotlin.math.max +import kotlinx.android.synthetic.main.recently_read_item.* /** * Holder that contains recent manga item diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/view/ViewExtensions.kt b/app/src/main/java/eu/kanade/tachiyomi/util/view/ViewExtensions.kt index 1fc621d0e2..983c8c4c31 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/view/ViewExtensions.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/view/ViewExtensions.kt @@ -35,11 +35,11 @@ import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.preference.PreferencesHelper import eu.kanade.tachiyomi.util.system.dpToPx import eu.kanade.tachiyomi.util.system.getResourceColor +import kotlin.math.abs +import kotlin.math.min import kotlinx.android.synthetic.main.main_activity.* import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get -import kotlin.math.abs -import kotlin.math.min /** * Returns coordinates of view.