Skip to content

Commit 7d3d8db

Browse files
author
Chris Bellew
committed
Don't switch to main screen on resume when first time setup isn't done yet.
1 parent 5de953f commit 7d3d8db

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@ protected void onResume() {
716716
}
717717

718718
// If we get unsubscribed from the notification, and the app isn't visible, the next time we show up the app will think it's still subscribed, so we have to set the UI to be unsubbed
719-
if(!isSubscribed()) {
719+
if(!isSubscribed() && !doingFirstTimeSetup) {
720720
switchToMainFragment();
721721
setCastIconInactive();
722722
prefs.remove(Preferences.SUBSCRIBED_CLIENT);

mobile/src/main/java/com/atomjack/vcfp/model/PlexMedia.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,19 @@ public String getImageKey(IMAGE_KEY imageKey) {
322322

323323
@Override
324324
public boolean equals(Object o) {
325-
return key.equals(((PlexMedia)o).key);
325+
if(this == o)
326+
return true;
327+
if(o == null)
328+
return false;
329+
if(getClass() != o.getClass())
330+
return false;
331+
PlexMedia other = (PlexMedia)o;
332+
if(key == null) {
333+
if (other.key != null)
334+
return false;
335+
} else if(!key.equals(other.key))
336+
return false;
337+
return true;
326338
}
327339

328340
@Override

0 commit comments

Comments
 (0)