Merge branch 'mac-release' into main

This commit is contained in:
Maurice Parker 2020-11-13 07:15:26 -06:00
commit 65510b1901
3 changed files with 9 additions and 5 deletions

View File

@ -96,7 +96,7 @@ class AddWebFeedWindowController : NSWindowController, AddFeedWindowController {
return
}
let container = selectedContainer()!
guard let container = selectedContainer() else { return }
AddWebFeedDefaultContainer.saveDefaultContainer(container)
delegate?.addFeedWindowController(self, userEnteredURL: url, userEnteredTitle: userEnteredTitle, container: container)
@ -122,7 +122,7 @@ class AddWebFeedWindowController : NSWindowController, AddFeedWindowController {
private extension AddWebFeedWindowController {
private func updateUI() {
addButton.isEnabled = urlTextField.stringValue.mayBeURL
addButton.isEnabled = urlTextField.stringValue.mayBeURL && selectedContainer() != nil
}
func cancelSheet() {
@ -130,6 +130,7 @@ private extension AddWebFeedWindowController {
}
func selectedContainer() -> Container? {
guard folderPopupButton.selectedItem?.isEnabled ?? false else { return nil }
return folderPopupButton.selectedItem?.representedObject as? Container
}
}

View File

@ -53,7 +53,10 @@ final class MultilineTextFieldSizer {
}
static func size(for attributedString: NSAttributedString, numberOfLines: Int, width: Int) -> TextFieldSizeInfo {
guard attributedString.length > 0 else {
return TextFieldSizeInfo(size: NSSize.zero, numberOfLinesUsed: 0)
}
// Assumes the same font family/size for the whole string
let font = attributedString.attribute(.font, at: 0, effectiveRange: nil) as! NSFont

View File

@ -1,6 +1,6 @@
// High Level Settings common to both the Mac application and any extensions we bundle with it
MARKETING_VERSION = 5.1.2
CURRENT_PROJECT_VERSION = 3016
MARKETING_VERSION = 5.1.3
CURRENT_PROJECT_VERSION = 3018
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;