triggers update when map changes

This commit is contained in:
Tsubasahane
2025-12-30 11:20:12 +08:00
parent f37fdefddd
commit 91e60694ad
3 changed files with 17 additions and 4 deletions

View File

@@ -17,8 +17,6 @@ namespace LightlessSync.Services
private IMemoryCache _sharingStatus = new MemoryCache(new MemoryCacheOptions());
private CancellationTokenSource _resetToken = new CancellationTokenSource();
public LocationShareService(ILogger<LocationShareService> logger, LightlessMediator mediator, DalamudUtilService dalamudUtilService, ApiController apiController) : base(logger, mediator)
{
_dalamudUtilService = dalamudUtilService;
@@ -37,7 +35,7 @@ namespace LightlessSync.Services
_ = RequestAllLocation();
} );
Mediator.Subscribe<LocationSharingMessage>(this, UpdateLocationList);
Mediator.Subscribe<ZoneSwitchEndMessage>(this,
Mediator.Subscribe<MapChangedMessage>(this,
msg => _ = _apiController.UpdateLocation(new LocationDto(new UserData(_apiController.UID, _apiController.DisplayName), _dalamudUtilService.GetMapData())));
}
@@ -134,5 +132,6 @@ namespace LightlessSync.Services
AddStatus(user, expireAt);
}
}
}
}