1
0
mirror of https://github.com/schollz/croc.git synced 2024-12-25 23:03:18 +03:00

Shorten the UI bar

This commit is contained in:
Zack Scholl 2017-10-25 09:44:08 -06:00
parent 2ab6542fea
commit d134e7986f

View File

@ -520,6 +520,7 @@ func (c *Connection) receiveFile(id int, connection net.Conn) error {
if !c.Debug {
c.bars[id] = uiprogress.AddBar(int(chunkSize)/1024 + 1).AppendCompleted().PrependElapsed()
c.bars[id].Width = 40
}
logger.Debug("waiting for file")
@ -579,6 +580,7 @@ func (c *Connection) sendFile(id int, connection net.Conn) error {
if !c.Debug {
logger.Debug("going to show progress")
c.bars[id] = uiprogress.AddBar(int(fi.Size())).AppendCompleted().PrependElapsed()
c.bars[id].Width = 40
}
// rate limit the bandwidth