Commit 07831ed6 authored by Bernd Paysan's avatar Bernd Paysan

Start album viewer

parent d9c1e1f5
......@@ -138,8 +138,9 @@ end-class msging-class
cmd-class class{ msg
$10 +field dummy
$value: name$ \ group name
$value: id$
$value: id$ \ id of current message
$value: msg$ \ decrypted message
64value: timestamp \ timestamp of message
field: peers[]
field: keys[]
field: log[]
......
......@@ -878,7 +878,7 @@ Variable emojis$ "👍👎🤣😍😘😛🤔😭😡😱🔃" emojis$ $! \
dup .subbox "msg-box" name!
to msg-box to msg-par ;
:noname { d: pk -- o }
pk key| to msg:id$
pk key| to msg:id$ pk startdate@ to msg:timestamp
pk [: .simple-id ." : " ;] $tmp notify-nick!
pk key| pkc over str= { me? }
pk enddate@ otr? { otr }
......@@ -1059,6 +1059,23 @@ Variable emojis$ "👍👎🤣😍😘😛🤔😭😡😱🔃" emojis$ $! \
hash key| ?fetch
THEN {{ glue*ll }}glue r> }}v 40%bv box[] ;
hash: imgs# \ hash of tables of
: .imgs ( -- )
imgs# [: dup $. ." :" cr
cell+ $@ bounds ?DO
I $@ over be-64@ .ticks space
1 64s /string 85type cr
cell +LOOP ;] #map ;
: +imgs ( addr$ -- )
[: { w^ string | ts[ 1 64s ] } msg:timestamp ts[ be-64!
ts[ 1 64s type string $. ;] $tmp $make { w^ string }
msg-group$ $@ imgs# #@ d0= IF
string cell msg-group$ $@ imgs# #!
ELSE
string $@ last# cell+ $ins[] string $free
THEN ;
:noname ( addr u type -- )
obj-red
case 0 >r
......@@ -1067,7 +1084,8 @@ Variable emojis$ "👍👎🤣😍😘😛🤔😭😡😱🔃" emojis$ $! \
rdrop 1- msg-box .childs[] $[] @
dup .name$ "thumbnail" str= IF
[: ." display image: " addr data $@ 85type cr ;]
2swap $make click[] drop EXIT THEN drop THEN
2swap $make dup +imgs
click[] drop EXIT THEN drop THEN
[: ." img[" 85type ']' emit ;] $tmp }}text "image" name!
endof
msg:thumbnail# of ?thumb "thumbnail" name! endof
......
......@@ -798,7 +798,7 @@ net2o' nestsig net2o: msg-nestsig ( $:cmd+sig -- ) \g check sig+nest
\ nest-sig for msg/msging classes
' message msging-class is start-req
:noname quicksig( check-date )else( pk-sig? )
:noname check-date \ quicksig( check-date )else( pk-sig? )
>r 2dup r> ; msging-class is nest-sig
' message msg-class is start-req
:noname 2dup msg-dec?-sig? ; msg-class is nest-sig
......
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