Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions app.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
const RELEASE_PROFILES = new Set(["preview", "production"]);
const {
resolveRevenueCatBuildConfigFromEnvironment,
} = require("./lib/subscription/revenueCatBuildConfig");

module.exports = ({ config }) => {
const shouldGenerateDevClientScheme = !RELEASE_PROFILES.has(
process.env.EAS_BUILD_PROFILE,
);
const shouldGenerateDevClientScheme =
process.env.EAS_BUILD_PROFILE === "development";
const revenueCat = resolveRevenueCatBuildConfigFromEnvironment(process.env);

return {
...config,
extra: {
...(config.extra || {}),
revenueCat,
},
plugins: (config.plugins || []).map((plugin) => {
const isDevClientPlugin =
plugin === "expo-dev-client" ||
Expand Down
6 changes: 3 additions & 3 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
"expo": {
"name": "DearDiary",
"slug": "dear-diary",
"version": "1.0.8",
"version": "1.0.9",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"scheme": "deardiary",
"userInterfaceStyle": "automatic",
"newArchEnabled": true,
"ios": {
"buildNumber": "7",
"buildNumber": "9",
"supportsTablet": true
},
"android": {
Expand All @@ -22,7 +22,7 @@
"icon": "./assets/images/icon.png",
"package": "com.aryan.deardiary",
"permissions": ["com.android.vending.BILLING"],
"versionCode": 8,
"versionCode": 9,
"adaptiveIcon": {
"backgroundColor": "#FFDDE8",
"foregroundImage": "./assets/images/icon.png"
Expand Down
58 changes: 4 additions & 54 deletions components/ai-chat/ai-chat-screen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { StatusBar } from "expo-status-bar";
import { Sparkles } from "lucide-react-native";
import { useEffect, useMemo, useRef, useState } from "react";
import {
Animated,
Keyboard,
KeyboardAvoidingView,
type NativeScrollEvent,
Expand All @@ -22,6 +21,7 @@ import {
} from "react-native";
import { useSafeAreaInsets } from "react-native-safe-area-context";

import { AiProcessingAnimation } from "@/components/ai-chat/ai-processing-animation";
import { AnimatedIconButton } from "@/components/ui/animated-icon-button";
import { AIResponseRenderer } from "@/components/ai/ai-response-renderer";
import { ScreenErrorState } from "@/components/states/ScreenErrorState";
Expand Down Expand Up @@ -581,7 +581,9 @@ export function AiChatScreen({
DearDiary AI
</Text>
</View>
<ThinkingText />
<View className="ml-8">
<AiProcessingAnimation />
</View>
</View>
) : null}
</View>
Expand Down Expand Up @@ -712,58 +714,6 @@ function shouldCountChatIntentTowardQuota(
].includes(intent);
}

function ThinkingText() {
const opacity = useRef(new Animated.Value(0.42)).current;
const translateY = useRef(new Animated.Value(0)).current;

useEffect(() => {
const animation = Animated.loop(
Animated.sequence([
Animated.parallel([
Animated.timing(opacity, {
duration: 620,
toValue: 1,
useNativeDriver: true,
}),
Animated.timing(translateY, {
duration: 620,
toValue: -1.5,
useNativeDriver: true,
}),
]),
Animated.parallel([
Animated.timing(opacity, {
duration: 620,
toValue: 0.42,
useNativeDriver: true,
}),
Animated.timing(translateY, {
duration: 620,
toValue: 0,
useNativeDriver: true,
}),
]),
]),
);

animation.start();

return () => animation.stop();
}, [opacity, translateY]);

return (
<Animated.Text
className="pl-10 text-[15px] font-semibold leading-5 text-[#71717B]"
style={{
opacity,
transform: [{ translateY }],
}}
>
Thinking...
</Animated.Text>
);
}

function ChatBubble({
assistantBubbleMaxWidth,
avatarUrl,
Expand Down
Loading