Skip to content

Commit

Permalink
Treat AppLink like DeviceLink
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalopitz committed Dec 6, 2016
1 parent 2a276bc commit c348c2b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/ui/actions/MusicServiceManagementActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default {
},

getLink (client) {
if(client.auth === 'DeviceLink') {
if(client.auth === 'DeviceLink' || client.auth === 'AppLink') {
client.getDeviceLinkCode().then((link) => {
Dispatcher.dispatch({
actionType: Constants.MUSICSERVICE_ADD_LINK_RECEIVED,
Expand Down
6 changes: 3 additions & 3 deletions src/ui/components/MusicServiceManagement.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class MusicServiceManagement extends Component {
MusicServiceManagementActions.addAnonymousService(this.state.client);
}

if(!this.state.link && this.state.client.auth === 'DeviceLink') {
if(!this.state.link && (this.state.client.auth === 'DeviceLink' || this.state.client.auth === 'AppLink')) {
MusicServiceManagementActions.getLink(this.state.client);
return;
}
Expand Down Expand Up @@ -85,13 +85,13 @@ class MusicServiceManagement extends Component {
</form>);
}

if(this.state.client.auth === 'DeviceLink' && !this.state.link) {
if((this.state.client.auth === 'DeviceLink' || this.state.client.auth === 'AppLink') && !this.state.link) {
link = (
<p>Click next to add the Service at your own risk.</p>
);
}

if(this.state.client.auth === 'DeviceLink' && this.state.link) {
if((this.state.client.auth === 'DeviceLink' || this.state.client.auth === 'AppLink') && this.state.link) {
link = (
<div>
<p>Click the link below to authorize this app to use the Service.</p>
Expand Down

0 comments on commit c348c2b

Please sign in to comment.