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

[NEW] Reaction and emoji#2795

Open
PushUpek wants to merge 3 commits intoRocketChat:developfrom
PushUpek:reaction_and_emoji
Open

[NEW] Reaction and emoji#2795
PushUpek wants to merge 3 commits intoRocketChat:developfrom
PushUpek:reaction_and_emoji

Conversation

@PushUpek
Copy link
Copy Markdown

@RocketChat/ios

  • Get popup of emoji when typing: same like on desktop
  • Typing +:emoji_name: should react to last message

Closes #2638
Closes #2627


let string3 = "+upside_down:"
XCTAssertNil(string3.reaction())

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)


let string2 = ":upside_down:"
XCTAssertNil(string2.reaction())

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

}

XCTAssertEqual(emoji, ":upside_down:")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

guard let emoji = string.reaction() else {
return XCTFail("string is valid reaction")
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)


func testReaction() {
let string = "+:upside_down:"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)


XCTAssertNil(string2.commandAndParams())
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)


let emoji = String(self.dropFirst())
guard emoji.first == ":" && emoji.last == ":" else { return nil }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)


func reaction() -> String? {
guard self.first == "+" && self.count > 1 else { return nil }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

let params = components.dropFirst().joined(separator: " ")
return (command: command, params: params)
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[NEW] Typing +:emoji_name: should react to last message [NEW] Get popup of emoji when typing: same like on desktop

2 participants