Skip to content

Commit

Permalink
Merge pull request #3787 from tloncorp/hm/misc-cleanup
Browse files Browse the repository at this point in the history
misc: cleanup activity layout and fix groups preview fetch
  • Loading branch information
arthyn authored Jul 23, 2024
2 parents 7364d3f + 3fa8818 commit e9ed021
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 18 deletions.
7 changes: 2 additions & 5 deletions apps/tlon-web/src/logic/useScrollerMessages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,8 @@ const getNewDayAndNewAuthorFromLastWrit = (
prevWrit &&
'essay' in prevWrit &&
!!getKindDataFromEssay(prevWrit.essay).notice;
const newAuthor = prevIsNotice
? false
: !author || !prevAuthor
? true
: author !== prevAuthor;
const newAuthor =
prevIsNotice || !author || !prevAuthor ? true : author !== prevAuthor;
const newDay = !prevKey
? true
: getDay(prevKey, messageDays) !== getDay(key, messageDays);
Expand Down
6 changes: 2 additions & 4 deletions apps/tlon-web/src/notifications/DMNotification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,8 @@ function DMNotification({
<Avatar size="default-sm" ship={author} />
</div>
<div className="min-w-0 grow-0 break-words p-1 space-y-2">
<div className="flex items-center space-x-1">
<ChatSmallIcon className="h-4 w-4" />
<ActivitySummary top={top} bundle={bundle} relevancy={relevancy} />
</div>
<ChatSmallIcon className="h-4 w-4" />
<ActivitySummary top={top} bundle={bundle} relevancy={relevancy} />
{content ? (
<div className="text-black py-1 leading-5">
<ChatContent story={truncateProse(content, 360)} />
Expand Down
4 changes: 2 additions & 2 deletions apps/tlon-web/src/notifications/Notifications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function VirtualNotification(
return (
<div key={bundle.latest} className="py-2">
{newDay && (
<h2 className="mt-2 mb-4 font-sans text-[17px] font-normal leading-[22px] text-gray-400">
<h2 className="mb-4 font-sans text-[17px] font-normal leading-[22px] text-gray-400">
{makePrettyDay(date)}
</h2>
)}
Expand Down Expand Up @@ -141,7 +141,7 @@ export default function Notifications({ title }: NotificationsProps) {
<title>{title}</title>
</Helmet>

<div className="flex flex-col card h-full pt-6 sm:py-6 sm:mb-6">
<div className="flex flex-col card h-full p-2 pr-0 sm:p-6 sm:mb-6">
{!isMobile && (
<div className="flex-none">
<WelcomeCard />
Expand Down
8 changes: 2 additions & 6 deletions apps/tlon-web/src/state/chat/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -747,9 +747,7 @@ export function useDmRsvpMutation() {
markRead({
source: { dm: { ship } },
action: {
event: {
'dm-invite': { ship },
},
all: { time: null, deep: false },
},
});

Expand Down Expand Up @@ -920,9 +918,7 @@ export function useMutliDmRsvpMutation() {
markRead({
source: { dm: { club: id } },
action: {
event: {
'dm-invite': { club: id },
},
all: { time: null, deep: false },
},
});
return api.poke(action);
Expand Down
2 changes: 1 addition & 1 deletion desk/app/groups.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -1927,7 +1927,7 @@
=/ =wire (welp ga-area /preview)
=/ =dock [p.flag dap.bowl]
=/ =path /groups/(scot %p p.flag)/[q.flag]/preview
=/ watch [%pass wire %agent dock %watch wire]
=/ watch [%pass wire %agent dock %watch path]
^+ cor
%- emil
?: =(p.flag our.bowl) ~[watch]
Expand Down

0 comments on commit e9ed021

Please sign in to comment.