Skip to content

Commit

Permalink
Update Android intents for Jetpack app
Browse files Browse the repository at this point in the history
  • Loading branch information
Siobhan committed Aug 27, 2022
1 parent 889a31a commit 02511ed
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions client/blocks/app-banner/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,16 +123,19 @@ export class AppBanner extends Component {
const { currentRoute, currentSection } = this.props;

if ( this.isAndroid() ) {
const displayJetpackAppBranding = config.isEnabled( 'jetpack/app-branding' );
const scheme = displayJetpackAppBranding ? 'jetpack' : 'wordpress';

//TODO: update when section deep links are available.
switch ( currentSection ) {
case GUTENBERG:
return 'intent://post/#Intent;scheme=wordpress;package=org.wordpress.android;end';
return `intent://post/#Intent;scheme=${ scheme };package=org.wordpress.android;end`;
case NOTES:
return 'intent://notifications/#Intent;scheme=wordpress;package=org.wordpress.android;end';
return `intent://notifications/#Intent;scheme=${ scheme };package=org.wordpress.android;end`;
case READER:
return 'intent://read/#Intent;scheme=wordpress;package=org.wordpress.android;end';
return `intent://read/#Intent;scheme=${ scheme };package=org.wordpress.android;end`;
case STATS:
return 'intent://stats/#Intent;scheme=wordpress;package=org.wordpress.android;end';
return `intent://stats/#Intent;scheme=${ scheme };package=org.wordpress.android;end`;
}
}

Expand Down

0 comments on commit 02511ed

Please sign in to comment.