mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +00:00
Fix: Transition issues
This commit is contained in:
parent
8d7cc2ed58
commit
ddda04369d
2 changed files with 4 additions and 6 deletions
|
|
@ -774,7 +774,6 @@ struct ContentView: View {
|
||||||
.transition(tabSwitchTransition)
|
.transition(tabSwitchTransition)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.clipped()
|
|
||||||
.zIndex(1)
|
.zIndex(1)
|
||||||
.allowsHitTesting(vm.notchState == .open)
|
.allowsHitTesting(vm.notchState == .open)
|
||||||
.blur(radius: abs(gestureProgress) > 0.3 ? min(abs(gestureProgress), 8) : 0)
|
.blur(radius: abs(gestureProgress) > 0.3 ? min(abs(gestureProgress), 8) : 0)
|
||||||
|
|
|
||||||
|
|
@ -107,12 +107,10 @@ struct TabSelectionView: View {
|
||||||
let isSelected = isSelected(tab)
|
let isSelected = isSelected(tab)
|
||||||
let activeAccent = tab.accentColor ?? .white
|
let activeAccent = tab.accentColor ?? .white
|
||||||
TabButton(label: tab.label, icon: tab.icon, selected: isSelected) {
|
TabButton(label: tab.label, icon: tab.icon, selected: isSelected) {
|
||||||
withAnimation(.smooth(duration: 0.3)) {
|
if tab.view == .extensionExperience {
|
||||||
if tab.view == .extensionExperience {
|
coordinator.selectedExtensionExperienceID = tab.experienceID
|
||||||
coordinator.selectedExtensionExperienceID = tab.experienceID
|
|
||||||
}
|
|
||||||
coordinator.currentView = tab.view
|
|
||||||
}
|
}
|
||||||
|
coordinator.currentView = tab.view
|
||||||
}
|
}
|
||||||
.frame(height: 26)
|
.frame(height: 26)
|
||||||
.foregroundStyle(isSelected ? activeAccent : .gray)
|
.foregroundStyle(isSelected ? activeAccent : .gray)
|
||||||
|
|
@ -131,6 +129,7 @@ struct TabSelectionView: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.animation(.smooth(duration: 0.3), value: coordinator.currentView)
|
||||||
.clipShape(Capsule())
|
.clipShape(Capsule())
|
||||||
.onAppear {
|
.onAppear {
|
||||||
ensureValidSelection(with: tabs)
|
ensureValidSelection(with: tabs)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue