Skip to content
This repository has been archived by the owner on Jun 7, 2020. It is now read-only.

[IMPROVEMENT] Auto suggesting slash commands even when not first character #2599

Merged
merged 1 commit into from
Mar 21, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ extension MessagesViewController: ComposerViewExpandedDelegate {
// MARK: Hints

func composerView(_ composerView: ComposerView, didChangeHintPrefixedWord word: String) {

// Don't generate hints if it is a slash command and not the first word
if word.first == "/" && composerView.textView.text != word {
return
}

composerViewModel.didChangeHintPrefixedWord(word: word)

if composerViewModel.hints.count > 0 {
Expand Down