Location Sharing

This commit is contained in:
Tsubasahane
2025-12-27 19:57:21 +08:00
parent 5c8e239a7b
commit 70745613e1
12 changed files with 224 additions and 6 deletions

View File

@@ -200,5 +200,17 @@ public partial class ApiController
await UserPushData(new(visibleCharacters, character, censusDto)).ConfigureAwait(false);
}
public async Task UpdateLocation(LocationDto locationDto, bool offline = false)
{
if (!IsConnected) return;
await _lightlessHub!.SendAsync(nameof(UpdateLocation), locationDto, offline).ConfigureAwait(false);
}
public async Task<List<LocationDto>> RequestAllLocationInfo()
{
if (!IsConnected) return [];
return await _lightlessHub!.InvokeAsync<List<LocationDto>>(nameof(RequestAllLocationInfo)).ConfigureAwait(false);
}
}
#pragma warning restore MA0040