diff options
author | Hubert Hirtz <hubert@hirtzfr.eu> | 2020-08-25 23:16:54 +0200 |
---|---|---|
committer | Hubert Hirtz <hubert@hirtzfr.eu> | 2020-08-26 17:53:40 +0200 |
commit | e91396fe94643b2745e6350210d3637d9770d5b4 (patch) | |
tree | 23fdbd7a0eb9ae7d6409c0d0aed31f4512d51bc8 /window.go | |
parent | Allow /part with a reason (diff) |
General refactor yay
- Centralize message formatting
- Make line formatting more flexible
- Provide more information in irc events
- Refactor command handling
- Add a /help command
- Make /me reply to last query if from home
- Enforce argument for /me
- Make BufferList and Editor public
- Batch processing of IRC events
Diffstat (limited to 'window.go')
-rw-r--r-- | window.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/window.go b/window.go new file mode 100644 index 0000000..77719f2 --- /dev/null +++ b/window.go @@ -0,0 +1,19 @@ +package senpai + +import ( + "time" + + "git.sr.ht/~taiite/senpai/ui" +) + +func (app *App) addLineNow(buffer string, line ui.Line) { + if line.At.IsZero() { + line.At = time.Now() + } + app.win.AddLine(buffer, false, line) + app.draw() +} + +func (app *App) draw() { + app.win.Draw() +} |