mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-28 07:50:31 +05:30
Merge pull request #2743 from Bnyro/master
Remove some unused constants
This commit is contained in:
commit
7f30bf7a7d
@ -41,10 +41,7 @@ const val FALLBACK_INSTANCES_URL = "https://instances.tokhmi.xyz"
|
||||
* Notification IDs
|
||||
*/
|
||||
const val PLAYER_NOTIFICATION_ID = 1
|
||||
const val DOWNLOAD_PENDING_NOTIFICATION_ID = 2
|
||||
const val DOWNLOAD_FAILURE_NOTIFICATION_ID = 3
|
||||
const val DOWNLOAD_SUCCESS_NOTIFICATION_ID = 4
|
||||
const val DOWNLOAD_PROGRESS_NOTIFICATION_ID = 5
|
||||
const val DOWNLOAD_PROGRESS_NOTIFICATION_ID = 2
|
||||
|
||||
/**
|
||||
* Notification Channel IDs
|
||||
|
@ -12,6 +12,7 @@ import androidx.work.Worker
|
||||
import androidx.work.WorkerParameters
|
||||
import com.github.libretube.R
|
||||
import com.github.libretube.api.SubscriptionHelper
|
||||
import com.github.libretube.constants.DOWNLOAD_PROGRESS_NOTIFICATION_ID
|
||||
import com.github.libretube.constants.IntentData
|
||||
import com.github.libretube.constants.PUSH_CHANNEL_ID
|
||||
import com.github.libretube.constants.PreferenceKeys
|
||||
@ -35,9 +36,9 @@ class NotificationWorker(appContext: Context, parameters: WorkerParameters) :
|
||||
// the id where notification channels start
|
||||
private var notificationId = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
val nManager = appContext.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
|
||||
nManager.activeNotifications.size + 5
|
||||
nManager.activeNotifications.size + DOWNLOAD_PROGRESS_NOTIFICATION_ID
|
||||
} else {
|
||||
5
|
||||
DOWNLOAD_PROGRESS_NOTIFICATION_ID
|
||||
}
|
||||
|
||||
override fun doWork(): Result {
|
||||
|
Loading…
x
Reference in New Issue
Block a user