fixed downloading galleris with long title, [wip] transfer data

This commit is contained in:
tom5079
2024-04-17 23:25:36 -07:00
parent b0e194898e
commit 68ec919ae4
11 changed files with 209 additions and 38 deletions

View File

@@ -343,7 +343,7 @@ class DownloadService : Service() {
return@launch
}
notification[galleryID]?.setContentTitle(galleryInfo.title?.ellipsize(30))
notification[galleryID]?.setContentTitle(galleryInfo.title.ellipsize(32))
notify(galleryID)
val queued = mutableSetOf<Int>()
@@ -408,7 +408,7 @@ class DownloadService : Service() {
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.TIRAMISU) {
startForeground(R.id.downloader_notification_id, serviceNotification.build())
} else {
startForeground(R.id.downloader_notification_id, serviceNotification.build(), ServiceInfo.FOREGROUND_SERVICE_TYPE_SPECIAL_USE)
startForeground(R.id.downloader_notification_id, serviceNotification.build(), ServiceInfo.FOREGROUND_SERVICE_TYPE_DATA_SYNC)
}
when (intent?.getStringExtra(KEY_COMMAND)) {
@@ -433,7 +433,7 @@ class DownloadService : Service() {
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.TIRAMISU) {
startForeground(R.id.downloader_notification_id, serviceNotification.build())
} else {
startForeground(R.id.downloader_notification_id, serviceNotification.build(), ServiceInfo.FOREGROUND_SERVICE_TYPE_SPECIAL_USE)
startForeground(R.id.downloader_notification_id, serviceNotification.build(), ServiceInfo.FOREGROUND_SERVICE_TYPE_DATA_SYNC)
}
interceptors[Tag::class] = interceptor
}