Skip to content

Commit

Permalink
update for 3.4.11
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Sergey-K committed May 2, 2024
1 parent 71829d0 commit 72d49c0
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Core/UDStringExtension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ extension String {
}

func udIsValidEmail() -> Bool {
let emailRegex = "[A-Z0-9a-z]([A-Z0-9a-z._%+-]{0,30}[A-Z0-9a-z_])?" + "@" + "([A-Z0-9a-z]([A-Z0-9a-z-]{0,30}[A-Z0-9a-z])?\\.){1,5}" + "[A-Za-z]{2,8}"
let emailRegex = "[A-Z0-9a-z]([A-Z0-9a-z._%+-]{0,64}[A-Z0-9a-z_])?" + "@" + "([A-Z0-9a-z]([A-Z0-9a-z-]{0,255}[A-Z0-9a-z])?\\.){1,5}" + "[A-Za-z]{2,8}"
let emailTest = NSPredicate(format:"SELF MATCHES[c] %@", emailRegex)
return emailTest.evaluate(with: self) && !self.udIsHtml()
}
Expand Down
2 changes: 1 addition & 1 deletion Core/UseDeskSDKHelp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class UseDeskSDKHelp {
let payload: [String : Any] = [
"sdk" : "iOS",
"type" : "sdk",
"version" : "3.4.11",
"version" : "3.4.12",
"message_limit" : countMessagesOnInit,
"userData" : getUserParameters()
]
Expand Down
4 changes: 2 additions & 2 deletions Example/UseDesk.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@
INFOPLIST_FILE = "UseDesk/UseDesk-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 3.4.11;
MARKETING_VERSION = 3.4.12;
MODULE_NAME = ExampleApp;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = UseDeskExampleSDK.ru;
Expand Down Expand Up @@ -622,7 +622,7 @@
INFOPLIST_FILE = "UseDesk/UseDesk-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 3.4.11;
MARKETING_VERSION = 3.4.12;
MODULE_NAME = ExampleApp;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = UseDeskExampleSDK.ru;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ class UDStartViewController: UIViewController, UITextFieldDelegate, TabBarContro
@IBAction func startChatButton(_ sender: Any) {
guard isCanStartSDK else {
return

}
IQKeyboardManager.shared.enable = false
isCanStartSDK = false
usedesk.presentationCompletionBlock = { [weak self] in
self?.isCanStartSDK = true
Expand Down Expand Up @@ -217,6 +217,7 @@ class UDStartViewController: UIViewController, UITextFieldDelegate, TabBarContro

usedesk.presentationCompletionBlock = {
print("close SDK")
IQKeyboardManager.shared.enable = true
}
}

Expand All @@ -240,6 +241,7 @@ class UDStartViewController: UIViewController, UITextFieldDelegate, TabBarContro
}
self.isCanStartSDK = true
}, errorStatus: { [weak self] _, error in
IQKeyboardManager.shared.enable = true
self?.showError(error: error)
self?.isCanStartSDK = true
})
Expand All @@ -263,6 +265,7 @@ class UDStartViewController: UIViewController, UITextFieldDelegate, TabBarContro
}
self.isCanStartSDK = true
}, errorStatus: { [weak self] _, error in
IQKeyboardManager.shared.enable = true
self?.showError(error: error)
self?.isCanStartSDK = true
})
Expand Down
4 changes: 3 additions & 1 deletion UseDesk/Classes/UDListBaseKnowledgeVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,9 @@ class UDListBaseKnowledgeVC: UDBaseKnowledgeVC, UITableViewDelegate, UITableView
self.searchViewTopC.isActive = true
self.viewForTableTopCForSuperView.isActive = false
self.viewForTableTopC.isActive = true
self.backButton.alpha = 1
if (self.usedesk?.model.isPresentDefaultControllers ?? true) {
self.backButton.alpha = 1
}
self.viewForTable.alpha = 1
self.searchSeparatorView.alpha = 0
self.searchNotFoundLabel.alpha = 0
Expand Down
7 changes: 5 additions & 2 deletions UseDesk/Classes/UDMessagesView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,11 @@ class UDMessagesView: UIViewController, UITextViewDelegate, UIImagePickerControl

configurationStyle = usedesk?.configurationStyle ?? ConfigurationStyle()

loader.alpha = 1
loader.startAnimating()

loader.alpha = isFromBase ? 0 : 1
if !isFromBase {
loader.startAnimating()
}

tableNode.backgroundColor = configurationStyle.chatStyle.backgroundColor
self.view.backgroundColor = tableNode.backgroundColor
Expand Down
1 change: 1 addition & 0 deletions UseDesk/Classes/UDUIManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ class UDUIManager: UDUIProtocole {
if dialogflowVC == nil {
dialogflowVC = DialogflowView()
dialogflowVC?.usedesk = usedesk
dialogflowVC?.updateChat()
}
dialogflowVC?.view.layoutSubviews()
return dialogflowVC
Expand Down
2 changes: 1 addition & 1 deletion UseDesk_SDK_Swift.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = 'UseDesk_SDK_Swift'
s.version = '3.4.11'
s.version = '3.4.12'
s.summary = 'A short description of UseDesk.'

s.homepage = 'https://github.com/usedesk/UseDeskSwift'
Expand Down

0 comments on commit 72d49c0

Please sign in to comment.