Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bb8ad1ee authored by Moez Bhatti's avatar Moez Bhatti
Browse files

Support SMS Uri where no number is entered

parent 8d9991fb
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@ package com.moez.QKSMS.feature.compose

import android.content.Intent
import android.net.Uri
import androidx.core.net.toFile
import androidx.lifecycle.ViewModel
import com.google.android.mms.ContentType
import com.moez.QKSMS.injection.ViewModelKey
@@ -50,8 +49,9 @@ class ComposeActivityModule {
        return activity.intent
                ?.decodedDataString()
                ?.substringAfter(':') // Remove scheme
                ?.replaceAfter("?", "") // Remove query
                ?.substringBeforeLast("?") // Remove query
                ?.split(",", ";")
                ?.filter { number -> number.isNotEmpty() }
                ?: listOf()
    }