mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-13 08:38:43 +03:00
Merge pull request #5281 from urbit/lf/landscape-fix
landscape: fix chats not bumping, hide spinner correctly
This commit is contained in:
commit
0a847c11f2
@ -112,7 +112,8 @@ function updateNotificationStats(state: HarkState, place: HarkPlace, f: (s: Hark
|
||||
function seenIndex(json: any, state: HarkState): HarkState {
|
||||
const data = _.get(json, 'saw-place');
|
||||
if(data) {
|
||||
updateNotificationStats(state, data, s => ({ last: Date.now() }));
|
||||
const last = data?.time || Date.now();
|
||||
updateNotificationStats(state, data.place, s => ({ last }));
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { LoadingSpinner, Button } from '@tlon/indigo-react';
|
||||
import React from 'react';
|
||||
import React from 'react';
|
||||
import { Box, Row, Col, Text } from '@tlon/indigo-react';
|
||||
import { PropFunc } from '~/types';
|
||||
import _ from 'lodash';
|
||||
@ -40,8 +40,8 @@ function Elbow(
|
||||
export function StatusBarJoins() {
|
||||
const pendingJoin = useGroupState(s => s.pendingJoin);
|
||||
if (
|
||||
Object.keys(_.omitBy(pendingJoin, j => j.progress === 'done')).length ===
|
||||
0
|
||||
Object.keys(_.omitBy(pendingJoin, j => j.hidden || j.progress === 'done'))
|
||||
.length === 0
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
@ -63,9 +63,9 @@ export function StatusBarJoins() {
|
||||
borderRadius="1"
|
||||
backgroundColor="white"
|
||||
>
|
||||
{Object.keys(pendingJoin).map(g => (
|
||||
<JoinStatus key={g} group={g} join={pendingJoin[g]} />
|
||||
))}
|
||||
{Object.keys(pendingJoin).map(g => (
|
||||
<JoinStatus key={g} group={g} join={pendingJoin[g]} />
|
||||
))}
|
||||
</Col>
|
||||
}
|
||||
alignX="left"
|
||||
@ -101,21 +101,19 @@ export function JoinStatus({
|
||||
};
|
||||
return (
|
||||
<Row alignItems="center" gapX="3">
|
||||
<Col gapY="2">
|
||||
<Row alignItems="center" gapX="2">
|
||||
{preview ? (
|
||||
<MetadataIcon height={4} width={4} metadata={preview.metadata} />
|
||||
) : null}
|
||||
<Text>{preview?.metadata.title || group.slice(6)}</Text>
|
||||
</Row>
|
||||
<Row ml="2" alignItems="center" gapX="2">
|
||||
<Elbow />
|
||||
<Text>{desc}</Text>
|
||||
</Row>
|
||||
</Col>
|
||||
<Button onClick={onHide}>
|
||||
Hide
|
||||
</Button>
|
||||
</Row>
|
||||
<Col gapY="2">
|
||||
<Row alignItems="center" gapX="2">
|
||||
{preview ? (
|
||||
<MetadataIcon height={4} width={4} metadata={preview.metadata} />
|
||||
) : null}
|
||||
<Text>{preview?.metadata.title || group.slice(6)}</Text>
|
||||
</Row>
|
||||
<Row ml="2" alignItems="center" gapX="2">
|
||||
<Elbow />
|
||||
<Text>{desc}</Text>
|
||||
</Row>
|
||||
</Col>
|
||||
<Button onClick={onHide}>Hide</Button>
|
||||
</Row>
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user