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

refactor: convert ForegroundNotificationDetailsProvider to fun interface #3070

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
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
9 changes: 1 addition & 8 deletions android/src/main/kotlin/com/wire/kalium/KaliumApplication.kt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import com.wire.kalium.logger.KaliumLogLevel
import com.wire.kalium.logic.CoreLogger
import com.wire.kalium.logic.CoreLogic
import com.wire.kalium.logic.featureFlags.KaliumConfigs
import com.wire.kalium.logic.sync.ForegroundNotificationDetailsProvider
import com.wire.kalium.logic.sync.WrapperWorkerFactory
import java.io.File

Expand All @@ -50,13 +49,7 @@ class KaliumApplication : Application(), Configuration.Provider {

override val workManagerConfiguration: Configuration
get() {
val myWorkerFactory = WrapperWorkerFactory(
coreLogic,
object : ForegroundNotificationDetailsProvider {
override fun getSmallIconResId(): Int = R.drawable.ic_launcher_foreground
}
)

val myWorkerFactory = WrapperWorkerFactory(coreLogic) { R.drawable.ic_launcher_foreground }
return Configuration.Builder()
.setWorkerFactory(myWorkerFactory)
.build()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import androidx.annotation.DrawableRes
* Provide resources that will be displayed when Kalium
* needs to display a Foreground notification due to some work being done.
*/
interface ForegroundNotificationDetailsProvider {
fun interface ForegroundNotificationDetailsProvider {
@DrawableRes
fun getSmallIconResId(): Int
}
Loading