Merge branch 'release/next-u' into lf/last-updated

This commit is contained in:
Liam Fitzgerald 2020-12-15 15:49:39 +10:00
commit d9b8fd77c1
No known key found for this signature in database
GPG Key ID: D390E12C61D1CFFB
6 changed files with 17 additions and 17 deletions

View File

@ -297,13 +297,8 @@
|^
=/ [=graph:store mark=(unit mark:store)]
(~(got by graphs) resource)
:: TODO: turn back on assertion once issue with 8-10x facts being
:: issued is resolved. Too noisy for now
::
:: ~| "cannot add duplicate nodes to {<resource>}"
:: ?< (check-for-duplicates graph ~(key by nodes))
?: (check-for-duplicates graph ~(key by nodes))
[~ state]
~| "cannot add duplicate nodes to {<resource>}"
?< (check-for-duplicates graph ~(key by nodes))
=/ =update-log:store (~(got by update-logs) resource)
=. update-log
(put:orm-log update-log time [%0 time [%add-nodes resource nodes]])

View File

@ -268,7 +268,6 @@
%+ weld
(push-updates:hc q.cage.sign)
cards
==
++ on-leave
|= =path
@ -374,6 +373,8 @@
=/ prefix=path
resource+(en-path:resource u.rid)
=/ paths=(list path)
%~ tap in
%- silt
%+ turn
(incoming-subscriptions prefix)
|=([ship pax=path] pax)

View File

@ -38,8 +38,7 @@ export function ChatResource(props: ChatResourceProps) {
const chatInput = useRef<ChatInput>();
useEffect(() => {
const count = Math.min(150, unreadCount + 30);
console.log(`fetching ${count}`);
const count = Math.min(50, unreadCount + 15);
props.api.graph.getNewest(owner, name, count);
}, [station]);

View File

@ -199,14 +199,14 @@ export default class ChatWindow extends Component<ChatWindowProps, ChatWindowSta
const currSize = graph.size;
if(newer && !this.loadedNewest) {
const [index] = graph.peekLargest()!;
await api.graph.getYoungerSiblings(ship,name, 100, `/${index.toString()}`)
await api.graph.getYoungerSiblings(ship,name, 20, `/${index.toString()}`)
if(currSize === graph.size) {
console.log('loaded all newest');
this.loadedNewest = true;
}
} else if(!newer && !this.loadedOldest) {
const [index] = graph.peekSmallest()!;
await api.graph.getOlderSiblings(ship,name, 100, `/${index.toString()}`)
await api.graph.getOlderSiblings(ship,name, 20, `/${index.toString()}`)
this.calculateUnreadIndex();
if(currSize === graph.size) {
console.log('loaded all oldest');

View File

@ -1,7 +1,7 @@
import React, { useEffect, useCallback } from "react";
import f from "lodash/fp";
import _ from "lodash";
import { Icon, Col, Row, Box, Text, Anchor } from "@tlon/indigo-react";
import { Icon, Col, Row, Box, Text, Anchor, Rule } from "@tlon/indigo-react";
import moment from "moment";
import { Notifications, Rolodex, Timebox, IndexedNotification, Groups } from "~/types";
import { MOMENT_CALENDAR_DATE, daToUnix, resourceAsPath } from "~/logic/lib/util";
@ -129,8 +129,10 @@ export default function Inbox(props: {
};
return (
<Col height="100%" overflowY="auto" onScroll={onScroll} >
{inviteItems(invites, api)}
<Col position="relative" height="100%" overflowY="auto" onScroll={onScroll} >
<Col zIndex={4} gapY={2} bg="white" top="0px" position="sticky">
{inviteItems(invites, api)}
</Col>
{newNotifications && (
<DaySection
latest

View File

@ -1,6 +1,6 @@
import React, { Component } from 'react';
import { Invite } from '~/types/invite-update';
import { Text, Box, Button, Row } from '@tlon/indigo-react';
import { Text, Box, Button, Row, Rule } from '@tlon/indigo-react';
import { StatelessAsyncAction } from "~/views/components/StatelessAsyncAction";
import { cite } from '~/logic/lib/util';
@ -9,7 +9,8 @@ export class InviteItem extends Component<{invite: Invite, onAccept: (i: any) =>
const { props } = this;
return (
<Box width='100%' p='4' mb='4' borderBottom='1px solid lightGray' position='sticky' style={{ top: 0 }}>
<>
<Box width='100%' p='4'>
<Box width='100%' verticalAlign='middle'>
<Text display='block' pb='2' gray><Text mono>{cite(props.invite.resource.ship)}</Text> invited you to <Text fontWeight='500'>{props.invite.resource.name}</Text></Text>
</Box>
@ -34,6 +35,8 @@ export class InviteItem extends Component<{invite: Invite, onAccept: (i: any) =>
</Row>
</Box>
<Rule />
</>
);
}
}