diff --git a/backend/src/main/java/com/openisle/model/User.java b/backend/src/main/java/com/openisle/model/User.java index fef975633..e2001db8c 100644 --- a/backend/src/main/java/com/openisle/model/User.java +++ b/backend/src/main/java/com/openisle/model/User.java @@ -7,6 +7,7 @@ import lombok.Setter; import org.hibernate.annotations.CreationTimestamp; import java.time.LocalDateTime; +import java.util.EnumSet; import java.util.HashSet; import java.util.Set; @@ -68,7 +69,10 @@ public class User { @CollectionTable(name = "user_disabled_notification_types", joinColumns = @JoinColumn(name = "user_id")) @Column(name = "notification_type") @Enumerated(EnumType.STRING) - private Set disabledNotificationTypes = new HashSet<>(); + private Set disabledNotificationTypes = EnumSet.of( + NotificationType.POST_VIEWED, + NotificationType.USER_ACTIVITY + ); @CreationTimestamp @Column(nullable = false, updatable = false, diff --git a/frontend_nuxt/components/GlobalPopups.vue b/frontend_nuxt/components/GlobalPopups.vue index 23de3e76f..e87867ffc 100644 --- a/frontend_nuxt/components/GlobalPopups.vue +++ b/frontend_nuxt/components/GlobalPopups.vue @@ -32,12 +32,12 @@ export default { }, async mounted() { await this.checkMilkTeaActivity() - if (!this.showMilkTeaPopup) { - await this.checkNotificationSetting() - if (!this.showNotificationPopup) { - await this.checkNewMedals() - } - } + if (this.showMilkTeaPopup) return + + await this.checkNotificationSetting() + if (this.showNotificationPopup) return + + await this.checkNewMedals() }, methods: { async checkMilkTeaActivity() { diff --git a/frontend_nuxt/components/NotificationSettingPopup.vue b/frontend_nuxt/components/NotificationSettingPopup.vue index d606898a5..998f2e231 100644 --- a/frontend_nuxt/components/NotificationSettingPopup.vue +++ b/frontend_nuxt/components/NotificationSettingPopup.vue @@ -1,8 +1,8 @@