From c80806c062ccaade1d303f4aa9494d99a4a8f290 Mon Sep 17 00:00:00 2001 From: Liam Fitzgerald Date: Fri, 1 Oct 2021 13:38:26 +1000 Subject: [PATCH 1/2] interface: reduce %saw-place correctly --- pkg/interface/src/logic/reducers/hark-update.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/interface/src/logic/reducers/hark-update.ts b/pkg/interface/src/logic/reducers/hark-update.ts index 1aa7c8608..aee9cd149 100644 --- a/pkg/interface/src/logic/reducers/hark-update.ts +++ b/pkg/interface/src/logic/reducers/hark-update.ts @@ -109,7 +109,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; } From 52f4d9a36750899296bd28997664bc0f40114790 Mon Sep 17 00:00:00 2001 From: Liam Fitzgerald Date: Fri, 1 Oct 2021 13:40:25 +1000 Subject: [PATCH 2/2] landscape: fix joining indicator in statusbar --- .../src/views/components/StatusBarJoins.tsx | 42 +++++++++---------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/pkg/interface/src/views/components/StatusBarJoins.tsx b/pkg/interface/src/views/components/StatusBarJoins.tsx index d3ed71db5..ddf70180d 100644 --- a/pkg/interface/src/views/components/StatusBarJoins.tsx +++ b/pkg/interface/src/views/components/StatusBarJoins.tsx @@ -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 => ( - - ))} + {Object.keys(pendingJoin).map(g => ( + + ))} } alignX="left" @@ -101,21 +101,19 @@ export function JoinStatus({ }; return ( - - - {preview ? ( - - ) : null} - {preview?.metadata.title || group.slice(6)} - - - - {desc} - - - - + + + {preview ? ( + + ) : null} + {preview?.metadata.title || group.slice(6)} + + + + {desc} + + + + ); }