Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#2674 PlayGamesPlatform.Instance.LoadScores returns old scores #3228

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@ public void LoadScores(
int rowCount,
LeaderboardCollection collection,
LeaderboardTimeSpan timeSpan,
Action<LeaderboardScoreData> callback)
Action<LeaderboardScoreData> callback,
bool forceReload = false)
{
LogUsage();
if (callback != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,14 @@ void ShowLeaderboardUI(string leaderboardId, LeaderboardTimeSpan span,
/// <param name="timeSpan">leaderboard timespan</param>
/// <param name="callback">callback with the scores, and a page token.
/// The token can be used to load next/prev pages.</param>
/// <param name="forceReload">
/// If true, this call will clear any locally cached data and attempt to
/// fetch the latest data from the server. This would commonly be used for something like a
/// user-initiated refresh. Normally, this should be set to {@code false} to gain advantages
/// of data caching.</param>
void LoadScores(string leaderboardId, LeaderboardStart start, int rowCount,
LeaderboardCollection collection, LeaderboardTimeSpan timeSpan,
Action<LeaderboardScoreData> callback);
Action<LeaderboardScoreData> callback, bool forceReload = false);

/// <summary>
/// Loads the more scores for the leaderboard.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -857,13 +857,17 @@ public void LoadScores(string leaderboardId, Action<IScore[]> callback)
/// <param name="collection">Collection. social or public</param>
/// <param name="timeSpan">Time span. daily, weekly, all-time</param>
/// <param name="callback">Callback to invoke when completed.</param>
/// <param name="forceReload">If true, this call will clear any locally cached data and
/// attempt to fetch the latest data from the server. Normally, this should be set to {@code
/// false} to gain advantages of data caching.</param>
public void LoadScores(
string leaderboardId,
LeaderboardStart start,
int rowCount,
LeaderboardCollection collection,
LeaderboardTimeSpan timeSpan,
Action<LeaderboardScoreData> callback)
Action<LeaderboardScoreData> callback,
bool forceReload = false)
{
if (!IsAuthenticated())
{
Expand All @@ -880,7 +884,8 @@ public void LoadScores(
rowCount,
collection,
timeSpan,
callback);
callback,
forceReload);
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,8 @@ public void ShowLeaderboardUI(string leaderboardId, LeaderboardTimeSpan span, Ac
public void LoadScores(string leaderboardId, LeaderboardStart start,
int rowCount, LeaderboardCollection collection,
LeaderboardTimeSpan timeSpan,
Action<LeaderboardScoreData> callback)
Action<LeaderboardScoreData> callback,
bool forceReload = false)
{
using (var client = getLeaderboardsClient())
{
Expand All @@ -791,7 +792,8 @@ public void LoadScores(string leaderboardId, LeaderboardStart start,
leaderboardId,
AndroidJavaConverter.ToLeaderboardVariantTimeSpan(timeSpan),
AndroidJavaConverter.ToLeaderboardVariantCollection(collection),
rowCount))
rowCount,
forceReload))
{
AndroidTaskUtils.AddOnSuccessListener<AndroidJavaObject>(
task,
Expand Down