Skip to content

Commit

Permalink
perf: adjust service rowHeight to 30
Browse files Browse the repository at this point in the history
  • Loading branch information
tisfeng committed Jan 8, 2024
1 parent ea8c9e0 commit 2e60d33
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Easydict/NewApp/View/SettingView/Tabs/ServiceTab.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ struct ServiceTab: View {
) { isEnable in
serviceToggled(index: index, isEnable: isEnable)
}
.frame(height: 30)
.tag(index)
.contentShape(Rectangle())
.onTapGesture {
Expand Down Expand Up @@ -76,9 +77,7 @@ struct ServiceTab: View {
func loadService(type: Int) {
let windowType = EZWindowType(rawValue: type) ?? .none
services = EZLocalStorage.shared().allServices(windowType)
serviceTypes = services.map { service in
service.serviceType()
}
serviceTypes = services.compactMap { $0.serviceType() }
}

func serviceToggled(index: Int, isEnable: Bool) {
Expand Down

0 comments on commit 2e60d33

Please sign in to comment.