修复一些bug

This commit is contained in:
ocean 2024-07-18 18:19:02 +08:00
parent 3328827ab6
commit 1d38c635dd
4 changed files with 63 additions and 42 deletions

View File

@ -45,3 +45,7 @@
-keep class * extends com.google.gson.TypeAdapter {
*;
}
-keep class org.chromium.** { *; }
-keep class androidx.media3.datasource.cronet.** { *; }
-keep class androidx.media3.exoplayer.scheduler.PlatformScheduler$PlatformSchedulerService { *; }

View File

@ -124,6 +124,10 @@
</intent-filter>
</service>
<service
android:name="androidx.media3.exoplayer.scheduler.PlatformScheduler$PlatformSchedulerService"
android:exported="true"
android:permission="android.permission.BIND_JOB_SERVICE" />
</application>
</manifest>

View File

@ -92,10 +92,17 @@ class MoSingerDetailsActivity : MoBaseActivity() {
showLoadingUi()
Innertube.moSingerListPage(browseId)
?.onSuccess {
if (isFinishing || isDestroyed) {
return
}
showDataUi()
try {
Glide.with(this)
.load(it.thumbnail)
.into(binding.singerImg)
} catch (e: Exception) {
e.printStackTrace()
}
binding.singerName.text = it.title
if (it.description.isNullOrEmpty()) {
binding.singerDesc.visibility = View.GONE
@ -144,4 +151,9 @@ class MoSingerDetailsActivity : MoBaseActivity() {
binding.loadingLayout.visibility = View.GONE
binding.noContentLayout.visibility = View.VISIBLE
}
override fun onDestroy() {
super.onDestroy()
Glide.with(this).clear(binding.singerImg)
}
}

View File

@ -194,6 +194,7 @@ class SearchFragment : MoBaseFragment<FragmentSearchBinding>(), TextWatcher,
}
is Request.SearchData -> {
if (isAdded) {
val input = it.input
if (input.isNotEmpty()) {
AnalysisUtil.logEvent(AnalysisUtil.SEARCH_TRIGGER)
@ -237,7 +238,6 @@ class SearchFragment : MoBaseFragment<FragmentSearchBinding>(), TextWatcher,
}?.onFailure {
showNoContentLayout()
}
LolAdWrapper.shared.loadAdIfNotCached(
requireActivity(), AdPlacement.INST_SEARCH
)
@ -245,6 +245,7 @@ class SearchFragment : MoBaseFragment<FragmentSearchBinding>(), TextWatcher,
}
}
}
}
events.onReceive {
when (it) {
Event.FragmentOnResume -> {