From 3ca24607fbf5c08f83243fc259dcd159bb0a24f2 Mon Sep 17 00:00:00 2001 From: Ivo Barros <devL3v3L@gmail.com> Date: Sat, 17 Jun 2023 09:37:03 +0100 Subject: [PATCH] add hours as sorting options --- src/shared/components/common/sort-select.tsx | 3 +++ src/shared/utils.ts | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/shared/components/common/sort-select.tsx b/src/shared/components/common/sort-select.tsx index dac6e20..1fd3207 100644 --- a/src/shared/components/common/sort-select.tsx +++ b/src/shared/components/common/sort-select.tsx @@ -66,6 +66,9 @@ export class SortSelect extends Component<SortSelectProps, SortSelectState> { <option disabled aria-hidden="true"> âââââ </option> + <option value={"TopHour"}>{i18n.t("top_hour")}</option> + <option value={"TopSixHour"}>{i18n.t("top_six_hours")}</option> + <option value={"TopTwelveHour"}>{i18n.t("top_twelve_hours")}</option> <option value={"TopDay"}>{i18n.t("top_day")}</option> <option value={"TopWeek"}>{i18n.t("top_week")}</option> <option value={"TopMonth"}>{i18n.t("top_month")}</option> diff --git a/src/shared/utils.ts b/src/shared/utils.ts index c7fbca6..abb3062 100644 --- a/src/shared/utils.ts +++ b/src/shared/utils.ts @@ -986,6 +986,9 @@ export function commentsToFlatNodes(comments: CommentView[]): CommentNodeI[] { export function convertCommentSortType(sort: SortType): CommentSortType { if ( sort == "TopAll" || + sort == "TopHour" || + sort == "TopSixHour" || + sort == "TopTwelveHour" || sort == "TopDay" || sort == "TopWeek" || sort == "TopMonth" || -- 2.44.1