Revert "Location Sharing"

This reverts commit 70745613e1.
This commit is contained in:
Tsubasahane
2025-12-28 10:54:01 +08:00
parent 70745613e1
commit eeda5aeb66
12 changed files with 6 additions and 224 deletions

View File

@@ -200,17 +200,5 @@ 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

View File

@@ -259,13 +259,6 @@ public partial class ApiController
ExecuteSafely(() => Mediator.Publish(new GPoseLobbyReceiveWorldData(userData, worldData)));
return Task.CompletedTask;
}
public Task Client_SendLocationToClient(LocationDto locationDto)
{
Logger.LogDebug($"{nameof(Client_SendLocationToClient)}: {locationDto.user}");
ExecuteSafely(() => Mediator.Publish(new LocationMessage(locationDto.user.UID, locationDto.location)));
return Task.CompletedTask;
}
public void OnDownloadReady(Action<Guid> act)
{
@@ -447,12 +440,6 @@ public partial class ApiController
if (_initialized) return;
_lightlessHub!.On(nameof(Client_GposeLobbyPushWorldData), act);
}
public void OnReciveLocation(Action<LocationDto> act)
{
if (_initialized) return;
_lightlessHub!.On(nameof(Client_SendLocationToClient), act);
}
private void ExecuteSafely(Action act)
{

View File

@@ -606,8 +606,6 @@ public sealed partial class ApiController : DisposableMediatorSubscriberBase, IL
OnGposeLobbyPushCharacterData((dto) => _ = Client_GposeLobbyPushCharacterData(dto));
OnGposeLobbyPushPoseData((dto, data) => _ = Client_GposeLobbyPushPoseData(dto, data));
OnGposeLobbyPushWorldData((dto, data) => _ = Client_GposeLobbyPushWorldData(dto, data));
OnReciveLocation(dto => _ = Client_SendLocationToClient(dto));
_healthCheckTokenSource?.Cancel();
_healthCheckTokenSource?.Dispose();