Skip to content

Commit 5f140d4

Browse files
committed
Omit (Unit)
1 parent c54884d commit 5f140d4

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/core/notifications/NotificationPollingService.kt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ object NotificationState : PersistentStateComponent<NotificationState.State> {
5454

5555
@Service(Service.Level.APP)
5656
class NotificationPollingService : Disposable {
57-
private val observers = mutableListOf<(Unit) -> Unit>()
57+
private val observers = mutableListOf<() -> Unit>()
5858
private val alarm = AlarmFactory.getInstance().create(Alarm.ThreadToUse.POOLED_THREAD, this)
5959
private val pollingIntervalMs = Duration.ofMinutes(10).toMillis()
6060
private val resourceResolver: RemoteResourceResolverProvider = DefaultRemoteResourceResolverProvider()
@@ -130,13 +130,11 @@ class NotificationPollingService : Disposable {
130130
)
131131
}
132132

133-
fun addObserver(observer: (Unit) -> Unit) {
134-
observers.add(observer)
135-
}
133+
fun addObserver(observer: () -> Unit) = observers.add(observer)
136134

137135
private fun notifyObservers() {
138136
observers.forEach { observer ->
139-
observer(Unit)
137+
observer()
140138
}
141139
}
142140

0 commit comments

Comments
 (0)