Skip to content

Commit a7f3064

Browse files
committed
Rename cell type for easy discovering
1 parent fd83ce3 commit a7f3064

File tree

4 files changed

+14
-16
lines changed

4 files changed

+14
-16
lines changed

WooCommerce/Classes/ViewRelated/Coupons/CouponListViewController.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ private extension CouponListViewController {
132132
}
133133

134134
func registerTableViewCells() {
135-
TitleAndSubtitleTableViewCell.register(for: tableView)
135+
TitleAndSubtitleAndStatusTableViewCell.register(for: tableView)
136136
}
137137
}
138138

@@ -144,7 +144,7 @@ extension CouponListViewController {
144144
///
145145
func displayPlaceholderCoupons() {
146146
let options = GhostOptions(displaysSectionHeader: false,
147-
reuseIdentifier: TitleAndSubtitleTableViewCell.reuseIdentifier,
147+
reuseIdentifier: TitleAndSubtitleAndStatusTableViewCell.reuseIdentifier,
148148
rowsPerSection: Constants.placeholderRowsPerSection)
149149
tableView.displayGhostContent(options: options,
150150
style: .wooDefaultGhostStyle)
@@ -211,15 +211,15 @@ extension CouponListViewController: UITableViewDataSource {
211211
}
212212

213213
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
214-
let cell = tableView.dequeueReusableCell(withIdentifier: TitleAndSubtitleTableViewCell.reuseIdentifier, for: indexPath)
214+
let cell = tableView.dequeueReusableCell(withIdentifier: TitleAndSubtitleAndStatusTableViewCell.reuseIdentifier, for: indexPath)
215215
if let cellViewModel = viewModel.couponViewModels[safe: indexPath.row] {
216-
configure(cell as? TitleAndSubtitleTableViewCell, with: cellViewModel)
216+
configure(cell as? TitleAndSubtitleAndStatusTableViewCell, with: cellViewModel)
217217
}
218218

219219
return cell
220220
}
221221

222-
func configure(_ cell: TitleAndSubtitleTableViewCell?, with cellViewModel: CouponListCellViewModel) {
222+
func configure(_ cell: TitleAndSubtitleAndStatusTableViewCell?, with cellViewModel: CouponListCellViewModel) {
223223
cell?.titleLabel.text = cellViewModel.title
224224
cell?.subtitleLabel.text = cellViewModel.subtitle
225225
cell?.accessibilityLabel = cellViewModel.accessibilityLabel

WooCommerce/Classes/ViewRelated/ReusableViews/TitleAndSubtitleTableViewCell.swift renamed to WooCommerce/Classes/ViewRelated/ReusableViews/TitleAndSubtitleAndStatusTableViewCell.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import UIKit
22

3-
final class TitleAndSubtitleTableViewCell: UITableViewCell {
3+
final class TitleAndSubtitleAndStatusTableViewCell: UITableViewCell {
44

55
@IBOutlet var subtitleLabel: UILabel!
66
@IBOutlet var titleLabel: UILabel!
@@ -25,7 +25,7 @@ final class TitleAndSubtitleTableViewCell: UITableViewCell {
2525

2626
// MARK: - Setup
2727

28-
private extension TitleAndSubtitleTableViewCell {
28+
private extension TitleAndSubtitleAndStatusTableViewCell {
2929
func configureBackground() {
3030
backgroundColor = .listForeground
3131
selectedBackgroundView = UIView()

WooCommerce/Classes/ViewRelated/ReusableViews/TitleAndSubtitleTableViewCell.xib

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,22 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19455" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
3-
<device id="retina6_1" orientation="portrait" appearance="light"/>
43
<dependencies>
5-
<deployment identifier="iOS"/>
64
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19454"/>
75
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
86
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
97
</dependencies>
108
<objects>
119
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
1210
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
13-
<tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="TitleAndSubtitleTableViewCell" rowHeight="90" id="KGk-i7-Jjw" customClass="TitleAndSubtitleTableViewCell" customModule="WooCommerce" customModuleProvider="target">
11+
<tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="TitleAndSubtitleTableViewCell" rowHeight="90" id="KGk-i7-Jjw" customClass="TitleAndSubtitleAndStatusTableViewCell" customModule="WooCommerce" customModuleProvider="target">
1412
<rect key="frame" x="0.0" y="0.0" width="351" height="90"/>
1513
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
1614
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
17-
<rect key="frame" x="0.0" y="0.0" width="321.5" height="90"/>
15+
<rect key="frame" x="0.0" y="0.0" width="325.5" height="90"/>
1816
<autoresizingMask key="autoresizingMask"/>
1917
<subviews>
2018
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" alignment="top" spacing="6" translatesAutoresizingMaskIntoConstraints="NO" id="zx0-L0-tSe">
21-
<rect key="frame" x="16" y="8" width="289.5" height="74"/>
19+
<rect key="frame" x="16" y="8" width="292" height="74"/>
2220
<subviews>
2321
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="240" verticalHuggingPriority="260" text="Fixed product discount " textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Kxr-JD-qZr" userLabel="Date Label">
2422
<rect key="frame" x="0.0" y="0.0" width="133.5" height="14.5"/>

WooCommerce/WooCommerce.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1491,7 +1491,7 @@
14911491
DEC6C51A2747758D006832D3 /* JetpackInstallView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEC6C5192747758D006832D3 /* JetpackInstallView.swift */; };
14921492
DEC6C51C27477890006832D3 /* JetpackInstallStepsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEC6C51B27477890006832D3 /* JetpackInstallStepsView.swift */; };
14931493
DEC6C51E27479280006832D3 /* JetpackInstallSteps.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEC6C51D27479280006832D3 /* JetpackInstallSteps.swift */; };
1494-
DECE13FB27993F6500816ECD /* TitleAndSubtitleTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DECE13F927993F6500816ECD /* TitleAndSubtitleTableViewCell.swift */; };
1494+
DECE13FB27993F6500816ECD /* TitleAndSubtitleAndStatusTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DECE13F927993F6500816ECD /* TitleAndSubtitleAndStatusTableViewCell.swift */; };
14951495
DECE13FC27993F6500816ECD /* TitleAndSubtitleTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = DECE13FA27993F6500816ECD /* TitleAndSubtitleTableViewCell.xib */; };
14961496
DECE1400279A595200816ECD /* Coupon+Woo.swift in Sources */ = {isa = PBXBuildFile; fileRef = DECE13FF279A595200816ECD /* Coupon+Woo.swift */; };
14971497
DEDB886B26E8531E00981595 /* ShippingLabelPackageAttributes.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEDB886A26E8531E00981595 /* ShippingLabelPackageAttributes.swift */; };
@@ -3101,7 +3101,7 @@
31013101
DEC6C5192747758D006832D3 /* JetpackInstallView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JetpackInstallView.swift; sourceTree = "<group>"; };
31023102
DEC6C51B27477890006832D3 /* JetpackInstallStepsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JetpackInstallStepsView.swift; sourceTree = "<group>"; };
31033103
DEC6C51D27479280006832D3 /* JetpackInstallSteps.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JetpackInstallSteps.swift; sourceTree = "<group>"; };
3104-
DECE13F927993F6500816ECD /* TitleAndSubtitleTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TitleAndSubtitleTableViewCell.swift; sourceTree = "<group>"; };
3104+
DECE13F927993F6500816ECD /* TitleAndSubtitleAndStatusTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TitleAndSubtitleAndStatusTableViewCell.swift; sourceTree = "<group>"; };
31053105
DECE13FA27993F6500816ECD /* TitleAndSubtitleTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = TitleAndSubtitleTableViewCell.xib; sourceTree = "<group>"; };
31063106
DECE13FF279A595200816ECD /* Coupon+Woo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Coupon+Woo.swift"; sourceTree = "<group>"; };
31073107
DEDB886A26E8531E00981595 /* ShippingLabelPackageAttributes.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShippingLabelPackageAttributes.swift; sourceTree = "<group>"; };
@@ -6902,7 +6902,7 @@
69026902
6832C7CB26DA5FDE00BA4088 /* LabeledTextViewTableViewCell.xib */,
69036903
DE68B81E26F86B1700C86CFB /* OfflineBannerView.swift */,
69046904
E1E125B126EB8EE80068A9B0 /* UpdateProgressImage.swift */,
6905-
DECE13F927993F6500816ECD /* TitleAndSubtitleTableViewCell.swift */,
6905+
DECE13F927993F6500816ECD /* TitleAndSubtitleAndStatusTableViewCell.swift */,
69066906
DECE13FA27993F6500816ECD /* TitleAndSubtitleTableViewCell.xib */,
69076907
);
69086908
path = ReusableViews;
@@ -8818,7 +8818,7 @@
88188818
DE23CFFA27462D8F003BE54E /* JetpackInstallIntroView.swift in Sources */,
88198819
DEC6C51E27479280006832D3 /* JetpackInstallSteps.swift in Sources */,
88208820
021AEF9E2407F55C00029D28 /* PHAssetImageLoader.swift in Sources */,
8821-
DECE13FB27993F6500816ECD /* TitleAndSubtitleTableViewCell.swift in Sources */,
8821+
DECE13FB27993F6500816ECD /* TitleAndSubtitleAndStatusTableViewCell.swift in Sources */,
88228822
26E0AE1926335AA900A5EB3B /* Survey.swift in Sources */,
88238823
0298430C259351F100979CAE /* ShippingLabelsTopBannerFactory.swift in Sources */,
88248824
020BE74D23B1F5EB007FE54C /* TitleAndTextFieldTableViewCell.swift in Sources */,

0 commit comments

Comments
 (0)