Skip to content
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
13 changes: 8 additions & 5 deletions Keychy/Keychy/Presentation/Home/Views/Alarm/AlarmView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ struct AlarmView: View {
viewModel.hasNetworkError = true
return
}

viewModel.checkNotificationPermission()
viewModel.fetchNotifications()
}
Expand Down Expand Up @@ -69,25 +69,28 @@ extension AlarmView {
})
.ignoresSafeArea()
}

/// 알림 리스트 뷰
private var notificationListView: some View {
List {
// 푸시 알림 off 배너
if viewModel.isNotiOff && viewModel.isNotiOffShown {
pushNotiOffView
.listRowInsets(.init())
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아하..!! 제가 List로 다시 바꾸면서 이 부분을 고려하지 못했네요
여기에도 이 모디파이어들을 넣어줘야하군요... 굿!!

.listRowSeparator(.hidden)
.listRowBackground(Color.clear)
.padding(.top, 10)
.padding(.bottom, 20)
}

ForEach(viewModel.notifications) { notification in
NotificationItemView(
notification: notification,
onTap: {
handleNotificationTap(notification)
}
)
.listRowInsets(EdgeInsets())
.listRowInsets(.init())
.listRowSeparator(.hidden)
.listRowBackground(Color.clear)
.swipeActions(edge: .trailing, allowsFullSwipe: false) {
Expand All @@ -111,7 +114,7 @@ extension AlarmView {
.typography(.suit15R)
.padding(15)
}

}

/// 기기 푸쉬 알림이 off일 때 나오는 상단뷰
Expand Down