Skip to content

Commit

Permalink
fixes done button
Browse files Browse the repository at this point in the history
  • Loading branch information
mrgrauel committed Nov 13, 2023
1 parent 02d31cb commit 42c483e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
* Shadows in checkout
* add text info to SupervisorView #APPS-1181
* Kassenbonvorschau zeigt keinen "Fertig"-Button in der Navigation an #APPS-1159

### Updated
* datatrans/ios-sdk 3.4.0 (was 2.7.2)
Expand Down
15 changes: 8 additions & 7 deletions Example/Snabble/DashboardViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,17 @@ extension DashboardViewController: DynamicViewControllerDelegate {
case .allStores:
tabBarController?.selectedIndex = 2
case .lastPurchases:
var rootViewController: UIViewController?
if let action = userInfo?["action"] as? String, action == "more" {
let viewController = ReceiptsListViewController()
viewController.navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .done, target: self, action: #selector(dismiss(_:)))
let navigationController = UINavigationController(rootViewController: viewController)
present(navigationController, animated: true)
rootViewController = ReceiptsListViewController()
} else if let action = userInfo?["action"] as? String, action == "purchase",
let orderID = userInfo?["id"] as? String, let projectID = (widget as? WidgetLastPurchases)?.projectId {

let detailViewController = ReceiptsDetailViewController(orderId: orderID, projectId: projectID)
present(detailViewController, animated: true)
rootViewController = ReceiptsDetailViewController(orderId: orderID, projectId: projectID)
}
rootViewController?.navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .done, target: self, action: #selector(dismiss(_:)))
if let rootViewController {
let navigationController = UINavigationController(rootViewController: rootViewController)
present(navigationController, animated: true)
}
default:
break
Expand Down
2 changes: 0 additions & 2 deletions Sources/UI/Receipts/ReceiptsDetailViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,6 @@ extension ReceiptsDetailViewController {
target: self,
action: #selector(rightBarButtonItemTouchedUpInside(_:)))
navigationItem.rightBarButtonItem = barbuttonItem
} else {
navigationItem.rightBarButtonItem = nil
}
}
}
Expand Down

0 comments on commit 42c483e

Please sign in to comment.