Combine into one application chat, inbox and home (#9865)

Signed-off-by: Artem Savchenko <armisav@gmail.com>
This commit is contained in:
Artyom Savchenko
2025-09-16 13:15:56 +07:00
committed by GitHub
parent ed424c1ba8
commit 38bc85bf6c
158 changed files with 424 additions and 2534 deletions
+14
View File
@@ -26,6 +26,10 @@ export function isFavoritesLocation (loc: Location): boolean {
return loc.path[2] === chatId && loc.path[3] === 'favorites'
}
export function isAllLocation (loc: Location): boolean {
return loc.path[2] === chatId && loc.path[3] === 'all'
}
export function getCardIdFromLocation (loc: Location): Ref<Card> | undefined {
if (loc.path[2] !== chatId) {
return undefined
@@ -78,6 +82,16 @@ export function navigateToFavorites (): void {
navigate(loc)
}
export function navigateToAll (): void {
const loc = getCurrentResolvedLocation()
loc.path[2] = chatId
loc.path[3] = 'all'
delete loc.query?.message
navigate(loc)
}
export async function resolveLocation (loc: Location): Promise<ResolvedLocation | undefined> {
if (loc.path[2] !== chatId) {
return undefined