mirror of
https://github.com/urbit/shrub.git
synced 2024-11-28 05:22:27 +03:00
Merge branch 'release/next-u' into lf/last-updated
This commit is contained in:
commit
d9b8fd77c1
@ -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]])
|
||||
|
@ -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)
|
||||
|
@ -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]);
|
||||
|
||||
|
@ -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');
|
||||
|
@ -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
|
||||
|
@ -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 />
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user