-
Couldn't load subscription status.
- Fork 437
[BLOCKED][IMPROVEMENT] Remove markdown & parse emojis in push notifications #2432
base: develop
Are you sure you want to change the base?
Conversation
Rocket.Chat.NotificationServiceExtension/NotificationService.swift
Outdated
Show resolved
Hide resolved
Rocket.Chat.NotificationServiceExtension/NotificationService.swift
Outdated
Show resolved
Hide resolved
Rocket.Chat.NotificationServiceExtension/NotificationService.swift
Outdated
Show resolved
Hide resolved
| parser.strikeAttributes = [NSAttributedString.Key.strikethroughStyle.rawValue: NSNumber(value: NSUnderlineStyle.single.rawValue)] | ||
| parser.linkAttributes = [NSAttributedString.Key.foregroundColor.rawValue: UIColor.darkGray] | ||
|
|
||
| #if !EXCLUDE_MARKDOWN_DOWNLOAD |
There was a problem hiding this comment.
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:
- Make sure the name is actually managed by us;
- It's a positive checking, not negative, will be like this:
#if ROCKETCHAT_MARKDOWN_DOWNLOAD_MEDIA
...
#endifI think it brings more clarity to the code... what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Agreed with namespacing the flag
- 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.
| ] | ||
| } | ||
|
|
||
| // swiftlint:enable all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀
There was a problem hiding this comment.
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?
f1f214b to
04d0c50
Compare
@RocketChat/ios
Had to move some stuff around to share markdown code with the extension
Partially closes #1563
Blocked by RocketChat/Rocket.Chat#12956