diff --git a/app.json b/app.json index 2d716b2..f3aedde 100644 --- a/app.json +++ b/app.json @@ -16,7 +16,7 @@ "supportsTablet": true, "bundleIdentifier": "com.cally.app", "googleServicesFile": "./ios/GoogleService-Info.plist", - "buildNumber": "10" + "buildNumber": "11" }, "android": { "adaptiveIcon": { diff --git a/app/(auth)/calendar/index.tsx b/app/(auth)/calendar/index.tsx index c13e298..a14a394 100644 --- a/app/(auth)/calendar/index.tsx +++ b/app/(auth)/calendar/index.tsx @@ -5,6 +5,7 @@ import {Button, Picker, PickerModes, SegmentedControl, Text, View} from "react-n import {MaterialIcons} from "@expo/vector-icons"; import {AddEventDialog} from "@/components/pages/calendar/AddEventDialog"; import {useGetEvents} from "@/hooks/firebase/useGetEvents"; +import {ManuallyAddEventModal} from "@/components/pages/calendar/ManuallyAddEventModal"; const modeMap = new Map([ [0, "day"], @@ -21,6 +22,8 @@ export default function Screen() { const [calendarHeight, setCalendarHeight] = useState(0); const [mode, setMode] = useState<"week" | "month" | "day">("week"); const [selectedDate, setSelectedDate] = useState(new Date()); + const [selectedNewEventDate, setSelectedNewEndDate] = useState(undefined); + const calendarContainerRef = useRef(null); const { data: events} = useGetEvents() @@ -109,6 +112,7 @@ export default function Screen() { events={events ?? []} height={calendarHeight} activeDate={selectedDate} + onPressCell={setSelectedNewEndDate} onSwipeEnd={(newDate) => { console.log(newDate) setSelectedDate(newDate); @@ -117,7 +121,9 @@ export default function Screen() { )} - + + setSelectedNewEndDate(undefined)}/> + ); } diff --git a/components/pages/calendar/ManuallyAddEventModal.tsx b/components/pages/calendar/ManuallyAddEventModal.tsx index 23970ed..f198027 100644 --- a/components/pages/calendar/ManuallyAddEventModal.tsx +++ b/components/pages/calendar/ManuallyAddEventModal.tsx @@ -29,14 +29,14 @@ const daysOfWeek = [ {label: "Sunday", value: "sunday"}, ]; -export const ManuallyAddEventModal = ({show, close}: { show: boolean, close: () => void }) => { +export const ManuallyAddEventModal = ({show, close, initialDate}: { show: boolean, close: () => void, initialDate?: Date }) => { const {user} = useAuthContext() const insets = useSafeAreaInsets(); const [title, setTitle] = useState(""); const [isAllDay, setIsAllDay] = useState(false); - const [startTime, setStartTime] = useState(new Date()); + const [startTime, setStartTime] = useState(initialDate ?? new Date()); const [endTime, setEndTime] = useState(new Date()) const [startDate, setStartDate] = useState(new Date()); diff --git a/ios/cally/Info.plist b/ios/cally/Info.plist index 47d6402..025ee4c 100644 --- a/ios/cally/Info.plist +++ b/ios/cally/Info.plist @@ -45,7 +45,7 @@ CFBundleVersion - 10 + 11 LSRequiresIPhoneOS NSAppTransportSecurity @@ -61,6 +61,7 @@ $(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route $(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route $(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route + $(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route UILaunchStoryboardName SplashScreen