fix: update spinner

This commit is contained in:
rebelonion 2024-04-21 06:21:10 -05:00
parent 233f4bfb48
commit 6113a10556
6 changed files with 15 additions and 5 deletions

View file

@ -79,7 +79,6 @@ class AddonDownloader {
activity.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
val installerSteps = InstallerSteps(notificationManager, activity)
manager.install(this)
.observeOn(AndroidSchedulers.mainThread())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(
{ installStep -> installerSteps.onInstallStep(installStep) {} },

View file

@ -75,7 +75,6 @@ internal class AddonInstallReceiver : BroadcastReceiver() {
}
Intent.ACTION_PACKAGE_REPLACED -> {
if (ExtensionInstallReceiver.isReplacing(intent)) return
launchNow {
when (type) {
AddonType.DOWNLOAD -> {

View file

@ -121,7 +121,6 @@ class CommentsFragment : Fragment() {
}
}
} else {
toast("Not logged in")
activity.binding.commentMessageContainer.visibility = View.GONE
}

View file

@ -10,7 +10,9 @@ import android.content.pm.PackageInstaller
import android.os.Build
import androidx.core.content.ContextCompat
import androidx.core.content.IntentSanitizer
import ani.dantotsu.R
import ani.dantotsu.snackString
import ani.dantotsu.toast
import ani.dantotsu.util.Logger
import eu.kanade.tachiyomi.extension.InstallStep
import eu.kanade.tachiyomi.util.lang.use
@ -55,7 +57,16 @@ class PackageInstallerInstaller(private val service: Service) : Installer(servic
}
PackageInstaller.STATUS_SUCCESS -> continueQueue(InstallStep.Installed)
else -> continueQueue(InstallStep.Error)
PackageInstaller.STATUS_FAILURE_CONFLICT -> {
Logger.log("Failed to install extension due to conflict")
toast(context.getString(R.string.failed_ext_install_conflict))
continueQueue(InstallStep.Error)
}
else -> {
Logger.log("Fatal error for $intent")
Logger.log("Status: ${intent.getIntExtra(PackageInstaller.EXTRA_STATUS, -1)}")
continueQueue(InstallStep.Error)
}
}
}
}

View file

@ -111,7 +111,7 @@
android:layout_gravity="center"
android:drawablePadding="4dp"
android:fontFamily="@font/poppins_bold"
android:text="Image"
android:text="@string/image"
android:textColor="?attr/colorPrimary"
app:drawableStartCompat="@drawable/ic_round_search_24"
app:drawableTint="?attr/colorPrimary" />

View file

@ -956,4 +956,6 @@ Non quae tempore quo provident laudantium qui illo dolor vel quia dolor et exerc
<string name="update_addon">Update Addon</string>
<string name="install_addon">Install Addon</string>
<string name="download_addon_not_found">Download addon not found</string>
<string name="image">Image</string>
<string name="failed_ext_install_conflict">Failed to install extension due to conflict</string>
</resources>