Store favourite comments per-activity#457
Conversation
|
Hello! Thank you very much for the help. About the UX. One way that comes to mind is to mirror how tags currently working. So clicking on favourite icon will add favourite comment only for the selected activity. Long clicking on added favourite comment will open an edit screen with ability to select another activity or select no activity which will mean that comment can be used for all activities. Also it is probably better to allow assigning one fav comment to several activities. To allow this it is possible to add a separate DBO similar to RecordTypeToTagDBO, that will store a relation between activity typeId and fav comment id. Instead of adding only one typeId field to FavouriteCommentDBO. Future ideas to expand:
Hope this makes sense. |
a813f54 to
30cd135
Compare
|
Ok, I've had another go at the database side of things to track activity links in their own table, so I believe this now works as you've described (no activity links = favourited for all activities). Activity toggling is still bolted on to a long press of the favourite button for now. Modern Android layout stuff is all new to me so I'm trying to familiarise myself with it, though if cloning the tag activity picker for this is easy enough then feel free to take what I've got so far and run with it. 🙂 |
This PR extends favourite comments to be optionally associated with a single activity. The favourites hints combine "global" comments from all activities with "local" ones belonging to the currently-selected activity.
Still to do:
UX: Currently tapping the star button adds a local favourite, while long-pressing it creates a global one. The star turns red and the hint appears when either exist, so currently there's no way to tell the two cases apart, nor is it apparent that two modes of favouriting exist. Open to suggestions on how to present this.
Tests: Not yet investigated, besides the minimum amount of updates of test utils needed to fix compilation.
Fixes #453.