diff options
author | Tulir Asokan <tulir@maunium.net> | 2020-03-01 17:11:56 +0200 |
---|---|---|
committer | Tulir Asokan <tulir@maunium.net> | 2020-03-01 17:11:56 +0200 |
commit | 3c21281adaccafebe818cfb34b17ec688c94bd32 (patch) | |
tree | 119c2d705e1375d6b424e00216646b294233d7e6 /ui/commands.go | |
parent | da4a2c670d9c1f399ad87ddbc109445f2d974edb (diff) |
Implement selecting message to reply/react to with keyboard
Diffstat (limited to 'ui/commands.go')
-rw-r--r-- | ui/commands.go | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/ui/commands.go b/ui/commands.go index c7f0301..9ef0577 100644 --- a/ui/commands.go +++ b/ui/commands.go @@ -147,19 +147,14 @@ const ( ) func cmdReply(cmd *Command) { - cmd.Room.selecting = true - cmd.Room.selectReason = SelectReply - cmd.Room.selectContent = strings.Join(cmd.Args, " ") - cmd.Room.OnSelect(cmd.Room.MessageView().selected) + cmd.Room.StartSelecting(SelectReply, strings.Join(cmd.Args, " ")) } func cmdRedact(cmd *Command) { cmd.Reply("Not yet implemented 3:") // This needs to be implemented in RoomView's OnSelect method - //cmd.Room.selecting = true - //cmd.Room.selectReason = SelectRedact - //cmd.Room.OnSelect(cmd.Room.MessageView().selected) + //cmd.Room.StartSelecting(SelectRedact, "") } func cmdReact(cmd *Command) { @@ -168,10 +163,7 @@ func cmdReact(cmd *Command) { return } - cmd.Room.selecting = true - cmd.Room.selectReason = SelectReact - cmd.Room.selectContent = strings.Join(cmd.Args, " ") - cmd.Room.OnSelect(cmd.Room.MessageView().selected) + cmd.Room.StartSelecting(SelectReact, strings.Join(cmd.Args, " ")) } func cmdTags(cmd *Command) { |