testing leaks

This commit is contained in:
LagradOst 2023-07-16 02:25:36 +02:00
parent a2a4da5a29
commit afadf121f4
4 changed files with 6 additions and 2 deletions

View file

@ -209,7 +209,7 @@ dependencies {
implementation("com.github.discord:OverlappingPanels:0.1.3")
// debugImplementation because LeakCanary should only run in debug builds.
// debugImplementation("com.squareup.leakcanary:leakcanary-android:2.7")
//debugImplementation("com.squareup.leakcanary:leakcanary-android:2.12")
// for shimmer when loading
implementation("com.facebook.shimmer:shimmer:0.5.0")

View file

@ -1122,7 +1122,7 @@ interface LoadResponse {
var isTrailersEnabled = true
fun LoadResponse.isMovie(): Boolean {
return this.type.isMovieType()
return this.type.isMovieType() || this is MovieLoadResponse
}
@JvmName("addActorNames")

View file

@ -165,6 +165,8 @@ class SettingsFragment : Fragment() {
activity?.navigate(id, Bundle())
}
// used to debug leaks showToast(activity,"${VideoDownloadManager.downloadStatusEvent.size} : ${VideoDownloadManager.downloadProgressEvent.size}")
val isTrueTv = isTrueTvSettings()
for (syncApi in accountManagers) {

View file

@ -3,6 +3,8 @@ package com.lagradost.cloudstream3.utils
class Event<T> {
private val observers = mutableSetOf<(T) -> Unit>()
val size : Int get() = observers.size
operator fun plusAssign(observer: (T) -> Unit) {
observers.add(observer)
}