Skip to content

Commit

Permalink
replace material bottom sheet with default UIKit impl
Browse files Browse the repository at this point in the history
  • Loading branch information
rustyshelf committed Oct 4, 2022
1 parent af6cc83 commit 713b8ec
Show file tree
Hide file tree
Showing 12 changed files with 53 additions and 101 deletions.
3 changes: 1 addition & 2 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ source 'https://cdn.cocoapods.org/'

use_modular_headers!

app_ios_deployment_target = Gem::Version.new('14.1')
app_ios_deployment_target = Gem::Version.new('15.0')

def common_pods
pod 'JLRoutes'
pod 'MaterialComponents/BottomSheet'
pod 'Kingfisher'
end

Expand Down
34 changes: 1 addition & 33 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,60 +1,28 @@
PODS:
- JLRoutes (2.1)
- Kingfisher (7.2.1)
- MaterialComponents/Availability (124.2.0)
- MaterialComponents/BottomSheet (124.2.0):
- MaterialComponents/Elevation
- MaterialComponents/private/KeyboardWatcher
- MaterialComponents/private/Math
- MaterialComponents/ShadowElevations
- MaterialComponents/ShadowLayer
- MaterialComponents/ShapeLibrary
- MaterialComponents/Shapes
- MaterialComponents/Elevation (124.2.0):
- MaterialComponents/Availability
- MaterialComponents/private/Color
- MaterialComponents/private/Math
- MaterialComponents/private/Application (124.2.0)
- MaterialComponents/private/Color (124.2.0):
- MaterialComponents/Availability
- MaterialComponents/private/KeyboardWatcher (124.2.0):
- MaterialComponents/private/Application
- MaterialComponents/private/Math (124.2.0)
- MaterialComponents/ShadowElevations (124.2.0)
- MaterialComponents/ShadowLayer (124.2.0):
- MaterialComponents/ShadowElevations
- MaterialComponents/ShapeLibrary (124.2.0):
- MaterialComponents/private/Math
- MaterialComponents/Shapes
- MaterialComponents/Shapes (124.2.0):
- MaterialComponents/private/Color
- MaterialComponents/private/Math
- MaterialComponents/ShadowLayer
- SwiftGen (6.5.1)
- SwiftLint (0.49.1)

DEPENDENCIES:
- JLRoutes
- Kingfisher
- MaterialComponents/BottomSheet
- SwiftGen (~> 6.0)
- SwiftLint (~> 0.49)

SPEC REPOS:
trunk:
- JLRoutes
- Kingfisher
- MaterialComponents
- SwiftGen
- SwiftLint

SPEC CHECKSUMS:
JLRoutes: d755245322b94227662ea3e43492fdca94e05c5b
Kingfisher: 7c084bebf7d548c623ad41bcf765fb200efed369
MaterialComponents: 1a9b2d9d45b1601ae544de85089adc4c464306d4
SwiftGen: a6d22010845f08fe18fbdf3a07a8e380fd22e0ea
SwiftLint: 32ee33ded0636d0905ef6911b2b67bbaeeedafa5

PODFILE CHECKSUM: 1900823a61d3d86a717273fac724ddf099cbe6e3
PODFILE CHECKSUM: 97e950a87ff8ad044da5bda3b257366c7dcaa791

