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).

concept Conversation {
  bool authed;
  S cookie, ip;
  new LL<Msg> oldDialogs;
  new L<Msg> msgs;

  void add(Msg m) {
    syncAdd(msgs, m);
    change();
    vmBus_send chatBot_messageAdded(mc(), this, m);
  }
  
  int allCount() { ret lengthLevel2(oldDialogs) + l(msgs); }
  int archiveSize() { ret lengthLevel2(oldDialogs); }
  
  L<Msg> allMsgs() { ret concatLists(listPlus(oldDialogs, msgs)); }
}

download  show line numbers  debug dex   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, 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: 51 / 704
Version history: 7 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1027630 & http://1027630.tinybrain.de