-
Notifications
You must be signed in to change notification settings - Fork 8
[FEATURE-REQ] Add OTP (One Time Password) tag to conversation list #122
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
I've implemented a feature that automatically detects OTP (One Time Password) messages and adds a tag to them in the conversation list. This helps users quickly identify important verification code messages.
Features implemented:
- OTP Detection: Uses the existing
OtpDetectorclass to intelligently identify OTP messages - Multi-language Support: Automatically shows "OTP" or "验证码" based on the device's language setting
- Visual Tag: Adds a rounded tag next to OTP messages for easy identification
- Theme Integration: Dynamically matches the app's theme colors
Files modified:
1. Layout file
presentation/src/main/res/layout/conversation_list_item.xml
- Added OTP tag TextView
- Set initial visibility to gone
- Applied rounded background style
2. Adapter code
presentation/src/main/java/com/moez/QKSMS/feature/conversations/ConversationsAdapter.kt
- Added OtpDetector import
- Implemented OTP detection logic
- Added multi-language support
- Integrated theme color matching
3. Background style
presentation/src/main/res/drawable/otp_tag_background.xml
- Created rounded rectangle background for OTP tag
Implementation details:
- The tag is only shown when OTP is detected with high confidence
- Does not affect existing message content or layout
- Matches the app's existing design language
- Handles null values and edge cases gracefully
I believe this feature would be a valuable addition to the app, helping users quickly find and use verification codes. Let me know if you need any further information or adjustments!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Projects
Status
No status