diff --git a/apps/mobile/app/components/list/index.js b/apps/mobile/app/components/list/index.js
index d1292cf92..4178f50aa 100644
--- a/apps/mobile/app/components/list/index.js
+++ b/apps/mobile/app/components/list/index.js
@@ -53,15 +53,10 @@ const renderItems = {
const RenderItem = ({ item, index, type, ...restArgs }) => {
if (!item) return ;
const Item = renderItems[item.itemType || item.type] || View;
- const groupOptions = db.settings?.getGroupOptions(type);
- const dateBy =
- groupOptions.sortBy !== "title" ? groupOptions.sortBy : "dateEdited";
const totalNotes = getTotalNotes(item);
-
return (
- (
@@ -111,6 +112,7 @@ const List = ({
index={index}
color={headerProps?.color}
title={headerProps?.heading}
+ dateBy={dateBy}
type={
screen === "Notes"
? "home"
@@ -122,7 +124,7 @@ const List = ({
isSheet={isSheet}
/>
),
- [headerProps?.color, headerProps?.heading, screen, type, isSheet]
+ [headerProps?.color, headerProps?.heading, screen, type, isSheet, dateBy]
);
const _onRefresh = async () => {
diff --git a/packages/common/src/hooks/use-time-ago.ts b/packages/common/src/hooks/use-time-ago.ts
index 8bad90b13..44c6ba446 100644
--- a/packages/common/src/hooks/use-time-ago.ts
+++ b/packages/common/src/hooks/use-time-ago.ts
@@ -74,6 +74,10 @@ export function useTimeAgo(
useEffect(() => {
if (!live) return;
+ const value = getTimeAgo(datetime, locale);
+ onUpdate?.(value);
+ setTimeAgo(value);
+
const reset = setInterval(() => {
const value = getTimeAgo(datetime, locale);
onUpdate?.(value);