COCOAPODS: 1.11.3
52 changes: 28 additions & 24 deletions podcasts.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,7 @@
BD56102D200DA4BC002F2D53 /* Podcast+Formatting.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD56102C200DA4BC002F2D53 /* Podcast+Formatting.swift */; };
BD561031200DADA0002F2D53 /* Episode+Formatting.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD561030200DADA0002F2D53 /* Episode+Formatting.swift */; };
BD57646A17E140BE0039CF8B /* NSNull+Length.m in Sources */ = {isa = PBXBuildFile; fileRef = BD57646917E140BE0039CF8B /* NSNull+Length.m */; };
BD57D7F928EBD4DC0034CF53 /* UIViewController+Modal.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD57D7F828EBD4DC0034CF53 /* UIViewController+Modal.swift */; };
BD583AF421AE5F9E0048D78D /* EpisodeDateHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD583AF321AE5F9E0048D78D /* EpisodeDateHelper.swift */; };
BD585C1D204785EF00AC842C /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD585C1C204785EF00AC842C /* AppDelegate.swift */; };
BD585C1F2047887700AC842C /* AppDelegate+UrlHandling.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD585C1E2047887700AC842C /* AppDelegate+UrlHandling.swift */; };
Expand Down Expand Up @@ -2172,6 +2173,7 @@
BD561030200DADA0002F2D53 /* Episode+Formatting.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Episode+Formatting.swift"; sourceTree = "<group>"; };
BD57646817E140BE0039CF8B /* NSNull+Length.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSNull+Length.h"; sourceTree = "<group>"; };
BD57646917E140BE0039CF8B /* NSNull+Length.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSNull+Length.m"; sourceTree = "<group>"; };
BD57D7F828EBD4DC0034CF53 /* UIViewController+Modal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIViewController+Modal.swift"; sourceTree = "<group>"; };
BD583AF321AE5F9E0048D78D /* EpisodeDateHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EpisodeDateHelper.swift; sourceTree = "<group>"; };
BD585C1C204785EF00AC842C /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
BD585C1E2047887700AC842C /* AppDelegate+UrlHandling.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AppDelegate+UrlHandling.swift"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -5544,6 +5546,7 @@
463538AD26E8F4AE00BA9D35 /* Server+Strings.swift */,
46851BB62790D5E00065C8B2 /* PodcastCollectionColors+Helpers.swift */,
C7F4BABE28DB7F7C001C9785 /* DiscoverItem+Helper.swift */,
BD57D7F828EBD4DC0034CF53 /* UIViewController+Modal.swift */,
);
name = Extensions;
sourceTree = "<group>";
Expand Down Expand Up @@ -7108,6 +7111,7 @@
400A3EFA22703D54007361C7 /* AccountUpdatedViewController.swift in Sources */,
BD998AC827B2257D00B38857 /* PodcastPickerRow.swift in Sources */,
403946EC2285898400F55162 /* CustomStorageColorCell.swift in Sources */,
BD57D7F928EBD4DC0034CF53 /* UIViewController+Modal.swift in Sources */,
BD00CB2B24BD20CD00A10257 /* TimeStepperCell.swift in Sources */,
BDC377631C44E6BD001FD219 /* EmptyHeaderView.swift in Sources */,
BD9324772398BC9D004F19A1 /* FeatureTour.swift in Sources */,
Expand Down Expand Up @@ -7629,7 +7633,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
INFOPLIST_FILE = PodcastsIntentsUI/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -7667,7 +7671,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
INFOPLIST_FILE = PodcastsIntentsUI/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -7705,7 +7709,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
INFOPLIST_FILE = PodcastsIntents/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -7744,7 +7748,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
INFOPLIST_FILE = PodcastsIntents/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -7784,7 +7788,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
INFOPLIST_FILE = WidgetExtension/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -7827,7 +7831,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
INFOPLIST_FILE = WidgetExtension/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -7869,7 +7873,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
INFOPLIST_FILE = WidgetExtension/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -8259,7 +8263,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
INFOPLIST_FILE = NotificationExtension/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -8290,7 +8294,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
INFOPLIST_FILE = NotificationExtension/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -8381,7 +8385,7 @@
"$(PROJECT_DIR)",
);
INFOPLIST_FILE = "podcasts/podcasts-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -8411,7 +8415,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
INFOPLIST_FILE = NotificationExtension/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -8442,7 +8446,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
INFOPLIST_FILE = NotificationContent/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -8485,7 +8489,7 @@
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 7.0;
WATCHOS_DEPLOYMENT_TARGET = 8.0;
};
name = Staging;
};
Expand Down Expand Up @@ -8521,7 +8525,7 @@
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OBJC_BRIDGING_HEADER = "Pocket Casts Watch App Extension/watch-bridging-header.h";
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 7.0;
WATCHOS_DEPLOYMENT_TARGET = 8.0;
};
name = Staging;
};
Expand All @@ -8547,7 +8551,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
INFOPLIST_FILE = PodcastsIntents/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -8585,7 +8589,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
INFOPLIST_FILE = PodcastsIntentsUI/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -8731,7 +8735,7 @@
"$(PROJECT_DIR)",
);
INFOPLIST_FILE = "podcasts/podcasts-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -8760,7 +8764,7 @@
"$(PROJECT_DIR)",
);
INFOPLIST_FILE = "podcasts/podcasts-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -8802,7 +8806,7 @@
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 7.0;
WATCHOS_DEPLOYMENT_TARGET = 8.0;
};
name = Debug;
};
Expand Down Expand Up @@ -8834,7 +8838,7 @@
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 7.0;
WATCHOS_DEPLOYMENT_TARGET = 8.0;
};
name = Release;
};
Expand Down Expand Up @@ -8870,7 +8874,7 @@
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OBJC_BRIDGING_HEADER = "Pocket Casts Watch App Extension/watch-bridging-header.h";
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 7.0;
WATCHOS_DEPLOYMENT_TARGET = 8.0;
};
name = Debug;
};
Expand Down Expand Up @@ -8908,7 +8912,7 @@
SWIFT_OBJC_BRIDGING_HEADER = "Pocket Casts Watch App Extension/watch-bridging-header.h";
SWIFT_OPTIMIZATION_LEVEL = "-O";
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 7.0;
WATCHOS_DEPLOYMENT_TARGET = 8.0;
};
name = Release;
};
Expand All @@ -8927,7 +8931,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
INFOPLIST_FILE = NotificationContent/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -8958,7 +8962,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
INFOPLIST_FILE = NotificationContent/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down
1 change: 0 additions & 1 deletion podcasts/MultiSelectActionController.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import MaterialComponents.MaterialBottomSheet
import PocketCastsDataModel
import UIKit

Expand Down
12 changes: 3 additions & 9 deletions podcasts/MultiSelectFooterView.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import MaterialComponents.MaterialBottomSheet
import UIKit

class MultiSelectFooterView: UIView, MultiSelectActionOrderDelegate {
Expand Down Expand Up @@ -133,14 +132,9 @@ class MultiSelectFooterView: UIView, MultiSelectActionOrderDelegate {

let actions = getActionsFunc()

let bottomSheet = MDCBottomSheetController(contentViewController: MultiSelectActionController(actions: actions, delegate: self, actionDelegate: delegate, numSelectedEpisodes: delegate.multiSelectedBaseEpisodes().count, setActionsFunc: setActionsFunc, themeOverride: themeOverride))
let shapeGenerator = MDCCurvedRectShapeGenerator(cornerSize: CGSize(width: 8, height: 8))
bottomSheet.setShapeGenerator(shapeGenerator, for: .preferred)
bottomSheet.setShapeGenerator(shapeGenerator, for: .extended)
bottomSheet.setShapeGenerator(shapeGenerator, for: .closed)
bottomSheet.isScrimAccessibilityElement = true
bottomSheet.scrimAccessibilityLabel = L10n.accessibilityDismiss
delegate.multiSelectPresentingViewController().present(bottomSheet, animated: true, completion: nil)
let multiSelectController = MultiSelectActionController(actions: actions, delegate: self, actionDelegate: delegate, numSelectedEpisodes: delegate.multiSelectedBaseEpisodes().count, setActionsFunc: setActionsFunc, themeOverride: themeOverride)
multiSelectController.configureBottomSheetModal()
delegate.multiSelectPresentingViewController().present(multiSelectController, animated: true, completion: nil)
}

@IBAction func rightActionTapped(_ sender: Any) {
Expand Down
Loading

0 comments on commit 713b8ec

Please sign in to comment.