GUI changes to reflect new chat data types

parent 35572ed4
......@@ -501,7 +501,7 @@ false Value in-group?
next-slide
;] swap click[] ;
: show-group ( last# -- )
: show-group ( group-o -- )
dup { g -- } cell+ $@ drop cell+ >o
{{ glue*l chat-bg-col# slide-frame dup .button1
{{
......@@ -780,7 +780,7 @@ Variable emojis$ "👍👎🤣😍😘😛🤔😭😡😱🔃" emojis$ $! \
posting-vp >o dispose-childs free-thumbs 0 to active-w o>
project:branch$ $@ { d: branch }
dvcs:new-posting-log >o
?msg-log last# msg-log@ 2dup { log u }
>group msg-log@ 2dup { log u }
bounds ?DO
I $@ msg:display \ this will only set the URLs
cell +LOOP
......@@ -917,18 +917,17 @@ Variable emojis$ "👍👎🤣😍😘😛🤔😭😡😱🔃" emojis$ $! \
; wmsg-class to msg:id
:noname { sig u' addr u -- }
u' 64'+ u = u sigsize# = and IF
last# >r last# $@ ?msg-log
addr u startdate@ 64dup date>i >r 64#1 64+ date>i' r>
\ 2dup = IF ." [otrified] " addr u startdate@ .ticks THEN
U+DO
I last# cell+ $[]@
I msg-group-o .msg:log[] $[]@
2dup dup sigpksize# - /string key| msg:id$ str= IF
dup u - /string addr u str= IF
I [: ." [OTRifying] #" u. forth:cr ;] do-debug
I [: ." OTRify #" u. ;] $tmp
\italic }}text 25%bv \regular light-blue text-color!
"otrify" name! msg-box .child+
sig u' I last# cell+ $[]@ replace-sig
sig u' I msg-group-o .msg:log[] $[]@ replace-sig
\ !!Schedule message saving!!
ELSE
I [: ." [OTRified] #" u. forth:cr ;] do-debug
......@@ -938,7 +937,6 @@ Variable emojis$ "👍👎🤣😍😘😛🤔😭😡😱🔃" emojis$ $! \
2drop
THEN
LOOP
r> to last#
THEN ; wmsg-class is msg:otrify
:noname ( addr u type -- )
obj-red
......@@ -986,8 +984,8 @@ wmsg-o >o msg-table @ token-table ! o>
0 to msg-par 0 to msg-box
msgs-box .dispose-childs
glue*lll }}glue msgs-box .child+
2dup load-msg ?msg-log
last# msg-log@ 2dup { log u }
2dup load-msg
msg-log@ 2dup { log u }
dup gui-msgs# cells - 0 max /string bounds ?DO
I $@ { d: msgt }
msgt ['] wmsg-display wmsg-o .catch IF
......
......@@ -227,11 +227,11 @@ User peer-buf
event: :>avalanche ( addr u o group -- )
avalanche( ." Avalanche to: " dup hex. cr )
to last# .avalanche-msg ;
to msg-group-o .avalanche-msg ;
event: :>chat-reconnect ( addr u $chat o group -- )
to last# .reconnect-chat ;
to msg-group-o .reconnect-chat ;
event: :>msg-nestsig ( $addr o group -- )
to last# >o { w^ m } m $@ do-msg-nestsig m $free o>
to msg-group-o >o { w^ m } m $@ do-msg-nestsig m $free o>
ctrl L inskey ;
\ coordinates
......@@ -300,14 +300,14 @@ Forward msg:last
up@ receiver-task <> IF
avalanche-msg
ELSE wait-task @ ?dup-IF
<event >r e$, o elit, last# elit,
<event >r e$, o elit, msg-group-o elit,
:>avalanche r> event>
ELSE 2drop THEN
THEN ;
: show-msg ( addr u -- )
parent dup IF .wait-task @ dup up@ <> and THEN
?dup-IF
>r r@ <hide> <event $make elit, o elit, last# elit, :>msg-nestsig
>r r@ <hide> <event $make elit, o elit, msg-group-o elit, :>msg-nestsig
r> event>
ELSE do-msg-nestsig THEN ;
......@@ -661,7 +661,7 @@ $21 net2o: msg-group ( $:group -- ) \g set group
$> >group parent msg-group-o .msg:peers[] del$cell ;
+net2o: msg-reconnect ( $:pubkey+addr -- ) \g rewire distribution tree
$> $make
<event last-msg 2@ e$, elit, o elit, last# elit, :>chat-reconnect
<event last-msg 2@ e$, elit, o elit, msg-group-o elit, :>chat-reconnect
parent .wait-task @ ?query-task over select event> ;
+net2o: msg-last? ( start end n -- ) 64>n msg:last? ;
+net2o: msg-last ( $:[tick0,msgs,..tickn] n -- ) 64>n msg:last ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment