mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 01:21:52 +01:00
Bump dependencies, remove unused resources
This commit is contained in:
parent
d352405ba6
commit
11ac4df5d7
@ -91,7 +91,7 @@ dependencies {
|
||||
compile 'com.github.inorichi:ReactiveNetwork:69092ed'
|
||||
|
||||
// Android support library
|
||||
final support_library_version = '24.1.1'
|
||||
final support_library_version = '24.2.1'
|
||||
compile "com.android.support:support-v4:$support_library_version"
|
||||
compile "com.android.support:appcompat-v7:$support_library_version"
|
||||
compile "com.android.support:cardview-v7:$support_library_version"
|
||||
@ -104,7 +104,7 @@ dependencies {
|
||||
|
||||
// ReactiveX
|
||||
compile 'io.reactivex:rxandroid:1.2.1'
|
||||
compile 'io.reactivex:rxjava:1.1.10'
|
||||
compile 'io.reactivex:rxjava:1.2.0'
|
||||
compile 'com.f2prateek.rx.preferences:rx-preferences:1.0.2'
|
||||
|
||||
// Network client
|
||||
@ -121,13 +121,13 @@ dependencies {
|
||||
|
||||
// JSON
|
||||
compile 'com.google.code.gson:gson:2.7'
|
||||
compile 'com.github.salomonbrys.kotson:kotson:2.3.0'
|
||||
compile 'com.github.salomonbrys.kotson:kotson:2.4.0'
|
||||
|
||||
// YAML
|
||||
compile 'com.github.bmoliveira:snake-yaml:v1.18-android'
|
||||
|
||||
// JavaScript engine
|
||||
compile 'com.squareup.duktape:duktape-android:0.9.5'
|
||||
compile 'com.squareup.duktape:duktape-android:1.0.0'
|
||||
|
||||
// Disk cache
|
||||
compile 'com.jakewharton:disklrucache:2.0.2'
|
||||
@ -157,19 +157,19 @@ dependencies {
|
||||
compile 'jp.wasabeef:glide-transformations:2.0.1'
|
||||
|
||||
// Logging
|
||||
compile 'com.jakewharton.timber:timber:4.3.0'
|
||||
compile 'com.jakewharton.timber:timber:4.3.1'
|
||||
|
||||
// Crash reports
|
||||
compile 'ch.acra:acra:4.9.0'
|
||||
|
||||
// UI
|
||||
compile 'com.dmitrymalkovich.android:material-design-dimens:1.2'
|
||||
compile 'com.dmitrymalkovich.android:material-design-dimens:1.4'
|
||||
compile 'com.github.dmytrodanylyk.android-process-button:library:1.0.4'
|
||||
compile 'eu.davidea:flexible-adapter:4.2.0'
|
||||
compile 'com.nononsenseapps:filepicker:2.5.2'
|
||||
compile 'com.github.amulyakhare:TextDrawable:558677e'
|
||||
compile 'com.afollestad.material-dialogs:core:0.8.6.2'
|
||||
compile 'net.xpece.android:support-preference:0.8.1'
|
||||
compile 'com.afollestad.material-dialogs:core:0.9.0.2'
|
||||
compile 'net.xpece.android:support-preference:1.0.3'
|
||||
compile 'me.zhanghai.android.systemuihelper:library:1.0.0'
|
||||
compile 'de.hdodenhof:circleimageview:2.1.0'
|
||||
|
||||
|
@ -60,8 +60,7 @@ class CloudflareInterceptor(private val cookies: PersistentCookieStore) : Interc
|
||||
.replace(Regex("""\s{3,}[a-z](?: = |\.).+"""), "")
|
||||
.replace("\n", "")
|
||||
|
||||
// Duktape can only return strings, so the result has to be converted to string first
|
||||
val result = duktape.evaluate("$js.toString()").toInt()
|
||||
val result = (duktape.evaluate(js) as Double).toInt()
|
||||
|
||||
val answer = "${result + domain.length}"
|
||||
|
||||
|
@ -41,6 +41,8 @@ class BackupFragment : BaseRxFragment<BackupPresenter>() {
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedState: Bundle?) {
|
||||
setToolbarTitle(getString(R.string.label_backup))
|
||||
|
||||
(activity as ActivityMixin).requestPermissionsOnMarshmallow()
|
||||
subscriptions = SubscriptionList()
|
||||
|
||||
|
@ -1,15 +1,10 @@
|
||||
package eu.kanade.tachiyomi.ui.manga.info
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Intent
|
||||
import android.graphics.Bitmap
|
||||
import android.graphics.BitmapFactory
|
||||
import android.graphics.drawable.BitmapDrawable
|
||||
import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import android.support.customtabs.CustomTabsIntent
|
||||
import android.support.design.widget.Snackbar
|
||||
import android.util.SparseArray
|
||||
import android.view.*
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.bumptech.glide.BitmapRequestBuilder
|
||||
@ -22,7 +17,6 @@ import eu.kanade.tachiyomi.data.database.models.Manga
|
||||
import eu.kanade.tachiyomi.data.source.Source
|
||||
import eu.kanade.tachiyomi.data.source.online.OnlineSource
|
||||
import eu.kanade.tachiyomi.ui.base.fragment.BaseRxFragment
|
||||
import eu.kanade.tachiyomi.ui.library.LibraryFragment
|
||||
import eu.kanade.tachiyomi.ui.manga.MangaActivity
|
||||
import eu.kanade.tachiyomi.util.getResourceColor
|
||||
import eu.kanade.tachiyomi.util.toast
|
||||
@ -31,14 +25,10 @@ import jp.wasabeef.glide.transformations.CropSquareTransformation
|
||||
import jp.wasabeef.glide.transformations.MaskTransformation
|
||||
import jp.wasabeef.glide.transformations.RoundedCornersTransformation
|
||||
import kotlinx.android.synthetic.main.fragment_manga_info.*
|
||||
import kotlinx.android.synthetic.main.item_download.*
|
||||
import nucleus.factory.RequiresPresenter
|
||||
import rx.Observable
|
||||
import rx.android.schedulers.AndroidSchedulers
|
||||
import rx.schedulers.Schedulers
|
||||
import timber.log.Timber
|
||||
import java.io.IOException
|
||||
import kotlin.concurrent.thread
|
||||
|
||||
/**
|
||||
* Fragment that shows manga information.
|
||||
|
@ -7,9 +7,9 @@ import android.support.v4.content.ContextCompat
|
||||
import android.support.v7.preference.XpPreferenceFragment
|
||||
import android.view.View
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.util.getResourceId
|
||||
import net.xpece.android.support.preference.PreferenceIconHelper
|
||||
import net.xpece.android.support.preference.PreferenceScreenNavigationStrategy
|
||||
import net.xpece.android.support.preference.Util
|
||||
import rx.subscriptions.CompositeSubscription
|
||||
|
||||
open class SettingsFragment : XpPreferenceFragment() {
|
||||
@ -24,8 +24,8 @@ open class SettingsFragment : XpPreferenceFragment() {
|
||||
|
||||
lateinit var subscriptions: CompositeSubscription
|
||||
|
||||
private val iconTint by lazy { ContextCompat.getColorStateList(
|
||||
context, Util.resolveResourceId(context, R.attr.colorAccent, 0))
|
||||
private val iconTint by lazy { ContextCompat.getColorStateList(context,
|
||||
context.theme.getResourceId(R.attr.colorAccent, 0))
|
||||
}
|
||||
|
||||
override final fun onCreatePreferences2(savedState: Bundle?, rootKey: String?) {
|
||||
@ -59,6 +59,7 @@ open class SettingsFragment : XpPreferenceFragment() {
|
||||
|
||||
@CallSuper
|
||||
override fun onViewCreated(view: View, savedState: Bundle?) {
|
||||
super.onViewCreated(view, savedState)
|
||||
listView.isFocusable = false
|
||||
}
|
||||
|
||||
|
@ -2,18 +2,26 @@ package eu.kanade.tachiyomi.util
|
||||
|
||||
import android.content.res.Resources
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.support.annotation.AttrRes
|
||||
import android.support.annotation.StringRes
|
||||
|
||||
fun Resources.Theme.getResourceColor(@StringRes resource: Int) : Int {
|
||||
val typedArray = this.obtainStyledAttributes(intArrayOf(resource))
|
||||
fun Resources.Theme.getResourceColor(@StringRes resource: Int): Int {
|
||||
val typedArray = obtainStyledAttributes(intArrayOf(resource))
|
||||
val attrValue = typedArray.getColor(0, 0)
|
||||
typedArray.recycle()
|
||||
return attrValue
|
||||
}
|
||||
|
||||
fun Resources.Theme.getResourceDrawable(@StringRes resource: Int) : Drawable {
|
||||
val typedArray = this.obtainStyledAttributes(intArrayOf(resource))
|
||||
fun Resources.Theme.getResourceDrawable(@StringRes resource: Int): Drawable {
|
||||
val typedArray = obtainStyledAttributes(intArrayOf(resource))
|
||||
val attrValue = typedArray.getDrawable(0)
|
||||
typedArray.recycle()
|
||||
return attrValue
|
||||
}
|
||||
|
||||
fun Resources.Theme.getResourceId(@AttrRes resource: Int, fallback: Int): Int {
|
||||
val typedArray = obtainStyledAttributes(intArrayOf(resource))
|
||||
val attrValue = typedArray.getResourceId(0, fallback)
|
||||
typedArray.recycle()
|
||||
return attrValue
|
||||
}
|
@ -226,9 +226,6 @@
|
||||
<string name="manga_info_genres_label">Genres</string>
|
||||
<string name="share_subject">Share…</string>
|
||||
<string name="share_text">Check out %1$s! at %2$s</string>
|
||||
<string name="added_to_home_screen">Manga added to home screen</string>
|
||||
<string name="icon_type">Icon type</string>
|
||||
<string name="tachiyomi_icon">Tachiyomi icon</string>
|
||||
<string name="circular_icon">Circular icon</string>
|
||||
<string name="rounded_icon">Rounded icon</string>
|
||||
<string name="square_icon">Square icon</string>
|
||||
|
@ -36,6 +36,8 @@
|
||||
<item name="divider_drawable">@drawable/line_divider_light</item>
|
||||
<item name="text_color_primary">@color/textColorPrimaryLight</item>
|
||||
<item name="background_card">@color/dialogLight</item>
|
||||
<item name="asp_preferenceIconTint">?colorAccent</item>
|
||||
<item name="asp_preferenceDialogIconTint">?colorAccent</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Tachiyomi" parent="Theme.Base">
|
||||
@ -74,6 +76,8 @@
|
||||
<item name="divider_drawable">@drawable/line_divider_dark</item>
|
||||
<item name="text_color_primary">@color/textColorPrimaryDark</item>
|
||||
<item name="background_card">@color/dialogDark</item>
|
||||
<item name="asp_preferenceIconTint">?colorAccent</item>
|
||||
<item name="asp_preferenceDialogIconTint">?colorAccent</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Tachiyomi.Dark" parent="Theme.Base.Dark">
|
||||
|
Loading…
Reference in New Issue
Block a user