Skip to content

Commit 1b18fb7

Browse files
committed
Move code around a little bit
Make the extension private
1 parent 339f421 commit 1b18fb7

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

WooCommerce/Classes/ViewRelated/Orders/OrderStatusListViewController.swift

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,18 @@ extension OrderStatusListViewController {
143143
}
144144

145145
@objc func applyButtonTapped() {
146+
updateOrderStatus()
147+
dismiss(animated: true, completion: nil)
148+
}
149+
}
150+
151+
152+
/// MARK: - Update the Order status
153+
///
154+
private extension OrderStatusListViewController {
155+
/// Dispatches an Action to update the order status
156+
///
157+
private func updateOrderStatus() {
146158
guard let newStatus = selectedStatus?.status.rawValue else {
147159
return
148160
}
@@ -161,8 +173,6 @@ extension OrderStatusListViewController {
161173
displayOrderUpdatedNotice {
162174
StoresManager.shared.dispatch(undo)
163175
}
164-
165-
dismiss(animated: true, completion: nil)
166176
}
167177

168178
/// Returns an Order Update Action that will result in the specified Order Status updated accordingly.

0 commit comments

Comments
 (0)