Skip to content

Commit

Permalink
Some cleanup related to community PR for jitsi call notifications
Browse files Browse the repository at this point in the history
Change-Id: Id723b9e4adb3915184da4548b07713a66e7ad533
  • Loading branch information
SpiritCroc committed Nov 20, 2024
1 parent 251a2ee commit c2a6aae
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 11 deletions.
2 changes: 2 additions & 0 deletions library/external/textdrawable/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
apply plugin: 'com.android.library'

apply plugin: 'com.android.library'

android {
namespace "com.amulyakhare.textdrawable"

Expand Down
2 changes: 1 addition & 1 deletion library/ui-strings/src/main/res/values-ru/strings_sc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -180,4 +180,4 @@
<string name="settings_clear_highlight_on_scroll">Очистить выделение при прокрутке</string>
<string name="settings_call_ringtone_use_default_stun_title">Разрешить резервный сервер звонков</string>
<string name="settings_integrations_scalar_warning">⚠️ Эта настройка по умолчанию (если не изменена конфигурацией Вашего домашнего сервера) включает доступ к \"Scalar\", менеджеру интеграций от Element. К сожалению, он является проприетарным, т.е. его исходый код не открытый и не может быть проверен пользователями или разработчиками SchildiChat.</string>
</resources>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@ class DebugVectorFeatures(
override fun isVoiceBroadcastEnabled(): Boolean = read(DebugFeatureKeys.voiceBroadcastEnabled)
?: vectorFeatures.isVoiceBroadcastEnabled()

override fun isJitsiCallNotificationEnabled(): Boolean = read(DebugFeatureKeys.jitsiCallNotificationsEnabled)
?: vectorFeatures.isJitsiCallNotificationEnabled()

override fun isUnverifiedSessionsAlertEnabled(): Boolean = read(DebugFeatureKeys.unverifiedSessionsAlertEnabled)
?: vectorFeatures.isUnverifiedSessionsAlertEnabled()

Expand Down Expand Up @@ -146,5 +143,4 @@ object DebugFeatureKeys {
val newAppLayoutEnabled = booleanPreferencesKey("new-app-layout-enabled")
val voiceBroadcastEnabled = booleanPreferencesKey("voice-broadcast-enabled")
val unverifiedSessionsAlertEnabled = booleanPreferencesKey("unverified-sessions-alert-enabled")
val jitsiCallNotificationsEnabled = booleanPreferencesKey("jitsi-call-notifications-enabled")
}
1 change: 0 additions & 1 deletion vector-config/src/main/res/values/config-settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
<bool name="settings_labs_rich_text_editor_default">false</bool>
<bool name="settings_labs_enable_voice_broadcast_visible">true</bool>
<bool name="settings_labs_enable_voice_broadcast_default">false</bool>
<bool name="settings_labs_enable_jitsi_call_notifications_default">false</bool>
<!-- Level 1: Advanced settings -->

<!-- Level 1: Help and about -->
Expand Down
4 changes: 4 additions & 0 deletions vector-config/src/main/res/values/config-settings_sc.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="settings_labs_enable_jitsi_call_notifications_default">false</bool>
</resources>
5 changes: 4 additions & 1 deletion vector/src/main/java/im/vector/app/features/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,12 @@ class MainActivity : VectorBaseActivity<ActivityMainBinding>(), UnlockedActivity
private const val EXTRA_NEXT_INTENT = "EXTRA_NEXT_INTENT"
private const val EXTRA_INIT_SESSION = "EXTRA_INIT_SESSION"
private const val EXTRA_ROOM_ID = "EXTRA_ROOM_ID"
private const val EXTRA_CALL_ID = "EXTRA_CALL_ID"
private const val ACTION_ROOM_DETAILS_FROM_SHORTCUT = "ROOM_DETAILS_FROM_SHORTCUT"

// SC start
private const val EXTRA_CALL_ID = "EXTRA_CALL_ID"
private const val ACTION_ROOM_DETAILS_JITSI_CALL = "ROOM_DETAILS_JITSI_CALL"
// SC end

// Special action to clear cache and/or clear credentials
fun restartApp(activity: Activity, args: MainActivityArgs) {
Expand Down
2 changes: 0 additions & 2 deletions vector/src/main/java/im/vector/app/features/VectorFeatures.kt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ interface VectorFeatures {
*/
fun isNewAppLayoutFeatureEnabled(): Boolean
fun isVoiceBroadcastEnabled(): Boolean
fun isJitsiCallNotificationEnabled(): Boolean
fun isUnverifiedSessionsAlertEnabled(): Boolean
}

Expand All @@ -59,6 +58,5 @@ class DefaultVectorFeatures : VectorFeatures {
override fun forceUsageOfOpusEncoder(): Boolean = false
override fun isNewAppLayoutFeatureEnabled(): Boolean = true
override fun isVoiceBroadcastEnabled(): Boolean = true
override fun isJitsiCallNotificationEnabled(): Boolean = true
override fun isUnverifiedSessionsAlertEnabled(): Boolean = true
}
Original file line number Diff line number Diff line change
Expand Up @@ -1599,8 +1599,8 @@ class VectorPreferences @Inject constructor(
}

fun isJitsiCallNotificationEnabled(): Boolean {
return vectorFeatures.isJitsiCallNotificationEnabled() &&
defaultPrefs.getBoolean(SETTINGS_LABS_JITSI_CALL_NOTIFICATION_KEY, getDefault(im.vector.app.config.R.bool.settings_labs_enable_jitsi_call_notifications_default))
return defaultPrefs.getBoolean(SETTINGS_LABS_JITSI_CALL_NOTIFICATION_KEY,
getDefault(im.vector.app.config.R.bool.settings_labs_enable_jitsi_call_notifications_default))
}

fun showIpAddressInSessionManagerScreens(): Boolean {
Expand Down

0 comments on commit c2a6aae

Please sign in to comment.