Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,8 @@ fun DebugSwitchRow(
) {
SessionSwitch(
checked = checked,
onCheckedChange = onCheckedChange
onCheckedChange = onCheckedChange,
qaTag = R.string.qa_default_debug
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ class AppearanceSettingsActivity: ScreenLockActionBarActivity(), View.OnClickLis
SessionSwitch(
checked = viewModel.uiState.collectAsState().value.followSystem,
onCheckedChange = viewModel::setNewFollowSystemSettings,
enabled = true
enabled = true,
qaTag = R.string.qa_preferences_appearance_follow_system
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import org.thoughtcrime.securesms.ui.IconActionRowItem
import org.thoughtcrime.securesms.ui.SwitchActionRowItem
import org.thoughtcrime.securesms.ui.components.annotatedStringResource
import org.thoughtcrime.securesms.ui.theme.LocalDimensions
import org.thoughtcrime.securesms.ui.theme.LocalType

@OptIn(ExperimentalMaterial3Api::class)
@Composable
Expand Down Expand Up @@ -54,8 +55,10 @@ private fun ConversationsPreference(
modifier = Modifier.fillMaxWidth(),
title = annotatedStringResource(R.string.conversationsMessageTrimmingTrimCommunities),
subtitle = annotatedStringResource(R.string.conversationsMessageTrimmingTrimCommunitiesDescription),
subtitleStyle = LocalType.current.large,
checked = uiState.trimThreads,
qaTag = R.string.qa_preferences_trim_threads,
switchQaTag = R.string.qa_preferences_trim_threads_toggle,
onCheckedChange = { isEnabled ->
sendCommand(
ChatsPreferenceViewModel.Commands.ToggleTrimThreads(
Expand All @@ -78,8 +81,10 @@ private fun ConversationsPreference(
modifier = Modifier.fillMaxWidth(),
title = annotatedStringResource(R.string.conversationsSendWithEnterKey),
subtitle = annotatedStringResource(R.string.conversationsSendWithEnterKeyDescription),
subtitleStyle = LocalType.current.large,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think large is potentially too much here? Isn't our base size enough for these?

checked = uiState.sendWithEnter,
qaTag = R.string.qa_preferences_send_with_enter,
switchQaTag = R.string.qa_preferences_send_with_enter_toggle,
onCheckedChange = { isEnabled ->
sendCommand(
ChatsPreferenceViewModel.Commands.ToggleSendWithEnter(
Expand All @@ -102,8 +107,10 @@ private fun ConversationsPreference(
modifier = Modifier.fillMaxWidth(),
title = annotatedStringResource(R.string.conversationsAutoplayAudioMessage),
subtitle = annotatedStringResource(R.string.conversationsAutoplayAudioMessageDescription),
subtitleStyle = LocalType.current.large,
checked = uiState.autoplayAudioMessage,
qaTag = R.string.qa_preferences_autoplay_audio,
switchQaTag = R.string.qa_preferences_autoplay_audio_toggle,
onCheckedChange = { isEnabled ->
sendCommand(
ChatsPreferenceViewModel.Commands.ToggleAutoplayAudioMessages(
Expand All @@ -126,6 +133,7 @@ private fun ConversationsPreference(
modifier = Modifier.fillMaxWidth(),
title = annotatedStringResource(R.string.conversationsBlockedContacts),
subtitle = annotatedStringResource(R.string.blockedContactsManageDescription),
subtitleStyle = LocalType.current.large,
icon = R.drawable.ic_chevron_right,
iconSize = LocalDimensions.current.iconSmall,
qaTag = R.string.qa_preferences_option_blocked_contacts,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import org.thoughtcrime.securesms.ui.findActivity
import org.thoughtcrime.securesms.ui.getSubbedString
import org.thoughtcrime.securesms.ui.openUrl
import org.thoughtcrime.securesms.ui.theme.LocalDimensions
import org.thoughtcrime.securesms.ui.theme.LocalType

private const val CROWDIN_URL = "https://getsession.org/translate"
private const val FEEDBACK_URL = "https://getsession.org/survey"
Expand Down Expand Up @@ -112,6 +113,7 @@ fun HelpSettings(
.put(APP_NAME_KEY, stringResource(R.string.app_name))
.format()
),
subtitleStyle = LocalType.current.large,
qaTag = R.string.qa_help_settings_export,
onClick = { sendCommand(HelpSettingsViewModel.Commands.ExportLogs) },
endContent = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import org.thoughtcrime.securesms.ui.openBatteryOptimizationSettings
import org.thoughtcrime.securesms.ui.requestDozeWhitelist
import org.thoughtcrime.securesms.ui.theme.LocalColors
import org.thoughtcrime.securesms.ui.theme.LocalDimensions
import org.thoughtcrime.securesms.ui.theme.LocalType

@Composable
fun NotificationsPreferenceScreen(
Expand Down Expand Up @@ -133,8 +134,10 @@ fun NotificationsPreference(
SwitchActionRowItem(
title = annotatedStringResource(R.string.useFastMode),
subtitle = annotatedStringResource(fastModeDescription),
subtitleStyle = LocalType.current.large,
checked = uiState.isPushEnabled,
qaTag = R.string.qa_preferences_enable_push,
switchQaTag = R.string.qa_preferences_enable_push_toggle,
onCheckedChange = {isEnabled -> sendCommand(TogglePushEnabled(isEnabled)) }
)

Expand All @@ -144,6 +147,7 @@ fun NotificationsPreference(
title = annotatedStringResource(R.string.runAppBackground),
checked = uiState.isWhitelistedFromDoze,
qaTag = R.string.qa_preferences_whitelist,
switchQaTag = R.string.qa_preferences_whitelist_toggle,
onCheckedChange = { sendCommand(WhiteListClicked) }
)

Expand Down Expand Up @@ -182,6 +186,7 @@ fun NotificationsPreference(
title = annotatedStringResource(R.string.notificationsSoundDescription),
checked = uiState.soundWhenAppIsOpen,
qaTag = R.string.qa_preferences_sound_when_app_is_open,
switchQaTag = R.string.qa_preferences_sound_when_app_is_open_toggle,
onCheckedChange = {isEnabled -> sendCommand(ToggleSoundWhenOpen(isEnabled)) }
)

Expand All @@ -191,6 +196,7 @@ fun NotificationsPreference(
title = annotatedStringResource(R.string.notificationsVibrate),
checked = uiState.vibrate,
qaTag = R.string.qa_preferences_vibrate,
switchQaTag = R.string.qa_preferences_vibrate_toggle,
onCheckedChange = {isEnabled -> sendCommand(ToggleVibrate(isEnabled)) }
)
}
Expand All @@ -211,6 +217,7 @@ fun NotificationsPreference(
IconTextActionRowItem(
title = annotatedStringResource(R.string.notificationsContent),
subtitle = annotatedStringResource(R.string.notificationsContentDescription),
subtitleStyle = LocalType.current.large,
qaTag = R.string.qa_pro_settings_action_show_badge,
icon = R.drawable.ic_baseline_arrow_drop_down_24,
endText = annotatedStringResource(uiState.notificationPrivacy.toString()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import org.thoughtcrime.securesms.ui.components.annotatedStringResource
import org.thoughtcrime.securesms.ui.findActivity
import org.thoughtcrime.securesms.ui.getSubbedString
import org.thoughtcrime.securesms.ui.theme.LocalDimensions
import org.thoughtcrime.securesms.ui.theme.LocalType
import org.thoughtcrime.securesms.util.IntentUtils

@Composable
Expand Down Expand Up @@ -133,8 +134,10 @@ fun PrivacySettingsPreference(
SwitchActionRowItem(
title = annotatedStringResource(R.string.callsVoiceAndVideo),
subtitle = annotatedStringResource(R.string.callsVoiceAndVideoToggleDescription),
subtitleStyle = LocalType.current.large,
checked = uiState.callNotificationsEnabled,
qaTag = R.string.qa_preferences_voice_calls,
switchQaTag = R.string.qa_preferences_voice_calls_toggle,
onCheckedChange = { isChecked ->
if (isChecked) {
sendCommand(ShowCallsWarningDialog)
Expand Down Expand Up @@ -163,9 +166,11 @@ fun PrivacySettingsPreference(
.put(APP_NAME_KEY, stringResource(R.string.app_name))
.format()
),
subtitleStyle = LocalType.current.large,
enabled = uiState.screenLockEnabled,
checked = uiState.screenLockChecked,
qaTag = R.string.qa_preferences_lock_app,
switchQaTag = R.string.qa_preferences_lock_app_toggle,
onCheckedChange = { isEnabled -> sendCommand(ToggleLockApp(isEnabled)) }
)
}
Expand All @@ -185,8 +190,10 @@ fun PrivacySettingsPreference(
SwitchActionRowItem(
title = annotatedStringResource(R.string.messageRequestsCommunities),
subtitle = annotatedStringResource(R.string.messageRequestsCommunitiesDescription),
subtitleStyle = LocalType.current.large,
checked = uiState.allowCommunityMessageRequests,
qaTag = R.string.qa_preferences_message_requests,
switchQaTag = R.string.qa_preferences_message_requests_toggle,
onCheckedChange = { sendCommand(ToggleCommunityRequests) }
)
}
Expand All @@ -206,8 +213,10 @@ fun PrivacySettingsPreference(
SwitchActionRowItem(
title = annotatedStringResource(R.string.readReceipts),
subtitle = annotatedStringResource(R.string.readReceiptsDescription),
subtitleStyle = LocalType.current.large,
checked = uiState.readReceiptsEnabled,
qaTag = R.string.qa_preferences_read_receipt,
switchQaTag = R.string.qa_preferences_read_receipt_toggle,
onCheckedChange = { isEnabled -> sendCommand(ToggleReadReceipts(isEnabled)) }
)
}
Expand All @@ -227,8 +236,10 @@ fun PrivacySettingsPreference(
SwitchActionRowItem(
title = annotatedStringResource(R.string.typingIndicators),
subtitle = annotatedStringResource(R.string.typingIndicatorsDescription),
subtitleStyle = LocalType.current.large,
checked = uiState.typingIndicators,
qaTag = R.string.qa_preferences_typing_indicator,
switchQaTag = R.string.qa_preferences_typing_indicator_toggle,
switchLeadingContent = {
TypingIndicator(isTyping = true)
},
Expand Down Expand Up @@ -257,8 +268,10 @@ fun PrivacySettingsPreference(
SwitchActionRowItem(
title = annotatedStringResource(R.string.linkPreviewsSend),
subtitle = annotatedStringResource(R.string.linkPreviewsDescription),
subtitleStyle = LocalType.current.large,
checked = uiState.linkPreviewEnabled,
qaTag = R.string.qa_preferences_link_previews,
switchQaTag = R.string.qa_preferences_link_previews_toggle,
onCheckedChange = { isEnabled -> sendCommand(ToggleLinkPreviews(isEnabled)) }
)
}
Expand All @@ -278,8 +291,10 @@ fun PrivacySettingsPreference(
SwitchActionRowItem(
title = annotatedStringResource(R.string.incognitoKeyboard),
subtitle = annotatedStringResource(R.string.incognitoKeyboardDescription),
subtitleStyle = LocalType.current.large,
checked = uiState.incognitoKeyboardEnabled,
qaTag = R.string.qa_preferences_incognito_keyboard,
switchQaTag = R.string.qa_preferences_incognito_keyboard_toggle,
onCheckedChange = { isEnabled ->
sendCommand(
ToggleIncognitoKeyboard(
Expand All @@ -306,7 +321,7 @@ fun PrivacySettingsPreference(
buttons = listOf(
DialogButtonData(
text = GetString(stringResource(R.string.enable)),
qaTag = stringResource(R.string.qa_preferences_dialog_cancel),
qaTag = stringResource(R.string.qa_preferences_dialog_enable),
onClick = {
sendCommand(AskMicPermission)
}
Expand Down
Loading