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

[BLOCKED][IMPROVEMENT] Remove markdown & parse emojis in push notifications #2432

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

Conversation

cardoso
Copy link
Collaborator

@cardoso cardoso commented Dec 14, 2018

@RocketChat/ios

Had to move some stuff around to share markdown code with the extension

Partially closes #1563
Blocked by RocketChat/Rocket.Chat#12956

@cardoso cardoso added this to the 3.3.0 milestone Dec 14, 2018
@@ -104,6 +104,7 @@ fileprivate extension RCMarkdownParser {
parser.strikeAttributes = [NSAttributedString.Key.strikethroughStyle.rawValue: NSNumber(value: NSUnderlineStyle.single.rawValue)]
parser.linkAttributes = [NSAttributedString.Key.foregroundColor.rawValue: UIColor.darkGray]

#if !EXCLUDE_MARKDOWN_DOWNLOAD
Copy link
Contributor

Choose a reason for hiding this comment

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

I love the idea of using this kind of configuration per scheme, but what about something "pattern", like this?

ROCKETCHAT_MARKDOWN_DOWNLOAD_MEDIA

This way we:

  1. Make sure the name is actually managed by us;
  2. It's a positive checking, not negative, will be like this:
#if ROCKETCHAT_MARKDOWN_DOWNLOAD_MEDIA
...
#endif

I think it brings more clarity to the code... what do you think?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

  1. Agreed with namespacing the flag
  2. If positive then we have to remember to add it for every build configuration in every target :/ this is very specific for the Notification Service Extension to avoid including all our download related classes.

@@ -308,3 +309,5 @@ public extension UIColor {
"YELLOWGREEN" : "9ACD32"
]
}

// swiftlint:enable all
Copy link
Contributor

Choose a reason for hiding this comment

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

👀

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I decided to treat this file as an external library. It has tons of single letter variables that prevent compiling with our linter.

Should I rewrite it? What do you think?

@cardoso cardoso changed the title [BLOCKED][IMPROVEMENT] Remove markdown from push notifications [BLOCKED][IMPROVEMENT] Remove markdown & show emojis in push notifications Dec 21, 2018
@cardoso cardoso changed the title [BLOCKED][IMPROVEMENT] Remove markdown & show emojis in push notifications [BLOCKED][IMPROVEMENT] Remove markdown & parse emojis in push notifications Dec 21, 2018
@rafaelks rafaelks modified the milestones: 3.3.0, 3.5.0 Mar 22, 2019
@rafaelks rafaelks modified the milestones: 3.4.1, 3.5.0 Apr 5, 2019
@rafaelks rafaelks modified the milestones: 3.5.0, 3.6.0 May 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[IMPROVEMENT] Remove Markdown tags from in some parts of the app
3 participants