| .. | ||
| add_new_folder.bat | ||
| add_reaction_folder.dart | ||
| generate_reaction_config.dart | ||
| README.md | ||
| update_reactions.bat | ||
Reaction Tools
This folder contains tools for managing reaction sets in Sojorn.
Available Tools
1. add_reaction_folder.dart
Purpose: Add new reaction folders to the reaction picker When to use: After creating a new folder with images and credit.md
How to run:
# Windows (easy)
tools\add_new_folder.bat
# Manual
dart tools/add_reaction_folder.dart
What it does:
- Scans
assets/reactions/for folders - Checks which folders have PNG/SVG files
- Updates
lib/widgets/reactions/reaction_picker.dartto include folders with content - Ignores empty folders automatically
2. generate_reaction_config.dart
Purpose: Generate configuration file (legacy/alternative) When to use: If you prefer JSON-based configuration
How to run:
dart tools/generate_reaction_config.dart
What it does:
- Scans folders and creates
reaction_config.json - Lists all files found in each folder
- Provides build-time file discovery
Recommended Workflow
- Create Folder:
mkdir assets/reactions/yourtheme - Add Images: Drop PNG/SVG files in the folder
- Add Credits: Create
credit.md(optional) - Update Picker: Run
tools\add_new_folder.bat - Restart App: See your new reaction tabs!
File Naming Tips
The system tries 200+ common file names including:
- Basic:
heart,thumbs_up,laugh,wow,sad,angry - Faces:
smiling_face,winking_face,laughing_face,melting_face - Special:
skull,ghost,robot,angel,devil - Hearts:
heart_with_arrow,broken_heart,green_heart,blue_heart - Actions:
clap,pray,party,fire,thinking - Modern:
lol,omg,cool,hot,computer,phone
Use descriptive names with underscores, not spaces or camelCase.