mirror of
https://github.com/mihonapp/mihon.git
synced 2025-06-30 04:57:50 +02:00
Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
d6386cef41 | |||
b88f8ae9d2 | |||
408c7b2ca6 | |||
271253fd0b | |||
5348154c42 | |||
e1b1f4f3fc | |||
75a2110626 | |||
9857d3d6ea | |||
836a2649d3 | |||
59cba2533c |
2
.github/ISSUE_TEMPLATE.md
vendored
2
.github/ISSUE_TEMPLATE.md
vendored
@ -3,7 +3,7 @@
|
|||||||
I acknowledge that:
|
I acknowledge that:
|
||||||
|
|
||||||
- I have updated:
|
- I have updated:
|
||||||
- To the latest version of the app (stable is v0.12.3)
|
- To the latest version of the app (stable is v0.13.1)
|
||||||
- All extensions
|
- All extensions
|
||||||
- I have tried the troubleshooting guide: https://tachiyomi.org/help/guides/troubleshooting-problems/
|
- I have tried the troubleshooting guide: https://tachiyomi.org/help/guides/troubleshooting-problems/
|
||||||
- If this is an issue with an extension, that I should be opening an issue in https://github.com/tachiyomiorg/tachiyomi-extensions
|
- If this is an issue with an extension, that I should be opening an issue in https://github.com/tachiyomiorg/tachiyomi-extensions
|
||||||
|
4
.github/ISSUE_TEMPLATE/report_issue.yml
vendored
4
.github/ISSUE_TEMPLATE/report_issue.yml
vendored
@ -53,7 +53,7 @@ body:
|
|||||||
label: Tachiyomi version
|
label: Tachiyomi version
|
||||||
description: You can find your Tachiyomi version in **More → About**.
|
description: You can find your Tachiyomi version in **More → About**.
|
||||||
placeholder: |
|
placeholder: |
|
||||||
Example: "0.12.3"
|
Example: "0.13.1"
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
@ -98,7 +98,7 @@ body:
|
|||||||
required: true
|
required: true
|
||||||
- label: I have tried the [troubleshooting guide](https://tachiyomi.org/help/guides/troubleshooting/).
|
- label: I have tried the [troubleshooting guide](https://tachiyomi.org/help/guides/troubleshooting/).
|
||||||
required: true
|
required: true
|
||||||
- label: I have updated the app to version **[0.12.3](https://github.com/tachiyomiorg/tachiyomi/releases/latest)**.
|
- label: I have updated the app to version **[0.13.1](https://github.com/tachiyomiorg/tachiyomi/releases/latest)**.
|
||||||
required: true
|
required: true
|
||||||
- label: I have updated all installed extensions.
|
- label: I have updated all installed extensions.
|
||||||
required: true
|
required: true
|
||||||
|
2
.github/ISSUE_TEMPLATE/request_feature.yml
vendored
2
.github/ISSUE_TEMPLATE/request_feature.yml
vendored
@ -33,7 +33,7 @@ body:
|
|||||||
required: true
|
required: true
|
||||||
- label: If this is an issue with an extension, I should be opening an issue in the [extensions repository](https://github.com/tachiyomiorg/tachiyomi-extensions/issues/new/choose).
|
- label: If this is an issue with an extension, I should be opening an issue in the [extensions repository](https://github.com/tachiyomiorg/tachiyomi-extensions/issues/new/choose).
|
||||||
required: true
|
required: true
|
||||||
- label: I have updated the app to version **[0.12.3](https://github.com/tachiyomiorg/tachiyomi/releases/latest)**.
|
- label: I have updated the app to version **[0.13.1](https://github.com/tachiyomiorg/tachiyomi/releases/latest)**.
|
||||||
required: true
|
required: true
|
||||||
- label: I will fill out all of the requested information in this form.
|
- label: I will fill out all of the requested information in this form.
|
||||||
required: true
|
required: true
|
||||||
|
@ -28,8 +28,8 @@ android {
|
|||||||
applicationId = "eu.kanade.tachiyomi"
|
applicationId = "eu.kanade.tachiyomi"
|
||||||
minSdk = AndroidConfig.minSdk
|
minSdk = AndroidConfig.minSdk
|
||||||
targetSdk = AndroidConfig.targetSdk
|
targetSdk = AndroidConfig.targetSdk
|
||||||
versionCode = 73
|
versionCode = 74
|
||||||
versionName = "0.13.0"
|
versionName = "0.13.1"
|
||||||
|
|
||||||
buildConfigField("String", "COMMIT_COUNT", "\"${getCommitCount()}\"")
|
buildConfigField("String", "COMMIT_COUNT", "\"${getCommitCount()}\"")
|
||||||
buildConfigField("String", "COMMIT_SHA", "\"${getGitSha()}\"")
|
buildConfigField("String", "COMMIT_SHA", "\"${getGitSha()}\"")
|
||||||
@ -208,8 +208,8 @@ dependencies {
|
|||||||
implementation("com.github.requery:sqlite-android:3.36.0")
|
implementation("com.github.requery:sqlite-android:3.36.0")
|
||||||
|
|
||||||
// Preferences
|
// Preferences
|
||||||
implementation("androidx.preference:preference-ktx:1.2.0-rc01")
|
implementation("androidx.preference:preference-ktx:1.2.0")
|
||||||
implementation("com.github.tfcporciuncula.flow-preferences:flow-preferences:1.4.0")
|
implementation("com.fredporciuncula:flow-preferences:1.6.0")
|
||||||
|
|
||||||
// Model View Presenter
|
// Model View Presenter
|
||||||
val nucleusVersion = "3.0.0"
|
val nucleusVersion = "3.0.0"
|
||||||
|
@ -6,7 +6,7 @@ import android.os.Environment
|
|||||||
import androidx.core.content.edit
|
import androidx.core.content.edit
|
||||||
import androidx.core.net.toUri
|
import androidx.core.net.toUri
|
||||||
import androidx.preference.PreferenceManager
|
import androidx.preference.PreferenceManager
|
||||||
import com.tfcporciuncula.flow.FlowSharedPreferences
|
import com.fredporciuncula.flow.preferences.FlowSharedPreferences
|
||||||
import eu.kanade.tachiyomi.R
|
import eu.kanade.tachiyomi.R
|
||||||
import eu.kanade.tachiyomi.data.database.models.Manga
|
import eu.kanade.tachiyomi.data.database.models.Manga
|
||||||
import eu.kanade.tachiyomi.data.track.TrackService
|
import eu.kanade.tachiyomi.data.track.TrackService
|
||||||
|
@ -13,10 +13,10 @@ import androidx.core.view.updatePadding
|
|||||||
import androidx.recyclerview.widget.GridLayoutManager
|
import androidx.recyclerview.widget.GridLayoutManager
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import com.fredporciuncula.flow.preferences.Preference
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||||
import com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
import com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||||
import com.google.android.material.snackbar.Snackbar
|
import com.google.android.material.snackbar.Snackbar
|
||||||
import com.tfcporciuncula.flow.Preference
|
|
||||||
import dev.chrisbanes.insetter.applyInsetter
|
import dev.chrisbanes.insetter.applyInsetter
|
||||||
import eu.davidea.flexibleadapter.FlexibleAdapter
|
import eu.davidea.flexibleadapter.FlexibleAdapter
|
||||||
import eu.davidea.flexibleadapter.items.IFlexible
|
import eu.davidea.flexibleadapter.items.IFlexible
|
||||||
|
@ -6,7 +6,7 @@ import android.view.ViewGroup.LayoutParams.MATCH_PARENT
|
|||||||
import android.widget.FrameLayout
|
import android.widget.FrameLayout
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout
|
import androidx.constraintlayout.widget.ConstraintLayout
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import com.tfcporciuncula.flow.Preference
|
import com.fredporciuncula.flow.preferences.Preference
|
||||||
import eu.davidea.flexibleadapter.FlexibleAdapter
|
import eu.davidea.flexibleadapter.FlexibleAdapter
|
||||||
import eu.davidea.flexibleadapter.items.AbstractFlexibleItem
|
import eu.davidea.flexibleadapter.items.AbstractFlexibleItem
|
||||||
import eu.davidea.flexibleadapter.items.IFlexible
|
import eu.davidea.flexibleadapter.items.IFlexible
|
||||||
|
@ -11,10 +11,10 @@ import androidx.appcompat.view.ActionMode
|
|||||||
import androidx.core.view.isVisible
|
import androidx.core.view.isVisible
|
||||||
import com.bluelinelabs.conductor.ControllerChangeHandler
|
import com.bluelinelabs.conductor.ControllerChangeHandler
|
||||||
import com.bluelinelabs.conductor.ControllerChangeType
|
import com.bluelinelabs.conductor.ControllerChangeType
|
||||||
|
import com.fredporciuncula.flow.preferences.Preference
|
||||||
import com.google.android.material.tabs.TabLayout
|
import com.google.android.material.tabs.TabLayout
|
||||||
import com.jakewharton.rxrelay.BehaviorRelay
|
import com.jakewharton.rxrelay.BehaviorRelay
|
||||||
import com.jakewharton.rxrelay.PublishRelay
|
import com.jakewharton.rxrelay.PublishRelay
|
||||||
import com.tfcporciuncula.flow.Preference
|
|
||||||
import eu.kanade.tachiyomi.R
|
import eu.kanade.tachiyomi.R
|
||||||
import eu.kanade.tachiyomi.data.database.models.Category
|
import eu.kanade.tachiyomi.data.database.models.Category
|
||||||
import eu.kanade.tachiyomi.data.database.models.Manga
|
import eu.kanade.tachiyomi.data.database.models.Manga
|
||||||
|
@ -6,7 +6,7 @@ import android.view.ViewGroup.LayoutParams.MATCH_PARENT
|
|||||||
import android.widget.FrameLayout
|
import android.widget.FrameLayout
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout
|
import androidx.constraintlayout.widget.ConstraintLayout
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import com.tfcporciuncula.flow.Preference
|
import com.fredporciuncula.flow.preferences.Preference
|
||||||
import eu.davidea.flexibleadapter.FlexibleAdapter
|
import eu.davidea.flexibleadapter.FlexibleAdapter
|
||||||
import eu.davidea.flexibleadapter.items.AbstractFlexibleItem
|
import eu.davidea.flexibleadapter.items.AbstractFlexibleItem
|
||||||
import eu.davidea.flexibleadapter.items.IFilterable
|
import eu.davidea.flexibleadapter.items.IFilterable
|
||||||
|
@ -6,6 +6,7 @@ import android.content.Context
|
|||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.graphics.Bitmap
|
import android.graphics.Bitmap
|
||||||
import android.graphics.drawable.BitmapDrawable
|
import android.graphics.drawable.BitmapDrawable
|
||||||
|
import android.os.Build
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.Menu
|
import android.view.Menu
|
||||||
@ -890,15 +891,20 @@ class MangaController :
|
|||||||
|
|
||||||
private fun openChapter(chapter: Chapter, sharedElement: View? = null) {
|
private fun openChapter(chapter: Chapter, sharedElement: View? = null) {
|
||||||
val activity = activity ?: return
|
val activity = activity ?: return
|
||||||
val intent = ReaderActivity.newIntent(activity, presenter.manga, chapter)
|
|
||||||
activity.apply {
|
activity.apply {
|
||||||
if (sharedElement != null) {
|
val intent = ReaderActivity.newIntent(activity, presenter.manga, chapter)
|
||||||
|
if (sharedElement != null && Build.VERSION.SDK_INT != Build.VERSION_CODES.O) {
|
||||||
val activityOptions = ActivityOptions.makeSceneTransitionAnimation(
|
val activityOptions = ActivityOptions.makeSceneTransitionAnimation(
|
||||||
activity,
|
activity,
|
||||||
sharedElement,
|
sharedElement,
|
||||||
ReaderActivity.SHARED_ELEMENT_NAME
|
ReaderActivity.SHARED_ELEMENT_NAME
|
||||||
)
|
)
|
||||||
startActivity(intent, activityOptions.toBundle())
|
startActivity(
|
||||||
|
intent.apply {
|
||||||
|
putExtra(ReaderActivity.EXTRA_IS_TRANSITION, true)
|
||||||
|
},
|
||||||
|
activityOptions.toBundle(),
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
}
|
}
|
||||||
|
@ -43,6 +43,7 @@ import com.google.android.material.slider.Slider
|
|||||||
import com.google.android.material.transition.platform.MaterialContainerTransform
|
import com.google.android.material.transition.platform.MaterialContainerTransform
|
||||||
import com.google.android.material.transition.platform.MaterialContainerTransformSharedElementCallback
|
import com.google.android.material.transition.platform.MaterialContainerTransformSharedElementCallback
|
||||||
import dev.chrisbanes.insetter.applyInsetter
|
import dev.chrisbanes.insetter.applyInsetter
|
||||||
|
import eu.kanade.tachiyomi.BuildConfig
|
||||||
import eu.kanade.tachiyomi.R
|
import eu.kanade.tachiyomi.R
|
||||||
import eu.kanade.tachiyomi.data.database.models.Chapter
|
import eu.kanade.tachiyomi.data.database.models.Chapter
|
||||||
import eu.kanade.tachiyomi.data.database.models.Manga
|
import eu.kanade.tachiyomi.data.database.models.Manga
|
||||||
@ -110,6 +111,7 @@ class ReaderActivity : BaseRxActivity<ReaderActivityBinding, ReaderPresenter>()
|
|||||||
private const val ENABLED_BUTTON_IMAGE_ALPHA = 255
|
private const val ENABLED_BUTTON_IMAGE_ALPHA = 255
|
||||||
private const val DISABLED_BUTTON_IMAGE_ALPHA = 64
|
private const val DISABLED_BUTTON_IMAGE_ALPHA = 64
|
||||||
|
|
||||||
|
const val EXTRA_IS_TRANSITION = "${BuildConfig.APPLICATION_ID}.READER_IS_TRANSITION"
|
||||||
const val SHARED_ELEMENT_NAME = "reader_shared_element_root"
|
const val SHARED_ELEMENT_NAME = "reader_shared_element_root"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -158,6 +160,7 @@ class ReaderActivity : BaseRxActivity<ReaderActivityBinding, ReaderPresenter>()
|
|||||||
applyAppTheme(preferences)
|
applyAppTheme(preferences)
|
||||||
|
|
||||||
// Setup shared element transitions
|
// Setup shared element transitions
|
||||||
|
if (intent.extras?.getBoolean(EXTRA_IS_TRANSITION) == true) {
|
||||||
window.requestFeature(Window.FEATURE_ACTIVITY_TRANSITIONS)
|
window.requestFeature(Window.FEATURE_ACTIVITY_TRANSITIONS)
|
||||||
findViewById<View>(android.R.id.content)?.let { contentView ->
|
findViewById<View>(android.R.id.content)?.let { contentView ->
|
||||||
contentView.transitionName = SHARED_ELEMENT_NAME
|
contentView.transitionName = SHARED_ELEMENT_NAME
|
||||||
@ -168,6 +171,7 @@ class ReaderActivity : BaseRxActivity<ReaderActivityBinding, ReaderPresenter>()
|
|||||||
// Postpone custom transition until manga ready
|
// Postpone custom transition until manga ready
|
||||||
postponeEnterTransition()
|
postponeEnterTransition()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package eu.kanade.tachiyomi.ui.reader.viewer
|
package eu.kanade.tachiyomi.ui.reader.viewer
|
||||||
|
|
||||||
import com.tfcporciuncula.flow.Preference
|
import com.fredporciuncula.flow.preferences.Preference
|
||||||
import eu.kanade.tachiyomi.data.preference.PreferenceValues.TappingInvertMode
|
import eu.kanade.tachiyomi.data.preference.PreferenceValues.TappingInvertMode
|
||||||
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
|
@ -137,7 +137,7 @@ abstract class SettingsController : PreferenceController() {
|
|||||||
(activity as? AppCompatActivity)?.supportActionBar?.title = getTitle()
|
(activity as? AppCompatActivity)?.supportActionBar?.title = getTitle()
|
||||||
}
|
}
|
||||||
|
|
||||||
inline fun <T> Preference.visibleIf(preference: com.tfcporciuncula.flow.Preference<T>, crossinline block: (T) -> Boolean) {
|
inline fun <T> Preference.visibleIf(preference: com.fredporciuncula.flow.preferences.Preference<T>, crossinline block: (T) -> Boolean) {
|
||||||
preference.asImmediateFlow { isVisible = block(it) }
|
preference.asImmediateFlow { isVisible = block(it) }
|
||||||
.launchIn(viewScope)
|
.launchIn(viewScope)
|
||||||
}
|
}
|
||||||
|
@ -114,12 +114,12 @@ inline fun <P : Preference> PreferenceGroup.addThenInit(p: P, block: P.() -> Uni
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inline fun <T> Preference.bindTo(preference: com.tfcporciuncula.flow.Preference<T>) {
|
inline fun <T> Preference.bindTo(preference: com.fredporciuncula.flow.preferences.Preference<T>) {
|
||||||
key = preference.key
|
key = preference.key
|
||||||
defaultValue = preference.defaultValue
|
defaultValue = preference.defaultValue
|
||||||
}
|
}
|
||||||
|
|
||||||
inline fun <T> ListPreference.bindTo(preference: com.tfcporciuncula.flow.Preference<T>) {
|
inline fun <T> ListPreference.bindTo(preference: com.fredporciuncula.flow.preferences.Preference<T>) {
|
||||||
key = preference.key
|
key = preference.key
|
||||||
// ListPreferences persist values as strings, even when we're using our IntListPreference
|
// ListPreferences persist values as strings, even when we're using our IntListPreference
|
||||||
defaultValue = preference.defaultValue.toString()
|
defaultValue = preference.defaultValue.toString()
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package eu.kanade.tachiyomi.util.preference
|
package eu.kanade.tachiyomi.util.preference
|
||||||
|
|
||||||
import android.widget.CompoundButton
|
import android.widget.CompoundButton
|
||||||
import com.tfcporciuncula.flow.Preference
|
import com.fredporciuncula.flow.preferences.Preference
|
||||||
import kotlinx.coroutines.flow.Flow
|
import kotlinx.coroutines.flow.Flow
|
||||||
import kotlinx.coroutines.flow.onEach
|
import kotlinx.coroutines.flow.onEach
|
||||||
|
|
||||||
|
@ -304,7 +304,7 @@ fun Context.defaultBrowserPackageName(): String? {
|
|||||||
val browserIntent = Intent(Intent.ACTION_VIEW, Uri.parse("http://"))
|
val browserIntent = Intent(Intent.ACTION_VIEW, Uri.parse("http://"))
|
||||||
return packageManager.resolveActivity(browserIntent, PackageManager.MATCH_DEFAULT_ONLY)
|
return packageManager.resolveActivity(browserIntent, PackageManager.MATCH_DEFAULT_ONLY)
|
||||||
?.activityInfo?.packageName
|
?.activityInfo?.packageName
|
||||||
?.takeIf { it != "android" }
|
?.takeUnless { it in DeviceUtil.invalidDefaultBrowsers }
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Context.createFileInCacheDir(name: String): File {
|
fun Context.createFileInCacheDir(name: String): File {
|
||||||
|
@ -35,6 +35,8 @@ object DeviceUtil {
|
|||||||
DynamicColors.isDynamicColorAvailable() || (isSamsung && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S)
|
DynamicColors.isDynamicColorAvailable() || (isSamsung && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val invalidDefaultBrowsers = listOf("android", "com.huawei.android.internal.app")
|
||||||
|
|
||||||
@SuppressLint("PrivateApi")
|
@SuppressLint("PrivateApi")
|
||||||
private fun getSystemProperty(key: String?): String? {
|
private fun getSystemProperty(key: String?): String? {
|
||||||
return try {
|
return try {
|
||||||
|
@ -13,7 +13,7 @@ import androidx.appcompat.view.menu.MenuBuilder
|
|||||||
import androidx.appcompat.widget.PopupMenu
|
import androidx.appcompat.widget.PopupMenu
|
||||||
import androidx.core.view.forEach
|
import androidx.core.view.forEach
|
||||||
import androidx.core.view.get
|
import androidx.core.view.get
|
||||||
import com.tfcporciuncula.flow.Preference
|
import com.fredporciuncula.flow.preferences.Preference
|
||||||
import eu.kanade.tachiyomi.R
|
import eu.kanade.tachiyomi.R
|
||||||
import eu.kanade.tachiyomi.databinding.PrefSpinnerBinding
|
import eu.kanade.tachiyomi.databinding.PrefSpinnerBinding
|
||||||
import eu.kanade.tachiyomi.util.system.getResourceColor
|
import eu.kanade.tachiyomi.util.system.getResourceColor
|
||||||
|
@ -204,6 +204,7 @@ class TachiyomiAppBarLayout @JvmOverloads constructor(
|
|||||||
type(statusBars = true) {
|
type(statusBars = true) {
|
||||||
padding(top = true)
|
padding(top = true)
|
||||||
}
|
}
|
||||||
|
ignoreVisibility(true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user