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
|
|
@ -623,6 +623,15 @@ class UIViewModel @Inject constructor(
|
|||
radioConfigRepository.onServiceAction(ServiceAction.Reaction(emoji, replyId, contactKey))
|
||||
}
|
||||
|
||||
private val _sharedContactRequested: MutableStateFlow<AdminProtos.SharedContact?> =
|
||||
MutableStateFlow(null)
|
||||
val sharedContactRequested: StateFlow<AdminProtos.SharedContact?> get() = _sharedContactRequested.asStateFlow()
|
||||
fun setSharedContactRequested(sharedContact: AdminProtos.SharedContact?) {
|
||||
viewModelScope.launch {
|
||||
_sharedContactRequested.value = sharedContact
|
||||
}
|
||||
}
|
||||
|
||||
fun addSharedContact(sharedContact: AdminProtos.SharedContact) = viewModelScope.launch {
|
||||
radioConfigRepository.onServiceAction(ServiceAction.AddSharedContact(sharedContact))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue