Skip to content

Commit

Permalink
Enable VoIP on dev mode
Browse files Browse the repository at this point in the history
  • Loading branch information
yostyle committed Dec 12, 2023
1 parent ae37438 commit 891f90a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -855,8 +855,8 @@ class TimelineViewModel @AssistedInject constructor(
R.id.invite -> state.canInvite
R.id.open_matrix_apps -> false // Tchap: there are no matrix apps
// Tchap: check if voip is enabled
R.id.video_call -> vectorPreferences.developerMode()
R.id.voice_call -> session.sessionParams.homeServerUrl.contains("agent.dinum.tchap.gouv.fr") &&
R.id.video_call -> vectorPreferences.developerMode() && vectorFeatures.tchapIsVoipSupported()
R.id.voice_call -> (session.sessionParams.homeServerUrl.contains("agent.dinum.tchap.gouv.fr") || vectorPreferences.developerMode()) &&
vectorFeatures.tchapIsVoipSupported() && (state.isCallOptionAvailable() || state.hasActiveElementCallWidget())
// Show Join conference button only if there is an active conf id not joined. Otherwise fallback to default video disabled. ^
R.id.join_conference -> vectorFeatures.tchapIsVoipSupported() && !state.isCallOptionAvailable() &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -993,8 +993,8 @@ class VectorPreferences @Inject constructor(
* The user does not allow screenshots of the application.
*/
fun useFlagSecure(): Boolean {
// Tchap: Screenshot is allowed for Gplay Pre-prod and Dev versions only.
return BuildConfig.FLAVOR_store != "gplay" || BuildConfig.FLAVOR_target == "tchap"
// Tchap: Screenshot is allowed when developer mode is enabled or for Gplay Pre-prod and Dev versions only.
return (!developerMode() && (BuildConfig.FLAVOR_store != "gplay" || BuildConfig.FLAVOR_target == "tchap"))
}

/** Whether the keyboard should disable personalized learning. */
Expand Down

0 comments on commit 891f90a

Please sign in to comment.