Allow pausing downloads from progress notification (#1637)

This commit is contained in:
FlaminSarge
2018-10-27 10:01:56 -07:00
committed by inorichi
parent d44cd16682
commit 974891a085
2 changed files with 27 additions and 2 deletions
@@ -37,7 +37,7 @@ internal class DownloadNotifier(private val context: Context) {
*/
var initialQueueSize = 0
set(value) {
if (value != 0){
if (value != 0) {
isSingleChapter = (value == 1)
}
field = value
@@ -99,6 +99,10 @@ internal class DownloadNotifier(private val context: Context) {
// Open download manager when clicked
setContentIntent(NotificationHandler.openDownloadManagerPendingActivity(context))
isDownloading = true
// Pause action
addAction(R.drawable.ic_av_pause_grey_24dp_img,
context.getString(R.string.action_pause),
NotificationReceiver.pauseDownloadsPendingBroadcast(context))
}
val title = download.manga.title.chop(15)