mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
another change
This commit is contained in:
parent
3d266e6226
commit
7514a9e9d0
1 changed files with 9 additions and 10 deletions
|
@ -267,8 +267,8 @@ object PluginManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
main {
|
main {
|
||||||
val uitext = UiText.StringResource(R.string.plugins_updated, updatedPlugins)
|
val uitext = txt(R.string.plugins_updated, updatedPlugins.size)
|
||||||
createNotification(activity, uitext)
|
createNotification(activity, uitext, updatedPlugins)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ioSafe {
|
// ioSafe {
|
||||||
|
@ -348,8 +348,8 @@ object PluginManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
main {
|
main {
|
||||||
val uitext = UiText.StringResource(R.string.plugins_downloaded, newDownloadPlugins)
|
val uitext = txt(R.string.plugins_downloaded, newDownloadPlugins.size)
|
||||||
createNotification(activity, uitext)
|
createNotification(activity, uitext, newDownloadPlugins)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ioSafe {
|
// ioSafe {
|
||||||
|
@ -611,15 +611,14 @@ object PluginManager {
|
||||||
|
|
||||||
private fun createNotification(
|
private fun createNotification(
|
||||||
context: Context,
|
context: Context,
|
||||||
uitext: UiText.StringResource
|
uitext: UiText,
|
||||||
|
extensions: List<String>
|
||||||
): Notification? {
|
): Notification? {
|
||||||
try {
|
try {
|
||||||
val extensionNames = uitext.args.filterIsInstance<String>()
|
|
||||||
val resIdFormat = uitext.resId
|
|
||||||
|
|
||||||
if (extensionNames.isEmpty()) return null
|
if (extensions.isEmpty()) return null
|
||||||
|
|
||||||
val content = extensionNames.joinToString(", ")
|
val content = extensions.joinToString(", ")
|
||||||
// main { // DON'T WANT TO SLOW IT DOWN
|
// main { // DON'T WANT TO SLOW IT DOWN
|
||||||
val builder = NotificationCompat.Builder(context, EXTENSIONS_CHANNEL_ID)
|
val builder = NotificationCompat.Builder(context, EXTENSIONS_CHANNEL_ID)
|
||||||
.setAutoCancel(false)
|
.setAutoCancel(false)
|
||||||
|
@ -628,7 +627,7 @@ object PluginManager {
|
||||||
.setSilent(true)
|
.setSilent(true)
|
||||||
.setPriority(NotificationCompat.PRIORITY_LOW)
|
.setPriority(NotificationCompat.PRIORITY_LOW)
|
||||||
.setColor(context.colorFromAttribute(R.attr.colorPrimary))
|
.setColor(context.colorFromAttribute(R.attr.colorPrimary))
|
||||||
.setContentTitle(txt(resIdFormat, extensionNames.size).asString(context))
|
.setContentTitle(uitext.asString(context))
|
||||||
//.setContentTitle(context.getString(title, extensionNames.size))
|
//.setContentTitle(context.getString(title, extensionNames.size))
|
||||||
.setSmallIcon(R.drawable.ic_baseline_extension_24)
|
.setSmallIcon(R.drawable.ic_baseline_extension_24)
|
||||||
.setStyle(
|
.setStyle(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue