Comments (2)
I'm having a similar issue. Here's my specifics
- Phone: Pixel 5
- OS: iode, version:
4.4-20230824-redfin
- Build number:
TQ3A.230805.001 dev-keys
- App version:
3.10.1
Specific message
🤍💕🤍💕🤍💕🤍💕🤍💕🤍💕🤍💕🤍💕🤍💕🤍💕🤍💕🤍💕🤍💕🤍💕🤍💕🤍💕!!!!!!!!!!!!!!
from qksms.
Remove EMOJI_REGEX from MessagesAdapter:
Remove the declaration and usage of EMOJI_REGEX from your MessagesAdapter class. This means you no longer need the Regex pattern EMOJI_REGEX in your adapter.
Update emojiOnly variable:
Change the line
val emojiOnly = messageText.isNotBlank() && messageText.matches(EMOJI_REGEX)
to :
val emojiOnly = messageText.isNotBlank() && containsOnlyEmoji(messageText.toString())
This means you're now calling the containsOnlyEmoji function to check if the message contains only emojis.
Add containsOnlyEmoji function:
Add the following function to your code:
fun containsOnlyEmoji(text: String): Boolean {
val regexPattern = Regex("^[\\p{So}]+$")
return regexPattern.matches(text)
}
This function checks if the given text contains only emojis by using the Regex pattern ^[\p{So}]+$. If the text matches this pattern (i.e., contains only emojis), it returns true; otherwise, it returns false.
// Update emojiOnly variable
val emojiOnly = messageText.isNotBlank() && containsOnlyEmoji(messageText.toString())
By following these steps, you'll remove the EMOJI_REGEX, update the emojiOnly variable, and add the containsOnlyEmoji function to your MessagesAdapter class.
from qksms.
Related Issues (20)
- f-droid icon
- Migrating data to new phone = screwed up contacts HOT 4
- Clearing the blacklist HOT 1
- End-to-end encrypted SMS HOT 4
- Thank you!
- [Bug] App crashes when accessing app via lock screen notification (CalyxOS)
- Is QKSMS messages app project discontinued forever? HOT 8
- Is there a way to support without having to go through Google Play ? HOT 3
- Unable to search by Group Conversation Title
- System Accent Color
- Detect airplane mode HOT 1
- Search Boxes
- per-contact notifications not working
- Feature Request: SMS Auto-delete/Retention Policy
- gradle not build while i am updating in android studio and latest kotlin version
- Confusing loading state in Battery Saver
- Main
- a prefix from another country arrives, for example 001 instead of 0044.
- Messages will be tagged as "Sending" even if they eventually go through
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qksms.