|
|
|
@ -101,8 +101,13 @@ class DownloadNotificationFactory @AssistedInject constructor(
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
suspend fun create(state: DownloadState?): Notification = mutex.withLock {
|
|
|
|
suspend fun create(state: DownloadState?): Notification = mutex.withLock {
|
|
|
|
builder.setContentTitle(state?.manga?.title ?: context.getString(R.string.preparing_))
|
|
|
|
if (state == null) {
|
|
|
|
builder.setContentText(context.getString(R.string.manga_downloading_))
|
|
|
|
builder.setContentTitle(context.getString(R.string.manga_downloading_))
|
|
|
|
|
|
|
|
builder.setContentText(context.getString(R.string.preparing_))
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
builder.setContentTitle(state.manga.title)
|
|
|
|
|
|
|
|
builder.setContentText(context.getString(R.string.manga_downloading_))
|
|
|
|
|
|
|
|
}
|
|
|
|
builder.setProgress(1, 0, true)
|
|
|
|
builder.setProgress(1, 0, true)
|
|
|
|
builder.setSmallIcon(android.R.drawable.stat_sys_download)
|
|
|
|
builder.setSmallIcon(android.R.drawable.stat_sys_download)
|
|
|
|
builder.setContentIntent(queueIntent)
|
|
|
|
builder.setContentIntent(queueIntent)
|
|
|
|
|