mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-03-30 20:45:49 +00:00
android: hide mic icon when mic is disabled (#5025)
This commit is contained in:
committed by
GitHub
parent
dbe4504f05
commit
7ff6ef09fe
@@ -194,7 +194,11 @@ actual fun ActiveCallView() {
|
||||
updateActiveCall(call) {
|
||||
val sources = it.localMediaSources
|
||||
when (cmd.source) {
|
||||
CallMediaSource.Mic -> it.copy(localMediaSources = sources.copy(mic = cmd.enable))
|
||||
CallMediaSource.Mic -> {
|
||||
val am = androidAppContext.getSystemService(Context.AUDIO_SERVICE) as AudioManager
|
||||
am.isMicrophoneMute = !cmd.enable
|
||||
it.copy(localMediaSources = sources.copy(mic = cmd.enable))
|
||||
}
|
||||
CallMediaSource.Camera -> it.copy(localMediaSources = sources.copy(camera = cmd.enable))
|
||||
CallMediaSource.ScreenAudio -> it.copy(localMediaSources = sources.copy(screenAudio = cmd.enable))
|
||||
CallMediaSource.ScreenVideo -> it.copy(localMediaSources = sources.copy(screenVideo = cmd.enable))
|
||||
|
||||
Reference in New Issue
Block a user