mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
feat: Add support for sharing contacts via deeplink (#2336)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
parent
91dd6dbef4
commit
25111552eb
3 changed files with 21 additions and 4 deletions
|
|
@ -69,6 +69,7 @@ import com.geeksville.mesh.ui.MainMenuAction
|
|||
import com.geeksville.mesh.ui.MainScreen
|
||||
import com.geeksville.mesh.ui.common.theme.AppTheme
|
||||
import com.geeksville.mesh.ui.common.theme.MODE_DYNAMIC
|
||||
import com.geeksville.mesh.ui.sharing.toSharedContact
|
||||
import com.geeksville.mesh.ui.intro.AppIntroductionScreen
|
||||
import com.geeksville.mesh.util.Exceptions
|
||||
import com.geeksville.mesh.util.LanguageUtils
|
||||
|
|
@ -186,6 +187,12 @@ class MainActivity : AppCompatActivity(), Logging {
|
|||
) {
|
||||
debug("App link data is a channel set")
|
||||
model.requestChannelUrl(it)
|
||||
} else if (it.path?.startsWith("/v/") == true ||
|
||||
it.path?.startsWith("/V/") == true
|
||||
) {
|
||||
val sharedContact = it.toSharedContact()
|
||||
debug("App link data is a shared contact: ${sharedContact.user.longName}")
|
||||
model.setSharedContactRequested(sharedContact)
|
||||
} else {
|
||||
debug("App link data is not a channel set")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue