mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-02 22:20:06 +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,
|
\ 'username' : msg.fromUser.username,
|
||||||
\ 'room' : room,
|
\ 'room' : room,
|
||||||
\ 'msg' : msg.text,
|
\ 'msg' : msg.text,
|
||||||
|
\ 'replays' : get(msg, 'threadMessageCount', 0),
|
||||||
\ 'time': s:format_time(msg.sent),
|
\ 'time': s:format_time(msg.sent),
|
||||||
\ })
|
\ })
|
||||||
endfor
|
endfor
|
||||||
|
@ -368,6 +368,9 @@ function! s:update_msg_screen() abort
|
|||||||
call add(buffer, repeat(' ', 18) . ' ' . nr2char(9474) . ' ' .repeat(' ', 12) . ' ' . nr2char(9474) . ' ' . l )
|
call add(buffer, repeat(' ', 18) . ' ' . nr2char(9474) . ' ' .repeat(' ', 12) . ' ' . nr2char(9474) . ' ' . l )
|
||||||
endfor
|
endfor
|
||||||
endif
|
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
|
endfor
|
||||||
call setline(1, buffer)
|
call setline(1, buffer)
|
||||||
normal! G
|
normal! G
|
||||||
|
Loading…
Reference in New Issue
Block a user