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:
parent
18a78c4de5
commit
da0bda1270
10
channel.go
10
channel.go
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue