Skip to content

Commit 2a96250

Browse files
committed
remove attribute tags, unnecessary clear
1 parent ed92b9f commit 2a96250

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

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

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ import com.intellij.openapi.components.State
1010
import com.intellij.openapi.components.Storage
1111
import com.intellij.openapi.components.service
1212
import com.intellij.util.xmlb.Converter
13-
import com.intellij.util.xmlb.annotations.Attribute
14-
import com.intellij.util.xmlb.annotations.Property
1513
import software.aws.toolkits.core.utils.ETagProvider
1614
import java.time.Duration
1715
import java.time.Instant
@@ -23,15 +21,12 @@ class InstantConverter : Converter<Instant>() {
2321
}
2422

2523
data class DismissedNotification(
26-
@Attribute
2724
val id: String = "",
28-
@Attribute(converter = InstantConverter::class)
2925
val dismissedAt: Instant = Instant.now(),
3026
)
3127

3228
data class NotificationDismissalConfiguration(
33-
@Property
34-
var dismissedNotifications: MutableSet<DismissedNotification> = mutableSetOf(),
29+
val dismissedNotifications: MutableSet<DismissedNotification> = mutableSetOf(),
3530
)
3631

3732
@Service
@@ -43,7 +38,6 @@ class NotificationDismissalState : PersistentStateComponent<NotificationDismissa
4338
override fun getState(): NotificationDismissalConfiguration = state
4439

4540
override fun loadState(state: NotificationDismissalConfiguration) {
46-
this.state.dismissedNotifications.clear()
4741
this.state.dismissedNotifications.addAll(state.dismissedNotifications)
4842
cleanExpiredNotifications()
4943
}

0 commit comments

Comments
 (0)