We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fire/Fire/CandidatesView.swift
Lines 128 to 151 in ede5b06
建议extract出来一个function给vertical和horizontal共用,这样就可以避免新功能out of sync的问题。这是一种写法:
var _indicator: some View { let arrowUp = getIndicatorIcon(imageName: "arrowUp", direction: direction, activeFlag: hasPrev, eventName: State.prevPageBtnTapped) let arrowDown = getIndicatorIcon(imageName: "arrowDown", direction: direction, activeFlag: hasNext, eventName: State.nextPageBtnTapped) if direction == CandidatesDirection.horizontal { return AnyView(VStack(spacing: 0) { arrowUp; arrowDown }) } else { return AnyView(HStack(spacing: 4) { arrowUp; arrowDown }) } } func getIndicatorIcon(imageName: String, direction: CandidatesDirection, activeFlag: Bool, eventName: Notification.Name) -> some View { return Image(imageName) .renderingMode(.template) .resizable() .frame(width: 10, height: 10, alignment: .center) .rotationEffect(Angle(degrees: direction == CandidatesDirection.horizontal ? 0 : -90), anchor: .center) .onTapGesture { if !activeFlag { return } NotificationCenter.default.post( name: eventName, object: nil ) } .foregroundColor(Color(activeFlag ? themeConfig[colorScheme].pageIndicatorColor : themeConfig[colorScheme].pageIndicatorDisabledColor )) }
The text was updated successfully, but these errors were encountered:
fix: 修复竖向模式下,翻页指示器颜色的问题 #89
5e8f0a9
Merge pull request #90 from qwertyyb/fix/vertical-indicator-color
80c839c
再次感谢你的反馈 🙏
Sorry, something went wrong.
No branches or pull requests
Fire/Fire/CandidatesView.swift
Lines 128 to 151 in ede5b06
建议extract出来一个function给vertical和horizontal共用,这样就可以避免新功能out of sync的问题。这是一种写法:
The text was updated successfully, but these errors were encountered: