Meshtastic-Apple icon indicating copy to clipboard operation
Meshtastic-Apple copied to clipboard

🐞 [Bug]: Messages Filters do not when switching between tabs

Open wingcomm opened this issue 8 months ago • 6 comments

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

wingcomm avatar Mar 30 '25 05:03 wingcomm

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

garthvh avatar Mar 31 '25 06:03 garthvh

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.

wingcomm avatar Mar 31 '25 18:03 wingcomm

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 avatar Apr 01 '25 03:04 tannerellen

@tannerellen Thanks for sharing. Nodes list seems to squirrelly after tapping around in Settings...

wingcomm avatar Apr 02 '25 03:04 wingcomm

@wingcomm Yep, can confirm I have run into the same issue with the nodes list now too.

tannerellen avatar Apr 07 '25 04:04 tannerellen

@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>

RCGV1 avatar May 08 '25 06:05 RCGV1

Fixed in 2.64 App Store release

garthvh avatar Jun 11 '25 23:06 garthvh