Skip to content

Commit ee09c3c

Browse files
committed
iam should add to triggers list
1 parent 69f1217 commit ee09c3c

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

examples/build.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,7 @@ Send In-App Message Section (placed right after In-App Messaging):
418418
- Left-aligned text and icon content (not centered)
419419
- UPPERCASE button text
420420
- On tap: adds trigger and shows Toast "Sent In-App Message: {type}"
421+
- Also upserts `iam_type` in the Triggers list immediately so UI reflects the sent IAM type
421422
422423
Use react-native-vector-icons (MaterialCommunityIcons or MaterialIcons) for icons.
423424
Tooltip should explain each IAM type.
@@ -506,6 +507,7 @@ Triggers Section:
506507
507508
IMPORTANT: Triggers are stored IN MEMORY ONLY during the app session.
508509
- triggersList is a [string, string][] array in the app state
510+
- Sending an IAM button also updates the same list by setting `iam_type`
509511
- Triggers are NOT persisted to AsyncStorage
510512
- Triggers are cleared when the app is killed/restarted
511513
- This is intentional - triggers are transient test data for IAM testing

examples/demo/src/context/AppContext.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,7 @@ export function AppContextProvider({ children }: Props) {
516516

517517
const sendIamTrigger = useCallback((iamType: string) => {
518518
repository.addTrigger('iam_type', iamType);
519+
dispatch({ type: 'ADD_TRIGGER', payload: { key: 'iam_type', value: iamType } });
519520
const msg = `Sent In-App Message: ${iamType}`;
520521
log.i(TAG, msg);
521522
Toast.show({ type: 'info', text1: msg });

0 commit comments

Comments
 (0)