mirror of
https://github.com/jjbrunton/Sauci.git
synced 2026-10-31 18:19:43 +00:00
Compare commits
8
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cff928ce5e | ||
|
|
3fc6f8aa1a | ||
|
|
02a7349899 | ||
|
|
8f70dbcc00 | ||
|
|
ac80d6b614 | ||
|
|
056bb62d04 | ||
|
|
80ec1663f9 | ||
|
|
8ff05c050b |
No files matched your search
@@ -59,6 +59,7 @@ e2e/playwright-report/
|
|||||||
|
|
||||||
# Misc
|
# Misc
|
||||||
*.pem
|
*.pem
|
||||||
|
!apps/mobile/certs/certificate.pem
|
||||||
.cache/
|
.cache/
|
||||||
.temp/
|
.temp/
|
||||||
.tmp/
|
.tmp/
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ android {
|
|||||||
applicationId 'com.sauci.app'
|
applicationId 'com.sauci.app'
|
||||||
minSdkVersion rootProject.ext.minSdkVersion
|
minSdkVersion rootProject.ext.minSdkVersion
|
||||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||||
versionCode 48
|
versionCode 49
|
||||||
versionName "1.0.7"
|
versionName "1.0.7"
|
||||||
buildConfigField "String", "REACT_NATIVE_RELEASE_LEVEL", "\"${findProperty('reactNativeReleaseLevel') ?: 'stable'}\""
|
buildConfigField "String", "REACT_NATIVE_RELEASE_LEVEL", "\"${findProperty('reactNativeReleaseLevel') ?: 'stable'}\""
|
||||||
}
|
}
|
||||||
@@ -182,3 +182,53 @@ dependencies {
|
|||||||
|
|
||||||
apply plugin: 'com.google.gms.google-services'
|
apply plugin: 'com.google.gms.google-services'
|
||||||
apply plugin: 'com.google.firebase.crashlytics'
|
apply plugin: 'com.google.firebase.crashlytics'
|
||||||
|
|
||||||
|
// Reanimated 4.1.7 imports Worklets from its pre-AGP-8 CMake output path,
|
||||||
|
// while AGP 8.14 writes release outputs below intermediates/cxx/RelWithDebInfo.
|
||||||
|
// Keep the checked-in Android project compatible with the supported SDK 54
|
||||||
|
// dependency set by materializing that one legacy input after Worklets builds.
|
||||||
|
def workletsReleaseAbis = ["armeabi-v7a", "arm64-v8a", "x86", "x86_64"]
|
||||||
|
def syncWorkletsReleaseCmakeInputs = tasks.register("syncWorkletsReleaseCmakeInputs") {
|
||||||
|
dependsOn(":react-native-worklets:externalNativeBuildRelease")
|
||||||
|
|
||||||
|
doLast {
|
||||||
|
def workletsIntermediates = file("${rootDir}/../../../node_modules/react-native-worklets/android/build/intermediates")
|
||||||
|
workletsReleaseAbis.each { abi ->
|
||||||
|
def libraries = fileTree(workletsIntermediates) {
|
||||||
|
include "cxx/RelWithDebInfo/**/obj/${abi}/libworklets.so"
|
||||||
|
}.files
|
||||||
|
if (libraries.size() != 1) {
|
||||||
|
throw new GradleException("Expected exactly one Worklets release library for ${abi}, found ${libraries.size()}")
|
||||||
|
}
|
||||||
|
def source = libraries.iterator().next()
|
||||||
|
def destination = file("${workletsIntermediates}/cmake/release/obj/${abi}/libworklets.so")
|
||||||
|
destination.parentFile.mkdirs()
|
||||||
|
java.nio.file.Files.deleteIfExists(destination.toPath())
|
||||||
|
source.withInputStream { input ->
|
||||||
|
destination.withOutputStream { output -> output << input }
|
||||||
|
}
|
||||||
|
if (destination.length() != source.length()) {
|
||||||
|
throw new GradleException("Failed to copy Worklets release library for ${abi}")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
gradle.projectsEvaluated {
|
||||||
|
def reanimatedProject = findProject(":react-native-reanimated")
|
||||||
|
reanimatedProject?.tasks?.configureEach { task ->
|
||||||
|
if (task.name == "externalNativeBuildRelease" || task.name == "prefabReleasePackage") {
|
||||||
|
task.dependsOn(syncWorkletsReleaseCmakeInputs)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.configureEach { task ->
|
||||||
|
if (task.name.startsWith("configureCMakeRelWithDebInfo")) {
|
||||||
|
task.dependsOn(
|
||||||
|
":react-native-worklets:prefabReleasePackage",
|
||||||
|
":react-native-reanimated:prefabReleasePackage",
|
||||||
|
":shopify_react-native-skia:prefabReleasePackage",
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
"group.com.sauci.app"
|
"group.com.sauci.app"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"buildNumber": "45",
|
"buildNumber": "46",
|
||||||
"usesAppleSignIn": true,
|
"usesAppleSignIn": true,
|
||||||
"googleServicesFile": "./GoogleService-Info.plist",
|
"googleServicesFile": "./GoogleService-Info.plist",
|
||||||
"infoPlist": {
|
"infoPlist": {
|
||||||
@@ -189,7 +189,7 @@
|
|||||||
"backgroundColor": "#1a1a2e"
|
"backgroundColor": "#1a1a2e"
|
||||||
},
|
},
|
||||||
"package": "com.sauci.app",
|
"package": "com.sauci.app",
|
||||||
"versionCode": 48,
|
"versionCode": 49,
|
||||||
"googleServicesFile": "./google-services.json",
|
"googleServicesFile": "./google-services.json",
|
||||||
"permissions": [
|
"permissions": [
|
||||||
"RECEIVE_BOOT_COMPLETED",
|
"RECEIVE_BOOT_COMPLETED",
|
||||||
|
|||||||
@@ -69,10 +69,12 @@ export default function MatchesScreen() {
|
|||||||
checkNudgeCooldown,
|
checkNudgeCooldown,
|
||||||
} = useMatchStore();
|
} = useMatchStore();
|
||||||
const { user, couple, partner } = useAuthStore();
|
const { user, couple, partner } = useAuthStore();
|
||||||
|
const userId = user?.id;
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { width } = useWindowDimensions();
|
const { width } = useWindowDimensions();
|
||||||
const isWideScreen = width > MAX_CONTENT_WIDTH;
|
const isWideScreen = width > MAX_CONTENT_WIDTH;
|
||||||
const [showTutorial, setShowTutorial] = useState(false);
|
const [showTutorial, setShowTutorial] = useState(false);
|
||||||
|
const tutorialDismissedRef = useRef(false);
|
||||||
const [nudgeFeedback, setNudgeFeedback] = useState<string | null>(null);
|
const [nudgeFeedback, setNudgeFeedback] = useState<string | null>(null);
|
||||||
const [headerHeight, setHeaderHeight] = useState(130);
|
const [headerHeight, setHeaderHeight] = useState(130);
|
||||||
|
|
||||||
@@ -104,21 +106,30 @@ export default function MatchesScreen() {
|
|||||||
// Check if tutorial should be shown when screen is focused or matches change
|
// Check if tutorial should be shown when screen is focused or matches change
|
||||||
useFocusEffect(
|
useFocusEffect(
|
||||||
useCallback(() => {
|
useCallback(() => {
|
||||||
|
let isActive = true;
|
||||||
|
|
||||||
const checkTutorial = async () => {
|
const checkTutorial = async () => {
|
||||||
if (matches.length > 0) {
|
if (matches.length > 0 && userId) {
|
||||||
const seen = await hasSeenMatchesTutorial();
|
const seen = await hasSeenMatchesTutorial(userId);
|
||||||
if (!seen) {
|
if (isActive && !tutorialDismissedRef.current && !seen) {
|
||||||
setShowTutorial(true);
|
setShowTutorial(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
checkTutorial();
|
void checkTutorial();
|
||||||
}, [matches.length])
|
|
||||||
|
return () => {
|
||||||
|
isActive = false;
|
||||||
|
};
|
||||||
|
}, [matches.length, userId])
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleTutorialComplete = async () => {
|
const handleTutorialComplete = async () => {
|
||||||
await markMatchesTutorialSeen();
|
if (!userId) return;
|
||||||
|
|
||||||
|
tutorialDismissedRef.current = true;
|
||||||
setShowTutorial(false);
|
setShowTutorial(false);
|
||||||
|
await markMatchesTutorialSeen(userId);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Load whichever view is showing, once. Returning to this tab reuses what is
|
// Load whichever view is showing, once. Returning to this tab reuses what is
|
||||||
|
|||||||
@@ -772,7 +772,7 @@
|
|||||||
CODE_SIGN_ENTITLEMENTS = ../targets/widget/generated.entitlements;
|
CODE_SIGN_ENTITLEMENTS = ../targets/widget/generated.entitlements;
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
COPY_PHASE_STRIP = NO;
|
COPY_PHASE_STRIP = NO;
|
||||||
CURRENT_PROJECT_VERSION = 44;
|
CURRENT_PROJECT_VERSION = 46;
|
||||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
DEVELOPMENT_TEAM = BXVPBATDZY;
|
DEVELOPMENT_TEAM = BXVPBATDZY;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
@@ -808,7 +808,7 @@
|
|||||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||||
CODE_SIGN_ENTITLEMENTS = ../targets/widget/generated.entitlements;
|
CODE_SIGN_ENTITLEMENTS = ../targets/widget/generated.entitlements;
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 44;
|
CURRENT_PROJECT_VERSION = 46;
|
||||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||||
DEVELOPMENT_TEAM = BXVPBATDZY;
|
DEVELOPMENT_TEAM = BXVPBATDZY;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
|
|||||||
+114
-114
@@ -1,118 +1,118 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>CFBundleAllowMixedLocalizations</key>
|
<key>CFBundleAllowMixedLocalizations</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||||
<key>CFBundleDisplayName</key>
|
<key>CFBundleDisplayName</key>
|
||||||
<string>Sauci</string>
|
<string>Sauci</string>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>$(EXECUTABLE_NAME)</string>
|
<string>$(EXECUTABLE_NAME)</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
<string>$(PRODUCT_NAME)</string>
|
<string>$(PRODUCT_NAME)</string>
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
|
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>1.0.7</string>
|
<string>1.0.7</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleURLTypes</key>
|
<key>CFBundleURLTypes</key>
|
||||||
<array>
|
<array>
|
||||||
<dict>
|
<dict>
|
||||||
<key>CFBundleURLSchemes</key>
|
<key>CFBundleURLSchemes</key>
|
||||||
<array>
|
<array>
|
||||||
<string>app.sauci</string>
|
<string>app.sauci</string>
|
||||||
<string>com.sauci.app</string>
|
<string>com.sauci.app</string>
|
||||||
</array>
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
<dict>
|
<dict>
|
||||||
<key>CFBundleURLSchemes</key>
|
<key>CFBundleURLSchemes</key>
|
||||||
<array>
|
<array>
|
||||||
<string>exp+sauci</string>
|
<string>exp+sauci</string>
|
||||||
</array>
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
<dict>
|
<dict>
|
||||||
<key>CFBundleURLSchemes</key>
|
<key>CFBundleURLSchemes</key>
|
||||||
<array>
|
<array>
|
||||||
<string>com.googleusercontent.apps.861972684340-0u2as8i5equfhmhmvjihottkf0ig7237</string>
|
<string>com.googleusercontent.apps.861972684340-0u2as8i5equfhmhmvjihottkf0ig7237</string>
|
||||||
</array>
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>45</string>
|
<string>46</string>
|
||||||
<key>GOOGLE_ANALYTICS_INAPURCHASE_COLLECTION_ENABLED</key>
|
<key>GOOGLE_ANALYTICS_INAPURCHASE_COLLECTION_ENABLED</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>ITSAppUsesNonExemptEncryption</key>
|
<key>ITSAppUsesNonExemptEncryption</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>LSApplicationQueriesSchemes</key>
|
<key>LSApplicationQueriesSchemes</key>
|
||||||
<array>
|
<array>
|
||||||
<string>instagram</string>
|
<string>instagram</string>
|
||||||
<string>instagram-stories</string>
|
<string>instagram-stories</string>
|
||||||
</array>
|
</array>
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
<string>12.0</string>
|
<string>12.0</string>
|
||||||
<key>LSRequiresIPhoneOS</key>
|
<key>LSRequiresIPhoneOS</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>NSAppTransportSecurity</key>
|
<key>NSAppTransportSecurity</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>NSAllowsArbitraryLoads</key>
|
<key>NSAllowsArbitraryLoads</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>NSAllowsLocalNetworking</key>
|
<key>NSAllowsLocalNetworking</key>
|
||||||
<true/>
|
<true/>
|
||||||
</dict>
|
</dict>
|
||||||
<key>NSCameraUsageDescription</key>
|
<key>NSCameraUsageDescription</key>
|
||||||
<string>Sauci uses your camera to take photos and videos that you can share privately with your partner.</string>
|
<string>Sauci uses your camera to take photos and videos that you can share privately with your partner.</string>
|
||||||
<key>NSFaceIDUsageDescription</key>
|
<key>NSFaceIDUsageDescription</key>
|
||||||
<string>Sauci uses Face ID to unlock the app and keep your conversations private.</string>
|
<string>Sauci uses Face ID to unlock the app and keep your conversations private.</string>
|
||||||
<key>NSMicrophoneUsageDescription</key>
|
<key>NSMicrophoneUsageDescription</key>
|
||||||
<string>Sauci uses your microphone to record audio when you capture videos to share privately with your partner.</string>
|
<string>Sauci uses your microphone to record audio when you capture videos to share privately with your partner.</string>
|
||||||
<key>NSPhotoLibraryAddUsageDescription</key>
|
<key>NSPhotoLibraryAddUsageDescription</key>
|
||||||
<string>Sauci saves photos and videos from your partner's messages to your photo library when you tap the save button.</string>
|
<string>Sauci saves photos and videos from your partner's messages to your photo library when you tap the save button.</string>
|
||||||
<key>NSPhotoLibraryUsageDescription</key>
|
<key>NSPhotoLibraryUsageDescription</key>
|
||||||
<string>Sauci uses your photo library so you can select photos and videos to share privately with your partner.</string>
|
<string>Sauci uses your photo library so you can select photos and videos to share privately with your partner.</string>
|
||||||
<key>NSUserActivityTypes</key>
|
<key>NSUserActivityTypes</key>
|
||||||
<array>
|
<array>
|
||||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route</string>
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route</string>
|
||||||
</array>
|
</array>
|
||||||
<key>RCTNewArchEnabled</key>
|
<key>RCTNewArchEnabled</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>UIBackgroundModes</key>
|
<key>UIBackgroundModes</key>
|
||||||
<array>
|
<array>
|
||||||
<string>remote-notification</string>
|
<string>remote-notification</string>
|
||||||
</array>
|
</array>
|
||||||
<key>UILaunchStoryboardName</key>
|
<key>UILaunchStoryboardName</key>
|
||||||
<string>SplashScreen</string>
|
<string>SplashScreen</string>
|
||||||
<key>UIRequiredDeviceCapabilities</key>
|
<key>UIRequiredDeviceCapabilities</key>
|
||||||
<array>
|
<array>
|
||||||
<string>arm64</string>
|
<string>arm64</string>
|
||||||
</array>
|
</array>
|
||||||
<key>UIRequiresFullScreen</key>
|
<key>UIRequiresFullScreen</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>UIStatusBarStyle</key>
|
<key>UIStatusBarStyle</key>
|
||||||
<string>UIStatusBarStyleDefault</string>
|
<string>UIStatusBarStyleDefault</string>
|
||||||
<key>UISupportedInterfaceOrientations</key>
|
<key>UISupportedInterfaceOrientations</key>
|
||||||
<array>
|
<array>
|
||||||
<string>UIInterfaceOrientationPortrait</string>
|
<string>UIInterfaceOrientationPortrait</string>
|
||||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||||
</array>
|
</array>
|
||||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||||
<array>
|
<array>
|
||||||
<string>UIInterfaceOrientationPortrait</string>
|
<string>UIInterfaceOrientationPortrait</string>
|
||||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||||
</array>
|
</array>
|
||||||
<key>UIUserInterfaceStyle</key>
|
<key>UIUserInterfaceStyle</key>
|
||||||
<string>Automatic</string>
|
<string>Automatic</string>
|
||||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||||
<false/>
|
<false/>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
import AsyncStorage from "@react-native-async-storage/async-storage";
|
||||||
|
import * as SecureStore from "expo-secure-store";
|
||||||
|
import {
|
||||||
|
hasSeenMatchesTutorial,
|
||||||
|
markMatchesTutorialSeen,
|
||||||
|
resetMatchesTutorial,
|
||||||
|
} from "@/lib/matchesTutorialSeen";
|
||||||
|
|
||||||
|
jest.mock("expo-secure-store", () => ({
|
||||||
|
getItemAsync: jest.fn(),
|
||||||
|
}));
|
||||||
|
|
||||||
|
describe("matchesTutorialSeen", () => {
|
||||||
|
beforeEach(async () => {
|
||||||
|
await AsyncStorage.clear();
|
||||||
|
jest.mocked(SecureStore.getItemAsync).mockReset();
|
||||||
|
jest.mocked(SecureStore.getItemAsync).mockResolvedValue(null);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("persists a dismissal for the signed-in account", async () => {
|
||||||
|
await markMatchesTutorialSeen("user-1");
|
||||||
|
|
||||||
|
await expect(hasSeenMatchesTutorial("user-1")).resolves.toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("does not dismiss the tutorial for another account on the same device", async () => {
|
||||||
|
await markMatchesTutorialSeen("user-1");
|
||||||
|
|
||||||
|
await expect(hasSeenMatchesTutorial("user-2")).resolves.toBe(false);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("migrates an existing legacy dismissal into durable account storage", async () => {
|
||||||
|
jest.mocked(SecureStore.getItemAsync).mockResolvedValue("true");
|
||||||
|
|
||||||
|
await expect(hasSeenMatchesTutorial("user-1")).resolves.toBe(true);
|
||||||
|
await expect(AsyncStorage.getItem("matches_tutorial_seen_user-1")).resolves.toBe("true");
|
||||||
|
});
|
||||||
|
|
||||||
|
it("lets the development reset show the tutorial for the current account again", async () => {
|
||||||
|
await markMatchesTutorialSeen("user-1");
|
||||||
|
await resetMatchesTutorial("user-1");
|
||||||
|
|
||||||
|
await expect(hasSeenMatchesTutorial("user-1")).resolves.toBe(false);
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -223,7 +223,8 @@ export function ProfileScreen() {
|
|||||||
label="Reset Matches Tutorial"
|
label="Reset Matches Tutorial"
|
||||||
description="Show the tutorial again"
|
description="Show the tutorial again"
|
||||||
onPress={async () => {
|
onPress={async () => {
|
||||||
await resetMatchesTutorial();
|
if (!user?.id) return;
|
||||||
|
await resetMatchesTutorial(user.id);
|
||||||
Alert.alert("Success", "Matches tutorial has been reset.");
|
Alert.alert("Success", "Matches tutorial has been reset.");
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -1,51 +1,70 @@
|
|||||||
|
import AsyncStorage from "@react-native-async-storage/async-storage";
|
||||||
import * as SecureStore from "expo-secure-store";
|
import * as SecureStore from "expo-secure-store";
|
||||||
import { Platform } from "react-native";
|
import { Platform } from "react-native";
|
||||||
|
|
||||||
const STORAGE_KEY = "matches_tutorial_seen";
|
const STORAGE_KEY_PREFIX = "matches_tutorial_seen";
|
||||||
|
const LEGACY_STORAGE_KEY = "matches_tutorial_seen";
|
||||||
|
|
||||||
async function getStorage(): Promise<boolean> {
|
const buildKey = (userId: string): string => `${STORAGE_KEY_PREFIX}_${userId}`;
|
||||||
|
|
||||||
|
async function getStorage(userId: string): Promise<boolean> {
|
||||||
try {
|
try {
|
||||||
let data: string | null = null;
|
const key = buildKey(userId);
|
||||||
|
|
||||||
if (Platform.OS === "web") {
|
if (Platform.OS === "web") {
|
||||||
if (typeof window !== "undefined" && typeof window.localStorage !== "undefined") {
|
if (typeof window !== "undefined" && typeof window.localStorage !== "undefined") {
|
||||||
data = window.localStorage.getItem(STORAGE_KEY);
|
return window.localStorage.getItem(key) === "true";
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
data = await SecureStore.getItemAsync(STORAGE_KEY);
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return data === "true";
|
const storedValue = await AsyncStorage.getItem(key);
|
||||||
|
if (storedValue !== null) {
|
||||||
|
return storedValue === "true";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Keep dismissals made before the account-scoped AsyncStorage key was
|
||||||
|
// introduced. Future reads use the durable app storage key above.
|
||||||
|
const legacyValue = await SecureStore.getItemAsync(LEGACY_STORAGE_KEY);
|
||||||
|
if (legacyValue === "true") {
|
||||||
|
await AsyncStorage.setItem(key, "true");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error reading matches tutorial state:", error);
|
console.error("Error reading matches tutorial state:", error);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function setStorage(seen: boolean): Promise<void> {
|
async function setStorage(userId: string, seen: boolean): Promise<void> {
|
||||||
try {
|
try {
|
||||||
const data = seen ? "true" : "false";
|
const data = seen ? "true" : "false";
|
||||||
|
const key = buildKey(userId);
|
||||||
|
|
||||||
if (Platform.OS === "web") {
|
if (Platform.OS === "web") {
|
||||||
if (typeof window !== "undefined" && typeof window.localStorage !== "undefined") {
|
if (typeof window !== "undefined" && typeof window.localStorage !== "undefined") {
|
||||||
window.localStorage.setItem(STORAGE_KEY, data);
|
window.localStorage.setItem(key, data);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
await SecureStore.setItemAsync(STORAGE_KEY, data);
|
await AsyncStorage.setItem(key, data);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error saving matches tutorial state:", error);
|
console.error("Error saving matches tutorial state:", error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function hasSeenMatchesTutorial(): Promise<boolean> {
|
/** The Matches tutorial is shown at most once per signed-in account. */
|
||||||
return getStorage();
|
export async function hasSeenMatchesTutorial(userId: string): Promise<boolean> {
|
||||||
|
return getStorage(userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function markMatchesTutorialSeen(): Promise<void> {
|
export async function markMatchesTutorialSeen(userId: string): Promise<void> {
|
||||||
await setStorage(true);
|
await setStorage(userId, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function resetMatchesTutorial(): Promise<void> {
|
export async function resetMatchesTutorial(userId: string): Promise<void> {
|
||||||
await setStorage(false);
|
await setStorage(userId, false);
|
||||||
}
|
}
|
||||||
@@ -8,8 +8,8 @@
|
|||||||
<string>com.apple.widgetkit-extension</string>
|
<string>com.apple.widgetkit-extension</string>
|
||||||
</dict>
|
</dict>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>45</string>
|
<string>46</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>1.0.7</string>
|
<string>1.0.7</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
@@ -1,5 +1,16 @@
|
|||||||
# Sauci Mobile Release Notes
|
# Sauci Mobile Release Notes
|
||||||
|
|
||||||
|
## v1.0.7 - 31 August 2026
|
||||||
|
_Android build 49 · iOS build 46_
|
||||||
|
|
||||||
|
More ways to discover each other, play together, and keep your shared space moving.
|
||||||
|
|
||||||
|
- **A new way to compare notes** - Take a couples quiz, see how well you know each other, and share your score when you are ready.
|
||||||
|
- **Dares with a little more proof** - Photo and voice-note proof give you new ways to bring a dare to life for your partner.
|
||||||
|
- **Your answers can wait safely** - Keep answering before you pair; your saved answers stay sealed until your partner joins.
|
||||||
|
- **An easier way to get started together** - A gentler welcome and clearer invite links help you find the right first prompt and bring your partner in.
|
||||||
|
- **More dependable updates** - The app is ready to receive signed over-the-air improvements more smoothly.
|
||||||
|
|
||||||
## v1.0.6 — 30 August 2026
|
## v1.0.6 — 30 August 2026
|
||||||
_iOS build 44 · Android build 48_
|
_iOS build 44 · Android build 48_
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user