Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove configuration of notification channel for badges #205

Merged
merged 1 commit into from
Jul 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import android.os.Build
import androidx.annotation.RequiresApi
import androidx.core.app.NotificationCompat
import androidx.core.app.NotificationManagerCompat
import com.infomaniak.lib.core.R

abstract class NotificationUtilsCore {

Expand Down Expand Up @@ -68,7 +67,7 @@ abstract class NotificationUtilsCore {
}

@RequiresApi(Build.VERSION_CODES.O)
protected fun Context.buildNotificationChannel(
protected fun buildNotificationChannel(
channelId: String,
name: String,
importance: Int,
Expand All @@ -78,18 +77,6 @@ abstract class NotificationUtilsCore {
return NotificationChannel(channelId, name, importance).apply {
description?.let { this.description = it }
groupId?.let { group = it }
when (importance) {
NotificationManager.IMPORTANCE_HIGH -> {
enableLights(true)
setShowBadge(true)
lightColor = getColor(R.color.primary)
}
else -> {
enableLights(false)
setShowBadge(false)
enableVibration(false)
}
}
}
}

Expand Down
Loading