mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
Small fixes to Intents and Subscriptions
This commit is contained in:
parent
d6df24eff2
commit
ab324b93e8
2 changed files with 19 additions and 9 deletions
|
@ -319,7 +319,11 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener {
|
||||||
} else if (safeURI(str)?.scheme == appStringSearch) {
|
} else if (safeURI(str)?.scheme == appStringSearch) {
|
||||||
nextSearchQuery =
|
nextSearchQuery =
|
||||||
URLDecoder.decode(str.substringAfter("$appStringSearch://"), "UTF-8")
|
URLDecoder.decode(str.substringAfter("$appStringSearch://"), "UTF-8")
|
||||||
nav_view.selectedItemId = R.id.navigation_search
|
|
||||||
|
// Use both navigation views to support both layouts.
|
||||||
|
// It might be better to use the QuickSearch.
|
||||||
|
nav_view?.selectedItemId = R.id.navigation_search
|
||||||
|
nav_rail_view?.selectedItemId = R.id.navigation_search
|
||||||
} else if (safeURI(str)?.scheme == appStringResumeWatching) {
|
} else if (safeURI(str)?.scheme == appStringResumeWatching) {
|
||||||
val id =
|
val id =
|
||||||
str.substringAfter("$appStringResumeWatching://").toIntOrNull()
|
str.substringAfter("$appStringResumeWatching://").toIntOrNull()
|
||||||
|
|
|
@ -105,14 +105,12 @@ class SubscriptionWorkManager(val context: Context, workerParams: WorkerParamete
|
||||||
SUBSCRIPTION_CHANNEL_DESCRIPTION
|
SUBSCRIPTION_CHANNEL_DESCRIPTION
|
||||||
)
|
)
|
||||||
|
|
||||||
safeApiCall {
|
|
||||||
setForeground(
|
setForeground(
|
||||||
ForegroundInfo(
|
ForegroundInfo(
|
||||||
SUBSCRIPTION_NOTIFICATION_ID,
|
SUBSCRIPTION_NOTIFICATION_ID,
|
||||||
progressNotificationBuilder.build()
|
progressNotificationBuilder.build()
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
|
||||||
|
|
||||||
val subscriptions = getAllSubscriptions()
|
val subscriptions = getAllSubscriptions()
|
||||||
|
|
||||||
|
@ -196,7 +194,15 @@ class SubscriptionWorkManager(val context: Context, workerParams: WorkerParamete
|
||||||
PendingIntent.getActivity(context, 0, intent, 0)
|
PendingIntent.getActivity(context, 0, intent, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
val poster = ioWork { savedData.posterUrl?.let { url -> context.getImageBitmapFromUrl(url, savedData.posterHeaders) } }
|
val poster = ioWork {
|
||||||
|
savedData.posterUrl?.let { url ->
|
||||||
|
context.getImageBitmapFromUrl(
|
||||||
|
url,
|
||||||
|
savedData.posterHeaders
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
val updateNotification =
|
val updateNotification =
|
||||||
updateNotificationBuilder.setContentTitle(updateHeader)
|
updateNotificationBuilder.setContentTitle(updateHeader)
|
||||||
.setContentText(updateDescription)
|
.setContentText(updateDescription)
|
||||||
|
|
Loading…
Reference in a new issue