- flaky navigation reproduced and fixed
This commit is contained in:
parent
7d38035350
commit
1027a06ecd
|
@ -145,6 +145,11 @@ struct HomeReducer: ReducerProtocol {
|
||||||
}
|
}
|
||||||
return .none
|
return .none
|
||||||
|
|
||||||
|
case .updateDestination(.profile):
|
||||||
|
state.profileState.destination = nil
|
||||||
|
state.destination = .profile
|
||||||
|
return .none
|
||||||
|
|
||||||
case .updateDestination(let destination):
|
case .updateDestination(let destination):
|
||||||
state.destination = destination
|
state.destination = destination
|
||||||
return .none
|
return .none
|
||||||
|
@ -155,23 +160,23 @@ struct HomeReducer: ReducerProtocol {
|
||||||
|
|
||||||
case .profile(.settings(.quickRescan)):
|
case .profile(.settings(.quickRescan)):
|
||||||
state.destination = nil
|
state.destination = nil
|
||||||
return .task {
|
return .run { send in
|
||||||
do {
|
do {
|
||||||
try await sdkSynchronizer.rewind(.quick)
|
try await sdkSynchronizer.rewind(.quick)
|
||||||
return .rewindDone(true, .quickRescan)
|
await send(.rewindDone(true, .quickRescan))
|
||||||
} catch {
|
} catch {
|
||||||
return .rewindDone(false, .quickRescan)
|
await send(.rewindDone(false, .quickRescan))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
case .profile(.settings(.fullRescan)):
|
case .profile(.settings(.fullRescan)):
|
||||||
state.destination = nil
|
state.destination = nil
|
||||||
return .task {
|
return .run { send in
|
||||||
do {
|
do {
|
||||||
try await sdkSynchronizer.rewind(.birthday)
|
try await sdkSynchronizer.rewind(.birthday)
|
||||||
return .rewindDone(true, .fullRescan)
|
await send(.rewindDone(true, .fullRescan))
|
||||||
} catch {
|
} catch {
|
||||||
return .rewindDone(false, .fullRescan)
|
await send(.rewindDone(false, .fullRescan))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue