Merge pull request #86 from loki-project/open-group

Enable the User to Join an Open Group Without Entering "https://"
pull/87/head
gmbnt 5 years ago committed by GitHub
commit f934b3c18b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -133,7 +133,10 @@ class EnterChatURLFragment : Fragment() {
private fun joinPublicChatIfPossible() { private fun joinPublicChatIfPossible() {
val inputMethodManager = context!!.getSystemService(BaseActionBarActivity.INPUT_METHOD_SERVICE) as InputMethodManager val inputMethodManager = context!!.getSystemService(BaseActionBarActivity.INPUT_METHOD_SERVICE) as InputMethodManager
inputMethodManager.hideSoftInputFromWindow(chatURLEditText.windowToken, 0) inputMethodManager.hideSoftInputFromWindow(chatURLEditText.windowToken, 0)
val chatURL = chatURLEditText.text.trim().toString().toLowerCase().replace("http://", "https://") var chatURL = chatURLEditText.text.trim().toString().toLowerCase().replace("http://", "https://")
if (!chatURL.toLowerCase().startsWith("https")) {
chatURL = "https://$chatURL"
}
(activity!! as JoinPublicChatActivity).joinPublicChatIfPossible(chatURL) (activity!! as JoinPublicChatActivity).joinPublicChatIfPossible(chatURL)
} }
} }

Loading…
Cancel
Save