mirror of
https://github.com/jjbrunton/Sauci.git
synced 2026-11-01 18:19:43 +00:00
feat(mobile): improve pairing invite journey
This commit is contained in:
1 parent
402c027b14
commit
f9481054de
12 files changed
+335
-92
No files matched your search
@@ -0,0 +1,15 @@
|
||||
import AsyncStorage from "@react-native-async-storage/async-storage";
|
||||
|
||||
const keyFor = (userId: string, coupleId: string) => `paired_unlock_seen_${userId}_${coupleId}`;
|
||||
|
||||
export async function hasSeenPairedUnlock(userId: string, coupleId: string): Promise<boolean> {
|
||||
return (await AsyncStorage.getItem(keyFor(userId, coupleId))) === "true";
|
||||
}
|
||||
|
||||
export async function markPairedUnlockSeen(userId: string, coupleId: string): Promise<void> {
|
||||
await AsyncStorage.setItem(keyFor(userId, coupleId), "true");
|
||||
}
|
||||
|
||||
export async function clearPairedUnlockSeen(userId: string, coupleId: string | null): Promise<void> {
|
||||
if (coupleId) await AsyncStorage.removeItem(keyFor(userId, coupleId));
|
||||
}
|
||||
Reference in new issue
Block a user