Skip to content

Commit

Permalink
Merge pull request #48 from jeroentvb/dev
Browse files Browse the repository at this point in the history
feat: navigate using uri - closes #41
  • Loading branch information
jeroentvb authored Aug 10, 2023
2 parents e33fb78 + bebac50 commit b7c0a0b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/PowerBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,11 @@ export default class PowerBar extends React.Component<Record<string, unknown>, L
}

if (key === 'Enter') {
if (trimmedValue.startsWith('spotify:')) {
navigateUsingUri(trimmedValue);
this.togglePowerBar();
return;
}
if (this.suggestions) {
const suggestion = this.suggestions[this.selectedSuggestionIndex];
this.onSelectSuggestion(suggestion, event.nativeEvent);
Expand Down

0 comments on commit b7c0a0b

Please sign in to comment.