Merge branch 'rebelonion:main' into main
This commit is contained in:
commit
3db4363100
17 changed files with 176 additions and 94 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -23,9 +23,6 @@ output.json
|
||||||
*.jks
|
*.jks
|
||||||
*.keystore
|
*.keystore
|
||||||
|
|
||||||
# Google Services (e.g. APIs or Firebase)
|
|
||||||
google-services.json
|
|
||||||
|
|
||||||
# Android Profiling
|
# Android Profiling
|
||||||
*.hprof
|
*.hprof
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ android {
|
||||||
minSdk 23
|
minSdk 23
|
||||||
targetSdk 34
|
targetSdk 34
|
||||||
versionCode ((System.currentTimeMillis() / 60000).toInteger())
|
versionCode ((System.currentTimeMillis() / 60000).toInteger())
|
||||||
versionName "2.0.0"
|
versionName "2.0.0-beta00-i"
|
||||||
signingConfig signingConfigs.debug
|
signingConfig signingConfigs.debug
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
67
app/google-services.json
Normal file
67
app/google-services.json
Normal file
|
@ -0,0 +1,67 @@
|
||||||
|
{
|
||||||
|
"project_info": {
|
||||||
|
"project_number": "1039200814590",
|
||||||
|
"project_id": "dantotsu-1e50f",
|
||||||
|
"storage_bucket": "dantotsu-1e50f.appspot.com"
|
||||||
|
},
|
||||||
|
"client": [
|
||||||
|
{
|
||||||
|
"client_info": {
|
||||||
|
"mobilesdk_app_id": "1:1039200814590:android:c372b8c1b92b825f1aacaf",
|
||||||
|
"android_client_info": {
|
||||||
|
"package_name": "ani.Dantotsu"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oauth_client": [],
|
||||||
|
"api_key": [
|
||||||
|
{
|
||||||
|
"current_key": "AIzaSyCiXo_q4S2ofA5oCztsoLnlDqJi3GtTJjY"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": {
|
||||||
|
"appinvite_service": {
|
||||||
|
"other_platform_oauth_client": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_info": {
|
||||||
|
"mobilesdk_app_id": "1:1039200814590:android:40e14720ee97917e1aacaf",
|
||||||
|
"android_client_info": {
|
||||||
|
"package_name": "ani.dantotsu.beta"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oauth_client": [],
|
||||||
|
"api_key": [
|
||||||
|
{
|
||||||
|
"current_key": "AIzaSyCiXo_q4S2ofA5oCztsoLnlDqJi3GtTJjY"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": {
|
||||||
|
"appinvite_service": {
|
||||||
|
"other_platform_oauth_client": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_info": {
|
||||||
|
"mobilesdk_app_id": "1:1039200814590:android:40e14720ee97917e1aacaf",
|
||||||
|
"android_client_info": {
|
||||||
|
"package_name": "ani.dantotsu"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oauth_client": [],
|
||||||
|
"api_key": [
|
||||||
|
{
|
||||||
|
"current_key": "AIzaSyCiXo_q4S2ofA5oCztsoLnlDqJi3GtTJjY"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": {
|
||||||
|
"appinvite_service": {
|
||||||
|
"other_platform_oauth_client": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"configuration_version": "1"
|
||||||
|
}
|
|
@ -69,10 +69,14 @@ class OfflineMangaFragment : Fragment(), OfflineMangaSearchListener {
|
||||||
|
|
||||||
val animeUserAvatar = view.findViewById<ShapeableImageView>(R.id.offlineMangaUserAvatar)
|
val animeUserAvatar = view.findViewById<ShapeableImageView>(R.id.offlineMangaUserAvatar)
|
||||||
animeUserAvatar.setSafeOnClickListener {
|
animeUserAvatar.setSafeOnClickListener {
|
||||||
SettingsDialogFragment(SettingsDialogFragment.Companion.PageType.HOME).show(
|
animeUserAvatar.setSafeOnClickListener {
|
||||||
(it.context as AppCompatActivity).supportFragmentManager,
|
val dialogFragment = SettingsDialogFragment.newInstance(SettingsDialogFragment.Companion.PageType.HOME)
|
||||||
"dialog"
|
dialogFragment.show(
|
||||||
)
|
(it.context as AppCompatActivity).supportFragmentManager,
|
||||||
|
"dialog"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
val colorOverflow = currContext()?.getSharedPreferences("Dantotsu", Context.MODE_PRIVATE)
|
val colorOverflow = currContext()?.getSharedPreferences("Dantotsu", Context.MODE_PRIVATE)
|
||||||
|
|
|
@ -98,10 +98,9 @@ class AnimePageAdapter : RecyclerView.Adapter<AnimePageAdapter.AnimePageViewHold
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.animeUserAvatar.setSafeOnClickListener {
|
binding.animeUserAvatar.setSafeOnClickListener {
|
||||||
SettingsDialogFragment(SettingsDialogFragment.Companion.PageType.ANIME).show(
|
val dialogFragment =
|
||||||
(it.context as AppCompatActivity).supportFragmentManager,
|
SettingsDialogFragment.newInstance(SettingsDialogFragment.Companion.PageType.ANIME)
|
||||||
"dialog"
|
dialogFragment.show((it.context as AppCompatActivity).supportFragmentManager, "dialog")
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
listOf(
|
listOf(
|
||||||
|
|
|
@ -113,8 +113,10 @@ class HomeFragment : Fragment() {
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.homeUserAvatarContainer.setSafeOnClickListener {
|
binding.homeUserAvatarContainer.setSafeOnClickListener {
|
||||||
SettingsDialogFragment(SettingsDialogFragment.Companion.PageType.HOME).show(
|
val dialogFragment =
|
||||||
parentFragmentManager,
|
SettingsDialogFragment.newInstance(SettingsDialogFragment.Companion.PageType.HOME)
|
||||||
|
dialogFragment.show(
|
||||||
|
(it.context as androidx.appcompat.app.AppCompatActivity).supportFragmentManager,
|
||||||
"dialog"
|
"dialog"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -127,19 +129,17 @@ class HomeFragment : Fragment() {
|
||||||
|
|
||||||
var reached = false
|
var reached = false
|
||||||
val duration = (uiSettings.animationSpeed * 200).toLong()
|
val duration = (uiSettings.animationSpeed * 200).toLong()
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
binding.homeScroll.setOnScrollChangeListener { _, _, _, _, _ ->
|
||||||
binding.homeScroll.setOnScrollChangeListener { _, _, _, _, _ ->
|
if (!binding.homeScroll.canScrollVertically(1)) {
|
||||||
if (!binding.homeScroll.canScrollVertically(1)) {
|
reached = true
|
||||||
reached = true
|
bottomBar.animate().translationZ(0f).setDuration(duration).start()
|
||||||
bottomBar.animate().translationZ(0f).setDuration(duration).start()
|
ObjectAnimator.ofFloat(bottomBar, "elevation", 4f, 0f).setDuration(duration)
|
||||||
ObjectAnimator.ofFloat(bottomBar, "elevation", 4f, 0f).setDuration(duration)
|
.start()
|
||||||
|
} else {
|
||||||
|
if (reached) {
|
||||||
|
bottomBar.animate().translationZ(12f).setDuration(duration).start()
|
||||||
|
ObjectAnimator.ofFloat(bottomBar, "elevation", 0f, 4f).setDuration(duration)
|
||||||
.start()
|
.start()
|
||||||
} else {
|
|
||||||
if (reached) {
|
|
||||||
bottomBar.animate().translationZ(12f).setDuration(duration).start()
|
|
||||||
ObjectAnimator.ofFloat(bottomBar, "elevation", 0f, 4f).setDuration(duration)
|
|
||||||
.start()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,10 +93,9 @@ class MangaPageAdapter : RecyclerView.Adapter<MangaPageAdapter.MangaPageViewHold
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.mangaUserAvatar.setSafeOnClickListener {
|
binding.mangaUserAvatar.setSafeOnClickListener {
|
||||||
SettingsDialogFragment(SettingsDialogFragment.Companion.PageType.MANGA).show(
|
val dialogFragment =
|
||||||
(it.context as AppCompatActivity).supportFragmentManager,
|
SettingsDialogFragment.newInstance(SettingsDialogFragment.Companion.PageType.MANGA)
|
||||||
"dialog"
|
dialogFragment.show((it.context as AppCompatActivity).supportFragmentManager, "dialog")
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.mangaSearchBar.setEndIconOnClickListener {
|
binding.mangaSearchBar.setEndIconOnClickListener {
|
||||||
|
|
|
@ -300,17 +300,16 @@ class MediaAdaptor(
|
||||||
return type
|
return type
|
||||||
}
|
}
|
||||||
|
|
||||||
fun randomOptionClick() { //used for user list
|
fun randomOptionClick() {
|
||||||
val media = mediaList?.random()
|
val media = if (!mediaList.isNullOrEmpty()) {
|
||||||
if (media != null) {
|
mediaList.random()
|
||||||
mediaList?.let {
|
} else {
|
||||||
clicked(
|
null
|
||||||
it.indexOf(media),
|
}
|
||||||
null
|
media?.let {
|
||||||
)
|
val index = mediaList?.indexOf(it) ?: -1
|
||||||
}
|
clicked(index, null)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inner class MediaViewHolder(val binding: ItemMediaCompactBinding) :
|
inner class MediaViewHolder(val binding: ItemMediaCompactBinding) :
|
||||||
|
|
|
@ -298,19 +298,21 @@ class AnimeWatchFragment : Fragment() {
|
||||||
|
|
||||||
fun openSettings(pkg: AnimeExtension.Installed) {
|
fun openSettings(pkg: AnimeExtension.Installed) {
|
||||||
val changeUIVisibility: (Boolean) -> Unit = { show ->
|
val changeUIVisibility: (Boolean) -> Unit = { show ->
|
||||||
val activity = requireActivity() as MediaDetailsActivity
|
val activity = activity
|
||||||
val visibility = if (show) View.VISIBLE else View.GONE
|
if (activity is MediaDetailsActivity && isAdded) {
|
||||||
activity.findViewById<AppBarLayout>(R.id.mediaAppBar).visibility = visibility
|
val visibility = if (show) View.VISIBLE else View.GONE
|
||||||
activity.findViewById<ViewPager2>(R.id.mediaViewPager).visibility = visibility
|
activity.findViewById<AppBarLayout>(R.id.mediaAppBar).visibility = visibility
|
||||||
activity.findViewById<CardView>(R.id.mediaCover).visibility = visibility
|
activity.findViewById<ViewPager2>(R.id.mediaViewPager).visibility = visibility
|
||||||
activity.findViewById<CardView>(R.id.mediaClose).visibility = visibility
|
activity.findViewById<CardView>(R.id.mediaCover).visibility = visibility
|
||||||
try {
|
activity.findViewById<CardView>(R.id.mediaClose).visibility = visibility
|
||||||
activity.findViewById<CustomBottomNavBar>(R.id.mediaTab).visibility = visibility
|
try {
|
||||||
} catch (e: ClassCastException) {
|
activity.findViewById<CustomBottomNavBar>(R.id.mediaTab).visibility = visibility
|
||||||
activity.findViewById<NavigationRailView>(R.id.mediaTab).visibility = visibility
|
} catch (e: ClassCastException) {
|
||||||
|
activity.findViewById<NavigationRailView>(R.id.mediaTab).visibility = visibility
|
||||||
|
}
|
||||||
|
activity.findViewById<FrameLayout>(R.id.fragmentExtensionsContainer).visibility =
|
||||||
|
if (show) View.GONE else View.VISIBLE
|
||||||
}
|
}
|
||||||
activity.findViewById<FrameLayout>(R.id.fragmentExtensionsContainer).visibility =
|
|
||||||
if (show) View.GONE else View.VISIBLE
|
|
||||||
}
|
}
|
||||||
val allSettings = pkg.sources.filterIsInstance<ConfigurableAnimeSource>()
|
val allSettings = pkg.sources.filterIsInstance<ConfigurableAnimeSource>()
|
||||||
if (allSettings.isNotEmpty()) {
|
if (allSettings.isNotEmpty()) {
|
||||||
|
|
|
@ -120,6 +120,7 @@ class MangaChapterAdapter(
|
||||||
|
|
||||||
fun downloadNChaptersFrom(position: Int, n: Int) {
|
fun downloadNChaptersFrom(position: Int, n: Int) {
|
||||||
//download next n chapters
|
//download next n chapters
|
||||||
|
if (position < 0 || position >= arr.size) return
|
||||||
for (i in 0..<n) {
|
for (i in 0..<n) {
|
||||||
if (position + i < arr.size) {
|
if (position + i < arr.size) {
|
||||||
val chapterNumber = arr[position + i].number
|
val chapterNumber = arr[position + i].number
|
||||||
|
@ -160,6 +161,7 @@ class MangaChapterAdapter(
|
||||||
//binding.itemDownload.setColorFilter(typedValue2.data) //TODO: colors go to wrong places
|
//binding.itemDownload.setColorFilter(typedValue2.data) //TODO: colors go to wrong places
|
||||||
binding.itemDownload.postDelayed({
|
binding.itemDownload.postDelayed({
|
||||||
binding.itemDownload.setImageResource(R.drawable.ic_round_delete_24)
|
binding.itemDownload.setImageResource(R.drawable.ic_round_delete_24)
|
||||||
|
binding.itemDownload.rotation = 0f
|
||||||
//binding.itemDownload.setColorFilter(typedValue2.data)
|
//binding.itemDownload.setColorFilter(typedValue2.data)
|
||||||
}, 1000)
|
}, 1000)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -203,6 +203,7 @@ open class MangaReadFragment : Fragment(), ScanlatorSelectionListener {
|
||||||
val chapters = media.manga?.chapters?.values?.toList()
|
val chapters = media.manga?.chapters?.values?.toList()
|
||||||
//filter by selected language
|
//filter by selected language
|
||||||
val progressChapterIndex = chapters?.indexOfFirst { MangaNameAdapter.findChapterNumber(it.number)?.toInt() == selected }?:0
|
val progressChapterIndex = chapters?.indexOfFirst { MangaNameAdapter.findChapterNumber(it.number)?.toInt() == selected }?:0
|
||||||
|
if (progressChapterIndex < 0 || n < 1) return
|
||||||
val chaptersToDownload = chapters?.subList(
|
val chaptersToDownload = chapters?.subList(
|
||||||
progressChapterIndex + 1,
|
progressChapterIndex + 1,
|
||||||
progressChapterIndex + n + 1
|
progressChapterIndex + n + 1
|
||||||
|
@ -338,19 +339,21 @@ open class MangaReadFragment : Fragment(), ScanlatorSelectionListener {
|
||||||
|
|
||||||
fun openSettings(pkg: MangaExtension.Installed) {
|
fun openSettings(pkg: MangaExtension.Installed) {
|
||||||
val changeUIVisibility: (Boolean) -> Unit = { show ->
|
val changeUIVisibility: (Boolean) -> Unit = { show ->
|
||||||
val activity = requireActivity() as MediaDetailsActivity
|
val activity = activity
|
||||||
val visibility = if (show) View.VISIBLE else View.GONE
|
if (activity is MediaDetailsActivity && isAdded) {
|
||||||
activity.findViewById<AppBarLayout>(R.id.mediaAppBar).visibility = visibility
|
val visibility = if (show) View.VISIBLE else View.GONE
|
||||||
activity.findViewById<ViewPager2>(R.id.mediaViewPager).visibility = visibility
|
activity.findViewById<AppBarLayout>(R.id.mediaAppBar).visibility = visibility
|
||||||
activity.findViewById<CardView>(R.id.mediaCover).visibility = visibility
|
activity.findViewById<ViewPager2>(R.id.mediaViewPager).visibility = visibility
|
||||||
activity.findViewById<CardView>(R.id.mediaClose).visibility = visibility
|
activity.findViewById<CardView>(R.id.mediaCover).visibility = visibility
|
||||||
try {
|
activity.findViewById<CardView>(R.id.mediaClose).visibility = visibility
|
||||||
activity.findViewById<CustomBottomNavBar>(R.id.mediaTab).visibility = visibility
|
try {
|
||||||
} catch (e: ClassCastException) {
|
activity.findViewById<CustomBottomNavBar>(R.id.mediaTab).visibility = visibility
|
||||||
activity.findViewById<NavigationRailView>(R.id.mediaTab).visibility = visibility
|
} catch (e: ClassCastException) {
|
||||||
|
activity.findViewById<NavigationRailView>(R.id.mediaTab).visibility = visibility
|
||||||
|
}
|
||||||
|
activity.findViewById<FrameLayout>(R.id.fragmentExtensionsContainer).visibility =
|
||||||
|
if (show) View.GONE else View.VISIBLE
|
||||||
}
|
}
|
||||||
activity.findViewById<FrameLayout>(R.id.fragmentExtensionsContainer).visibility =
|
|
||||||
if (show) View.GONE else View.VISIBLE
|
|
||||||
}
|
}
|
||||||
val allSettings = pkg.sources.filterIsInstance<ConfigurableSource>()
|
val allSettings = pkg.sources.filterIsInstance<ConfigurableSource>()
|
||||||
if (allSettings.isNotEmpty()) {
|
if (allSettings.isNotEmpty()) {
|
||||||
|
|
|
@ -81,7 +81,8 @@ class MangaReaderActivity : AppCompatActivity() {
|
||||||
|
|
||||||
private var isContVisible = false
|
private var isContVisible = false
|
||||||
private var showProgressDialog = true
|
private var showProgressDialog = true
|
||||||
private var progressDialog: AlertDialog.Builder? = null
|
|
||||||
|
//private var progressDialog: AlertDialog.Builder? = null
|
||||||
private var maxChapterPage = 0L
|
private var maxChapterPage = 0L
|
||||||
private var currentChapterPage = 0L
|
private var currentChapterPage = 0L
|
||||||
|
|
||||||
|
@ -253,23 +254,6 @@ class MangaReaderActivity : AppCompatActivity() {
|
||||||
|
|
||||||
showProgressDialog =
|
showProgressDialog =
|
||||||
if (settings.askIndividual) loadData<Boolean>("${media.id}_progressDialog") != true else false
|
if (settings.askIndividual) loadData<Boolean>("${media.id}_progressDialog") != true else false
|
||||||
progressDialog =
|
|
||||||
if (showProgressDialog && Anilist.userid != null && if (media.isAdult) settings.updateForH else true) {
|
|
||||||
val dialogView = layoutInflater.inflate(R.layout.item_custom_dialog, null)
|
|
||||||
val checkbox = dialogView.findViewById<CheckBox>(R.id.dialog_checkbox)
|
|
||||||
checkbox.text = getString(R.string.dont_ask_again, media.userPreferredName)
|
|
||||||
checkbox.setOnCheckedChangeListener { _, isChecked ->
|
|
||||||
if (isChecked) progressDialog = null
|
|
||||||
saveData("${media.id}_progressDialog", isChecked)
|
|
||||||
showProgressDialog = isChecked
|
|
||||||
}
|
|
||||||
AlertDialog.Builder(this, R.style.MyPopup)
|
|
||||||
.setTitle(getString(R.string.title_update_progress))
|
|
||||||
.setView(dialogView)
|
|
||||||
.apply {
|
|
||||||
setOnCancelListener { hideBars() }
|
|
||||||
}
|
|
||||||
} else null
|
|
||||||
|
|
||||||
//Chapter Change
|
//Chapter Change
|
||||||
fun change(index: Int) {
|
fun change(index: Int) {
|
||||||
|
@ -811,9 +795,20 @@ class MangaReaderActivity : AppCompatActivity() {
|
||||||
|
|
||||||
private fun progress(runnable: Runnable) {
|
private fun progress(runnable: Runnable) {
|
||||||
if (maxChapterPage - currentChapterPage <= 1 && Anilist.userid != null) {
|
if (maxChapterPage - currentChapterPage <= 1 && Anilist.userid != null) {
|
||||||
if (showProgressDialog && progressDialog != null) {
|
if (showProgressDialog) {
|
||||||
progressDialog?.setCancelable(false)
|
val dialogView = layoutInflater.inflate(R.layout.item_custom_dialog, null)
|
||||||
?.setPositiveButton(getString(R.string.yes)) { dialog, _ ->
|
val checkbox = dialogView.findViewById<CheckBox>(R.id.dialog_checkbox)
|
||||||
|
checkbox.text = getString(R.string.dont_ask_again, media.userPreferredName)
|
||||||
|
checkbox.setOnCheckedChangeListener { _, isChecked ->
|
||||||
|
saveData("${media.id}_progressDialog", isChecked)
|
||||||
|
showProgressDialog = !isChecked
|
||||||
|
}
|
||||||
|
|
||||||
|
AlertDialog.Builder(this, R.style.MyPopup)
|
||||||
|
.setTitle(getString(R.string.title_update_progress))
|
||||||
|
.setView(dialogView)
|
||||||
|
.setCancelable(false)
|
||||||
|
.setPositiveButton(getString(R.string.yes)) { dialog, _ ->
|
||||||
saveData("${media.id}_save_progress", true)
|
saveData("${media.id}_save_progress", true)
|
||||||
updateProgress(
|
updateProgress(
|
||||||
media,
|
media,
|
||||||
|
@ -823,12 +818,14 @@ class MangaReaderActivity : AppCompatActivity() {
|
||||||
dialog.dismiss()
|
dialog.dismiss()
|
||||||
runnable.run()
|
runnable.run()
|
||||||
}
|
}
|
||||||
?.setNegativeButton(getString(R.string.no)) { dialog, _ ->
|
.setNegativeButton(getString(R.string.no)) { dialog, _ ->
|
||||||
saveData("${media.id}_save_progress", false)
|
saveData("${media.id}_save_progress", false)
|
||||||
dialog.dismiss()
|
dialog.dismiss()
|
||||||
runnable.run()
|
runnable.run()
|
||||||
}
|
}
|
||||||
progressDialog?.show()
|
.setOnCancelListener { hideBars() }
|
||||||
|
.create()
|
||||||
|
.show()
|
||||||
} else {
|
} else {
|
||||||
if (loadData<Boolean>("${media.id}_save_progress") != false && if (media.isAdult) settings.updateForH else true)
|
if (loadData<Boolean>("${media.id}_save_progress") != false && if (media.isAdult) settings.updateForH else true)
|
||||||
updateProgress(
|
updateProgress(
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
DisabledReports.kt
|
|
|
@ -16,6 +16,7 @@ import ani.dantotsu.logger
|
||||||
import ani.dantotsu.media.anime.AnimeNameAdapter
|
import ani.dantotsu.media.anime.AnimeNameAdapter
|
||||||
import ani.dantotsu.media.manga.ImageData
|
import ani.dantotsu.media.manga.ImageData
|
||||||
import ani.dantotsu.media.manga.MangaCache
|
import ani.dantotsu.media.manga.MangaCache
|
||||||
|
import ani.dantotsu.snackString
|
||||||
import com.google.firebase.crashlytics.FirebaseCrashlytics
|
import com.google.firebase.crashlytics.FirebaseCrashlytics
|
||||||
import eu.kanade.tachiyomi.animesource.AnimeCatalogueSource
|
import eu.kanade.tachiyomi.animesource.AnimeCatalogueSource
|
||||||
import eu.kanade.tachiyomi.animesource.model.AnimesPage
|
import eu.kanade.tachiyomi.animesource.model.AnimesPage
|
||||||
|
@ -327,8 +328,7 @@ class DynamicMangaParser(extension: MangaExtension.Installed) : MangaParser() {
|
||||||
|
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
logger("loadImages Exception: $e")
|
logger("loadImages Exception: $e")
|
||||||
Toast.makeText(currContext(), "Failed to load images: $e", Toast.LENGTH_SHORT)
|
snackString("Failed to load images: $e")
|
||||||
.show()
|
|
||||||
emptyList()
|
emptyList()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,10 +26,16 @@ import ani.dantotsu.startMainActivity
|
||||||
import ani.dantotsu.toast
|
import ani.dantotsu.toast
|
||||||
|
|
||||||
|
|
||||||
class SettingsDialogFragment(val pageType: PageType) : BottomSheetDialogFragment() {
|
class SettingsDialogFragment() : BottomSheetDialogFragment() {
|
||||||
private var _binding: BottomSheetSettingsBinding? = null
|
private var _binding: BottomSheetSettingsBinding? = null
|
||||||
private val binding get() = _binding!!
|
private val binding get() = _binding!!
|
||||||
|
|
||||||
|
private lateinit var pageType: PageType
|
||||||
|
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
pageType = arguments?.getSerializable("pageType") as? PageType ?: PageType.HOME
|
||||||
|
}
|
||||||
override fun onCreateView(
|
override fun onCreateView(
|
||||||
inflater: LayoutInflater,
|
inflater: LayoutInflater,
|
||||||
container: ViewGroup?,
|
container: ViewGroup?,
|
||||||
|
@ -136,5 +142,13 @@ class SettingsDialogFragment(val pageType: PageType) : BottomSheetDialogFragment
|
||||||
enum class PageType {
|
enum class PageType {
|
||||||
MANGA, ANIME, HOME
|
MANGA, ANIME, HOME
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun newInstance(pageType: PageType): SettingsDialogFragment {
|
||||||
|
val fragment = SettingsDialogFragment()
|
||||||
|
val args = Bundle()
|
||||||
|
args.putSerializable("pageType", pageType)
|
||||||
|
fragment.arguments = args
|
||||||
|
return fragment
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -22,7 +22,7 @@
|
||||||
android:id="@+id/mangaReaderRecyclerContainer"
|
android:id="@+id/mangaReaderRecyclerContainer"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
app:gest_doubleTapZoom="2"
|
app:gest_doubleTapZoom="1.5"
|
||||||
app:gest_maxZoom="6"
|
app:gest_maxZoom="6"
|
||||||
app:gest_restrictRotation="true"
|
app:gest_restrictRotation="true"
|
||||||
app:gest_rotationEnabled="true">
|
app:gest_rotationEnabled="true">
|
||||||
|
|
|
@ -46,8 +46,8 @@
|
||||||
<item name="android:layout_marginRight">16dp</item>
|
<item name="android:layout_marginRight">16dp</item>
|
||||||
<item name="android:background">@drawable/round_corner</item>
|
<item name="android:background">@drawable/round_corner</item>
|
||||||
</style>
|
</style>
|
||||||
<string name="MySnackBarText" parent="Widget.MaterialComponents.Snackbar.TextView">
|
<string name="MySnackBarText" parent="Widget.MaterialComponents.Snackbar.TextView" translatable="false">
|
||||||
<item name="android:textColor">?attr/colorOnBackground</item>
|
<item name="android:textColor">@color/bg_opp</item>
|
||||||
</string>
|
</string>
|
||||||
|
|
||||||
<style name="fontTooltip" parent="Widget.Material3.Tooltip">
|
<style name="fontTooltip" parent="Widget.Material3.Tooltip">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue