Remove fleet lobby follow notifications
This commit is contained in:
@@ -87,21 +87,3 @@ export function matchesFleet(server: FleetServer, query: string, filter: FleetFi
|
||||
...(server.roster ?? []).map(player => player.name)].join(' ').toLocaleLowerCase();
|
||||
return query.trim().toLocaleLowerCase().split(/\s+/).every(term => text.includes(term));
|
||||
}
|
||||
|
||||
export interface LobbyWatch {
|
||||
id: string;
|
||||
server: string;
|
||||
kind: 'empty' | 'online' | 'operation';
|
||||
operationKey?: string;
|
||||
href: string;
|
||||
}
|
||||
|
||||
export function watchSatisfied(watch: LobbyWatch, server: FleetServer | undefined,
|
||||
operations: readonly FleetOperation[], now: number): boolean {
|
||||
if (watch.kind === 'operation') {
|
||||
// Disappearance, failure and replacement by another operation are not completion.
|
||||
return operations.some(op => op.key === watch.operationKey && op.state === 'done');
|
||||
}
|
||||
if (!server || !freshServer(server, now)) return false;
|
||||
return watch.kind === 'online' || server.last_players === 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user