Skip to content

Commit c1341fd

Browse files
committed
- Fix building
- Fix long translations (fix piscoTech#16)
1 parent afd196a commit c1341fd

File tree

4 files changed

+21
-19
lines changed

4 files changed

+21
-19
lines changed

Workout.xcodeproj/project.pbxproj

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
7A1F8CC623AFC294008EA2E9 /* WorkoutRouteExporter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A1F8CC523AFC294008EA2E9 /* WorkoutRouteExporter.swift */; };
1616
7A1F8CC823AFC358008EA2E9 /* CSVWorkoutRouteExporter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A1F8CC723AFC358008EA2E9 /* CSVWorkoutRouteExporter.swift */; };
1717
7A1F8CCA23AFC374008EA2E9 /* GPXWorkoutRouteExporter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A1F8CC923AFC374008EA2E9 /* GPXWorkoutRouteExporter.swift */; };
18+
7A45CBB523BEA2DB006424B4 /* MBHealth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7A5E998A23B88F4600691185 /* MBHealth.framework */; };
19+
7A45CBB623BEA2DB006424B4 /* MBHealth.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 7A5E998A23B88F4600691185 /* MBHealth.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
1820
7A5E999D23B892F900691185 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 7A5E999B23B892F800691185 /* InfoPlist.strings */; };
1921
7A5E999E23B8956E00691185 /* MBLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7A5E998423B88F4600691185 /* MBLibrary.framework */; };
20-
7A5E999F23B8956E00691185 /* MBLibrary.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 7A5E998423B88F4600691185 /* MBLibrary.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
2122
7A5E99A123B895B900691185 /* MBHealth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7A5E998A23B88F4600691185 /* MBHealth.framework */; };
22-
7A5E99A223B895B900691185 /* MBHealth.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 7A5E998A23B88F4600691185 /* MBHealth.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
2323
7A5E99A323B8965900691185 /* MBLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7A5E998423B88F4600691185 /* MBLibrary.framework */; };
2424
7A5E99A423B8965900691185 /* MBLibrary.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 7A5E998423B88F4600691185 /* MBLibrary.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
2525
7A650B0122C1300100059687 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A650B0022C1300100059687 /* AppDelegate.swift */; };
@@ -138,25 +138,14 @@
138138
/* End PBXContainerItemProxy section */
139139

140140
/* Begin PBXCopyFilesBuildPhase section */
141-
7A5E99A023B8956E00691185 /* Embed Frameworks */ = {
142-
isa = PBXCopyFilesBuildPhase;
143-
buildActionMask = 2147483647;
144-
dstPath = "";
145-
dstSubfolderSpec = 10;
146-
files = (
147-
7A5E999F23B8956E00691185 /* MBLibrary.framework in Embed Frameworks */,
148-
7A5E99A223B895B900691185 /* MBHealth.framework in Embed Frameworks */,
149-
);
150-
name = "Embed Frameworks";
151-
runOnlyForDeploymentPostprocessing = 0;
152-
};
153141
7A650B3222C132EE00059687 /* Embed Frameworks */ = {
154142
isa = PBXCopyFilesBuildPhase;
155143
buildActionMask = 2147483647;
156144
dstPath = "";
157145
dstSubfolderSpec = 10;
158146
files = (
159147
7AB7CD8922C4D774001A0171 /* WorkoutCore.framework in Embed Frameworks */,
148+
7A45CBB623BEA2DB006424B4 /* MBHealth.framework in Embed Frameworks */,
160149
7A5E99A423B8965900691185 /* MBLibrary.framework in Embed Frameworks */,
161150
);
162151
name = "Embed Frameworks";
@@ -255,6 +244,7 @@
255244
buildActionMask = 2147483647;
256245
files = (
257246
7A650B1722C1307200059687 /* HealthKit.framework in Frameworks */,
247+
7A45CBB523BEA2DB006424B4 /* MBHealth.framework in Frameworks */,
258248
7A5E99A323B8965900691185 /* MBLibrary.framework in Frameworks */,
259249
7A650B3622C1330A00059687 /* StoreKit.framework in Frameworks */,
260250
6FDD7897C9603553538BAE3D /* Pods_Workout.framework in Frameworks */,
@@ -274,9 +264,9 @@
274264
isa = PBXFrameworksBuildPhase;
275265
buildActionMask = 2147483647;
276266
files = (
277-
FEBC70160AA4711455BAEE49 /* Pods_Workout_Core.framework in Frameworks */,
278267
7A5E99A123B895B900691185 /* MBHealth.framework in Frameworks */,
279268
7A5E999E23B8956E00691185 /* MBLibrary.framework in Frameworks */,
269+
FEBC70160AA4711455BAEE49 /* Pods_Workout_Core.framework in Frameworks */,
280270
);
281271
runOnlyForDeploymentPostprocessing = 0;
282272
};
@@ -625,7 +615,6 @@
625615
7AB7CD7D22C4D774001A0171 /* Sources */,
626616
7AB7CD7E22C4D774001A0171 /* Frameworks */,
627617
7AB7CD7F22C4D774001A0171 /* Resources */,
628-
7A5E99A023B8956E00691185 /* Embed Frameworks */,
629618
);
630619
buildRules = (
631620
);

Workout/Controller/ListTVC.swift

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ import StoreKit
1515

1616
class ListTableViewController: UITableViewController, WorkoutListDelegate, WorkoutBulkExporterDelegate, PreferencesDelegate, AdsManagerDelegate, EnhancedNavigationBarDelegate {
1717

18+
private static let defaultHeight: CGFloat = 44
19+
1820
private let list = WorkoutList(healthData: healthData, preferences: preferences)
1921
private var exporter: WorkoutBulkExporter?
2022

@@ -63,6 +65,9 @@ class ListTableViewController: UITableViewController, WorkoutListDelegate, Worko
6365
adsManager.delegate = self
6466
adsManager.initialize()
6567

68+
tableView.rowHeight = UITableView.automaticDimension
69+
tableView.estimatedRowHeight = Self.defaultHeight
70+
6671
preferences.add(delegate: self)
6772
list.delegate = self
6873
updateFilterLabel()
@@ -142,6 +147,14 @@ class ListTableViewController: UITableViewController, WorkoutListDelegate, Worko
142147
}
143148
}
144149

150+
override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
151+
if indexPath.section == 0, list.workouts?.isEmpty ?? true {
152+
return UITableView.automaticDimension
153+
} else {
154+
return Self.defaultHeight
155+
}
156+
}
157+
145158
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
146159
if indexPath.section == 1 {
147160
let res = tableView.dequeueReusableCell(withIdentifier: "loadMore", for: indexPath) as! LoadMoreCell

Workout/View/Base.lproj/Main.storyboard

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
4949
<autoresizingMask key="autoresizingMask"/>
5050
<subviews>
51-
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="[Message]" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="kRo-Ia-wba">
51+
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="[Message]" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="kRo-Ia-wba">
5252
<rect key="frame" x="16" y="0.0" width="343" height="44"/>
5353
<autoresizingMask key="autoresizingMask"/>
5454
<fontDescription key="fontDescription" type="system" pointSize="17"/>

Workout/View/fr.lproj/Main.strings

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@
5858
"drg-GC-zpj.text" = "Unités";
5959

6060
/* Class = "UILabel"; text = "Running Heart Zones"; ObjectID = "gp7-Kc-v84"; */
61-
"gp7-Kc-v84.text" = "Zones de fréquence cardiaque";
61+
"gp7-Kc-v84.text" = "Zones cardiaques";
6262

6363
/* Class = "UINavigationItem"; title = "Running Heart Zones"; ObjectID = "jdI-fn-b3q"; */
64-
"jdI-fn-b3q.title" = "Zones de fréquence cardiaque";
64+
"jdI-fn-b3q.title" = "Zones cardiaques";
6565

6666
/* Class = "UINavigationItem"; title = "Step Source"; ObjectID = "n64-Oo-NfG"; */
6767
"n64-Oo-NfG.title" = "Source du podomètre";

0 commit comments

Comments
 (0)