Skip to content

Commit

Permalink
fix: user setting name (#331)
Browse files Browse the repository at this point in the history
  • Loading branch information
boojack authored Oct 21, 2022
1 parent 1c2998c commit e6f376a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion api/user_setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const (
// UserSettingEditorFontStyleKey is the key type for mobile editor style.
UserSettingMobileEditorStyleKey UserSettingKey = "mobileEditorStyle"
// UserSettingMemoDisplayTsOptionKey is the key type for memo display ts option.
UserSettingMemoDisplayTsOptionKey UserSettingKey = "memoSortOption"
UserSettingMemoDisplayTsOptionKey UserSettingKey = "memoDisplayTsOption"
)

// String returns the string format of UserSettingKey type.
Expand Down
6 changes: 3 additions & 3 deletions web/src/components/MemoList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ const MemoList = () => {

const pinnedMemos = shownMemos.filter((m) => m.pinned);
const unpinnedMemos = shownMemos.filter((m) => !m.pinned);
const memoSorting = (mi: Memo, mj: Memo) => {
const memoSort = (mi: Memo, mj: Memo) => {
return mj.displayTs - mi.displayTs;
};
pinnedMemos.sort(memoSorting);
unpinnedMemos.sort(memoSorting);
pinnedMemos.sort(memoSort);
unpinnedMemos.sort(memoSort);
const sortedMemos = pinnedMemos.concat(unpinnedMemos).filter((m) => m.rowStatus === "NORMAL");

useEffect(() => {
Expand Down

0 comments on commit e6f376a

Please sign in to comment.