mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
feat: display memo with updated ts (#1760)
This commit is contained in:
@ -56,7 +56,7 @@ const MemoList = () => {
|
||||
if (
|
||||
duration &&
|
||||
duration.from < duration.to &&
|
||||
(getTimeStampByDate(memo.createdTs) < duration.from || getTimeStampByDate(memo.createdTs) > duration.to)
|
||||
(getTimeStampByDate(memo.displayTs) < duration.from || getTimeStampByDate(memo.displayTs) > duration.to)
|
||||
) {
|
||||
shouldShow = false;
|
||||
}
|
||||
@ -82,7 +82,7 @@ const MemoList = () => {
|
||||
const pinnedMemos = shownMemos.filter((m) => m.pinned);
|
||||
const unpinnedMemos = shownMemos.filter((m) => !m.pinned);
|
||||
const memoSort = (mi: Memo, mj: Memo) => {
|
||||
return mj.createdTs - mi.createdTs;
|
||||
return mj.displayTs - mi.displayTs;
|
||||
};
|
||||
pinnedMemos.sort(memoSort);
|
||||
unpinnedMemos.sort(memoSort);
|
||||
@ -168,7 +168,7 @@ const MemoList = () => {
|
||||
return (
|
||||
<div className="memo-list-container">
|
||||
{sortedMemos.map((memo) => (
|
||||
<Memo key={`${memo.id}-${memo.createdTs}`} memo={memo} />
|
||||
<Memo key={`${memo.id}-${memo.displayTs}`} memo={memo} />
|
||||
))}
|
||||
{isFetching ? (
|
||||
<div className="status-text-container fetching-tip">
|
||||
|
Reference in New Issue
Block a user