@@ -9,6 +9,8 @@ export interface FilterConfig {
99 showAttachmentsOnly : boolean ;
1010 showStarredOnly : boolean ;
1111 showHiddenOnly : boolean ;
12+ showCodeOnly : boolean ;
13+ showDiagramOnly : boolean ;
1214}
1315
1416export interface SortConfig {
@@ -28,7 +30,7 @@ export const FilterSortSheet = forwardRef<BottomSheetModal, FilterSortSheetProps
2830 ( { filterConfig, setFilterConfig, sortConfig, setSortConfig, hasActiveFilters } , ref ) => {
2931 const theme = useTheme ( ) ;
3032
31- const snapPoints = useMemo ( ( ) => [ '70 %' ] , [ ] ) ;
33+ const snapPoints = useMemo ( ( ) => [ '80 %' ] , [ ] ) ;
3234
3335 const renderBackdrop = useCallback (
3436 ( props : BottomSheetBackdropProps ) => (
@@ -70,7 +72,7 @@ export const FilterSortSheet = forwardRef<BottomSheetModal, FilterSortSheetProps
7072 < Text style = { [ styles . inputLabel , { color : theme . colors . mutedForeground } ] } > FILTER</ Text >
7173 < TouchableOpacity
7274 style = { [ styles . viewModeButton , { backgroundColor : theme . colors . muted , opacity : hasActiveFilters ? 1 : 0 } ] }
73- onPress = { ( ) => setFilterConfig ( { showAttachmentsOnly : false , showStarredOnly : false , showHiddenOnly : false } ) }
75+ onPress = { ( ) => setFilterConfig ( { showAttachmentsOnly : false , showStarredOnly : false , showHiddenOnly : false , showCodeOnly : false , showDiagramOnly : false } ) }
7476 activeOpacity = { 0.7 }
7577 disabled = { ! hasActiveFilters }
7678 >
@@ -87,7 +89,7 @@ export const FilterSortSheet = forwardRef<BottomSheetModal, FilterSortSheetProps
8789 size = { 24 }
8890 color = { filterConfig . showAttachmentsOnly ? theme . colors . primary : theme . colors . mutedForeground }
8991 />
90- < Text style = { [ styles . filterOptionText , { color : theme . colors . foreground } ] } > Attachments Only </ Text >
92+ < Text style = { [ styles . filterOptionText , { color : theme . colors . foreground } ] } > Attachment </ Text >
9193 </ TouchableOpacity >
9294
9395 < TouchableOpacity
@@ -99,7 +101,7 @@ export const FilterSortSheet = forwardRef<BottomSheetModal, FilterSortSheetProps
99101 size = { 24 }
100102 color = { filterConfig . showStarredOnly ? theme . colors . primary : theme . colors . mutedForeground }
101103 />
102- < Text style = { [ styles . filterOptionText , { color : theme . colors . foreground } ] } > Starred Only </ Text >
104+ < Text style = { [ styles . filterOptionText , { color : theme . colors . foreground } ] } > Starred</ Text >
103105 </ TouchableOpacity >
104106
105107 < TouchableOpacity
@@ -111,7 +113,31 @@ export const FilterSortSheet = forwardRef<BottomSheetModal, FilterSortSheetProps
111113 size = { 24 }
112114 color = { filterConfig . showHiddenOnly ? theme . colors . primary : theme . colors . mutedForeground }
113115 />
114- < Text style = { [ styles . filterOptionText , { color : theme . colors . foreground } ] } > Hidden Only</ Text >
116+ < Text style = { [ styles . filterOptionText , { color : theme . colors . foreground } ] } > Hidden</ Text >
117+ </ TouchableOpacity >
118+
119+ < TouchableOpacity
120+ style = { [ styles . filterOption , { backgroundColor : filterConfig . showCodeOnly ? 'rgba(59, 130, 246, 0.1)' : 'transparent' } ] }
121+ onPress = { ( ) => setFilterConfig ( prev => ( { ...prev , showCodeOnly : ! prev . showCodeOnly } ) ) }
122+ >
123+ < Ionicons
124+ name = { filterConfig . showCodeOnly ? "checkbox" : "square-outline" }
125+ size = { 24 }
126+ color = { filterConfig . showCodeOnly ? theme . colors . primary : theme . colors . mutedForeground }
127+ />
128+ < Text style = { [ styles . filterOptionText , { color : theme . colors . foreground } ] } > Code</ Text >
129+ </ TouchableOpacity >
130+
131+ < TouchableOpacity
132+ style = { [ styles . filterOption , { backgroundColor : filterConfig . showDiagramOnly ? 'rgba(59, 130, 246, 0.1)' : 'transparent' } ] }
133+ onPress = { ( ) => setFilterConfig ( prev => ( { ...prev , showDiagramOnly : ! prev . showDiagramOnly } ) ) }
134+ >
135+ < Ionicons
136+ name = { filterConfig . showDiagramOnly ? "checkbox" : "square-outline" }
137+ size = { 24 }
138+ color = { filterConfig . showDiagramOnly ? theme . colors . primary : theme . colors . mutedForeground }
139+ />
140+ < Text style = { [ styles . filterOptionText , { color : theme . colors . foreground } ] } > Diagram</ Text >
115141 </ TouchableOpacity >
116142
117143 < Text style = { [ styles . inputLabel , { color : theme . colors . mutedForeground , marginTop : 24 } ] } > SORT BY</ Text >
0 commit comments