Skip to content

Commit

Permalink
fix: update spinner
Browse files Browse the repository at this point in the history
  • Loading branch information
rebelonion committed Apr 21, 2024
1 parent 233f4bf commit 6113a10
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 5 deletions.
1 change: 0 additions & 1 deletion app/src/main/java/ani/dantotsu/addons/AddonDownloader.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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) {} },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ internal class AddonInstallReceiver : BroadcastReceiver() {
}

Intent.ACTION_PACKAGE_REPLACED -> {
if (ExtensionInstallReceiver.isReplacing(intent)) return
launchNow {
when (type) {
AddonType.DOWNLOAD -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ class CommentsFragment : Fragment() {
}
}
} else {
toast("Not logged in")
activity.binding.commentMessageContainer.visibility = View.GONE
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/item_search_header.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>

0 comments on commit 6113a10

Please sign in to comment.