@planningcenter/chat-react-native 3.9.1-rc.3 → 3.9.1-rc.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -99,6 +99,14 @@ const useStyles = () => {
99
99
  headerTitle: {
100
100
  textAlign: 'left',
101
101
  flex: 1,
102
+ marginTop: Platform.select({
103
+ ios: 2,
104
+ default: 0,
105
+ }),
106
+ marginLeft: Platform.select({
107
+ ios: -11,
108
+ default: 0,
109
+ }),
102
110
  },
103
111
  filterBar: {
104
112
  backgroundColor: theme.colors.fillColorNeutral100Inverted,
@@ -120,7 +128,7 @@ const useStyles = () => {
120
128
  },
121
129
  headerRight: {
122
130
  flexDirection: 'row',
123
- gap: 8,
131
+ gap: 16,
124
132
  alignItems: 'center',
125
133
  },
126
134
  });
@@ -1 +1 @@
1
- {"version":3,"file":"conversation_filters_screen.js","sourceRoot":"","sources":["../../src/screens/conversation_filters_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAoB,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAC3F,OAAO,EAAE,kCAAkC,EAAa,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAClG,OAAO,EACL,0BAA0B,GAE3B,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,mBAAmB,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EACL,aAAa,EACb,cAAc,GACf,MAAM,4DAA4D,CAAA;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wDAAwD,CAAA;AAC5F,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAA;AAKnE,OAAO,EAAE,QAAQ,EAAE,MA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import { createComponentForStaticNavigation, RouteProp, useRoute } from '@react-navigation/native'\nimport {\n createNativeStackNavigator,\n NativeStackNavigationOptions,\n} from '@react-navigation/native-stack'\nimport React from 'react'\nimport { Platform, StyleSheet, useWindowDimensions, View } from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { Button, TextButton } from '../components'\nimport {\n FilterContext,\n FilterProvider,\n} from './conversation_filters/context/conversation_filter_context'\nimport { ConversationFilters } from './conversation_filters/components/conversation_filters'\nimport { GroupFilters } from './conversation_filters/group_filters'\nimport {\n ConversationFiltersScreenProps,\n ConversationFilterStackParamList,\n} from './conversation_filters/screen_props'\nimport { useTheme } from '../hooks'\nimport { TeamFilters } from './conversation_filters/team_filters'\n\nconst FilterHeaderTitle = ({ tintColor }: HeaderTitleProps) => {\n const styles = useStyles()\n return (\n <HeaderTitle maxFontSizeMultiplier={1} style={[styles.headerTitle, { color: tintColor }]}>\n Filters\n </HeaderTitle>\n )\n}\n\nconst HeaderRight = () => {\n const { resetFilter, applyFilters } = React.useContext(FilterContext)\n const route = useRoute<RouteProp<ConversationFiltersScreenProps['route']>>()\n const styles = useStyles()\n\n return (\n <View style={styles.headerRight}>\n <TextButton maxFontSizeMultiplier={1} onPress={resetFilter}>\n Reset\n </TextButton>\n <Button maxFontSizeMultiplier={1} title=\"Apply\" onPress={() => applyFilters(route.params)} />\n </View>\n )\n}\n\nconst HeaderRightWithContext = () => {\n return (\n <FilterProvider>\n <HeaderRight />\n </FilterProvider>\n )\n}\n\nexport const ConversationFiltersScreenOptions: NativeStackNavigationOptions = {\n presentation: Platform.select({ android: 'modal', ios: 'formSheet' }),\n sheetAllowedDetents: [0.75, 1],\n sheetGrabberVisible: true,\n headerBackVisible: false,\n headerRight: HeaderRightWithContext,\n headerTitle: FilterHeaderTitle,\n headerTitleAlign: 'left',\n sheetCornerRadius: 16,\n}\n\nconst FilterNavigator = createNativeStackNavigator<ConversationFilterStackParamList>({\n initialRouteName: 'Filters',\n screens: {\n Filters: {\n screen: ConversationFilters,\n options: {\n headerShown: false,\n },\n },\n GroupFilters: {\n screen: GroupFilters,\n options: {\n headerTitle: Platform.select({\n android: 'Groups',\n ios: '',\n }),\n headerBackTitle: 'Groups',\n },\n },\n TeamFilters: {\n screen: TeamFilters,\n options: {\n headerTitle: Platform.select({\n android: 'Teams',\n ios: '',\n }),\n headerBackTitle: 'Teams',\n },\n },\n },\n})\n\nconst Filters = createComponentForStaticNavigation(FilterNavigator, 'Filters')\n\nexport const ConversationFiltersScreen = (_props: ConversationFiltersScreenProps) => {\n const styles = useStyles()\n\n return (\n <FilterProvider>\n <View style={styles.container}>\n <Filters />\n </View>\n </FilterProvider>\n )\n}\n\nconst useStyles = () => {\n const { top } = useSafeAreaInsets()\n const { height } = useWindowDimensions()\n const headerHeight = useHeaderHeight()\n const theme = useTheme()\n\n const containerHeight = Platform.select({\n android: height,\n ios: height - top - headerHeight,\n })\n\n return StyleSheet.create({\n container: {\n height: containerHeight,\n flex: 1,\n },\n headerTitle: {\n textAlign: 'left',\n flex: 1,\n },\n filterBar: {\n backgroundColor: theme.colors.fillColorNeutral100Inverted,\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n paddingHorizontal: 16,\n paddingVertical: 16,\n gap: 8,\n },\n filterBarScroll: {\n elevation: 4,\n boxShadow: '0px 4px 4px rgba(0, 0, 0, 0.1)',\n },\n filterBarActions: {\n flexDirection: 'row',\n gap: 8,\n alignItems: 'center',\n },\n headerRight: {\n flexDirection: 'row',\n gap: 8,\n alignItems: 'center',\n },\n })\n}\n"]}
1
+ {"version":3,"file":"conversation_filters_screen.js","sourceRoot":"","sources":["../../src/screens/conversation_filters_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAoB,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAC3F,OAAO,EAAE,kCAAkC,EAAa,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAClG,OAAO,EACL,0BAA0B,GAE3B,MAAM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AAM,CAAC;gBAC1B,GAAG,EAAE,CAAC,EAAE;gBACR,OAAO,EAAE,CAAC;aACX,CAAC;SACH;QACD,SAAS,EAAE;YACT,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,2BAA2B;YACzD,aAAa,EAAE,KAAK;YACpB,cAAc,EAAE,eAAe;YAC/B,UAAU,EAAE,QAAQ;YACpB,iBAAiB,EAAE,EAAE;YACrB,eAAe,EAAE,EAAE;YACnB,GAAG,EAAE,CAAC;SACP;QACD,eAAe,EAAE;YACf,SAAS,EAAE,CAAC;YACZ,SAAS,EAAE,gCAAgC;SAC5C;QACD,gBAAgB,EAAE;YAChB,aAAa,EAAE,KAAK;YACpB,GAAG,EAAE,CAAC;YACN,UAAU,EAAE,QAAQ;SACrB;QACD,WAAW,EAAE;YACX,aAAa,EAAE,KAAK;YACpB,GAAG,EAAE,EAAE;YACP,UAAU,EAAE,QAAQ;SACrB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { HeaderTitle, HeaderTitleProps, useHeaderHeight } from '@react-navigation/elements'\nimport { createComponentForStaticNavigation, RouteProp, useRoute } from '@react-navigation/native'\nimport {\n createNativeStackNavigator,\n NativeStackNavigationOptions,\n} from '@react-navigation/native-stack'\nimport React from 'react'\nimport { Platform, StyleSheet, useWindowDimensions, View } from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { Button, TextButton } from '../components'\nimport {\n FilterContext,\n FilterProvider,\n} from './conversation_filters/context/conversation_filter_context'\nimport { ConversationFilters } from './conversation_filters/components/conversation_filters'\nimport { GroupFilters } from './conversation_filters/group_filters'\nimport {\n ConversationFiltersScreenProps,\n ConversationFilterStackParamList,\n} from './conversation_filters/screen_props'\nimport { useTheme } from '../hooks'\nimport { TeamFilters } from './conversation_filters/team_filters'\n\nconst FilterHeaderTitle = ({ tintColor }: HeaderTitleProps) => {\n const styles = useStyles()\n return (\n <HeaderTitle maxFontSizeMultiplier={1} style={[styles.headerTitle, { color: tintColor }]}>\n Filters\n </HeaderTitle>\n )\n}\n\nconst HeaderRight = () => {\n const { resetFilter, applyFilters } = React.useContext(FilterContext)\n const route = useRoute<RouteProp<ConversationFiltersScreenProps['route']>>()\n const styles = useStyles()\n\n return (\n <View style={styles.headerRight}>\n <TextButton maxFontSizeMultiplier={1} onPress={resetFilter}>\n Reset\n </TextButton>\n <Button maxFontSizeMultiplier={1} title=\"Apply\" onPress={() => applyFilters(route.params)} />\n </View>\n )\n}\n\nconst HeaderRightWithContext = () => {\n return (\n <FilterProvider>\n <HeaderRight />\n </FilterProvider>\n )\n}\n\nexport const ConversationFiltersScreenOptions: NativeStackNavigationOptions = {\n presentation: Platform.select({ android: 'modal', ios: 'formSheet' }),\n sheetAllowedDetents: [0.75, 1],\n sheetGrabberVisible: true,\n headerBackVisible: false,\n headerRight: HeaderRightWithContext,\n headerTitle: FilterHeaderTitle,\n headerTitleAlign: 'left',\n sheetCornerRadius: 16,\n}\n\nconst FilterNavigator = createNativeStackNavigator<ConversationFilterStackParamList>({\n initialRouteName: 'Filters',\n screens: {\n Filters: {\n screen: ConversationFilters,\n options: {\n headerShown: false,\n },\n },\n GroupFilters: {\n screen: GroupFilters,\n options: {\n headerTitle: Platform.select({\n android: 'Groups',\n ios: '',\n }),\n headerBackTitle: 'Groups',\n },\n },\n TeamFilters: {\n screen: TeamFilters,\n options: {\n headerTitle: Platform.select({\n android: 'Teams',\n ios: '',\n }),\n headerBackTitle: 'Teams',\n },\n },\n },\n})\n\nconst Filters = createComponentForStaticNavigation(FilterNavigator, 'Filters')\n\nexport const ConversationFiltersScreen = (_props: ConversationFiltersScreenProps) => {\n const styles = useStyles()\n\n return (\n <FilterProvider>\n <View style={styles.container}>\n <Filters />\n </View>\n </FilterProvider>\n )\n}\n\nconst useStyles = () => {\n const { top } = useSafeAreaInsets()\n const { height } = useWindowDimensions()\n const headerHeight = useHeaderHeight()\n const theme = useTheme()\n\n const containerHeight = Platform.select({\n android: height,\n ios: height - top - headerHeight,\n })\n\n return StyleSheet.create({\n container: {\n height: containerHeight,\n flex: 1,\n },\n headerTitle: {\n textAlign: 'left',\n flex: 1,\n marginTop: Platform.select({\n ios: 2,\n default: 0,\n }),\n marginLeft: Platform.select({\n ios: -11,\n default: 0,\n }),\n },\n filterBar: {\n backgroundColor: theme.colors.fillColorNeutral100Inverted,\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n paddingHorizontal: 16,\n paddingVertical: 16,\n gap: 8,\n },\n filterBarScroll: {\n elevation: 4,\n boxShadow: '0px 4px 4px rgba(0, 0, 0, 0.1)',\n },\n filterBarActions: {\n flexDirection: 'row',\n gap: 8,\n alignItems: 'center',\n },\n headerRight: {\n flexDirection: 'row',\n gap: 16,\n alignItems: 'center',\n },\n })\n}\n"]}
@@ -87,7 +87,6 @@ const useStyles = () => {
87
87
  listHeader: {
88
88
  borderBottomWidth: 1,
89
89
  borderBottomColor: theme.colors.fillColorNeutral050Base,
90
- paddingHorizontal: 16,
91
90
  paddingBottom: 16,
92
91
  gap: 12,
93
92
  },
@@ -95,11 +94,13 @@ const useStyles = () => {
95
94
  flexDirection: 'row',
96
95
  justifyContent: 'space-between',
97
96
  paddingTop: 8,
97
+ paddingHorizontal: 16,
98
98
  },
99
99
  filterRow: {
100
100
  flexDirection: 'row',
101
101
  justifyContent: 'flex-start',
102
102
  gap: 8,
103
+ paddingHorizontal: 16,
103
104
  },
104
105
  });
