File tree Expand file tree Collapse file tree
app/src/main/java/com/nextcloud/talk Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,8 +43,10 @@ import com.nextcloud.talk.utils.UnifiedPushUtils
4343import com.nextcloud.talk.utils.ShortcutManagerHelper
4444import com.nextcloud.talk.utils.bundle.BundleKeys
4545import com.nextcloud.talk.utils.bundle.BundleKeys.KEY_ROOM_TOKEN
46+ import io.reactivex.SingleObserver
4647import io.reactivex.android.schedulers.AndroidSchedulers
4748import io.reactivex.disposables.CompositeDisposable
49+ import io.reactivex.disposables.Disposable
4850import io.reactivex.schedulers.Schedulers
4951import javax.inject.Inject
5052
Original file line number Diff line number Diff line change @@ -76,9 +76,8 @@ object DeepLinkHandler {
7676 */
7777 private fun parseAuthority (authority : String ): Pair <String ?, String > =
7878 if (authority.contains(" @" )) {
79- val parts = authority.split(" @" , limit = 2 )
80- val username = parts[0 ].takeIf { it.isNotBlank() }
81- val host = parts.getOrElse(1 ) { " " }
79+ val username = authority.substringBeforeLast(" @" ).takeIf { it.isNotBlank() }
80+ val host = authority.substringAfterLast(" @" ).takeIf { it.isNotBlank() } ? : " "
8281 Pair (username, host)
8382 } else {
8483 Pair (null , authority)
You can’t perform that action at this time.
0 commit comments