diff --git a/.travis.yml b/.travis.yml
index 1bd1500..d0b101e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,4 +1,4 @@
language: objective-c
-osx_image: xcode9.4
+osx_image: xcode10
script: xcodebuild -project iOS/break/break.xcodeproj -scheme break CODE_SIGNING_ALLOWED=NO
diff --git a/iOS/break/break-watchOS Extension/Info.plist b/iOS/break/break-watchOS Extension/Info.plist
index ad6b893..126842a 100644
--- a/iOS/break/break-watchOS Extension/Info.plist
+++ b/iOS/break/break-watchOS Extension/Info.plist
@@ -21,7 +21,7 @@
CFBundleSignature
????
CFBundleVersion
- 1401
+ 1402
CLKComplicationPrincipalClass
$(PRODUCT_MODULE_NAME).ComplicationController
CLKComplicationPrincipalClass - 2
@@ -39,7 +39,7 @@
NSExtensionAttributes
WKAppBundleIdentifier
- com.saagarjha.break.watchkitapp
+ org.vihan.break.watchkitapp
NSExtensionPointIdentifier
com.apple.watchkit
diff --git a/iOS/break/break-watchOS/Info.plist b/iOS/break/break-watchOS/Info.plist
index fe24be2..c73660b 100644
--- a/iOS/break/break-watchOS/Info.plist
+++ b/iOS/break/break-watchOS/Info.plist
@@ -21,14 +21,14 @@
CFBundleSignature
????
CFBundleVersion
- 1401
+ 1402
UISupportedInterfaceOrientations
UIInterfaceOrientationPortrait
UIInterfaceOrientationPortraitUpsideDown
WKCompanionAppBundleIdentifier
- com.saagarjha.break
+ org.vihan.break
WKWatchKitApp
diff --git a/iOS/break/break.xcodeproj/project.pbxproj b/iOS/break/break.xcodeproj/project.pbxproj
index e37c974..1a6b69e 100644
--- a/iOS/break/break.xcodeproj/project.pbxproj
+++ b/iOS/break/break.xcodeproj/project.pbxproj
@@ -109,6 +109,7 @@
49DF2B2E1CF3BDF900DC1EB7 /* CourseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49DF2B2D1CF3BDF900DC1EB7 /* CourseViewController.swift */; };
49E1BD091CF006EE002E819D /* SchoolLoopCategory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49E1BD081CF006EE002E819D /* SchoolLoopCategory.swift */; };
49F128C41F5F365F0000E19A /* RatingsReviewsTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49F128C31F5F365F0000E19A /* RatingsReviewsTableViewController.swift */; };
+ D84C2DBB21B788F3005F4442 /* LoopMail.css in Resources */ = {isa = PBXBuildFile; fileRef = D84C2DBA21B788F3005F4442 /* LoopMail.css */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -257,6 +258,7 @@
49DF2B2D1CF3BDF900DC1EB7 /* CourseViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CourseViewController.swift; sourceTree = ""; };
49E1BD081CF006EE002E819D /* SchoolLoopCategory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SchoolLoopCategory.swift; sourceTree = ""; };
49F128C31F5F365F0000E19A /* RatingsReviewsTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RatingsReviewsTableViewController.swift; sourceTree = ""; };
+ D84C2DBA21B788F3005F4442 /* LoopMail.css */ = {isa = PBXFileReference; lastKnownFileType = text.css; path = LoopMail.css; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -502,6 +504,7 @@
498665721C8D24E9004BA249 /* Info.plist */,
498665731C8D24E9004BA249 /* LaunchScreen.storyboard */,
498665671C8D24E9004BA249 /* Main.storyboard */,
+ D84C2DBA21B788F3005F4442 /* LoopMail.css */,
);
path = Resources;
sourceTree = "";
@@ -610,17 +613,17 @@
TargetAttributes = {
4906AB781CCDBFB800610448 = {
CreatedOnToolsVersion = 7.3;
- DevelopmentTeam = X4A9GH5NN2;
+ DevelopmentTeam = AP83862692;
LastSwiftMigration = 0900;
};
4906AB841CCDBFBA00610448 = {
CreatedOnToolsVersion = 7.3;
- DevelopmentTeam = X4A9GH5NN2;
+ DevelopmentTeam = AP83862692;
LastSwiftMigration = 0900;
};
493E17751C63E95000AFC7A6 = {
CreatedOnToolsVersion = 7.2.1;
- DevelopmentTeam = X4A9GH5NN2;
+ DevelopmentTeam = AP83862692;
LastSwiftMigration = 0900;
SystemCapabilities = {
com.apple.BackgroundModes = {
@@ -689,6 +692,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+ D84C2DBB21B788F3005F4442 /* LoopMail.css in Resources */,
493DDDEC1EA71AEA006104D4 /* AppIcon.xcassets in Resources */,
4986659E1C8D24E9004BA249 /* Main.storyboard in Resources */,
498665A71C8D24E9004BA249 /* LaunchScreen.storyboard in Resources */,
@@ -879,10 +883,10 @@
CLANG_ANALYZER_NONNULL = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
- DEVELOPMENT_TEAM = X4A9GH5NN2;
+ DEVELOPMENT_TEAM = AP83862692;
IBSC_MODULE = break_watchOS_Extension;
INFOPLIST_FILE = "break-watchOS/Info.plist";
- PRODUCT_BUNDLE_IDENTIFIER = com.saagarjha.break.watchkitapp;
+ PRODUCT_BUNDLE_IDENTIFIER = org.vihan.break.watchkitapp;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = watchos;
SKIP_INSTALL = YES;
@@ -899,10 +903,10 @@
CLANG_ANALYZER_NONNULL = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
- DEVELOPMENT_TEAM = X4A9GH5NN2;
+ DEVELOPMENT_TEAM = AP83862692;
IBSC_MODULE = break_watchOS_Extension;
INFOPLIST_FILE = "break-watchOS/Info.plist";
- PRODUCT_BUNDLE_IDENTIFIER = com.saagarjha.break.watchkitapp;
+ PRODUCT_BUNDLE_IDENTIFIER = org.vihan.break.watchkitapp;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = watchos;
SKIP_INSTALL = YES;
@@ -918,10 +922,10 @@
CLANG_ANALYZER_NONNULL = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
- DEVELOPMENT_TEAM = X4A9GH5NN2;
+ DEVELOPMENT_TEAM = AP83862692;
INFOPLIST_FILE = "break-watchOS Extension/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
- PRODUCT_BUNDLE_IDENTIFIER = com.saagarjha.break.watchkitapp.watchkitextension;
+ PRODUCT_BUNDLE_IDENTIFIER = org.vihan.break.watchkitapp.watchkitextension;
PRODUCT_NAME = "${TARGET_NAME}";
SDKROOT = watchos;
SKIP_INSTALL = YES;
@@ -938,10 +942,10 @@
CLANG_ANALYZER_NONNULL = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
- DEVELOPMENT_TEAM = X4A9GH5NN2;
+ DEVELOPMENT_TEAM = AP83862692;
INFOPLIST_FILE = "break-watchOS Extension/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
- PRODUCT_BUNDLE_IDENTIFIER = com.saagarjha.break.watchkitapp.watchkitextension;
+ PRODUCT_BUNDLE_IDENTIFIER = org.vihan.break.watchkitapp.watchkitextension;
PRODUCT_NAME = "${TARGET_NAME}";
SDKROOT = watchos;
SKIP_INSTALL = YES;
@@ -1064,11 +1068,11 @@
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_ENTITLEMENTS = break/break.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
- DEVELOPMENT_TEAM = X4A9GH5NN2;
+ DEVELOPMENT_TEAM = AP83862692;
INFOPLIST_FILE = "$(SRCROOT)/break/Resources/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
- PRODUCT_BUNDLE_IDENTIFIER = com.saagarjha.break;
+ PRODUCT_BUNDLE_IDENTIFIER = org.vihan.break;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.0;
@@ -1083,11 +1087,11 @@
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_ENTITLEMENTS = break/break.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
- DEVELOPMENT_TEAM = X4A9GH5NN2;
+ DEVELOPMENT_TEAM = AP83862692;
INFOPLIST_FILE = "$(SRCROOT)/break/Resources/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
- PRODUCT_BUNDLE_IDENTIFIER = com.saagarjha.break;
+ PRODUCT_BUNDLE_IDENTIFIER = org.vihan.break;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 4.0;
diff --git a/iOS/break/break/Resources/Info.plist b/iOS/break/break/Resources/Info.plist
index 48e7e9c..a078eb3 100644
--- a/iOS/break/break/Resources/Info.plist
+++ b/iOS/break/break/Resources/Info.plist
@@ -19,7 +19,7 @@
CFBundleSignature
????
CFBundleVersion
- 1401
+ 1402
LSRequiresIPhoneOS
NSFaceIDUsageDescription
diff --git a/iOS/break/break/Resources/LoopMail.css b/iOS/break/break/Resources/LoopMail.css
new file mode 100644
index 0000000..d07ffc9
--- /dev/null
+++ b/iOS/break/break/Resources/LoopMail.css
@@ -0,0 +1,31 @@
+html, body {
+ font-size: 16px;
+ margin: 0.5rem;
+}
+
+h1.subject {
+ font-weight: bold;
+ font-size: 1.4rem;
+ margin-bottom: 0.2rem;
+}
+
+.sender {
+ color: #AAA;
+ font-weight: 300;
+}
+
+.user {
+ display: inline-block;
+ font-size: 1rem;
+ padding: 2px 16px;
+ border-radius: 16px;
+ background: rgba(26, 188, 156, 0.25);
+ color: rgba(26, 188, 156, 1.0);
+}
+
+hr.divider {
+ border: none;
+ border: 0.5px solid rgba(0, 0, 0, 0.1
+ );
+ margin: 1rem 0 2rem 0;
+}
diff --git a/iOS/break/break/break/Locker/LockerItemCollectionViewCell.swift b/iOS/break/break/break/Locker/LockerItemCollectionViewCell.swift
index 2aa5e4d..5d56d6a 100644
--- a/iOS/break/break/break/Locker/LockerItemCollectionViewCell.swift
+++ b/iOS/break/break/break/Locker/LockerItemCollectionViewCell.swift
@@ -11,12 +11,4 @@ import UIKit
class LockerItemCollectionViewCell: UICollectionViewCell {
@IBOutlet weak var typeImageView: UIImageView!
@IBOutlet weak var nameLabel: UILabel!
- @IBOutlet weak var typeImageViewWidthConstraint: NSLayoutConstraint! {
- didSet {
- // Not sure why this is necessary, but adding it makes AutoLayout
- // stop complaining
- contentView.translatesAutoresizingMaskIntoConstraints = false
- nameLabel.preferredMaxLayoutWidth = typeImageViewWidthConstraint.constant
- }
- }
}
diff --git a/iOS/break/break/break/Locker/LockerViewController.swift b/iOS/break/break/break/Locker/LockerViewController.swift
index d3996da..1a2afcc 100644
--- a/iOS/break/break/break/Locker/LockerViewController.swift
+++ b/iOS/break/break/break/Locker/LockerViewController.swift
@@ -15,6 +15,7 @@ class LockerViewController: UIViewController, UICollectionViewDataSource, UIColl
static let cellIdentifier = "lockerItem"
static let cellWidth: CGFloat = 144
+ static let otherCellHeight: CGFloat = 128 + 8
var path = "/"
@@ -137,6 +138,21 @@ class LockerViewController: UIViewController, UICollectionViewDataSource, UIColl
return UIEdgeInsets(inset: inset)
}
}
+
+ func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
+ let width: CGFloat
+ if #available(iOS 11.0, *) {
+ width = lockerCollectionView.frame.width - lockerCollectionView.safeAreaInsets.right - lockerCollectionView.safeAreaInsets.left
+ } else {
+ width = lockerCollectionView.frame.width
+ }
+ let rowSize = Int(width / LockerViewController.cellWidth)
+ let startIndex = indexPath.row / rowSize
+ let maxTextHeight = (startIndex.. Int {
return 1
diff --git a/iOS/break/break/break/LoopMail/LoopMailMessageViewController.swift b/iOS/break/break/break/LoopMail/LoopMailMessageViewController.swift
index 3599415..384f5d3 100644
--- a/iOS/break/break/break/LoopMail/LoopMailMessageViewController.swift
+++ b/iOS/break/break/break/LoopMail/LoopMailMessageViewController.swift
@@ -56,14 +56,25 @@ class LoopMailMessageViewController: WebViewToSafariViewControllerShimViewContro
return
}
`self`.loopMail = loopMail
- `self`.message = "\(breakConstants.webViewDefaultStyle)From: \(loopMail.sender.name)
\(loopMail.subject)
\(loopMail.message)"
+ `self`.message = """
+
+
+\(breakConstants.webViewDefaultStyle)
+
+
+
+\(loopMail.subject)
+From: \(loopMail.sender.name)
+
+\(loopMail.message)
+"""
if !loopMail.links.isEmpty {
- `self`.message += "
Links:
"
+ `self`.message += "
Links:
"
}
for link in loopMail.links {
`self`.message += "\(link.title)
"
}
- `self`.webView.loadHTMLString(`self`.message, baseURL: nil)
+ `self`.webView.loadHTMLString(`self`.message, baseURL: Bundle.main.resourceURL)
}
}
}
diff --git a/iOS/break/break/break/LoopMail/LoopMailViewController.swift b/iOS/break/break/break/LoopMail/LoopMailViewController.swift
index 87cd8ae..3930485 100644
--- a/iOS/break/break/break/LoopMail/LoopMailViewController.swift
+++ b/iOS/break/break/break/LoopMail/LoopMailViewController.swift
@@ -14,6 +14,7 @@ class LoopMailViewController: UITableViewController, Refreshable, UISearchResult
static let dateFormatter: DateFormatter = {
let dateFormatter = DateFormatter()
+ dateFormatter.doesRelativeDateFormatting = true
dateFormatter.dateStyle = .long
dateFormatter.timeStyle = .short
return dateFormatter
@@ -100,6 +101,10 @@ class LoopMailViewController: UITableViewController, Refreshable, UISearchResult
tableView.deselectRow(at: indexPath, animated: true)
}
+ override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
+ return UITableViewAutomaticDimension
+ }
+
override func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath) -> [UITableViewRowAction]? {
let replyAction = UITableViewRowAction(style: .default, title: "Reply") { [weak self] _, indexPath in
guard let `self` = self else {
diff --git a/iOS/break/break/break/Main.storyboard b/iOS/break/break/break/Main.storyboard
index 68b5ee6..e9aa2e5 100644
--- a/iOS/break/break/break/Main.storyboard
+++ b/iOS/break/break/break/Main.storyboard
@@ -1,14 +1,11 @@
-
+
-
-
-
-
+
@@ -31,22 +28,22 @@
-
+
-
+
-
+
-
+
@@ -77,7 +74,7 @@
-
+
@@ -154,7 +151,7 @@
-
+
@@ -177,7 +174,7 @@
-
+
@@ -262,49 +259,47 @@
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
@@ -351,7 +346,7 @@
-
+
@@ -380,7 +375,7 @@
-
+
@@ -453,7 +448,7 @@
-
+
@@ -489,7 +484,7 @@
-
+
@@ -580,50 +575,80 @@
-
-
+
+
-
+
-
-
-
-
-
-
-
-
+
+
-
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
@@ -631,7 +656,7 @@
-
+
@@ -655,7 +680,7 @@
-
+
@@ -968,13 +993,13 @@
-
+
-
+
@@ -1019,7 +1044,7 @@
-
+
@@ -1066,7 +1091,7 @@
-
+
@@ -1232,27 +1257,27 @@
-
-
+
+
-
+
-
+
-
+
-
+
@@ -1265,7 +1290,7 @@
-
+
@@ -1286,7 +1311,7 @@
-
+
@@ -1305,7 +1330,7 @@
-
+
@@ -1375,6 +1400,7 @@
+
@@ -1382,7 +1408,7 @@
-
+