105
106
  };
@@ -1 +1 @@
1
- {"version":3,"file":"list_header_component.js","sourceRoot":"","sources":["../../../../src/screens/conversations/components/list_header_component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,aAAa,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAC7E,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AACnD,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAClE,OAAO,EAAE,OA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,CAAC,CACD,kBAAkB,CAAC,8BAA8B,EAErD;UAAA,GAAG,CACJ,CACD;QAAA,CAAC,YAAY,CACX,KAAK,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CACpD,OAAO,CAAC,CAAC,GAAG,EAAE,CACZ,UAAU,CAAC,QAAQ,CAAC,qBAAqB,EAAE;YACzC,mBAAmB;YACnB,qBAAqB;SACtB,CACH,CAAC,CACD,MAAM,CAAC,CAAC,MAAM,KAAK,WAAW,CAAC,IAAI,CAAC,CACpC,aAAa,CAAC,qCAAqC,CACnD,kBAAkB,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,mBAAmB,CAAC,EAElF;MAAA,EAAE,UAAU,CACZ;MAAA,CAAC,cAAc,CAAC,AAAD,EACjB;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC,CAAA;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAA;IACxB,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,UAAU,EAAE;YACV,iBAAiB,EAAE,CAAC;YACpB,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC,uBAAuB;YACvD,iBAAiB,EAAE,EAAE;YACrB,aAAa,EAAE,EAAE;YACjB,GAAG,EAAE,EAAE;SACR;QACD,QAAQ,EAAE;YACR,aAAa,EAAE,KAAK;YACpB,cAAc,EAAE,eAAe;YAC/B,UAAU,EAAE,CAAC;SACd;QACD,SAAS,EAAE;YACT,aAAa,EAAE,KAAK;YACpB,cAAc,EAAE,YAAY;YAC5B,GAAG,EAAE,CAAC;SACP;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { RouteProp, useNavigation, useRoute } from '@react-navigation/native'\nimport React, { useCallback, useMemo } from 'react'\nimport { Alert, ScrollView, StyleSheet, View } from 'react-native'\nimport { Heading, TextButton, ToggleButton } from '../../../components'\nimport { useCurrentPerson, useCurrentPersonCache, useTheme } from '../../../hooks'\nimport { useMarkAllRead } from '../../../hooks/use_conversations_actions'\nimport { useCanDisplayGroups } from '../../../hooks/use_groups'\nimport { ConversationScreenProps } from '../conversations_screen'\nimport { ChatGroupBadge } from './chat_group_badge'\n\nenum FilterTypes {\n All = 'All',\n Groups = 'Groups',\n Teams = 'Teams',\n More = 'More',\n}\n\nexport const ListHeaderComponent = () => {\n const styles = useStyles()\n const navigation = useNavigation()\n const canFilterByTeams = useCanDisplayGroups({ source_app_name: 'Services', source_type: 'Team' })\n const canFilterByGroups = useCanDisplayGroups({ source_app_name: 'Groups', source_type: 'Group' })\n const route = useRoute<RouteProp<ConversationScreenProps['route']>>()\n const { chat_group_graph_id, group_source_app_name = '' } = route.params || {}\n\n const { unreadCount } = useCurrentPerson()\n const currentPersonCache = useCurrentPersonCache()\n const { markAllRead, isPending } = useMarkAllRead()\n\n const active: FilterTypes = useMemo(() => {\n if (chat_group_graph_id) {\n return FilterTypes.More\n } else if (/groups/i.test(group_source_app_name)) {\n return FilterTypes.Groups\n } else if (/services/i.test(group_source_app_name)) {\n return FilterTypes.Teams\n }\n\n return FilterTypes.All\n }, [chat_group_graph_id, group_source_app_name])\n\n const handleMarkAllRead = useCallback(() => {\n currentPersonCache.update({ unreadCount: 0 })\n markAllRead()\n }, [currentPersonCache, markAllRead])\n\n const alertMarkAllRead = useCallback(() => {\n if (active === FilterTypes.All) return handleMarkAllRead()\n\n Alert.alert('Mark all read', 'This includes conversations not shown by the current filter.', [\n { text: 'Cancel' },\n { text: 'OK', onPress: () => handleMarkAllRead() },\n ])\n }, [active, handleMarkAllRead])\n\n const showAppFilters = canFilterByGroups && canFilterByTeams\n\n return (\n <View style={styles.listHeader}>\n <View style={styles.titleRow}>\n <Heading numberOfLines={1} variant=\"h2\">\n Conversations\n </Heading>\n <TextButton onPress={alertMarkAllRead} disabled={isPending || !unreadCount}>\n Mark all read\n </TextButton>\n </View>\n <ScrollView\n horizontal\n showsHorizontalScrollIndicator={false}\n contentContainerStyle={styles.filterRow}\n accessibilityRole=\"toolbar\"\n >\n {showAppFilters && (\n <>\n <ToggleButton\n title={FilterTypes.All}\n active={active === FilterTypes.All}\n onPress={() =>\n navigation.setParams({\n chat_group_graph_id: undefined,\n group_source_app_name: undefined,\n })\n }\n accessibilityLabel=\"Show all conversations\"\n />\n <ToggleButton\n title={FilterTypes.Groups}\n active={active === FilterTypes.Groups}\n onPress={() =>\n navigation.setParams({\n chat_group_graph_id: undefined,\n group_source_app_name: 'Groups',\n })\n }\n accessibilityLabel=\"Filter to group conversations\"\n />\n\n <ToggleButton\n title={FilterTypes.Teams}\n active={active === FilterTypes.Teams}\n onPress={() =>\n navigation.setParams({\n chat_group_graph_id: undefined,\n group_source_app_name: 'Services',\n })\n }\n accessibilityLabel=\"Filter to team conversations\"\n />\n </>\n )}\n <ToggleButton\n title={showAppFilters ? FilterTypes.More : 'Filter'}\n onPress={() =>\n navigation.navigate('ConversationFilters', {\n chat_group_graph_id,\n group_source_app_name,\n })\n }\n active={active === FilterTypes.More}\n iconNameRight=\"general.threeReducingHorizontalBars\"\n accessibilityLabel={showAppFilters ? 'View all filters' : 'View more filters'}\n />\n </ScrollView>\n <ChatGroupBadge />\n </View>\n )\n}\n\nconst useStyles = () => {\n const theme = useTheme()\n return StyleSheet.create({\n listHeader: {\n borderBottomWidth: 1,\n borderBottomColor: theme.colors.fillColorNeutral050Base,\n paddingHorizontal: 16,\n paddingBottom: 16,\n gap: 12,\n },\n titleRow: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n paddingTop: 8,\n },\n filterRow: {\n flexDirection: 'row',\n justifyContent: 'flex-start',\n gap: 8,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"list_header_component.js","sourceRoot":"","sources":["../../../../src/screens/conversations/components/list_header_component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,aAAa,EAAE,QAAQ,EAAE,MAAM,0BAA0B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Y;YAC5B,GAAG,EAAE,CAAC;YACN,iBAAiB,EAAE,EAAE;SACtB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { RouteProp, useNavigation, useRoute } from '@react-navigation/native'\nimport React, { useCallback, useMemo } from 'react'\nimport { Alert, ScrollView, StyleSheet, View } from 'react-native'\nimport { Heading, TextButton, ToggleButton } from '../../../components'\nimport { useCurrentPerson, useCurrentPersonCache, useTheme } from '../../../hooks'\nimport { useMarkAllRead } from '../../../hooks/use_conversations_actions'\nimport { useCanDisplayGroups } from '../../../hooks/use_groups'\nimport { ConversationScreenProps } from '../conversations_screen'\nimport { ChatGroupBadge } from './chat_group_badge'\n\nenum FilterTypes {\n All = 'All',\n Groups = 'Groups',\n Teams = 'Teams',\n More = 'More',\n}\n\nexport const ListHeaderComponent = () => {\n const styles = useStyles()\n const navigation = useNavigation()\n const canFilterByTeams = useCanDisplayGroups({ source_app_name: 'Services', source_type: 'Team' })\n const canFilterByGroups = useCanDisplayGroups({ source_app_name: 'Groups', source_type: 'Group' })\n const route = useRoute<RouteProp<ConversationScreenProps['route']>>()\n const { chat_group_graph_id, group_source_app_name = '' } = route.params || {}\n\n const { unreadCount } = useCurrentPerson()\n const currentPersonCache = useCurrentPersonCache()\n const { markAllRead, isPending } = useMarkAllRead()\n\n const active: FilterTypes = useMemo(() => {\n if (chat_group_graph_id) {\n return FilterTypes.More\n } else if (/groups/i.test(group_source_app_name)) {\n return FilterTypes.Groups\n } else if (/services/i.test(group_source_app_name)) {\n return FilterTypes.Teams\n }\n\n return FilterTypes.All\n }, [chat_group_graph_id, group_source_app_name])\n\n const handleMarkAllRead = useCallback(() => {\n currentPersonCache.update({ unreadCount: 0 })\n markAllRead()\n }, [currentPersonCache, markAllRead])\n\n const alertMarkAllRead = useCallback(() => {\n if (active === FilterTypes.All) return handleMarkAllRead()\n\n Alert.alert('Mark all read', 'This includes conversations not shown by the current filter.', [\n { text: 'Cancel' },\n { text: 'OK', onPress: () => handleMarkAllRead() },\n ])\n }, [active, handleMarkAllRead])\n\n const showAppFilters = canFilterByGroups && canFilterByTeams\n\n return (\n <View style={styles.listHeader}>\n <View style={styles.titleRow}>\n <Heading numberOfLines={1} variant=\"h2\">\n Conversations\n </Heading>\n <TextButton onPress={alertMarkAllRead} disabled={isPending || !unreadCount}>\n Mark all read\n </TextButton>\n </View>\n <ScrollView\n horizontal\n showsHorizontalScrollIndicator={false}\n contentContainerStyle={styles.filterRow}\n accessibilityRole=\"toolbar\"\n >\n {showAppFilters && (\n <>\n <ToggleButton\n title={FilterTypes.All}\n active={active === FilterTypes.All}\n onPress={() =>\n navigation.setParams({\n chat_group_graph_id: undefined,\n group_source_app_name: undefined,\n })\n }\n accessibilityLabel=\"Show all conversations\"\n />\n <ToggleButton\n title={FilterTypes.Groups}\n active={active === FilterTypes.Groups}\n onPress={() =>\n navigation.setParams({\n chat_group_graph_id: undefined,\n group_source_app_name: 'Groups',\n })\n }\n accessibilityLabel=\"Filter to group conversations\"\n />\n\n <ToggleButton\n title={FilterTypes.Teams}\n active={active === FilterTypes.Teams}\n onPress={() =>\n navigation.setParams({\n chat_group_graph_id: undefined,\n group_source_app_name: 'Services',\n })\n }\n accessibilityLabel=\"Filter to team conversations\"\n />\n </>\n )}\n <ToggleButton\n title={showAppFilters ? FilterTypes.More : 'Filter'}\n onPress={() =>\n navigation.navigate('ConversationFilters', {\n chat_group_graph_id,\n group_source_app_name,\n })\n }\n active={active === FilterTypes.More}\n iconNameRight=\"general.threeReducingHorizontalBars\"\n accessibilityLabel={showAppFilters ? 'View all filters' : 'View more filters'}\n />\n </ScrollView>\n <ChatGroupBadge />\n </View>\n )\n}\n\nconst useStyles = () => {\n const theme = useTheme()\n return StyleSheet.create({\n listHeader: {\n borderBottomWidth: 1,\n borderBottomColor: theme.colors.fillColorNeutral050Base,\n paddingBottom: 16,\n gap: 12,\n },\n titleRow: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n paddingTop: 8,\n paddingHorizontal: 16,\n },\n filterRow: {\n flexDirection: 'row',\n justifyContent: 'flex-start',\n gap: 8,\n paddingHorizontal: 16,\n },\n })\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@planningcenter/chat-react-native",
3
- "version": "3.9.1-rc.3",
3
+ "version": "3.9.1-rc.5",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -55,5 +55,5 @@
55
55
  "prettier": "^3.4.2",
56
56
  "typescript": "<5.6.0"
57
57
  },
58
- "gitHead": "a74674f0a1b53c9aada32a1d7e16f07bdb53f27c"
58
+ "gitHead": "78808e297f4d32842b46ff68816e3ec7695f9b51"
59
59
  }
@@ -129,6 +129,14 @@ const useStyles = () => {
129
129
  headerTitle: {
130
130
  textAlign: 'left',
131
131
  flex: 1,
132
+ marginTop: Platform.select({
133
+ ios: 2,
134
+ default: 0,
135
+ }),
136
+ marginLeft: Platform.select({
137
+ ios: -11,
138
+ default: 0,
139
+ }),
132
140
  },
133
141
  filterBar: {
134
142
  backgroundColor: theme.colors.fillColorNeutral100Inverted,
@@ -150,7 +158,7 @@ const useStyles = () => {
150
158
  },
151
159
  headerRight: {
152
160
  flexDirection: 'row',
153
- gap: 8,
161
+ gap: 16,
154
162
  alignItems: 'center',
155
163
  },
156
164
  })
@@ -133,7 +133,6 @@ const useStyles = () => {
133
133
  listHeader: {
134
134
  borderBottomWidth: 1,
135
135
  borderBottomColor: theme.colors.fillColorNeutral050Base,
136
- paddingHorizontal: 16,
137
136
  paddingBottom: 16,
138
137
  gap: 12,
139
138
  },
@@ -141,11 +140,13 @@ const useStyles = () => {
141
140
  flexDirection: 'row',
142
141
  justifyContent: 'space-between',
143
142
  paddingTop: 8,
143
+ paddingHorizontal: 16,
144
144
  },
145
145
  filterRow: {
146
146
  flexDirection: 'row',
147
147
  justifyContent: 'flex-start',
148
148
  gap: 8,
149
+ paddingHorizontal: 16,
149
150
  },
150
151
  })
151
152
  }