mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-10-31 06:17:57 +01:00 
			
		
		
		
	Dependency updates. Enable new translations. Minor fixes
This commit is contained in:
		| @@ -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() ?: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user