mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-13 08:38:43 +03:00
graph-fe: unify @udification in api
This fixes an issue prevent backlog in DMs being unable to be fetched
This commit is contained in:
parent
5d55b1ee7b
commit
cdfd5369f2
@ -362,7 +362,8 @@ export default class GraphApi extends BaseApi<StoreState> {
|
||||
}
|
||||
|
||||
async getNewest(ship: string, resource: string, count: number, index = '') {
|
||||
const data = await this.scry<any>('graph-store', `/newest/${ship}/${resource}/${count}${index}`);
|
||||
const idx = index.split('/').map(decToUd).join('/');
|
||||
const data = await this.scry<any>('graph-store', `/newest/${ship}/${resource}/${count}${idx}`);
|
||||
data['graph-update'].fetch = true;
|
||||
this.store.handleEvent({ data });
|
||||
}
|
||||
|
@ -11,7 +11,6 @@ import useGraphState, { useDM } from '~/logic/state/graph';
|
||||
import { useHarkDm } from '~/logic/state/hark';
|
||||
import useSettingsState, { selectCalmState } from '~/logic/state/settings';
|
||||
import { ChatPane } from './components/ChatPane';
|
||||
import { patpToUd } from '~/logic/lib/util';
|
||||
|
||||
interface DmResourceProps {
|
||||
ship: string;
|
||||
@ -64,7 +63,7 @@ export function DmResource(props: DmResourceProps) {
|
||||
`~${window.ship}`,
|
||||
'dm-inbox',
|
||||
100,
|
||||
`/${patpToUd(ship)}`
|
||||
`/${patp2dec(ship)}`
|
||||
);
|
||||
}, [ship]);
|
||||
|
||||
@ -81,7 +80,7 @@ export function DmResource(props: DmResourceProps) {
|
||||
`~${window.ship}`,
|
||||
'dm-inbox',
|
||||
pageSize,
|
||||
`/${patpToUd(ship)}/${index.toString()}`
|
||||
`/${patp2dec(ship)}/${index.toString()}`
|
||||
);
|
||||
return expectedSize !== getCurrDmSize(ship);
|
||||
} else {
|
||||
@ -93,7 +92,7 @@ export function DmResource(props: DmResourceProps) {
|
||||
`~${window.ship}`,
|
||||
'dm-inbox',
|
||||
pageSize,
|
||||
`/${patpToUd(ship)}/${index.toString()}`
|
||||
`/${patp2dec(ship)}/${index.toString()}`
|
||||
);
|
||||
return expectedSize !== getCurrDmSize(ship);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user