Meshtastic-Apple
Meshtastic-Apple copied to clipboard
🐞 [Bug]: Messages Filters do not when switching between tabs
Before submitting
- [x] I have searched existing issues to make sure this bug hasn't already been reported
- [x] I have updated to the latest version of the software to verify the issue still exists
Firmware Version
2.6.3.640e731
What did you do?
After specifying filters on the Messages view, they are no longer applied when you switch to another view like Bluetooth or Nodes and then back to Messages.
Expected Behavior
Filters should always be applied as set by the users no matter what tab they switch to...
Current Behavior
Filters are not applied correctly until you hit the filter button and toggle the filter you want on/off.
Participation
- [ ] I am willing to submit a pull request for this issue.
Additional comments
No response
Code of Conduct
- [x] I agree to follow this project's Code of Conduct
I can't replicate this issue, unless you close the app the filters stay in place when you come back, it does re-run the filter as more nodes can come in while you are in other tabs
I can't replicate this issue, unless you close the app the filters stay in place when you come back, it does re-run the filter as more nodes can come in while you are in other tabs
Yes, that's what I would expect to occur, but the filters are not working reliably for me at all. What would help show what I'm experiencing? The filters fail pretty reliably on my device.
I'm experiencing this bug as well. Happens very consistently for me. Here is a video. The bug appears to affect message contacts but not the node list.
https://github.com/user-attachments/assets/ec0971fd-595a-4b23-956e-bdd463ff849e
@tannerellen Thanks for sharing. Nodes list seems to squirrelly after tapping around in Settings...
@wingcomm Yep, can confirm I have run into the same issue with the nodes list now too.
@garthvh I have identified the issue: the initialized default predicate overrides the .onApppear searchUserList() predicate opperation. Adding a short delay to the .onAppear lets it fire after the init stage and it works as intended. This is not a clean solution but I have not played much with Core Data predicates so looking for your advice.
Heres the default values:
@FetchRequest(
sortDescriptors: [NSSortDescriptor(key: "lastMessage", ascending: false),
NSSortDescriptor(key: "userNode.favorite", ascending: false),
NSSortDescriptor(key: "pkiEncrypted", ascending: false),
NSSortDescriptor(key: "userNode.lastHeard", ascending: false),
NSSortDescriptor(key: "longName", ascending: true)],
predicate: NSPredicate(
format: "userNode.ignored == false && longName != '' AND NOT (userNode.viaMqtt == YES AND userNode.hopsAway > 0)"
), animation: .default
)
var users: FetchedResults<UserEntity>
Fixed in 2.64 App Store release