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:
parent
49f1838963
commit
3d645a86ee
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user