mirror of
https://github.com/neon443/NearFuture.git
synced 2026-03-11 06:49:12 +00:00
made events update propery when changing on ios
update animations on adding and removing events fix symbolpicker crash on fast scroll by making it not show all the symbols lol might be ready to ship?
This commit is contained in:
@@ -22,14 +22,14 @@ extension View {
|
||||
extension AnyTransition {
|
||||
static var moveAndFade: AnyTransition {
|
||||
.asymmetric(
|
||||
insertion: .move(edge: .leading),
|
||||
insertion: .opacity,
|
||||
removal: .move(edge: .trailing)
|
||||
)
|
||||
.combined(with: .opacity)
|
||||
}
|
||||
static var moveAndFadeReversed: AnyTransition {
|
||||
.asymmetric(
|
||||
insertion: .move(edge: .trailing),
|
||||
insertion: .opacity,
|
||||
removal: .move(edge: .leading)
|
||||
)
|
||||
.combined(with: .opacity)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
import Foundation
|
||||
|
||||
class SymbolsLoader: ObservableObject {
|
||||
@Published var allSymbols: [String] = []
|
||||
private var allSymbols: [String] = []
|
||||
|
||||
init() {
|
||||
self.allSymbols = getAllSymbols()
|
||||
@@ -16,7 +16,7 @@ class SymbolsLoader: ObservableObject {
|
||||
|
||||
func getSymbols(_ searched: String) -> [String] {
|
||||
if searched.isEmpty {
|
||||
return allSymbols
|
||||
return []
|
||||
} else {
|
||||
return allSymbols.filter() { $0.localizedCaseInsensitiveContains(searched) }
|
||||
}
|
||||
|
||||
@@ -31,7 +31,17 @@ struct SymbolsPicker: View {
|
||||
NavigationStack {
|
||||
GeometryReader { geo in
|
||||
ScrollView {
|
||||
if symbols.isEmpty {
|
||||
if searchInput.isEmpty {
|
||||
HStack {
|
||||
Image(systemName: "magnifyingglass")
|
||||
.resizable().scaledToFit()
|
||||
.frame(width: 30)
|
||||
Text("Start a Search")
|
||||
.font(.title)
|
||||
.bold()
|
||||
}
|
||||
.padding()
|
||||
} else if symbols.isEmpty {
|
||||
HStack {
|
||||
Image(systemName: "magnifyingglass")
|
||||
.resizable().scaledToFit()
|
||||
|
||||
Reference in New Issue
Block a user