Skip to content

Commit

Permalink
Allow for feeds or entries without images
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelnisi committed Jan 1, 2022
1 parent 22c88e0 commit c65472a
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 21 deletions.
12 changes: 6 additions & 6 deletions Podest.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 11;
CURRENT_PROJECT_VERSION = 2;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
Expand Down Expand Up @@ -867,7 +867,7 @@
CODE_SIGN_IDENTITY = "iPhone Distribution";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
COPY_PHASE_STRIP = YES;
CURRENT_PROJECT_VERSION = 11;
CURRENT_PROJECT_VERSION = 2;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
Expand Down Expand Up @@ -898,7 +898,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 11;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = "";
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
Expand Down Expand Up @@ -927,7 +927,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 11;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = "";
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
Expand Down Expand Up @@ -977,7 +977,7 @@
repositoryURL = "https://github.com/michaelnisi/podcasts";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 1.1.1;
minimumVersion = 1.2.0;
};
};
4C233A1325D8617F001782AE /* XCRemoteSwiftPackageReference "InsetPresentation" */ = {
Expand Down Expand Up @@ -1033,7 +1033,7 @@
repositoryURL = "https://github.com/michaelnisi/feedkit";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 18.0.0;
minimumVersion = 19.0.0;
};
};
/* End XCRemoteSwiftPackageReference section */
Expand Down
5 changes: 3 additions & 2 deletions Podest.xcodeproj/xcshareddata/xcschemes/Podest.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
enableAddressSanitizer = "YES"
enableASanStackUseAfterReturn = "YES"
enableUBSanitizer = "YES"
launchStyle = "0"
Expand All @@ -56,7 +57,7 @@
<CommandLineArguments>
<CommandLineArgument
argument = "-ink.codes.podest.noSync"
isEnabled = "NO">
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "-ink.codes.podest.removeReceipts"
Expand All @@ -68,7 +69,7 @@
</CommandLineArgument>
<CommandLineArgument
argument = "-ink.codes.podest.noDownloading"
isEnabled = "NO">
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "-ink.codes.podest.allButUpsideDown"
Expand Down
8 changes: 4 additions & 4 deletions Podest.xcworkspace/xcshareddata/swiftpm/Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
"repositoryURL": "https://github.com/michaelnisi/feedkit",
"state": {
"branch": null,
"revision": "00677ed2b05378ec5769a08ac218db36331050a0",
"version": "18.1.0"
"revision": "4e170f0f07941467a3ce49ba06b60e34d601fa6c",
"version": "19.0.0"
}
},
{
Expand Down Expand Up @@ -123,8 +123,8 @@
"repositoryURL": "https://github.com/michaelnisi/podcasts",
"state": {
"branch": null,
"revision": "8478829fef2bc564b4d1328fee64987881c5fc12",
"version": "1.1.1"
"revision": "8b0e9bfdf33d0831a77b274a1a7a7ce30ea10b6e",
"version": "1.2.0"
}
},
{
Expand Down
8 changes: 8 additions & 0 deletions Podest/App/Podest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ protocol Navigator: AnyObject {
var navigationDelegate: ViewControllers? { get set }
}

// MARK: - UIImage

extension UIImage {
static var defaultFeedImage: UIImage {
UIImage(named: "Oval")!
}
}

// MARK: - Accessing User Library and Queue

/// Defines a callback interface to the user library and queue.
Expand Down
4 changes: 2 additions & 2 deletions Podest/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<string>10.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -36,7 +36,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<string>2</string>
<key>INIntentsSupported</key>
<array>
<string>Intent</string>
Expand Down
4 changes: 2 additions & 2 deletions Podest/Modules/Podcast/ListDataSource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -200,14 +200,14 @@ extension ListDataSource: UITableViewDataSource {
cell.selectionStyle = .none

images.cancel(displaying: cell.largeImageView)
cell.invalidate(image: UIImage(named: "Oval"))
cell.invalidate(image: UIImage.defaultFeedImage)

cell.layoutSubviewsBlock = { [weak self] imageView in
self?.images.loadImage(
representing: feed,
into: imageView,
options: FKImageLoadingOptions(
fallbackImage: UIImage(named: "Oval"),
fallbackImage: UIImage.defaultFeedImage,
quality: .high,
isClean: true
)
Expand Down
4 changes: 2 additions & 2 deletions Podest/Modules/Queue/QueueDataSource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ extension QueueDataSource {
}

images.cancel(displaying: cell.imageView)
cell.invalidate(image: UIImage(named: "Oval"))
cell.invalidate(image: UIImage.defaultFeedImage)

cell.tag = entry.hashValue

Expand All @@ -443,7 +443,7 @@ extension QueueDataSource {
representing: entry,
into: imageView,
options: FKImageLoadingOptions(
fallbackImage: UIImage(named: "Oval"),
fallbackImage: UIImage.defaultFeedImage,
quality: .medium,
isDirect: true
)
Expand Down
4 changes: 2 additions & 2 deletions Podest/Modules/Search/SearchResultsDataSource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -502,14 +502,14 @@ extension SearchResultsDataSource: UITableViewDataSource {
cell.accessoryType = .disclosureIndicator

images.cancel(displaying: cell.imageView)
cell.invalidate(image: UIImage(named: "Oval"))
cell.invalidate(image: UIImage.defaultFeedImage)

cell.layoutSubviewsBlock = { [weak self] imageView in
self?.images.loadImage(
representing: feed,
into: imageView,
options: FKImageLoadingOptions(
fallbackImage: UIImage(named: "Oval"),
fallbackImage: UIImage.defaultFeedImage,
quality: .medium,
isDirect: true
)
Expand Down
2 changes: 1 addition & 1 deletion Settings.bundle/Root.plist
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
</dict>
<dict>
<key>DefaultValue</key>
<string>10 (11)</string>
<string>10 (2)</string>
<key>Key</key>
<string>enabled_preference</string>
<key>Title</key>
Expand Down

0 comments on commit c65472a

Please sign in to comment.