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

[NEW] Reaction and emoji #2795

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

PushUpek
Copy link

@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())

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())

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:")

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")
}

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:"

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)

@@ -146,4 +146,23 @@ class StringExtensionSpec: XCTestCase {

XCTAssertNil(string2.commandAndParams())
}

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 }

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 }

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)

@@ -137,6 +137,15 @@ extension String {
let params = components.dropFirst().joined(separator: " ")
return (command: command, params: params)
}

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
2 participants