Skip to content

Commit

Permalink
use latestState instead of latestSnapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
zippy committed Feb 7, 2024
1 parent d735f46 commit 3df213f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ui/src/boardList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export class BoardList {
}
)
const latestState = pipe(board,
board => board.workspace.latestSnapshot
board => board.workspace.latestState
)
const tip = pipe(board,
board => board.workspace.tip
Expand Down
10 changes: 5 additions & 5 deletions ui/src/we.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,20 @@ export const appletServices: AppletServices = {
const docStore = new DocumentStore<BoardState, BoardEphemeralState> (synStore, documentHash)
const workspaces = await toPromise(docStore.allWorkspaces)
const workspace = new WorkspaceStore(docStore, Array.from(workspaces.keys())[0])
const latestSnapshot = await toPromise(workspace.latestSnapshot)
const latestState = await toPromise(workspace.latestState)

if (hrlWithContext.context) {
const card = latestSnapshot.cards.find(c=>c.id === hrlWithContext.context)
const card = latestState.cards.find(c=>c.id === hrlWithContext.context)
if (card) {
return {
icon_src: CARD_ICON_SRC,
name: `${latestSnapshot.name}: ${card.props.title}`,
name: `${latestState.name}: ${card.props.title}`,
};
}
}
return {
icon_src: BOARD_ICON_SRC,
name: latestSnapshot.name,
name: latestState.name,
};
} else {
throw new Error("unknown entry type:"+ entryType)
Expand All @@ -96,7 +96,7 @@ export const appletServices: AppletServices = {
}
)
const latestState = pipe(workspace,
w => w.latestSnapshot
w => w.latestState
)
return latestState
})
Expand Down

0 comments on commit 3df213f

Please sign in to comment.