mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-10 12:47:26 +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.jakewharton.rxrelay.BehaviorRelay
|
||||
import com.jakewharton.rxrelay.PublishRelay
|
||||
import eu.kanade.tachiyomi.BuildConfig
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.data.cache.ChapterCache
|
||||
import eu.kanade.tachiyomi.data.database.models.Chapter
|
||||
@ -278,7 +279,8 @@ class Downloader(
|
||||
.groupBy { it.source }
|
||||
.filterKeys { it !is UnmeteredSource }
|
||||
.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 {
|
||||
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.widget.Toast
|
||||
import androidx.core.content.ContextCompat
|
||||
import eu.kanade.tachiyomi.BuildConfig
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.data.cache.CoverCache
|
||||
import eu.kanade.tachiyomi.data.database.DatabaseHelper
|
||||
@ -270,7 +271,8 @@ class LibraryUpdateService(
|
||||
.groupBy { it.source }
|
||||
.filterKeys { sourceManager.get(it) !is UnmeteredSource }
|
||||
.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)
|
||||
}
|
||||
}
|
||||
|
@ -126,5 +126,4 @@ private data class ExtensionSourceJsonObject(
|
||||
val name: String,
|
||||
val id: Long,
|
||||
val baseUrl: String,
|
||||
|
||||
)
|
||||
|
@ -68,7 +68,8 @@ abstract class SearchableNucleusController<VB : ViewBinding, P : BasePresenter<*
|
||||
editable.getSpans(0, editable.length, CharacterStyle::class.java)
|
||||
.forEach { editable.removeSpan(it) }
|
||||
}
|
||||
},)
|
||||
},
|
||||
)
|
||||
|
||||
searchView.queryTextEvents()
|
||||
.onEach {
|
||||
|
@ -363,7 +363,8 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>() {
|
||||
override fun onStopTrackingTouch(slider: Slider) {
|
||||
isScrollingThroughPages = false
|
||||
}
|
||||
},)
|
||||
},
|
||||
)
|
||||
binding.pageSlider.addOnChangeListener { slider, value, fromUser ->
|
||||
if (viewer != null && fromUser) {
|
||||
isScrollingThroughPages = true
|
||||
|
@ -54,7 +54,8 @@ class ReaderSettingsSheet(
|
||||
activity.setMenuVisibility(!isFilterTab)
|
||||
}
|
||||
}
|
||||
},)
|
||||
},
|
||||
)
|
||||
|
||||
if (showColorFilterSettings) {
|
||||
binding.tabs.getTabAt(filterTabIndex)?.select()
|
||||
|
@ -120,7 +120,8 @@ class TachiyomiBottomNavigationView @JvmOverloads constructor(
|
||||
currentAnimator = null
|
||||
postInvalidate()
|
||||
}
|
||||
},)
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
internal class SavedState : AbsSavedState {
|
||||
|
@ -42,7 +42,8 @@ class ThemesPreference @JvmOverloads constructor(context: Context, attrs: Attrib
|
||||
super.onScrolled(recyclerView, dx, dy)
|
||||
lastScrollPosition = recyclerView.computeHorizontalScrollOffset()
|
||||
}
|
||||
},)
|
||||
},
|
||||
)
|
||||
lastScrollPosition?.let { scrollToOffset(it) }
|
||||
}
|
||||
|
||||
|
@ -49,6 +49,7 @@ class BottomSheetViewPager @JvmOverloads constructor(
|
||||
override fun onPageSelected(position: Int) {
|
||||
requestLayout()
|
||||
}
|
||||
},)
|
||||
},
|
||||
)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user