The overall UI of Ferrite has been changed to make animations smoother and streamline the experiences. A new search filter interface has been added for all iOS versions, but iOS 15 and up have smooth UI applied due to bugs with searchbars in iOS 14 (which shouldn't even have a searchbar in the first place). Also fix the plugin fetching logic to not listen to a combine publisher and instead use a notification that is easier to control. Signed-off-by: kingbri <bdashore3@proton.me>
30 lines
696 B
Swift
30 lines
696 B
Swift
//
|
|
// InlinedList.swift
|
|
// Ferrite
|
|
//
|
|
// Created by Brian Dashore on 9/4/22.
|
|
//
|
|
// Removes the top padding on unsectioned lists
|
|
// If a list is sectioned, see InlineHeader
|
|
//
|
|
|
|
import Introspect
|
|
import SwiftUI
|
|
|
|
struct InlinedList: ViewModifier {
|
|
let inset: CGFloat
|
|
|
|
func body(content: Content) -> some View {
|
|
if #available(iOS 16, *) {
|
|
content
|
|
.introspectCollectionView { collectionView in
|
|
collectionView.contentInset.top = inset
|
|
}
|
|
} else {
|
|
content
|
|
.introspectTableView { tableView in
|
|
tableView.contentInset.top = inset
|
|
}
|
|
}
|
|
}
|
|
}
|