refactor: optimize EmailRow component and improve row press handling in EmailListScreen

This commit is contained in:
Linus Rath
2026-04-26 21:19:08 +02:00
parent 373c66f2ba
commit e5bbfeb26e
4 changed files with 56 additions and 24 deletions
+3 -1
View File
@@ -32,7 +32,7 @@ interface MonthViewProps {
onLongPressDate?: (date: Date) => void;
}
export function MonthView({
function MonthViewInner({
currentDate,
selectedDate,
events,
@@ -118,6 +118,8 @@ export function MonthView({
);
}
export const MonthView = React.memo(MonthViewInner);
const styles = StyleSheet.create({
grid: { paddingHorizontal: spacing.sm },
weekdayRow: { flexDirection: 'row', paddingHorizontal: spacing.xs, marginBottom: 4 },
+3 -1
View File
@@ -39,7 +39,7 @@ interface WeekViewProps {
weekStartsOn?: 0 | 1;
}
export function WeekView({
function WeekViewInner({
selectedDate,
events,
calendars,
@@ -303,6 +303,8 @@ export function WeekView({
);
}
export const WeekView = React.memo(WeekViewInner);
function minutesToTimeLabel(minutes: number): string {
const h = Math.floor(minutes / 60);
const m = minutes % 60;