mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2024-11-24 19:04:38 -06:00
[Sync] Fix doubled and dead notifications during sync.
This commit is contained in:
parent
97e0d04842
commit
67d4d0f898
@ -301,7 +301,7 @@ class ApiService : Service() {
|
||||
|
||||
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
||||
d(TAG, "Foreground service onStartCommand")
|
||||
startForeground(EdziennikNotification.NOTIFICATION_ID, notification.notification)
|
||||
startForeground(app.notifications.syncId, notification.notification)
|
||||
return START_NOT_STICKY
|
||||
}
|
||||
|
||||
|
@ -17,10 +17,6 @@ import kotlin.math.roundToInt
|
||||
|
||||
|
||||
class EdziennikNotification(val app: App) {
|
||||
companion object {
|
||||
const val NOTIFICATION_ID = 20191001
|
||||
}
|
||||
|
||||
private val notificationManager by lazy { app.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager }
|
||||
|
||||
private val notificationBuilder: NotificationCompat.Builder by lazy {
|
||||
|
Loading…
Reference in New Issue
Block a user