Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

17
LINES

< > BotCompany Repo | #1027630 // Conversation concept (used to include Msg + MsgOut)

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (12788L/87K).

1  
concept Conversation {
2  
  bool authed;
3  
  S cookie, ip;
4  
  new LL<Msg> oldDialogs;
5  
  new L<Msg> msgs;
6  
7  
  void add(Msg m) {
8  
    syncAdd(msgs, m);
9  
    change();
10  
    vmBus_send chatBot_messageAdded(mc(), this, m);
11  
  }
12  
  
13  
  int allCount() { ret lengthLevel2(oldDialogs) + l(msgs); }
14  
  int archiveSize() { ret lengthLevel2(oldDialogs); }
15  
  
16  
  L<Msg> allMsgs() { ret concatLists(listPlus(oldDialogs, msgs)); }
17  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1027630
Snippet name: Conversation concept (used to include Msg + MsgOut)
Eternal ID of this version: #1027630/8
Text MD5: 37e1c4e4835c77f564abaa263033342e
Transpilation MD5: 18bbd140758503d5809020aeba53a35d
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-04-10 18:51:42
Source code size: 420 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 160 / 1034
Version history: 7 change(s)
Referenced in: [show references]