Sort Bool In Swift
SOLVED: How can I sort SwiftData Query results by a bool?
1
2
3
4
5
6
extension Bool: Comparable {
    public static fun <(lhs: Self, rhs: Self) -> Bool {
        // the only true inequality is false < true
        !lhs && rhs
    }
}
 This post is licensed under  CC BY 4.0  by the author.