Skip to content

Commit

Permalink
Merge branch 'develop' into fix/channel-selection
Browse files Browse the repository at this point in the history
  • Loading branch information
laevandus authored Oct 2, 2024
2 parents 1b95378 + d7bdf43 commit 6c95af4
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ open class TwoStepMentionCommand: CommandHandler {
self.displayInfo = displayInfo
}

public func canHandleCommand(in text: String, caretLocation: Int) -> ComposerCommand? {
open func canHandleCommand(in text: String, caretLocation: Int) -> ComposerCommand? {
if text == id {
return ComposerCommand(
id: id,
Expand All @@ -59,7 +59,7 @@ open class TwoStepMentionCommand: CommandHandler {
}
}

public func handleCommand(
open func handleCommand(
for text: Binding<String>,
selectedRangeLocation: Binding<Int>,
command: Binding<ComposerCommand?>,
Expand All @@ -84,19 +84,19 @@ open class TwoStepMentionCommand: CommandHandler {
selectedRangeLocation.wrappedValue = newCaretLocation
}

public func canBeExecuted(composerCommand: ComposerCommand) -> Bool {
open func canBeExecuted(composerCommand: ComposerCommand) -> Bool {
selectedUser != nil
}

public func commandHandler(for command: ComposerCommand) -> CommandHandler? {
open func commandHandler(for command: ComposerCommand) -> CommandHandler? {
if let selectedUser = selectedUser,
command.typingSuggestion.text != "\(mentionSymbol)\(selectedUser.mentionText)" {
self.selectedUser = nil
}
return command.id == id ? self : nil
}

public func showSuggestions(
open func showSuggestions(
for command: ComposerCommand
) -> Future<SuggestionInfo, Error> {
if selectedUser != nil {
Expand Down Expand Up @@ -126,7 +126,7 @@ open class TwoStepMentionCommand: CommandHandler {
return mentionsCommandHandler.showSuggestions(for: updated)
}

public var replacesMessageSent: Bool {
open var replacesMessageSent: Bool {
true
}

Expand Down

0 comments on commit 6c95af4

Please sign in to comment.