Skip to content

Commit a825956

Browse files
authored
Merge pull request #166 from eurofurence/fix/feedback-round-fixes
fix: Issues from feedback
2 parents dbaeace + 4ff76a0 commit a825956

11 files changed

Lines changed: 40 additions & 35 deletions

File tree

src/components/dealers/DealerCard.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Moment } from "moment/moment";
2-
import React, { FC } from "react";
2+
import React, { FC, useCallback } from "react";
33
import { useTranslation } from "react-i18next";
44
import { StyleSheet, View, ViewStyle } from "react-native";
55
import { TouchableOpacity } from "react-native-gesture-handler";
@@ -58,13 +58,11 @@ export const DealerCard: FC<DealerCardProps> = ({ containerStyle, style, dealer,
5858
const stylePre = useThemeBackground(present ? "primary" : "darken");
5959
const avatarBackground = useThemeBackground("primary");
6060

61+
const onPressBind = useCallback(() => onPress?.(dealer.details), [dealer.details, onPress]);
62+
const onLongPressBind = useCallback(() => onLongPress?.(dealer.details), [dealer.details, onLongPress]);
63+
6164
return (
62-
<TouchableOpacity
63-
containerStyle={containerStyle}
64-
style={[styles.container, appStyles.shadow, styleBackground, style]}
65-
onPress={() => onPress?.(dealer.details)}
66-
onLongPress={() => onLongPress?.(dealer.details)}
67-
>
65+
<TouchableOpacity containerStyle={containerStyle} style={[styles.container, appStyles.shadow, styleBackground, style]} onPress={onPressBind} onLongPress={onLongPressBind}>
6866
<View style={[styles.pre, stylePre]}>
6967
<Image style={[avatarBackground, styles.avatarCircle]} source={avatar} contentFit="contain" placeholder={assetSource("ych")} transition={60} />
7068
</View>

src/components/events/EventCard.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import moment, { Moment } from "moment-timezone";
2-
import React, { FC } from "react";
2+
import React, { FC, useCallback } from "react";
33
import { StyleSheet, View, ViewStyle } from "react-native";
44
import { TouchableOpacity } from "react-native-gesture-handler";
55

@@ -114,13 +114,11 @@ export const EventCard: FC<EventCardProps> = ({ containerStyle, style, type = "d
114114
const colorGlyph = useThemeColorValue("lighten");
115115
const colorHeart = useThemeColorValue(event.details.Banner ? "white" : "text");
116116

117+
const onPressBind = useCallback(() => onPress?.(event.details), [event.details, onPress]);
118+
const onLongPressBind = useCallback(() => onLongPress?.(event.details), [event.details, onLongPress]);
119+
117120
return (
118-
<TouchableOpacity
119-
containerStyle={containerStyle}
120-
style={[styles.container, appStyles.shadow, styleContainer, style]}
121-
onPress={() => onPress?.(event.details)}
122-
onLongPress={() => onLongPress?.(event.details)}
123-
>
121+
<TouchableOpacity containerStyle={containerStyle} style={[styles.container, appStyles.shadow, styleContainer, style]} onPress={onPressBind} onLongPress={onLongPressBind}>
124122
<View style={[styles.pre, stylePre]}>
125123
{!glyph ? null : (
126124
<View key="eventGlyph" style={styles.glyphContainer}>

src/components/generic/containers/Header.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,9 @@ export const Header: FC<HeaderProps> = (props) => {
3131
const styleBorder = useThemeBorder("darken");
3232

3333
const navigation = useNavigation();
34-
3534
return (
3635
<Row style={[styles.container, styleBackground, styleBorder, props.style]} type="center" variant="spaced">
37-
<TouchableOpacity hitSlop={50} containerStyle={styles.back} onPress={() => navigation.goBack()}>
36+
<TouchableOpacity hitSlop={180} containerStyle={styles.back} onPress={() => navigation.goBack()}>
3837
<Icon name="chevron-left" size={iconSize} color={colorValue} />
3938
</TouchableOpacity>
4039

@@ -79,12 +78,14 @@ const styles = StyleSheet.create({
7978
width: iconSize + iconPad,
8079
height: iconSize + iconPad,
8180
justifyContent: "center",
81+
zIndex: 20,
8282
},
8383
secondary: {
8484
width: iconSize + iconPad,
8585
height: iconSize + iconPad,
8686
marginRight: -iconPad,
8787
justifyContent: "center",
88+
zIndex: 20,
8889
},
8990
loading: {
9091
position: "absolute",

src/components/generic/containers/Tab.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ const styles = StyleSheet.create({
8585
container: {
8686
flex: 1,
8787
alignItems: "center",
88-
padding: 16,
88+
paddingVertical: 16,
89+
paddingHorizontal: 4,
8990
},
9091
disabled: {
9192
opacity: 0.5,

src/components/generic/nav/useTabStyles.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ export const useTabStyles = () => {
88
fontWeight: "bold",
99
textTransform: "none",
1010
borderRadius: 6,
11-
padding: 6,
12-
paddingHorizontal: 10,
11+
marginHorizontal: -10,
1312
color: theme.invText,
1413
backgroundColor: theme.secondary,
1514
}),
@@ -22,5 +21,6 @@ const styles = StyleSheet.create({
2221
normal: {
2322
fontWeight: "bold",
2423
textTransform: "none",
24+
marginHorizontal: -10,
2525
},
2626
});

src/components/maps/MapContent.tsx

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -165,18 +165,20 @@ export const MapContent: FC<MapContentProps> = ({ map, entry }) => {
165165
</ZoomableView>
166166
</View>
167167

168-
<BottomSheet ref={refSheet} backgroundStyle={styleBackground} handleStyle={styles.handle} handleIndicatorStyle={styleHandle} snapPoints={["17%", "75%"]} index={0}>
169-
<MapContentFlatList
170-
initialNumToRender={2}
171-
maxToRenderPerBatch={1}
172-
ListHeaderComponent={header}
173-
windowSize={5}
174-
data={results}
175-
keyExtractor={keyExtractor}
176-
renderItem={renderItem}
177-
contentContainerStyle={styles.mapContentContainer}
178-
/>
179-
</BottomSheet>
168+
{!map?.Entries?.length ? null : (
169+
<BottomSheet ref={refSheet} backgroundStyle={styleBackground} handleStyle={styles.handle} handleIndicatorStyle={styleHandle} snapPoints={["17%", "75%"]} index={0}>
170+
<MapContentFlatList
171+
initialNumToRender={2}
172+
maxToRenderPerBatch={1}
173+
ListHeaderComponent={header}
174+
windowSize={5}
175+
data={results}
176+
keyExtractor={keyExtractor}
177+
renderItem={renderItem}
178+
contentContainerStyle={styles.mapContentContainer}
179+
/>
180+
</BottomSheet>
181+
)}
180182
</>
181183
);
182184
};

src/components/settings/LanguagePicker.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export const LanguagePicker = () => {
5656
<Picker<string>
5757
selectedValue={i18n.language}
5858
style={style}
59+
itemStyle={style}
5960
dropdownIconColor={style.color}
6061
prompt={t("changeLanguage")}
6162
onValueChange={(it: string) => {

src/components/sync/SynchronizationProvider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export const SynchronizationProvider: FC<PropsWithChildren> = ({ children }) =>
140140

141141
// Dependent function.
142142
const synchronizeUi = useCallback(
143-
async (vibrate: boolean = true) => {
143+
async (vibrate: boolean = false) => {
144144
if (vibrate) Vibration.vibrate(400);
145145
try {
146146
return await synchronize();

src/context/AuthContext.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const redirectUri = authRedirect;
2525
/**
2626
* Token refresh interval.
2727
*/
28-
const refreshInterval = 600_000;
28+
const refreshInterval = 3_600_000;
2929

3030
/**
3131
* User claims record.

src/routes/artistalley/ArtistAlleyReg.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,11 @@ export const ArtistAlleyReg = () => {
4646
const [show, setShow] = useState(true);
4747

4848
return (
49-
<ScrollView style={StyleSheet.absoluteFill} refreshControl={<RefreshControl refreshing={isFetching} onRefresh={refetch} />} stickyHeaderIndices={[0]}>
49+
<ScrollView
50+
style={StyleSheet.absoluteFill}
51+
refreshControl={authorized ? <RefreshControl refreshing={isFetching} onRefresh={refetch} /> : undefined}
52+
stickyHeaderIndices={[0]}
53+
>
5054
<Header>{t("title")}</Header>
5155
<Floater containerStyle={appStyles.trailer}>
5256
{!data?.State ? null : (

0 commit comments

Comments
 (0)