graph-fe: unify @udification in api

This fixes an issue prevent backlog in DMs being unable to be fetched
This commit is contained in:
Liam Fitzgerald 2021-06-16 13:56:01 +10:00
parent 5d55b1ee7b
commit cdfd5369f2
No known key found for this signature in database
GPG Key ID: D390E12C61D1CFFB
2 changed files with 5 additions and 5 deletions

View File

@ -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 });
}

View File

@ -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);
}