mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-07 11:17:25 +01:00
Gate update/download warnings to non-stable flavors
This commit is contained in:
parent
445ee274c5
commit
4ecde9fc39
@ -6,6 +6,7 @@ import android.widget.Toast
|
|||||||
import com.hippo.unifile.UniFile
|
import com.hippo.unifile.UniFile
|
||||||
import com.jakewharton.rxrelay.BehaviorRelay
|
import com.jakewharton.rxrelay.BehaviorRelay
|
||||||
import com.jakewharton.rxrelay.PublishRelay
|
import com.jakewharton.rxrelay.PublishRelay
|
||||||
|
import eu.kanade.tachiyomi.BuildConfig
|
||||||
import eu.kanade.tachiyomi.R
|
import eu.kanade.tachiyomi.R
|
||||||
import eu.kanade.tachiyomi.data.cache.ChapterCache
|
import eu.kanade.tachiyomi.data.cache.ChapterCache
|
||||||
import eu.kanade.tachiyomi.data.database.models.Chapter
|
import eu.kanade.tachiyomi.data.database.models.Chapter
|
||||||
@ -278,7 +279,8 @@ class Downloader(
|
|||||||
.groupBy { it.source }
|
.groupBy { it.source }
|
||||||
.filterKeys { it !is UnmeteredSource }
|
.filterKeys { it !is UnmeteredSource }
|
||||||
.maxOf { it.value.size }
|
.maxOf { it.value.size }
|
||||||
if (maxDownloadsFromSource > CHAPTERS_PER_SOURCE_QUEUE_WARNING_THRESHOLD) {
|
// TODO: show warnings in stable
|
||||||
|
if (maxDownloadsFromSource > CHAPTERS_PER_SOURCE_QUEUE_WARNING_THRESHOLD && BuildConfig.FLAVOR != "stable") {
|
||||||
withUIContext {
|
withUIContext {
|
||||||
context.toast(R.string.download_queue_size_warning, Toast.LENGTH_LONG)
|
context.toast(R.string.download_queue_size_warning, Toast.LENGTH_LONG)
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@ import android.os.IBinder
|
|||||||
import android.os.PowerManager
|
import android.os.PowerManager
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
|
import eu.kanade.tachiyomi.BuildConfig
|
||||||
import eu.kanade.tachiyomi.R
|
import eu.kanade.tachiyomi.R
|
||||||
import eu.kanade.tachiyomi.data.cache.CoverCache
|
import eu.kanade.tachiyomi.data.cache.CoverCache
|
||||||
import eu.kanade.tachiyomi.data.database.DatabaseHelper
|
import eu.kanade.tachiyomi.data.database.DatabaseHelper
|
||||||
@ -270,7 +271,8 @@ class LibraryUpdateService(
|
|||||||
.groupBy { it.source }
|
.groupBy { it.source }
|
||||||
.filterKeys { sourceManager.get(it) !is UnmeteredSource }
|
.filterKeys { sourceManager.get(it) !is UnmeteredSource }
|
||||||
.maxOfOrNull { it.value.size } ?: 0
|
.maxOfOrNull { it.value.size } ?: 0
|
||||||
if (maxUpdatesFromSource > MANGA_PER_SOURCE_QUEUE_WARNING_THRESHOLD) {
|
// TODO: show warnings in stable
|
||||||
|
if (maxUpdatesFromSource > MANGA_PER_SOURCE_QUEUE_WARNING_THRESHOLD && BuildConfig.FLAVOR != "stable") {
|
||||||
toast(R.string.notification_size_warning, Toast.LENGTH_LONG)
|
toast(R.string.notification_size_warning, Toast.LENGTH_LONG)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -126,5 +126,4 @@ private data class ExtensionSourceJsonObject(
|
|||||||
val name: String,
|
val name: String,
|
||||||
val id: Long,
|
val id: Long,
|
||||||
val baseUrl: String,
|
val baseUrl: String,
|
||||||
|
|
||||||
)
|
)
|
||||||
|
@ -68,7 +68,8 @@ abstract class SearchableNucleusController<VB : ViewBinding, P : BasePresenter<*
|
|||||||
editable.getSpans(0, editable.length, CharacterStyle::class.java)
|
editable.getSpans(0, editable.length, CharacterStyle::class.java)
|
||||||
.forEach { editable.removeSpan(it) }
|
.forEach { editable.removeSpan(it) }
|
||||||
}
|
}
|
||||||
},)
|
},
|
||||||
|
)
|
||||||
|
|
||||||
searchView.queryTextEvents()
|
searchView.queryTextEvents()
|
||||||
.onEach {
|
.onEach {
|
||||||
|
@ -363,7 +363,8 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>() {
|
|||||||
override fun onStopTrackingTouch(slider: Slider) {
|
override fun onStopTrackingTouch(slider: Slider) {
|
||||||
isScrollingThroughPages = false
|
isScrollingThroughPages = false
|
||||||
}
|
}
|
||||||
},)
|
},
|
||||||
|
)
|
||||||
binding.pageSlider.addOnChangeListener { slider, value, fromUser ->
|
binding.pageSlider.addOnChangeListener { slider, value, fromUser ->
|
||||||
if (viewer != null && fromUser) {
|
if (viewer != null && fromUser) {
|
||||||
isScrollingThroughPages = true
|
isScrollingThroughPages = true
|
||||||
|
@ -54,7 +54,8 @@ class ReaderSettingsSheet(
|
|||||||
activity.setMenuVisibility(!isFilterTab)
|
activity.setMenuVisibility(!isFilterTab)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},)
|
},
|
||||||
|
)
|
||||||
|
|
||||||
if (showColorFilterSettings) {
|
if (showColorFilterSettings) {
|
||||||
binding.tabs.getTabAt(filterTabIndex)?.select()
|
binding.tabs.getTabAt(filterTabIndex)?.select()
|
||||||
|
@ -120,7 +120,8 @@ class TachiyomiBottomNavigationView @JvmOverloads constructor(
|
|||||||
currentAnimator = null
|
currentAnimator = null
|
||||||
postInvalidate()
|
postInvalidate()
|
||||||
}
|
}
|
||||||
},)
|
},
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
internal class SavedState : AbsSavedState {
|
internal class SavedState : AbsSavedState {
|
||||||
|
@ -42,7 +42,8 @@ class ThemesPreference @JvmOverloads constructor(context: Context, attrs: Attrib
|
|||||||
super.onScrolled(recyclerView, dx, dy)
|
super.onScrolled(recyclerView, dx, dy)
|
||||||
lastScrollPosition = recyclerView.computeHorizontalScrollOffset()
|
lastScrollPosition = recyclerView.computeHorizontalScrollOffset()
|
||||||
}
|
}
|
||||||
},)
|
},
|
||||||
|
)
|
||||||
lastScrollPosition?.let { scrollToOffset(it) }
|
lastScrollPosition?.let { scrollToOffset(it) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,6 +49,7 @@ class BottomSheetViewPager @JvmOverloads constructor(
|
|||||||
override fun onPageSelected(position: Int) {
|
override fun onPageSelected(position: Int) {
|
||||||
requestLayout()
|
requestLayout()
|
||||||
}
|
}
|
||||||
},)
|
},
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user