Skip to content

Commit

Permalink
Merge pull request #16 from sunshinejr/fix/live_session_cancel_freeze
Browse files Browse the repository at this point in the history
Fix freeze on cancelling saving tree details flow
  • Loading branch information
sunshinejr authored Feb 23, 2021
2 parents dea7e0f + 0514754 commit c88209f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Tree Tracker/Screens/Live Upload/LiveUploadViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,8 @@ final class LiveUploadViewModel {
assetManager.save(image: image, location: location) { [weak self] result in
switch result {
case let .success(asset):
self?.navigation.triggerAskForDetailsAndStoreFlow(assets: [asset]) { success in
if success {
self?.askForPermissionsIfNeededAndStartNewSession()
}
self?.navigation.triggerAskForDetailsAndStoreFlow(assets: [asset]) { _ in
self?.askForPermissionsIfNeededAndStartNewSession()
}
case let .failure(error):
self?.alert = .init(title: "Error", message: "Error happened while capturing an image. \n Details: \(error)", buttons: [.init(title: "Ok", style: .default, action: nil)])
Expand Down

0 comments on commit c88209f

Please sign in to comment.