mirror of
https://github.com/jjbrunton/Sauci.git
synced 2026-10-31 18:19:43 +00:00
Update icons, screenshots, and UX improvements
- Refactor icon picker to use full Ionicons set dynamically - Add date sort toggle to My Answers screen - Fix match deduplication and show total count on home - Clear stale data when switching chats - Update app store screenshots - Bump build number to 25 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c48936686e
commit
b60b72a289
64 files changed
+381
-298
No files matched your search
@@ -22,7 +22,7 @@ const ACCENT_COLOR = colors.primary;
|
||||
|
||||
export default function HomeScreen() {
|
||||
const { user, partner, couple } = useAuthStore();
|
||||
const { matches, newMatchesCount, fetchMatches } = useMatchStore();
|
||||
const { matches, newMatchesCount, totalCount, fetchMatches } = useMatchStore();
|
||||
const { enabledPackIds, fetchPacks } = usePacksStore();
|
||||
const { width } = useWindowDimensions();
|
||||
|
||||
@@ -146,7 +146,7 @@ export default function HomeScreen() {
|
||||
color={matches.length > 0 ? colors.text : ACCENT_COLOR}
|
||||
/>
|
||||
</View>
|
||||
<Text style={styles.statNumber}>{matches.length}</Text>
|
||||
<Text style={styles.statNumber}>{totalCount ?? matches.length}</Text>
|
||||
<Text style={styles.statLabel}>Matches</Text>
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
|
||||
@@ -47,7 +47,7 @@ const AnimatedSectionList = Animated.createAnimatedComponent(SectionList);
|
||||
type GroupByOption = "pack" | "date" | "answer";
|
||||
|
||||
export default function MyAnswersScreen() {
|
||||
const { responses, isLoading, isLoadingMore, hasMore, groupBy, fetchResponses, setGroupBy, totalCount } = useResponsesStore();
|
||||
const { responses, isLoading, isLoadingMore, hasMore, groupBy, dateSortOrder, fetchResponses, setGroupBy, toggleDateSortOrder, totalCount } = useResponsesStore();
|
||||
const { user } = useAuthStore();
|
||||
const router = useRouter();
|
||||
const params = useLocalSearchParams();
|
||||
@@ -123,7 +123,7 @@ export default function MyAnswersScreen() {
|
||||
}
|
||||
}, [isLoading, isLoadingMore, hasMore]);
|
||||
|
||||
const sections = groupResponses(responses, groupBy);
|
||||
const sections = groupResponses(responses, groupBy, dateSortOrder);
|
||||
|
||||
const handleEditPress = (response: ResponseWithQuestion) => {
|
||||
setSelectedResponse(response);
|
||||
@@ -164,16 +164,39 @@ export default function MyAnswersScreen() {
|
||||
);
|
||||
};
|
||||
|
||||
const GroupByButton = ({ option, label }: { option: GroupByOption; label: string }) => (
|
||||
<TouchableOpacity
|
||||
style={[styles.groupByButton, groupBy === option && styles.groupByButtonActive]}
|
||||
onPress={() => setGroupBy(option)}
|
||||
>
|
||||
<Text style={[styles.groupByText, groupBy === option && styles.groupByTextActive]}>
|
||||
{label}
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
);
|
||||
const GroupByButton = ({ option, label }: { option: GroupByOption; label: string }) => {
|
||||
const isActive = groupBy === option;
|
||||
const isDateButton = option === "date";
|
||||
const showChevron = isDateButton && isActive;
|
||||
|
||||
const handlePress = () => {
|
||||
if (isDateButton && isActive) {
|
||||
// Toggle sort order when date is already selected
|
||||
toggleDateSortOrder();
|
||||
} else {
|
||||
setGroupBy(option);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<TouchableOpacity
|
||||
style={[styles.groupByButton, isActive && styles.groupByButtonActive]}
|
||||
onPress={handlePress}
|
||||
>
|
||||
<Text style={[styles.groupByText, isActive && styles.groupByTextActive]}>
|
||||
{label}
|
||||
</Text>
|
||||
{showChevron && (
|
||||
<Ionicons
|
||||
name={dateSortOrder === "newest" ? "chevron-down" : "chevron-up"}
|
||||
size={14}
|
||||
color={ACCENT}
|
||||
style={styles.sortChevron}
|
||||
/>
|
||||
)}
|
||||
</TouchableOpacity>
|
||||
);
|
||||
};
|
||||
|
||||
if (!user) {
|
||||
return (
|
||||
@@ -441,6 +464,8 @@ const styles = StyleSheet.create({
|
||||
marginTop: spacing.md,
|
||||
},
|
||||
groupByButton: {
|
||||
flexDirection: "row",
|
||||
alignItems: "center",
|
||||
paddingHorizontal: spacing.md,
|
||||
paddingVertical: spacing.sm,
|
||||
borderRadius: radius.full,
|
||||
@@ -461,6 +486,9 @@ const styles = StyleSheet.create({
|
||||
color: ACCENT,
|
||||
fontWeight: "600",
|
||||
},
|
||||
sortChevron: {
|
||||
marginLeft: spacing.xs,
|
||||
},
|
||||
// Section header
|
||||
sectionHeader: {
|
||||
paddingVertical: spacing.sm,
|
||||
|
||||
Reference in new issue
Block a user