1
0
Fork 0
mirror of https://github.com/diamondburned/cchat-mock.git synced 2025-01-13 13:26:49 +00:00

Removed delete events from the main loop, as that should be done in the menu

This commit is contained in:
diamondburned (Forefront) 2020-06-12 17:24:15 -07:00
parent 18a78c4de5
commit da0bda1270

View file

@ -118,8 +118,8 @@ func (ch *Channel) JoinServer(container cchat.MessagesContainer) (stop func(), e
editTick := time.NewTicker(10 * time.Second)
defer editTick.Stop()
deleteTick := time.NewTicker(15 * time.Second)
defer deleteTick.Stop()
// deleteTick := time.NewTicker(15 * time.Second)
// defer deleteTick.Stop()
for {
select {
@ -136,9 +136,9 @@ func (ch *Channel) JoinServer(container cchat.MessagesContainer) (stop func(), e
var old = ch.randomOldMsg()
ch.updateMessage(newRandomMessage(old.id, old.author), container)
case <-deleteTick.C:
var old = ch.randomOldMsg()
ch.deleteMessage(MessageHeader{old.id, time.Now()}, container)
// case <-deleteTick.C:
// var old = ch.randomOldMsg()
// ch.deleteMessage(MessageHeader{old.id, time.Now()}, container)
case <-ch.ctx.Done():
return