Skip to content

Commit

Permalink
Support share text url decode
Browse files Browse the repository at this point in the history
  • Loading branch information
Jun Tang committed Jun 15, 2018
1 parent 3930cc0 commit 7c51daa
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Mixin/UserInterface/Windows/UrlWindow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -372,14 +372,12 @@ extension UrlWindow {
guard let query = url.getKeyVals() else {
return false
}
guard let text = query["text"] else {
return false
}
guard !text.isEmpty else {
guard let text = query["text"], !text.isEmpty else {
return false
}

UIApplication.rootNavigationController()?.pushViewController(SendToViewController.instance(text: text), animated: true)
let shareText = text.removingPercentEncoding ?? text
UIApplication.rootNavigationController()?.pushViewController(SendToViewController.instance(text: shareText), animated: true)

return true
}
Expand Down

0 comments on commit 7c51daa

Please sign in to comment.