Skip to content

Commit

Permalink
Correct rating sort descriptions; handle expired session while upload…
Browse files Browse the repository at this point in the history
…ing plays more aggressively
  • Loading branch information
ccomeaux committed May 12, 2014
1 parent ee7a71f commit 4ca9808
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class GeekRatingSortData extends CollectionSortData {
public GeekRatingSortData(Context context) {
super(context);
mOrderByClause = Collection.SORT_BY_RATING;
mDescriptionId = R.string.rating;
mDescriptionId = R.string.menu_collection_sort_rating;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class MyRatingSortData extends CollectionSortData {
public MyRatingSortData(Context context) {
super(context);
mOrderByClause = getClause(Collection.RATING, true);
mDescriptionId = R.string.rating;
mDescriptionId = R.string.menu_collection_sort_myrating;
}

@Override
Expand Down
11 changes: 3 additions & 8 deletions BoardGameGeek/src/com/boardgamegeek/service/SyncPlaysUpload.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,6 @@ private void updatePendingPlays(String username, SyncResult syncResult) {
syncResult.stats.numAuthExceptions++;
Authenticator.clearPassword(mContext);
break;
} else if (response.hasBadIdError()) {
PlayPersister.delete(mContext.getContentResolver(), play);
notifyUser(mContext.getResources().getString(R.string.msg_play_update_bad_id));
} else {
syncResult.stats.numIoExceptions++;
notifyUser(response.error);
Expand Down Expand Up @@ -438,11 +435,9 @@ boolean hasError() {
}

boolean hasAuthError() {
return hasError() && error.contains("You must login to save plays");
}

boolean hasBadIdError() {
return hasError() && error.contains("You are not permitted to edit this play.");
return hasError()
&& (error.contains("You must login to save plays") || error
.contains("You are not permitted to edit this play."));
}
}
}

0 comments on commit 4ca9808

Please sign in to comment.