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

refac: method names #19

Merged
merged 1 commit into from
Jun 28, 2024
Merged
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 @@ -29,7 +29,7 @@ public interface ISteamApiService
/// </remarks>
/// <param name="appId">The Steamworks API will not initialize if it does not know the App ID of your game.</param>
/// <returns>True, if the api is initialized, otherwise false.</returns>
bool Init(int appId);
bool Initialize(int appId);

/// <summary>
/// When done using the Steamworks API you should call <see cref="Shutdown"/> to release the resources used
Expand Down Expand Up @@ -65,7 +65,7 @@ public interface ISteamApiService
/// You must always call this first to get the initial status of stats and achievements.
/// </remarks>
/// <returns>True, if the request was successful, otherwise false.</returns>
bool RequestCurrentStats();
bool RequestStats();

/// <summary>
/// Send the changed stats and achievements data to the server for permanent storage.
Expand Down
4 changes: 2 additions & 2 deletions src/BB84.SAU.Application/ViewModels/AchievementsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,10 @@ private void OnPropertyChanged(string? propertyName)
if (propertyName == nameof(Model))
{
if (_steamApiService.Initialized.IsFalse())
_steamApiService.Init(Model.Id);
_steamApiService.Initialize(Model.Id);

if (_steamApiService.StatsRequested.IsFalse())
_steamApiService.RequestCurrentStats();
_steamApiService.RequestStats();
}

if (propertyName == nameof(SelectedAchievement) && SelectedAchievement is not null)
Expand Down
4 changes: 2 additions & 2 deletions src/BB84.SAU.Infrastructure/Services/SteamApiService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ internal sealed class SteamApiService(ILoggerService<SteamApiService> loggerServ
public bool Initialized => AppId is not null;
public bool StatsRequested { get; private set; }

public bool Init(int appId)
public bool Initialize(int appId)
{
try
{
Expand All @@ -49,7 +49,7 @@ public bool Init(int appId)
}
}

public bool RequestCurrentStats()
public bool RequestStats()
{
try
{
Expand Down