mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-07 11:17:25 +01:00
Dependency updates. Enable new translations. Minor fixes
This commit is contained in:
parent
90d27147e6
commit
bb40a4d6b8
@ -122,7 +122,7 @@ dependencies {
|
||||
compile 'com.github.pwittchen:reactivenetwork:0.7.0'
|
||||
|
||||
// Network client
|
||||
compile "com.squareup.okhttp3:okhttp:3.8.0"
|
||||
compile "com.squareup.okhttp3:okhttp:3.8.1"
|
||||
compile 'com.squareup.okio:okio:1.13.0'
|
||||
|
||||
// REST
|
||||
@ -132,7 +132,7 @@ dependencies {
|
||||
compile "com.squareup.retrofit2:adapter-rxjava:$retrofit_version"
|
||||
|
||||
// JSON
|
||||
compile 'com.google.code.gson:gson:2.8.0'
|
||||
compile 'com.google.code.gson:gson:2.8.1'
|
||||
compile 'com.github.salomonbrys.kotson:kotson:2.5.0'
|
||||
|
||||
// YAML
|
||||
@ -146,11 +146,11 @@ dependencies {
|
||||
compile 'com.github.seven332:unifile:1.0.0'
|
||||
|
||||
// HTML parser
|
||||
compile 'org.jsoup:jsoup:1.10.2'
|
||||
compile 'org.jsoup:jsoup:1.10.3'
|
||||
|
||||
// Job scheduling
|
||||
compile 'com.evernote:android-job:1.1.8'
|
||||
compile 'com.google.android.gms:play-services-gcm:10.2.0'
|
||||
compile 'com.evernote:android-job:1.1.11'
|
||||
compile 'com.google.android.gms:play-services-gcm:11.0.1'
|
||||
|
||||
// Changelog
|
||||
compile 'com.github.gabrielemariotti.changeloglib:changelog:2.1.0'
|
||||
@ -161,7 +161,6 @@ dependencies {
|
||||
// Model View Presenter
|
||||
final nucleus_version = '3.0.0'
|
||||
compile "info.android15.nucleus:nucleus:$nucleus_version"
|
||||
compile "info.android15.nucleus:nucleus-support-v4:$nucleus_version"
|
||||
compile "info.android15.nucleus:nucleus-support-v7:$nucleus_version"
|
||||
|
||||
// Dependency injection
|
||||
@ -194,7 +193,7 @@ dependencies {
|
||||
compile 'com.nightlynexus.viewstatepageradapter:viewstatepageradapter:1.0.4'
|
||||
|
||||
// Conductor
|
||||
compile "com.bluelinelabs:conductor:2.1.2"
|
||||
compile "com.bluelinelabs:conductor:2.1.4"
|
||||
compile 'com.github.inorichi:conductor-support-preference:9e36460'
|
||||
|
||||
// RxBindings
|
||||
|
@ -32,6 +32,7 @@ import eu.kanade.tachiyomi.ui.manga.track.TrackController
|
||||
import eu.kanade.tachiyomi.util.toast
|
||||
import kotlinx.android.synthetic.main.main_activity.*
|
||||
import kotlinx.android.synthetic.main.manga_controller.view.*
|
||||
import rx.Subscription
|
||||
import uy.kohesive.injekt.Injekt
|
||||
import uy.kohesive.injekt.api.get
|
||||
|
||||
@ -67,6 +68,10 @@ class MangaController : RxController, TabbedController {
|
||||
|
||||
val mangaFavoriteRelay: PublishRelay<Boolean> = PublishRelay.create()
|
||||
|
||||
private val trackingIconRelay: BehaviorRelay<Boolean> = BehaviorRelay.create()
|
||||
|
||||
private var trackingIconSubscription: Subscription? = null
|
||||
|
||||
override fun getTitle(): String? {
|
||||
return manga?.title
|
||||
}
|
||||
@ -103,6 +108,7 @@ class MangaController : RxController, TabbedController {
|
||||
super.onChangeStarted(handler, type)
|
||||
if (type.isEnter) {
|
||||
activity?.tabs?.setupWithViewPager(view?.view_pager)
|
||||
trackingIconSubscription = trackingIconRelay.subscribe { setTrackingIconInternal(it) }
|
||||
}
|
||||
}
|
||||
|
||||
@ -122,16 +128,20 @@ class MangaController : RxController, TabbedController {
|
||||
}
|
||||
|
||||
override fun cleanupTabs(tabs: TabLayout) {
|
||||
setTrackingIcon(false)
|
||||
trackingIconSubscription?.unsubscribe()
|
||||
setTrackingIconInternal(false)
|
||||
}
|
||||
|
||||
fun setTrackingIcon(visible: Boolean) {
|
||||
trackingIconRelay.call(visible)
|
||||
}
|
||||
|
||||
private fun setTrackingIconInternal(visible: Boolean) {
|
||||
val tab = activity?.tabs?.getTabAt(TRACK_CONTROLLER) ?: return
|
||||
val drawable = if (visible)
|
||||
VectorDrawableCompat.create(resources!!, R.drawable.ic_done_white_18dp, null)
|
||||
else null
|
||||
|
||||
// I had no choice but to use reflection...
|
||||
val view = tabField.get(tab) as LinearLayout
|
||||
val textView = view.getChildAt(1) as TextView
|
||||
textView.setCompoundDrawablesWithIntrinsicBounds(null, null, drawable, null)
|
||||
|
@ -29,7 +29,8 @@ class SettingsGeneralController : SettingsController() {
|
||||
listPreference {
|
||||
key = Keys.lang
|
||||
titleRes = R.string.pref_language
|
||||
entryValues = arrayOf("", "bg", "en", "es", "fr", "it", "pt", "ru", "vi")
|
||||
entryValues = arrayOf("", "bg", "en", "es", "fr", "it", "lv", "nl", "pt", "pt-BR", "ru",
|
||||
"vi")
|
||||
entries = entryValues.map { value ->
|
||||
val locale = LocaleHelper.getLocaleFromString(value.toString())
|
||||
locale?.getDisplayName(locale)?.capitalize() ?:
|
||||
|
Loading…
Reference in New Issue
Block a user