Rename fixedLayout to fixlayout
MODIFY
internal/app.go
internal/app.go
@@ -56,7 +56,7 @@ func Run() {
log.Fatalf("Error constructing window (%s).\n", createError.Error())
}
- window.RegisterCommand("fixlayout", commands.FixedLayout)
+ window.RegisterCommand("fixlayout", commands.FixLayout)
runError := window.Run()
if runError != nil {

RENAME
internal/commands/fixedlayout.go
internal/commands/fixlayout.go
@@ -9,7 +9,7 @@ import (
"github.com/Bios-Marcel/cordless/internal/ui"
)
-func FixedLayout(writer io.Writer, window *ui.Window, parameters []string) {
+func FixLayout(writer io.Writer, window *ui.Window, parameters []string) {
if len(parameters) == 1 {
choice, parseError := strconv.ParseBool(parameters[0])
if parseError != nil {

MODIFY
internal/ui/window.go
internal/ui/window.go
@@ -324,9 +324,7 @@ func NewWindow(discord *discordgo.Session) (*Window, error) {
window.messageInput.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey {
messageToSend := window.messageInput.GetText()
- if messageToSend == "" {
- }
if event.Key() == tcell.KeyUp {
for i := len(window.shownMessages) - 1; i > 0; i-- {
message := window.shownMessages[i]

Rename fixedLayout to fixlayout