fix: search

This commit is contained in:
2026-06-09 22:00:06 +02:00
parent eb51f043ac
commit 1274ad9b46
9 changed files with 141 additions and 19 deletions

View File

@@ -100,12 +100,12 @@ export class ServersRailComponent {
currentUser = this.store.selectSignal(selectCurrentUser);
onlineUsers = this.store.selectSignal(selectOnlineUsers);
bannedRoomLookup = signal<Record<string, boolean>>({});
isOnSearch = toSignal(
isOnServers = toSignal(
this.router.events.pipe(
filter((navigationEvent): navigationEvent is NavigationEnd => navigationEvent instanceof NavigationEnd),
map((navigationEvent) => navigationEvent.urlAfterRedirects.startsWith('/search'))
map((navigationEvent) => navigationEvent.urlAfterRedirects.startsWith('/servers'))
),
{ initialValue: this.router.url.startsWith('/search') }
{ initialValue: this.router.url.startsWith('/servers') }
);
isOnDirectMessage = toSignal(
this.router.events.pipe(
@@ -393,7 +393,7 @@ export class ServersRailComponent {
if (isCurrentRoom) {
this.optimisticSelectedRoomId.set(null);
this.router.navigate(['/search']);
this.router.navigate(['/servers']);
}
this.showLeaveConfirm.set(false);