1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 10:20:05 +08:00

feat(vimchat): support replays counts

This commit is contained in:
wsdjeg 2022-05-04 14:40:33 +08:00
parent 49f1838963
commit 3d645a86ee
2 changed files with 4 additions and 0 deletions

View File

@ -164,6 +164,7 @@ function! s:gitter_fetch_exit(id, data, event) abort
\ 'username' : msg.fromUser.username,
\ 'room' : room,
\ 'msg' : msg.text,
\ 'replays' : get(msg, 'threadMessageCount', 0),
\ 'time': s:format_time(msg.sent),
\ })
endfor

View File

@ -368,6 +368,9 @@ function! s:update_msg_screen() abort
call add(buffer, repeat(' ', 18) . ' ' . nr2char(9474) . ' ' .repeat(' ', 12) . ' ' . nr2char(9474) . ' ' . l )
endfor
endif
if has_key(msg, 'replays') && msg.replays > 0
call add(buffer, repeat(' ', 18) . ' ' . nr2char(9474) . ' ' .repeat(' ', 12) . ' ' . nr2char(9474) . ' ' . printf('-> %s replays', msg.replays))
endif
endfor
call setline(1, buffer)
normal! G