Merge remote-tracking branch 'csupdate/master'

This commit is contained in:
Stormunblessed 2023-03-02 23:55:54 -06:00
commit 39f70d9a23
No known key found for this signature in database
GPG key ID: CE92471F93C0CAB4
2 changed files with 19 additions and 9 deletions

View file

@ -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()

View file

@ -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)