Skip to content

Commit

Permalink
Merge remote-tracking branch 'matiosfree/playgameservices#2674-LoadSc…
Browse files Browse the repository at this point in the history
…ores'

# Conflicts:
#	Assets/Public/GooglePlayGames/com.google.play.games/Runtime/Scripts/Platforms/Android/AndroidClient.cs
  • Loading branch information
DmiShib committed Jun 6, 2024
2 parents 97139db + d2ec4d6 commit e884911
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
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 @@ -858,13 +858,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 @@ -881,7 +885,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 @@ -759,7 +759,9 @@ public void ShowLeaderboardUI(string leaderboardId, LeaderboardTimeSpan span, Ac

public void LoadScores(string leaderboardId, LeaderboardStart start,
int rowCount, LeaderboardCollection collection,
LeaderboardTimeSpan timeSpan, Action<LeaderboardScoreData> callback)
LeaderboardTimeSpan timeSpan,
Action<LeaderboardScoreData> callback,
bool forceReload = false)
{
using (var client = getLeaderboardsClient())
{
Expand All @@ -770,7 +772,8 @@ public void LoadScores(string leaderboardId, LeaderboardStart start,
leaderboardId,
AndroidJavaConverter.ToLeaderboardVariantTimeSpan(timeSpan),
AndroidJavaConverter.ToLeaderboardVariantCollection(collection),
rowCount))
rowCount,
forceReload))
{
AndroidTaskUtils.AddOnSuccessListener<AndroidJavaObject>(
task,
Expand Down

0 comments on commit e884911

Please sign in to comment.