Skip to content
Merged
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
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@
- For a delegated role, read `.agents/roles.md` and follow the assigned role section and output format.
- Use `.agents/workflows.md` when the task matches one of its executable workflows.
- If repository-local instructions conflict with global memory, follow the repository-local instructions.
- Write DevLog PR and review text in Korean.
Original file line number Diff line number Diff line change
Expand Up @@ -157,81 +157,78 @@ public struct PushNotificationListView: View {
}

private var headerView: some View {
ScrollView(.horizontal) {
HStack(spacing: 8) {
if 0 < store.appliedFilterCount {
Menu {
Text(
String.localizedStringWithFormat(
String(localized: "push_filters_applied_format"),
Int64(store.appliedFilterCount)
)
)
Button(role: .destructive) {
store.send(.view(.resetFilters))
} label: {
Text(String(localized: "push_clear_all_filters"))
}
} label: {
HStack(spacing: 6) {
Image(systemName: "line.3.horizontal.decrease")
filterBadge
}
.adaptiveButtonStyle()
}
}

Button {
DispatchQueue.main.async {
store.send(.view(.toggleSortOption))
}
} label: {
let condition = store.query.sortOrder == .oldest
HStack(spacing: 8) {
Comment thread
opficdev marked this conversation as resolved.
if 0 < store.appliedFilterCount {
Menu {
Text(
String.localizedStringWithFormat(
String(localized: "push_sort_format"),
store.query.sortOrder.title
String(localized: "push_filters_applied_format"),
Int64(store.appliedFilterCount)
)
)
.foregroundStyle(condition ? .white : Color(.label))
.adaptiveButtonStyle(color: condition ? .blue : .clear)
}
.frame(height: headerHeight)

Menu {
Picker(selection: $store.query.timeFilter) {
ForEach(PushNotificationQuery.TimeFilter.availableOptions, id: \.self) { option in
Text(option.title).tag(option)
}
Button(role: .destructive) {
store.send(.view(.resetFilters))
} label: {
Text(String(localized: "push_period"))
Text(String(localized: "push_clear_all_filters"))
}
} label: {
let condition = store.query.timeFilter == .none
HStack {
Text(String(localized: "push_period"))
Image(systemName: "chevron.down")
HStack(spacing: 6) {
Image(systemName: "line.3.horizontal.decrease")
filterBadge
}
.foregroundStyle(condition ? Color(.label) : .white)
.adaptiveButtonStyle(color: condition ? .clear : .blue)
.adaptiveButtonStyle()
}
}

Button {
DispatchQueue.main.async {
store.send(.view(.toggleSortOption))
}
} label: {
let condition = store.query.sortOrder == .oldest
Text(
String.localizedStringWithFormat(
String(localized: "push_sort_format"),
store.query.sortOrder.title
)
)
.foregroundStyle(condition ? .white : Color(.label))
.adaptiveButtonStyle(color: condition ? .blue : .clear)
}
.frame(height: headerHeight)

Button {
DispatchQueue.main.async {
store.send(.view(.toggleUnreadOnly))
Menu {
Picker(selection: $store.query.timeFilter) {
ForEach(PushNotificationQuery.TimeFilter.availableOptions, id: \.self) { option in
Text(option.title).tag(option)
}
} label: {
let condition = store.query.unreadOnly
Text(String(localized: "push_unread"))
.foregroundStyle(condition ? .white : Color(.label))
.adaptiveButtonStyle(color: condition ? .blue : .clear)
Text(String(localized: "push_period"))
}
} label: {
let condition = store.query.timeFilter == .none
HStack {
Text(String(localized: "push_period"))
Image(systemName: "chevron.down")
}
.frame(height: headerHeight)
.foregroundStyle(condition ? Color(.label) : .white)
.adaptiveButtonStyle(color: condition ? .clear : .blue)
}

Button {
DispatchQueue.main.async {
store.send(.view(.toggleUnreadOnly))
}
} label: {
let condition = store.query.unreadOnly
Text(String(localized: "push_unread"))
.foregroundStyle(condition ? .white : Color(.label))
.adaptiveButtonStyle(color: condition ? .blue : .clear)
}
.frame(height: headerHeight)
}
.scrollIndicators(.never)
.scrollDisabled(!isScrollTrackingEnabled)
.contentMargins(.leading, 16, for: .scrollContent)
.padding(.leading, 16)
.frame(maxWidth: .infinity, alignment: .leading)
.frame(height: headerHeight)
.onAppear {
headerOffset = 0
Expand Down
Loading