Skip to content

Commit

Permalink
Nitpicks and cleanups, fix broken assets
Browse files Browse the repository at this point in the history
  • Loading branch information
sudokoko committed Apr 16, 2023
1 parent 3114cff commit 9dc017c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
6 changes: 3 additions & 3 deletions PLRPC/LighthouseClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ private async void UpdatePresence()
{
slot = new Slot
{
IconHash = "default_icon",
IconHash = "e6bb64f5f280ce07fdcf4c63e25fa8296c73ec29",
};
}

Expand Down Expand Up @@ -99,9 +99,9 @@ private async void UpdatePresence()
State = userStatus,
Assets = new Assets
{
LargeImageKey = this.serverUrl + "/gameAssets" + slot.IconHash,
LargeImageKey = this.serverUrl + "/gameAssets/" + slot.IconHash,
LargeImageText = slot.Name,
SmallImageKey = this.serverUrl + "/gameAssets" + user.YayHash,
SmallImageKey = this.serverUrl + "/gameAssets/" + user.YayHash,
SmallImageText = user.Username,
},
Timestamps = new Timestamps
Expand Down
2 changes: 0 additions & 2 deletions PLRPC/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ namespace LBPUnion.PLRPC;

public static class Program
{

public static async Task Main(string[] args)
{
#if !DEBUG
Expand Down Expand Up @@ -116,5 +115,4 @@ public static async Task Main(string[] args)

await lighthouseClient.StartUpdateLoop();
}

}
4 changes: 2 additions & 2 deletions PLRPC/Types/ApiRepositoryImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ private bool GetFromCache<T1, T2>(IReadOnlyDictionary<T1, (T2, long)> cache, T1

val = entry.Item1;
return true;
}
}

public async Task<User?> GetUser(string username)
{
if (this.GetFromCache(this.userCache, username, out User? cachedUser)) return cachedUser;

string userJson = await this.httpClient.GetStringAsync($"username/{username}");
User? user = JsonSerializer.Deserialize<User>(userJson);
if (user == null) return null;
Expand Down
2 changes: 1 addition & 1 deletion PLRPC/Updater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace LBPUnion.PLRPC;
public class Updater
{
private readonly HttpClient updaterHttpClient;

public Updater(HttpClient updaterClient)
{
this.updaterHttpClient = updaterClient;
Expand Down

0 comments on commit 9dc017c

Please sign in to comment.