mirror of
https://github.com/tulir/gomuks.git
synced 2025-04-19 02:03:40 -05:00
Remove unused newline toggle. Fixes #434
This commit is contained in:
parent
4616f33d50
commit
e6a2c3ff85
2 changed files with 0 additions and 18 deletions
|
@ -59,7 +59,6 @@ type UserPreferences struct {
|
||||||
DisableDownloads bool `yaml:"disable_downloads"`
|
DisableDownloads bool `yaml:"disable_downloads"`
|
||||||
DisableNotifications bool `yaml:"disable_notifications"`
|
DisableNotifications bool `yaml:"disable_notifications"`
|
||||||
DisableShowURLs bool `yaml:"disable_show_urls"`
|
DisableShowURLs bool `yaml:"disable_show_urls"`
|
||||||
AltEnterToSend bool `yaml:"alt_enter_to_send"`
|
|
||||||
|
|
||||||
InlineURLMode string `yaml:"inline_url_mode"`
|
InlineURLMode string `yaml:"inline_url_mode"`
|
||||||
}
|
}
|
||||||
|
|
|
@ -954,20 +954,6 @@ func (itm InvertedToggleMessage) Name() string {
|
||||||
return string(unicode.ToUpper(rune(itm[0]))) + string(itm[1:])
|
return string(unicode.ToUpper(rune(itm[0]))) + string(itm[1:])
|
||||||
}
|
}
|
||||||
|
|
||||||
type NewlineKeybindMessage string
|
|
||||||
|
|
||||||
func (nkm NewlineKeybindMessage) Format(state bool) string {
|
|
||||||
if state {
|
|
||||||
return "Now using <enter> to create new line and <alt+enter> to send"
|
|
||||||
} else {
|
|
||||||
return "Now using <enter> to send and <alt+enter> to create new line"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (nkm NewlineKeybindMessage) Name() string {
|
|
||||||
return string(nkm)
|
|
||||||
}
|
|
||||||
|
|
||||||
var toggleMsg = map[string]ToggleMessage{
|
var toggleMsg = map[string]ToggleMessage{
|
||||||
"rooms": HideMessage("Room list sidebar"),
|
"rooms": HideMessage("Room list sidebar"),
|
||||||
"users": HideMessage("User list sidebar"),
|
"users": HideMessage("User list sidebar"),
|
||||||
|
@ -983,7 +969,6 @@ var toggleMsg = map[string]ToggleMessage{
|
||||||
"unverified": SimpleToggleMessage("sending messages to unverified devices"),
|
"unverified": SimpleToggleMessage("sending messages to unverified devices"),
|
||||||
"showurls": SimpleToggleMessage("show URLs in text format"),
|
"showurls": SimpleToggleMessage("show URLs in text format"),
|
||||||
"inlineurls": InvertedToggleMessage("use fancy terminal features to render URLs inside text"),
|
"inlineurls": InvertedToggleMessage("use fancy terminal features to render URLs inside text"),
|
||||||
"newline": NewlineKeybindMessage("should <alt+enter> make a new line or send the message"),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func makeUsage() string {
|
func makeUsage() string {
|
||||||
|
@ -1040,8 +1025,6 @@ func cmdToggle(cmd *Command) {
|
||||||
cmd.Reply("Force-enabled using fancy terminal features to render URLs inside text. Restart gomuks to apply changes.")
|
cmd.Reply("Force-enabled using fancy terminal features to render URLs inside text. Restart gomuks to apply changes.")
|
||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
case "newline":
|
|
||||||
val = &cmd.Config.Preferences.AltEnterToSend
|
|
||||||
default:
|
default:
|
||||||
cmd.Reply("Unknown toggle %s. Use /toggle without arguments for a list of togglable things.", thing)
|
cmd.Reply("Unknown toggle %s. Use /toggle without arguments for a list of togglable things.", thing)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Reference in a new issue