Libraryless. Click here for Pure Java version (14432L/90K).
1 | // r : voidfunc(snippet ID), called in module queue |
2 | static AutoCloseable dm_onSnippetEdited(final VF1<S> r) {
|
3 | dm_requireSnippetUpdatesModule(); |
4 | final DynModule m = dm_current_mandatory(); |
5 | ret dm_vmBus_onMessage('snippetUpdate, voidfunc(fL l) {
|
6 | switch to m.q(); |
7 | S uri = getString(l, 1); |
8 | new Matches m; |
9 | if (swic(uri, "/edit/", m)) {
|
10 | S snippetID = fsI(firstIntAsString(m.rest())); |
11 | callF(r, snippetID); |
12 | } |
13 | }); |
14 | } |
15 | |
16 | static AutoCloseable dm_onSnippetEdited(fS snippetID, final Runnable r) {
|
17 | ret dm_onSnippetEdited(voidfunc(S id) {
|
18 | if (sameSnippetID(id, snippetID)) callF(r) |
19 | }); |
20 | } |
Began life as a copy of #1020439
download show line numbers debug dex old transpilations
Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1020647 |
| Snippet name: | dm_onSnippetEdited |
| Eternal ID of this version: | #1020647/3 |
| Text MD5: | 0907cd33b29c524688678a0b990eec00 |
| Transpilation MD5: | 161900105cfaebbf04e92cf1482bdd55 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-10-01 18:04:01 |
| Source code size: | 637 bytes / 20 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 590 / 688 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |