Skip to content

Commit 15fecc9

Browse files
author
Chris Bellew
committed
When connecting to this device, don't set subscribing to true since a successful connection will happen instantaneously, and if it's set and a purchase of local media playback is canceled, the cast button will no longer respond.
1 parent c47725d commit 15fecc9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

mobile/src/main/java/com/atomjack/vcfp/activities/MainActivity.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1646,10 +1646,8 @@ private void animateCastIcon() {
16461646
@Override
16471647
public void onDeviceSelected(PlexDevice device, boolean resume) {
16481648
if(device != null) {
1649-
subscribing = true;
1650-
final PlexClient clientSelected = (PlexClient)device;
1651-
setClient(clientSelected);
16521649

1650+
final PlexClient clientSelected = (PlexClient)device;
16531651
if(client.isLocalClient) {
16541652
if(!prefs.get(Preferences.HAS_SHOWN_INITIAL_LOCALMEDIA_PURCHASE, false) && !VoiceControlForPlexApplication.getInstance().hasLocalmedia()) {
16551653
showPurchaseLocalMedia(true);
@@ -1658,6 +1656,8 @@ public void onDeviceSelected(PlexDevice device, boolean resume) {
16581656
}
16591657
return;
16601658
}
1659+
subscribing = true;
1660+
setClient(clientSelected);
16611661
// Start animating the action bar icon
16621662
animateCastIcon();
16631663

@@ -1686,6 +1686,7 @@ public void run() {
16861686
};
16871687

16881688
private void localClientSelected(PlexClient clientSelected) {
1689+
setClient(clientSelected);
16891690
setCastIconActive();
16901691
subscribing = false;
16911692
subscribed = true;

0 commit comments

Comments
 (0)