mirror of
https://github.com/wanderer-industries/wanderer
synced 2025-12-13 03:06:15 +00:00
Merge branch 'main' into update-lifetime
This commit is contained in:
11
CHANGELOG.md
11
CHANGELOG.md
@@ -2,6 +2,17 @@
|
|||||||
|
|
||||||
<!-- changelog -->
|
<!-- changelog -->
|
||||||
|
|
||||||
|
## [v1.78.1](https://github.com/wanderer-industries/wanderer/compare/v1.78.0...v1.78.1) (2025-09-24)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes:
|
||||||
|
|
||||||
|
* pr feedback
|
||||||
|
|
||||||
|
* removed wormhole only logic error
|
||||||
|
|
||||||
## [v1.78.0](https://github.com/wanderer-industries/wanderer/compare/v1.77.19...v1.78.0) (2025-09-23)
|
## [v1.78.0](https://github.com/wanderer-industries/wanderer/compare/v1.77.19...v1.78.0) (2025-09-23)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -16,8 +16,21 @@ const SystemKillsContent = () => {
|
|||||||
} = useMapRootState();
|
} = useMapRootState();
|
||||||
|
|
||||||
const [systemId] = selectedSystems || [];
|
const [systemId] = selectedSystems || [];
|
||||||
|
const whCacheRef = useMemo(() => new Map<number, boolean>(), []);
|
||||||
|
|
||||||
const systemStaticInfo = getSystemStaticInfo(systemId)!;
|
const isWormholeSystem = useCallback(
|
||||||
|
(systemId: number): boolean => {
|
||||||
|
const cached = whCacheRef.get(systemId);
|
||||||
|
if (cached !== undefined) return cached;
|
||||||
|
|
||||||
|
const info = getSystemStaticInfo(systemId);
|
||||||
|
const isWH = info?.system_class != null ? isWormholeSpace(Number(info.system_class)) : false;
|
||||||
|
|
||||||
|
whCacheRef.set(systemId, isWH);
|
||||||
|
return isWH;
|
||||||
|
},
|
||||||
|
[whCacheRef],
|
||||||
|
);
|
||||||
|
|
||||||
const { kills, isLoading, error } = useSystemKills({
|
const { kills, isLoading, error } = useSystemKills({
|
||||||
systemId,
|
systemId,
|
||||||
@@ -30,15 +43,9 @@ const SystemKillsContent = () => {
|
|||||||
const showLoading = isLoading && kills.length === 0;
|
const showLoading = isLoading && kills.length === 0;
|
||||||
|
|
||||||
const filteredKills = useMemo(() => {
|
const filteredKills = useMemo(() => {
|
||||||
if (!settingsKills.whOnly || !settingsKills.showAll) return kills;
|
if (!settingsKills.whOnly) return kills;
|
||||||
return kills.filter(kill => {
|
return kills.filter(kill => isWormholeSystem(Number(kill.solar_system_id)));
|
||||||
if (!systemStaticInfo) {
|
}, [kills, settingsKills.whOnly, isWormholeSystem]);
|
||||||
console.warn(`System with id ${kill.solar_system_id} not found.`);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return isWormholeSpace(systemStaticInfo.system_class);
|
|
||||||
});
|
|
||||||
}, [kills, settingsKills.whOnly, systemStaticInfo, settingsKills.showAll]);
|
|
||||||
|
|
||||||
if (!isSubscriptionActive) {
|
if (!isSubscriptionActive) {
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user