Enable use of EventeListeners to inform when link is enqueued and dequeued#35
Enable use of EventeListeners to inform when link is enqueued and dequeued#35zesarone wants to merge 5 commits intohelfer:masterfrom
Conversation
- It is now possible to add an eventlistener to be notified after beeing queued and before beeing dequeued for further processing.
|
Sorry for the delay @zesarone! I think this makes sense and I'd be open to merging it, but can you tell me a bit more about your use case first? Are you using it to build offline persistence, or do something else? |
* Removal of old listeners - Return a GUID on creation of a listener - Function for removing the listener by passing GUID, opName and event * Remove tslint rules that are no longer in use
Codecov Report
@@ Coverage Diff @@
## master #35 +/- ##
============================================
- Coverage 100.00% 62.82% -37.18%
============================================
Files 1 2 +1
Lines 26 78 +52
Branches 3 18 +15
============================================
+ Hits 26 49 +23
- Misses 0 29 +29
Continue to review full report at Codecov.
|
|
@helfer Our use case is as you mention to do offline persistence. the idea is to have a convenient access point to trigger actions in the UI and others when things get queued. Got some other changes from @fishyFrogFace in to handle cleanup of listeners etc. |
Used this implementation in our app and it helped us along with notifying the UI to act accordingly.
Can be used as follows
Please merge/edit/ignore if you find this useful and aligning with project plan.