mirror of
https://github.com/diamondburned/cchat-mock.git
synced 2025-01-14 22:06:42 +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)
|
editTick := time.NewTicker(10 * time.Second)
|
||||||
defer editTick.Stop()
|
defer editTick.Stop()
|
||||||
|
|
||||||
deleteTick := time.NewTicker(15 * time.Second)
|
// deleteTick := time.NewTicker(15 * time.Second)
|
||||||
defer deleteTick.Stop()
|
// defer deleteTick.Stop()
|
||||||
|
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
|
@ -136,9 +136,9 @@ func (ch *Channel) JoinServer(container cchat.MessagesContainer) (stop func(), e
|
||||||
var old = ch.randomOldMsg()
|
var old = ch.randomOldMsg()
|
||||||
ch.updateMessage(newRandomMessage(old.id, old.author), container)
|
ch.updateMessage(newRandomMessage(old.id, old.author), container)
|
||||||
|
|
||||||
case <-deleteTick.C:
|
// case <-deleteTick.C:
|
||||||
var old = ch.randomOldMsg()
|
// var old = ch.randomOldMsg()
|
||||||
ch.deleteMessage(MessageHeader{old.id, time.Now()}, container)
|
// ch.deleteMessage(MessageHeader{old.id, time.Now()}, container)
|
||||||
|
|
||||||
case <-ch.ctx.Done():
|
case <-ch.ctx.Done():
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue