Skip to content

Commit

Permalink
Fix "Official Community" link, Improve navigation routing pattern (#656)
Browse files Browse the repository at this point in the history
  • Loading branch information
boscojwho authored Oct 11, 2023
1 parent a497f6e commit 309b4a2
Show file tree
Hide file tree
Showing 29 changed files with 541 additions and 389 deletions.
62 changes: 31 additions & 31 deletions Mlem.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
503BA26F2A2C94540052516C /* URL+Identifiable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 503BA26E2A2C94540052516C /* URL+Identifiable.swift */; };
504106CD2A744D7F000AAEF8 /* CommentRepository+Dependency.swift in Sources */ = {isa = PBXBuildFile; fileRef = 504106CC2A744D7F000AAEF8 /* CommentRepository+Dependency.swift */; };
504ECBAA2AB27C73006C0B96 /* LandingPage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 504ECBA92AB27C73006C0B96 /* LandingPage.swift */; };
504ECBAC2AB27CB1006C0B96 /* OnboardingRoute.swift in Sources */ = {isa = PBXBuildFile; fileRef = 504ECBAB2AB27CB1006C0B96 /* OnboardingRoute.swift */; };
504ECBAE2AB45B2A006C0B96 /* LemmyURL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 504ECBAD2AB45B2A006C0B96 /* LemmyURL.swift */; };
504ECBB12AB4B101006C0B96 /* LemmyURLTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 504ECBB02AB4B101006C0B96 /* LemmyURLTests.swift */; };
505240E32A86916500EA4558 /* FavoriteCommunitiesTracker+Dependency.swift in Sources */ = {isa = PBXBuildFile; fileRef = 505240E22A86916500EA4558 /* FavoriteCommunitiesTracker+Dependency.swift */; };
Expand Down Expand Up @@ -452,15 +451,16 @@
CDF8426B2A4A2AB600723DA0 /* Inbox Item.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDF8426A2A4A2AB600723DA0 /* Inbox Item.swift */; };
CDF8426F2A4A385A00723DA0 /* Inbox Item Type.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDF8426E2A4A385A00723DA0 /* Inbox Item Type.swift */; };
CDF9EF332AB2845C003F885B /* Icons.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDF9EF322AB2845C003F885B /* Icons.swift */; };
E40E018C2AABF85500410B2C /* NavigationRoutes.swift in Sources */ = {isa = PBXBuildFile; fileRef = E40E018B2AABF85500410B2C /* NavigationRoutes.swift */; };
E40E018E2AABFBDE00410B2C /* NavigationRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E40E018D2AABFBDE00410B2C /* NavigationRouter.swift */; };
E40E01902AABFC9300410B2C /* AnyNavigationPath.swift in Sources */ = {isa = PBXBuildFile; fileRef = E40E018F2AABFC9300410B2C /* AnyNavigationPath.swift */; };
E40E018C2AABF85500410B2C /* AppRoutes.swift in Sources */ = {isa = PBXBuildFile; fileRef = E40E018B2AABF85500410B2C /* AppRoutes.swift */; };
E40E018E2AABFBDE00410B2C /* AnyNavigationPath.swift in Sources */ = {isa = PBXBuildFile; fileRef = E40E018D2AABFBDE00410B2C /* AnyNavigationPath.swift */; };
E40E01902AABFC9300410B2C /* AnyNavigablePath.swift in Sources */ = {isa = PBXBuildFile; fileRef = E40E018F2AABFC9300410B2C /* AnyNavigablePath.swift */; };
E42D9B5A2AD6802B0087693C /* OnboardingRoutes.swift in Sources */ = {isa = PBXBuildFile; fileRef = E42D9B592AD6802B0087693C /* OnboardingRoutes.swift */; };
E453477E2A9DE37300D1B46F /* Array+SafeIndexing.swift in Sources */ = {isa = PBXBuildFile; fileRef = E453477D2A9DE37300D1B46F /* Array+SafeIndexing.swift */; };
E453A1D02A81C2140004BB8A /* QuickLookPreviewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E453A1CF2A81C2140004BB8A /* QuickLookPreviewController.swift */; };
E47478132AAC350E001CB1AC /* NavigationLink+Helpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = E47478122AAC350E001CB1AC /* NavigationLink+Helpers.swift */; };
E47478152AAC3C19001CB1AC /* NavigationContext.swift in Sources */ = {isa = PBXBuildFile; fileRef = E47478142AAC3C19001CB1AC /* NavigationContext.swift */; };
E47B2B762A902DE200629AF7 /* SettingsRoutes.swift in Sources */ = {isa = PBXBuildFile; fileRef = E47B2B752A902DE200629AF7 /* SettingsRoutes.swift */; };
E4902BAB2A9024BF0054FB36 /* SettingsRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4902BAA2A9024BF0054FB36 /* SettingsRouter.swift */; };
E47B2B762A902DE200629AF7 /* SettingsValues.swift in Sources */ = {isa = PBXBuildFile; fileRef = E47B2B752A902DE200629AF7 /* SettingsValues.swift */; };
E48DE4A22AC3F23F004E6291 /* DestinationValue.swift in Sources */ = {isa = PBXBuildFile; fileRef = E48DE4A12AC3F23F004E6291 /* DestinationValue.swift */; };
E49E01F42ABD99D300E42BB3 /* Routable.swift in Sources */ = {isa = PBXBuildFile; fileRef = E49E01F32ABD99D300E42BB3 /* Routable.swift */; };
E49F0E762A90395400BC4EE3 /* NavigationPath+Helpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = E49F0E752A90395400BC4EE3 /* NavigationPath+Helpers.swift */; };
E4D4DBA02A7C7B9D00C4F3DE /* Comments.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4D4DB9F2A7C7B9D00C4F3DE /* Comments.swift */; };
Expand Down Expand Up @@ -552,7 +552,6 @@
503BA26E2A2C94540052516C /* URL+Identifiable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "URL+Identifiable.swift"; sourceTree = "<group>"; };
504106CC2A744D7F000AAEF8 /* CommentRepository+Dependency.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "CommentRepository+Dependency.swift"; sourceTree = "<group>"; };
504ECBA92AB27C73006C0B96 /* LandingPage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LandingPage.swift; sourceTree = "<group>"; };
504ECBAB2AB27CB1006C0B96 /* OnboardingRoute.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingRoute.swift; sourceTree = "<group>"; };
504ECBAD2AB45B2A006C0B96 /* LemmyURL.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LemmyURL.swift; sourceTree = "<group>"; };
504ECBB02AB4B101006C0B96 /* LemmyURLTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LemmyURLTests.swift; sourceTree = "<group>"; };
505240E22A86916500EA4558 /* FavoriteCommunitiesTracker+Dependency.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "FavoriteCommunitiesTracker+Dependency.swift"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -932,15 +931,16 @@
CDF8426A2A4A2AB600723DA0 /* Inbox Item.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Inbox Item.swift"; sourceTree = "<group>"; };
CDF8426E2A4A385A00723DA0 /* Inbox Item Type.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Inbox Item Type.swift"; sourceTree = "<group>"; };
CDF9EF322AB2845C003F885B /* Icons.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Icons.swift; sourceTree = "<group>"; };
E40E018B2AABF85500410B2C /* NavigationRoutes.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationRoutes.swift; sourceTree = "<group>"; };
E40E018D2AABFBDE00410B2C /* NavigationRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationRouter.swift; sourceTree = "<group>"; };
E40E018F2AABFC9300410B2C /* AnyNavigationPath.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnyNavigationPath.swift; sourceTree = "<group>"; };
E40E018B2AABF85500410B2C /* AppRoutes.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppRoutes.swift; sourceTree = "<group>"; };
E40E018D2AABFBDE00410B2C /* AnyNavigationPath.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnyNavigationPath.swift; sourceTree = "<group>"; };
E40E018F2AABFC9300410B2C /* AnyNavigablePath.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnyNavigablePath.swift; sourceTree = "<group>"; };
E42D9B592AD6802B0087693C /* OnboardingRoutes.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OnboardingRoutes.swift; sourceTree = "<group>"; };
E453477D2A9DE37300D1B46F /* Array+SafeIndexing.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Array+SafeIndexing.swift"; sourceTree = "<group>"; };
E453A1CF2A81C2140004BB8A /* QuickLookPreviewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QuickLookPreviewController.swift; sourceTree = "<group>"; };
E47478122AAC350E001CB1AC /* NavigationLink+Helpers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NavigationLink+Helpers.swift"; sourceTree = "<group>"; };
E47478142AAC3C19001CB1AC /* NavigationContext.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationContext.swift; sourceTree = "<group>"; };
E47B2B752A902DE200629AF7 /* SettingsRoutes.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsRoutes.swift; sourceTree = "<group>"; };
E4902BAA2A9024BF0054FB36 /* SettingsRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsRouter.swift; sourceTree = "<group>"; };
E47B2B752A902DE200629AF7 /* SettingsValues.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsValues.swift; sourceTree = "<group>"; };
E48DE4A12AC3F23F004E6291 /* DestinationValue.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DestinationValue.swift; sourceTree = "<group>"; };
E49E01F32ABD99D300E42BB3 /* Routable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Routable.swift; sourceTree = "<group>"; };
E49F0E752A90395400BC4EE3 /* NavigationPath+Helpers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NavigationPath+Helpers.swift"; sourceTree = "<group>"; };
E4D4DB9F2A7C7B9D00C4F3DE /* Comments.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Comments.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1179,7 +1179,6 @@
children = (
504ECBA92AB27C73006C0B96 /* LandingPage.swift */,
CDE3BA862A8C25B000B972E2 /* OnboardingView.swift */,
504ECBAB2AB27CB1006C0B96 /* OnboardingRoute.swift */,
CD2053112ACB72190000AA38 /* AccountTransitionView.swift */,
);
path = Onboarding;
Expand Down Expand Up @@ -2385,34 +2384,35 @@
path = "Quick Look";
sourceTree = "<group>";
};
E47B2B742A902DB400629AF7 /* Route */ = {
E47B2B742A902DB400629AF7 /* Routes */ = {
isa = PBXGroup;
children = (
E40E018B2AABF85500410B2C /* NavigationRoutes.swift */,
E47B2B752A902DE200629AF7 /* SettingsRoutes.swift */,
E49E01F32ABD99D300E42BB3 /* Routable.swift */,
E40E018B2AABF85500410B2C /* AppRoutes.swift */,
E42D9B592AD6802B0087693C /* OnboardingRoutes.swift */,
);
path = Route;
path = Routes;
sourceTree = "<group>";
};
E47B2B772A902E3C00629AF7 /* Router */ = {
E48DE4A02AC3F208004E6291 /* Destination Values */ = {
isa = PBXGroup;
children = (
E40E018D2AABFBDE00410B2C /* NavigationRouter.swift */,
E4902BAA2A9024BF0054FB36 /* SettingsRouter.swift */,
E48DE4A12AC3F23F004E6291 /* DestinationValue.swift */,
E47B2B752A902DE200629AF7 /* SettingsValues.swift */,
);
path = Router;
path = "Destination Values";
sourceTree = "<group>";
};
E4902BA92A90245E0054FB36 /* Navigation */ = {
isa = PBXGroup;
children = (
E40E018F2AABFC9300410B2C /* AnyNavigationPath.swift */,
E40E018F2AABFC9300410B2C /* AnyNavigablePath.swift */,
E40E018D2AABFBDE00410B2C /* AnyNavigationPath.swift */,
E47478142AAC3C19001CB1AC /* NavigationContext.swift */,
E47478122AAC350E001CB1AC /* NavigationLink+Helpers.swift */,
E49F0E752A90395400BC4EE3 /* NavigationPath+Helpers.swift */,
E49E01F32ABD99D300E42BB3 /* Routable.swift */,
E47B2B772A902E3C00629AF7 /* Router */,
E47B2B742A902DB400629AF7 /* Route */,
E47B2B742A902DB400629AF7 /* Routes */,
E48DE4A02AC3F208004E6291 /* Destination Values */,
);
path = Navigation;
sourceTree = "<group>";
Expand Down Expand Up @@ -2622,7 +2622,7 @@
637218472A3A2AAD008C4816 /* APICommentView.swift in Sources */,
CDDCF6492A6641F0003DA3AC /* FancyTabItemLabelBuilder.swift in Sources */,
63344C542A07D193001BC616 /* FiltersSettingsView.swift in Sources */,
E40E01902AABFC9300410B2C /* AnyNavigationPath.swift in Sources */,
E40E01902AABFC9300410B2C /* AnyNavigablePath.swift in Sources */,
6372185C2A3A2AAD008C4816 /* APICommunity.swift in Sources */,
6372185D2A3A2AAD008C4816 /* APICommunityAggregates.swift in Sources */,
03B7AAF52ABEFA7A00068B23 /* UserResultView.swift in Sources */,
Expand Down Expand Up @@ -2683,9 +2683,11 @@
B1DD00BD2A62DDEC002A7B39 /* RecognizedLemmyInstances.swift in Sources */,
6DA61F892A575DF1001EA633 /* URL - Lemmy Image Parameters.swift in Sources */,
50811B3E2A9205BA006BA3F2 /* GetCommunityResponse+Mock.swift in Sources */,
E48DE4A22AC3F23F004E6291 /* DestinationValue.swift in Sources */,
E4DDB4322A81819300B3A7E0 /* Double.swift in Sources */,
CD3FBCD92A4A6BD100B2063F /* Replies Tracker.swift in Sources */,
5016A2B32A67EC0700B257E8 /* NotificationDisplayer.swift in Sources */,
E42D9B5A2AD6802B0087693C /* OnboardingRoutes.swift in Sources */,
CD1446212A5B328E00610EF1 /* Privacy Policy.swift in Sources */,
507573942A5AD59E00AA7ABD /* EquatableError.swift in Sources */,
CDE6A81A2A490B970062D161 /* Inbox Reply View.swift in Sources */,
Expand All @@ -2694,7 +2696,7 @@
CD1446272A5B36DA00610EF1 /* EULA.swift in Sources */,
500C168E2A66FAAB006F243B /* HapticManager+Dependency.swift in Sources */,
038A16E52A7A97380087987E /* LayoutWidgetView.swift in Sources */,
E40E018E2AABFBDE00410B2C /* NavigationRouter.swift in Sources */,
E40E018E2AABFBDE00410B2C /* AnyNavigationPath.swift in Sources */,
CD1446252A5B357900610EF1 /* Document.swift in Sources */,
CDEBC32C2A9A582500518D9D /* Votes Model.swift in Sources */,
CDEBC3282A9A57F200518D9D /* Content Model Identifier.swift in Sources */,
Expand All @@ -2714,7 +2716,7 @@
50C99B592A61D889005D57DD /* APIClient+Dependency.swift in Sources */,
CDDCF6572A678298003DA3AC /* FancyTabBarSelection.swift in Sources */,
CD3FBCE92A4B482700B2063F /* Generic Merge.swift in Sources */,
E47B2B762A902DE200629AF7 /* SettingsRoutes.swift in Sources */,
E47B2B762A902DE200629AF7 /* SettingsValues.swift in Sources */,
CDA145ED2A510AC100DDAFC9 /* MarkCommentReplyAsReadRequest.swift in Sources */,
CD391F982A537E8E00E213B5 /* ReplyToComment.swift in Sources */,
5064D03D2A6DE0AA00B22EE3 /* Notifier.swift in Sources */,
Expand Down Expand Up @@ -2906,7 +2908,6 @@
637218432A3A2AAD008C4816 /* APIClient.swift in Sources */,
CD82A2572A716D7C00111034 /* PersonRepository+Dependency.swift in Sources */,
63DF71F12A02999C002AC14E /* App Constants.swift in Sources */,
504ECBAC2AB27CB1006C0B96 /* OnboardingRoute.swift in Sources */,
CD82A2532A716B8100111034 /* PersonRepository.swift in Sources */,
CD69F55F2A40121D0028D4F7 /* Ellipsis Menu.swift in Sources */,
638535712A1779BC00815781 /* GeneralSettingsView.swift in Sources */,
Expand All @@ -2915,7 +2916,6 @@
50811B322A9204C1006BA3F2 /* APICommunity+Mock.swift in Sources */,
6D693A482A51B904009E2D76 /* CreateCommentReport.swift in Sources */,
CD2E182B2A3B708500224F8A /* Settings Options.swift in Sources */,
E4902BAB2A9024BF0054FB36 /* SettingsRouter.swift in Sources */,
50A881282A71D66B003E3661 /* APIClient+Community.swift in Sources */,
6307378D2A1CEB7C00039852 /* My Vote.swift in Sources */,
50F830FA2A4C935C00D67099 /* FeedTracker.swift in Sources */,
Expand Down Expand Up @@ -3013,7 +3013,7 @@
50BC1ABB2A8D6A5A00E3C48B /* ScoringOperation.swift in Sources */,
CD18DC692A51ECB6002C56BC /* InteractionSwipeAndMenuHelpers.swift in Sources */,
6386E0362A042C59006B3C1D /* Contributor.swift in Sources */,
E40E018C2AABF85500410B2C /* NavigationRoutes.swift in Sources */,
E40E018C2AABF85500410B2C /* AppRoutes.swift in Sources */,
CD18DC6F2A5209C3002C56BC /* MarkPrivateMessageAsReadRequest.swift in Sources */,
CD82A2552A716C7C00111034 /* APIPersonUnreadCounts.swift in Sources */,
CD04D5E72A3636FB008EF95B /* Headline Post.swift in Sources */,
Expand Down
4 changes: 2 additions & 2 deletions Mlem/Extensions/Navigation getter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ extension EnvironmentValues {
// MARK: - Mlem NavigationRoute

private struct NavigationPathWithRoutes: EnvironmentKey {
static let defaultValue: Binding<[NavigationRoute]> = .constant([])
static let defaultValue: Binding<[AppRoute]> = .constant([])
}

extension EnvironmentValues {
var navigationPathWithRoutes: Binding<[NavigationRoute]> {
var navigationPathWithRoutes: Binding<[AppRoute]> {
get { self[NavigationPathWithRoutes.self] }
set { self[NavigationPathWithRoutes.self] = newValue }
}
Expand Down
Loading

0 comments on commit 309b4a2

Please sign in to comment.