diff --git a/Browserino/Extensions/View+ScrollEdgeDisabled.swift b/Browserino/Extensions/View+ScrollEdgeDisabled.swift index 26ce109..b3305c6 100644 --- a/Browserino/Extensions/View+ScrollEdgeDisabled.swift +++ b/Browserino/Extensions/View+ScrollEdgeDisabled.swift @@ -11,9 +11,7 @@ extension View { @ViewBuilder func scrollEdgeEffectDisabledCompat() -> some View { if #available(macOS 26.0, *) { - self - .scrollEdgeEffectStyle(.soft, for: .all) - .scrollEdgeEffectDisabled(true, for: .all) + self.scrollEdgeEffectStyle(.soft, for: .all) } else { self } diff --git a/Browserino/Views/Preferences/RulesTab.swift b/Browserino/Views/Preferences/RulesTab.swift index b3ffa86..15820ba 100644 --- a/Browserino/Views/Preferences/RulesTab.swift +++ b/Browserino/Views/Preferences/RulesTab.swift @@ -86,7 +86,11 @@ struct RuleItem: View { struct RulesTab: View { @AppStorage("rules") private var rules: [Rule] = [] - + + private func move(from source: IndexSet, to destination: Int) { + rules.move(fromOffsets: source, toOffset: destination) + } + var body: some View { VStack (alignment: .leading) { List { @@ -97,9 +101,10 @@ struct RulesTab: View { rule: rule ) } + .onMove(perform: move) } - - Text("Type regex and choose app in which links will be opened without prompt") + + Text("Drag and drop to reorder. Type regex and choose app in which links will be opened without prompt. The first matching rule wins.") .font(.subheadline) .foregroundStyle(.primary.opacity(0.5)) .frame(maxWidth: .infinity)