From 73066e06da22164d6c465ce8daf9b832cdcd4216 Mon Sep 17 00:00:00 2001 From: Guy Tepper Date: Wed, 24 Apr 2024 08:16:44 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=B8=20-=20Added=20snap=20interval=20to?= =?UTF-8?q?=20recent=20searches=20box=20(#365)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../recent-searches-box/recent-searches-box.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/screens/select-station/recent-searches-box/recent-searches-box.tsx b/app/screens/select-station/recent-searches-box/recent-searches-box.tsx index 1ee96395..ec2b9842 100644 --- a/app/screens/select-station/recent-searches-box/recent-searches-box.tsx +++ b/app/screens/select-station/recent-searches-box/recent-searches-box.tsx @@ -1,5 +1,5 @@ import React, { useMemo } from "react" -import { View, Image, TextStyle, ViewStyle, ImageStyle } from "react-native" +import { View, Image, TextStyle, ViewStyle, ImageStyle, Platform } from "react-native" import { observer } from "mobx-react-lite" import { useStores } from "../../../models" import analytics from "@react-native-firebase/analytics" @@ -29,6 +29,7 @@ const SCROLL_VIEW: ViewStyle = { minWidth: "100%", marginTop: spacing[3], paddingStart: spacing[3], + paddingEnd: spacing[4], gap: spacing[3], } @@ -67,6 +68,7 @@ export const RecentSearchesBox = observer(function RecentSearchesBox(props: Rece showsHorizontalScrollIndicator={false} keyboardShouldPersistTaps="handled" contentContainerStyle={SCROLL_VIEW} + snapToInterval={175 + spacing[3]} > {sortedSearches.map((entry) => { // if a station is removed from stations list, it might still be in recent searches