Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- [*] Shipping Labels: Improve UI of Split shipments screen. [https://github.com/woocommerce/woocommerce-ios/pull/15838]
- [*] POS: icon button with confirmation step used for clearing the cart [https://github.com/woocommerce/woocommerce-ios/pull/15829]
- [*] Shipping Labels: Fixed a portion of layout issues caused by bigger accessibility content size categories. [https://github.com/woocommerce/woocommerce-ios/pull/15844]
- [*] Shipping Labels: Enable the confirm button on the payment method sheet even when there are no changes. [https://github.com/woocommerce/woocommerce-ios/pull/15856]

22.7
-----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ final class ShippingLabelPaymentMethodsViewModel: ObservableObject {

/// Shipping Label account settings from the remote API
///
private var accountSettings: ShippingLabelAccountSettings
private(set) var accountSettings: ShippingLabelAccountSettings

@Published var selectedPaymentMethodID: Int64
@Published var isEmailReceiptsEnabled: Bool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,15 @@ struct WooShippingPaymentMethodsView: View {
.toggleStyle(.switch)

Button(Localization.confirmButton) {
Task {
await confirmPaymentMethod()
if viewModel.isDoneButtonEnabled() {
Task {
await confirmPaymentMethod()
}
} else {
onAccountSettingsUpdate(viewModel.accountSettings)
}
}
.buttonStyle(PrimaryLoadingButtonStyle(isLoading: viewModel.isUpdating))
.disabled(viewModel.isDoneButtonEnabled() == false)
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions WooCommerce/WooCommerce.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -5704,7 +5704,7 @@
DE02ABBD2B578D0E008E0AC4 /* CreditCardType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreditCardType.swift; sourceTree = "<group>"; };
DE02ABBF2B57D333008E0AC4 /* BlazeConfirmPaymentViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlazeConfirmPaymentViewModelTests.swift; sourceTree = "<group>"; };
DE02ABC12B5903AB008E0AC4 /* BlazeCampaignCreationErrorView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlazeCampaignCreationErrorView.swift; sourceTree = "<group>"; };
DE02B64E2E12766B00B79E0D /* CollapsibleShipmentItemCardViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = CollapsibleShipmentItemCardViewModelTests.swift; path = "WooCommerceTests/ViewRelated/Shipping Label/WooShipping Create Shipping Labels/Split shipments/CollapsibleShipmentItemCardViewModelTests.swift"; sourceTree = "<group>"; };
DE02B64E2E12766B00B79E0D /* CollapsibleShipmentItemCardViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CollapsibleShipmentItemCardViewModelTests.swift; sourceTree = "<group>"; };
DE02C65B2D5A0B9F0089850D /* FailedProductImageCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FailedProductImageCollectionViewCell.swift; sourceTree = "<group>"; };
DE02C65D2D5A0C5D0089850D /* FailedProductImageCollectionViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = FailedProductImageCollectionViewCell.xib; sourceTree = "<group>"; };
DE06D65F2D64699D00419FFA /* AuthenticatedWebViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthenticatedWebViewModelTests.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -10552,7 +10552,6 @@
B56DB3BD2049BFAA00D4AA8E = {
isa = PBXGroup;
children = (
DE02B64E2E12766B00B79E0D /* CollapsibleShipmentItemCardViewModelTests.swift */,
3F3689E22DCB1B470065B48F /* Modules */,
D8FBFF1622D4CC2F006E3336 /* docs */,
8CA4F6DC220B24EB00A47B5D /* config */,
Expand Down Expand Up @@ -13975,6 +13974,7 @@
EEBB9B3E2D8FE5AC008D6CE5 /* Split shipments */ = {
isa = PBXGroup;
children = (
DE02B64E2E12766B00B79E0D /* CollapsibleShipmentItemCardViewModelTests.swift */,
EEBB9B3F2D8FE5B4008D6CE5 /* WooShippingSplitShipmentsViewModelTests.swift */,
);
path = "Split shipments";
Expand Down