Making sure we use the right string for Huawei builds

pull/1712/head
ThomasSession 2 weeks ago
parent 397a7dec71
commit 1ce13adae9

@ -19,6 +19,7 @@ import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.tooling.preview.PreviewParameter
import androidx.compose.ui.unit.dp
import com.squareup.phrase.Phrase
import network.loki.messenger.BuildConfig
import network.loki.messenger.R
import org.session.libsession.utilities.StringSubstitutionConstants.APP_NAME_KEY
import org.thoughtcrime.securesms.onboarding.OnboardingBackPressAlertDialog
@ -76,7 +77,8 @@ internal fun MessageNotificationsScreen(
NotificationRadioButton(
R.string.notificationsFastMode,
R.string.notificationsFastModeDescription,
if(BuildConfig.FLAVOR == "huawei") R.string.notificationsFastModeDescriptionHuawei
else R.string.notificationsFastModeDescription,
modifier = Modifier.contentDescription(R.string.AccessibilityId_notificationsFastMode),
tag = R.string.recommended,
checked = state.pushEnabled,

@ -12,6 +12,7 @@ import android.text.TextUtils
import androidx.preference.ListPreference
import androidx.preference.Preference
import dagger.hilt.android.AndroidEntryPoint
import network.loki.messenger.BuildConfig
import network.loki.messenger.R
import org.session.libsession.utilities.TextSecurePreferences
import org.thoughtcrime.securesms.ApplicationContext
@ -38,6 +39,11 @@ class NotificationsPreferenceFragment : CorrectedPreferenceFragment() {
true
}
fcmPreference.summary = when (BuildConfig.FLAVOR) {
"huawei" -> getString(R.string.notificationsFastModeDescriptionHuawei)
else -> getString(R.string.notificationsFastModeDescription)
}
prefs.setNotificationRingtone(
NotificationChannels.getMessageRingtone(requireContext()).toString()
)

Loading…
Cancel
Save