Skip to content

Commit

Permalink
Merge pull request #2 from WebEngage/develop
Browse files Browse the repository at this point in the history
removed warnings.
  • Loading branch information
ShubhamN123 authored Jul 3, 2024
2 parents 061ddc6 + 1cbe09f commit 271de2e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ extension WEXBannerPushNotificationViewController{

let richBodyLabel = UILabel()
if let viewController = viewController, let message = message {
richBodyLabel.attributedText = WEXCoreUtils.getAttributedString(message: message, colorHex: colorHex, viewController: self.viewController)
richBodyLabel.attributedText = WEXCoreUtils.getAttributedString(message: message, colorHex: colorHex, viewController: viewController)
}
richBodyLabel.numberOfLines = 0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ extension WEXOverlayPushNotificationViewController{

let richBodyLabel = UILabel()
if let viewController = viewController, let message = message {
richBodyLabel.attributedText = WEXCoreUtils.getAttributedString(message: message, colorHex: colorHex, viewController: self.viewController)
richBodyLabel.attributedText = WEXCoreUtils.getAttributedString(message: message, colorHex: colorHex, viewController: viewController)
}
richBodyLabel.numberOfLines = 0

Expand Down
8 changes: 4 additions & 4 deletions Sources/WEContentExtension/WEContentExtension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ open class WEXRichPushNotificationViewController: UIViewController,UNNotificatio
if !forDescription {
let preferredLanguages = Locale.preferredLanguages
let deviceLanguage = preferredLanguages.first
let primaryLanguage = Locale.components(fromIdentifier: deviceLanguage ?? "")[NSLocale.Key.languageCode.rawValue] as? String ?? ""
let primaryLanguage = Locale.components(fromIdentifier: deviceLanguage ?? "")[NSLocale.Key.languageCode.rawValue] ?? ""
if rightToLeftLanguages.contains(primaryLanguage) {
return .right
} else {
Expand Down Expand Up @@ -278,7 +278,7 @@ open class WEXRichPushNotificationViewController: UIViewController,UNNotificatio
inputString = "<strong>\(textString)</strong>"
}

guard let data = inputString.data(using: .unicode) else {
guard (inputString.data(using: .unicode) != nil) else {
return nil
}

Expand Down Expand Up @@ -377,8 +377,8 @@ open class WEXRichPushNotificationViewController: UIViewController,UNNotificatio
return !scalar.isTraditionalEmoji
}
func differentiateCharsAndEmojis(inputString: String) -> (chars: [Character], emojis: [Character]){
var chars: [Character] = []
var emojis: [Character] = []
let chars: [Character] = []
let emojis: [Character] = []
for char in inputString {
if isEmoji(character: char) {
if isKeycapEmoji(char){
Expand Down

0 comments on commit 271de2e

Please sign in to comment.