diff --git a/apps/mobile/app/screens/add-reminder/index.tsx b/apps/mobile/app/screens/add-reminder/index.tsx index c6a1a4413..79289f996 100644 --- a/apps/mobile/app/screens/add-reminder/index.tsx +++ b/apps/mobile/app/screens/add-reminder/index.tsx @@ -42,9 +42,9 @@ import { DDS } from "../../services/device-detection"; import { ToastManager } from "../../services/event-manager"; import Navigation, { NavigationProps } from "../../services/navigation"; import Notifications from "../../services/notifications"; -import PremiumService from "../../services/premium"; import SettingsService from "../../services/settings"; import { useRelationStore } from "../../stores/use-relation-store"; +import { useSettingStore } from "../../stores/use-setting-store"; import { AppFontSize, defaultBorderRadius } from "../../utils/size"; import { DefaultAppStyles } from "../../utils/styles"; import { getFormattedDate, useIsFeatureAvailable } from "@notesnook/common"; @@ -70,7 +70,8 @@ const RecurringModes = { Year: "year" }; -const WeekDays = new Array(7).fill(true); +const WeekDays = [0, 1, 2, 3, 4, 5, 6]; +const WeekDaysMon = [1, 2, 3, 4, 5, 6, 0]; const MonthDays = new Array(31).fill(true); const WeekDayNames = { 0: "Sunday", @@ -92,6 +93,7 @@ export default function AddReminder(props: NavigationProps<"AddReminder">) { const { reminder, reference } = props.route.params; useNavigationFocus(props.navigation, { focusOnInit: true }); const { colors, isDark } = useThemeColors(); + const weekFormat = useSettingStore((state) => state.weekFormat); const [reminderMode, setReminderMode] = useState( reminder?.mode || "once" ); @@ -151,7 +153,7 @@ export default function AddReminder(props: NavigationProps<"AddReminder">) { const isSecondLast = index === selectedDays.length - 2; const joinWith = isSecondLast ? " & " : isLast ? "" : ", "; return recurringMode === RecurringModes.Week - ? WeekDayNames[day as keyof typeof WeekDayNames] + joinWith + ? strings.weekDayNames[day as keyof typeof WeekDayNames]() + joinWith : `${day}${nth(day)} ${joinWith}`; }) .join(""); @@ -390,37 +392,39 @@ export default function AddReminder(props: NavigationProps<"AddReminder">) { recurringMode === RecurringModes.Year ? null : recurringMode === RecurringModes.Week - ? WeekDays.map((item, index) => ( -