qrcode experiment; dont sent when doing antispam on enter
continuous-integration/drone/pr Build was killed
Details
continuous-integration/drone/pr Build was killed
Details
This commit is contained in:
parent
cfa4b4f95b
commit
4d4901838e
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"@@locale": "cy",
|
||||
"@@last_modified": "2022-09-09T22:56:43+02:00",
|
||||
"@@last_modified": "2022-09-09T23:36:56+02:00",
|
||||
"experimentQRCodeDescription": "QR Code support allows sharing data (such as profile identity) by QR Codes",
|
||||
"enableExperimentQRCode": "QR Codes",
|
||||
"shareMenuQRCode": "Show QR Code",
|
||||
"shareProfileMenuTooltop": "Share profile via...",
|
||||
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"@@locale": "da",
|
||||
"@@last_modified": "2022-09-09T22:56:43+02:00",
|
||||
"@@last_modified": "2022-09-09T23:36:56+02:00",
|
||||
"experimentQRCodeDescription": "QR Code support allows sharing data (such as profile identity) by QR Codes",
|
||||
"enableExperimentQRCode": "QR Codes",
|
||||
"shareMenuQRCode": "Show QR Code",
|
||||
"shareProfileMenuTooltop": "Share profile via...",
|
||||
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"@@locale": "de",
|
||||
"@@last_modified": "2022-09-09T22:56:43+02:00",
|
||||
"@@last_modified": "2022-09-09T23:36:56+02:00",
|
||||
"experimentQRCodeDescription": "QR Code support allows sharing data (such as profile identity) by QR Codes",
|
||||
"enableExperimentQRCode": "QR Codes",
|
||||
"shareMenuQRCode": "Show QR Code",
|
||||
"shareProfileMenuTooltop": "Share profile via...",
|
||||
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"@@locale": "el",
|
||||
"@@last_modified": "2022-09-09T22:56:43+02:00",
|
||||
"@@last_modified": "2022-09-09T23:36:56+02:00",
|
||||
"experimentQRCodeDescription": "QR Code support allows sharing data (such as profile identity) by QR Codes",
|
||||
"enableExperimentQRCode": "QR Codes",
|
||||
"shareMenuQRCode": "Show QR Code",
|
||||
"shareProfileMenuTooltop": "Share profile via...",
|
||||
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"@@locale": "en",
|
||||
"@@last_modified": "2022-09-09T22:56:43+02:00",
|
||||
"@@last_modified": "2022-09-09T23:36:56+02:00",
|
||||
"experimentQRCodeDescription": "QR Code support allows sharing data (such as profile identity) by QR Codes",
|
||||
"enableExperimentQRCode": "QR Codes",
|
||||
"shareMenuQRCode": "Show QR Code",
|
||||
"shareProfileMenuTooltop": "Share profile via...",
|
||||
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"@@locale": "es",
|
||||
"@@last_modified": "2022-09-09T22:56:43+02:00",
|
||||
"@@last_modified": "2022-09-09T23:36:56+02:00",
|
||||
"experimentQRCodeDescription": "QR Code support allows sharing data (such as profile identity) by QR Codes",
|
||||
"enableExperimentQRCode": "QR Codes",
|
||||
"shareMenuQRCode": "Show QR Code",
|
||||
"shareProfileMenuTooltop": "Share profile via...",
|
||||
"tooltipPinConversation": "Fija la conversación en la parte superior de \"Conversaciones\"",
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"@@locale": "fr",
|
||||
"@@last_modified": "2022-09-09T22:56:43+02:00",
|
||||
"@@last_modified": "2022-09-09T23:36:56+02:00",
|
||||
"experimentQRCodeDescription": "QR Code support allows sharing data (such as profile identity) by QR Codes",
|
||||
"enableExperimentQRCode": "QR Codes",
|
||||
"shareMenuQRCode": "Show QR Code",
|
||||
"shareProfileMenuTooltop": "Share profile via...",
|
||||
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"@@locale": "it",
|
||||
"@@last_modified": "2022-09-09T22:56:43+02:00",
|
||||
"@@last_modified": "2022-09-09T23:36:56+02:00",
|
||||
"experimentQRCodeDescription": "QR Code support allows sharing data (such as profile identity) by QR Codes",
|
||||
"enableExperimentQRCode": "QR Codes",
|
||||
"shareMenuQRCode": "Show QR Code",
|
||||
"shareProfileMenuTooltop": "Share profile via...",
|
||||
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"@@locale": "lb",
|
||||
"@@last_modified": "2022-09-09T22:56:43+02:00",
|
||||
"@@last_modified": "2022-09-09T23:36:56+02:00",
|
||||
"experimentQRCodeDescription": "QR Code support allows sharing data (such as profile identity) by QR Codes",
|
||||
"enableExperimentQRCode": "QR Codes",
|
||||
"shareMenuQRCode": "Show QR Code",
|
||||
"shareProfileMenuTooltop": "Share profile via...",
|
||||
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"@@locale": "no",
|
||||
"@@last_modified": "2022-09-09T22:56:43+02:00",
|
||||
"@@last_modified": "2022-09-09T23:36:56+02:00",
|
||||
"experimentQRCodeDescription": "QR Code support allows sharing data (such as profile identity) by QR Codes",
|
||||
"enableExperimentQRCode": "QR Codes",
|
||||
"shareMenuQRCode": "Show QR Code",
|
||||
"shareProfileMenuTooltop": "Share profile via...",
|
||||
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"@@locale": "pl",
|
||||
"@@last_modified": "2022-09-09T22:56:43+02:00",
|
||||
"@@last_modified": "2022-09-09T23:36:56+02:00",
|
||||
"experimentQRCodeDescription": "QR Code support allows sharing data (such as profile identity) by QR Codes",
|
||||
"enableExperimentQRCode": "QR Codes",
|
||||
"shareMenuQRCode": "Show QR Code",
|
||||
"shareProfileMenuTooltop": "Share profile via...",
|
||||
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"@@locale": "pt",
|
||||
"@@last_modified": "2022-09-09T22:56:43+02:00",
|
||||
"@@last_modified": "2022-09-09T23:36:56+02:00",
|
||||
"experimentQRCodeDescription": "QR Code support allows sharing data (such as profile identity) by QR Codes",
|
||||
"enableExperimentQRCode": "QR Codes",
|
||||
"shareMenuQRCode": "Show QR Code",
|
||||
"shareProfileMenuTooltop": "Share profile via...",
|
||||
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"@@locale": "ro",
|
||||
"@@last_modified": "2022-09-09T22:56:43+02:00",
|
||||
"@@last_modified": "2022-09-09T23:36:56+02:00",
|
||||
"experimentQRCodeDescription": "QR Code support allows sharing data (such as profile identity) by QR Codes",
|
||||
"enableExperimentQRCode": "QR Codes",
|
||||
"shareMenuQRCode": "Show QR Code",
|
||||
"shareProfileMenuTooltop": "Share profile via...",
|
||||
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"@@locale": "ru",
|
||||
"@@last_modified": "2022-09-09T22:56:43+02:00",
|
||||
"@@last_modified": "2022-09-09T23:36:56+02:00",
|
||||
"experimentQRCodeDescription": "QR Code support allows sharing data (such as profile identity) by QR Codes",
|
||||
"enableExperimentQRCode": "QR Codes",
|
||||
"shareMenuQRCode": "Show QR Code",
|
||||
"shareProfileMenuTooltop": "Share profile via...",
|
||||
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
||||
|
|
|
@ -15,6 +15,7 @@ const FileSharingExperiment = "filesharing";
|
|||
const ImagePreviewsExperiment = "filesharing-images";
|
||||
const ClickableLinksExperiment = "clickable-links";
|
||||
const FormattingExperiment = "message-formatting";
|
||||
const QRCodeExperiment = "qrcode-support";
|
||||
|
||||
enum DualpaneMode {
|
||||
Single,
|
||||
|
|
|
@ -166,7 +166,8 @@ class _ContactsViewState extends State<ContactsView> {
|
|||
actions.add(Tooltip(message: AppLocalizations.of(context)!.blockUnknownConnectionsEnabledDescription, child: Icon(CwtchIcons.block_unknown)));
|
||||
}
|
||||
|
||||
actions.add(PopupMenuButton<ShareMenu>(
|
||||
if (Provider.of<Settings>(context, listen: false).isExperimentEnabled(QRCodeExperiment)) {
|
||||
actions.add(PopupMenuButton<ShareMenu>(
|
||||
icon: Icon(CwtchIcons.address_copy_2),
|
||||
tooltip: AppLocalizations.of(context)!.shareProfileMenuTooltop,
|
||||
splashRadius: Material.defaultSplashRadius / 2,
|
||||
|
@ -196,8 +197,22 @@ class _ContactsViewState extends State<ContactsView> {
|
|||
value: ShareMenu.qrcode,
|
||||
child: Text(AppLocalizations.of(context)!.shareMenuQRCode),
|
||||
),
|
||||
],
|
||||
));
|
||||
],
|
||||
));
|
||||
} else {
|
||||
actions.add(IconButton(
|
||||
icon: Icon(CwtchIcons.address_copy_2),
|
||||
tooltip: AppLocalizations.of(context)!.copyAddress,
|
||||
splashRadius: Material.defaultSplashRadius / 2,
|
||||
onPressed: () {
|
||||
Clipboard.setData(new ClipboardData(text: Provider
|
||||
.of<ProfileInfoState>(context, listen: false)
|
||||
.onion));
|
||||
final snackBar = SnackBar(content: Text(AppLocalizations.of(context)!.copiedToClipboardNotification));
|
||||
ScaffoldMessenger.of(context).showSnackBar(snackBar);
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
// Manage known Servers
|
||||
if (Provider.of<Settings>(context, listen: false).isExperimentEnabled(TapirGroupsExperiment) || Provider.of<Settings>(context, listen: false).isExperimentEnabled(ServerManagementExperiment)) {
|
||||
|
|
|
@ -468,6 +468,24 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
|
|||
inactiveTrackColor: settings.theme.defaultButtonDisabledColor,
|
||||
secondary: Icon(Icons.link, color: settings.current().mainTextColor),
|
||||
)),
|
||||
Visibility(
|
||||
visible: settings.experimentsEnabled,
|
||||
child: SwitchListTile(
|
||||
title: Text(AppLocalizations.of(context)!.enableExperimentQRCode, style: TextStyle(color: settings.current().mainTextColor)),
|
||||
subtitle: Text(AppLocalizations.of(context)!.experimentQRCodeDescription),
|
||||
value: settings.isExperimentEnabled(QRCodeExperiment),
|
||||
onChanged: (bool value) {
|
||||
if (value) {
|
||||
settings.enableExperiment(QRCodeExperiment);
|
||||
} else {
|
||||
settings.disableExperiment(QRCodeExperiment);
|
||||
}
|
||||
saveSettings(context);
|
||||
},
|
||||
activeTrackColor: settings.theme.defaultButtonActiveColor,
|
||||
inactiveTrackColor: settings.theme.defaultButtonDisabledColor,
|
||||
secondary: Icon(Icons.qr_code, color: settings.current().mainTextColor),
|
||||
)),
|
||||
AboutListTile(
|
||||
icon: appIcon,
|
||||
applicationIcon: Padding(padding: EdgeInsets.all(5), child: Icon(CwtchIcons.cwtch_knott)),
|
||||
|
|
|
@ -294,10 +294,12 @@ class _MessageViewState extends State<MessageView> {
|
|||
|
||||
// Do this after we trim to preserve enter-behaviour...
|
||||
bool isOffline = Provider.of<ContactInfoState>(context, listen: false).isOnline() == false;
|
||||
if (isOffline) {
|
||||
bool performingAntiSpam = Provider.of<ContactInfoState>(context).antispamTickets == 0;
|
||||
if (isOffline || performingAntiSpam) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
var isGroup = Provider.of<ProfileInfoState>(context, listen: false).contactList.getContact(Provider.of<AppState>(context, listen: false).selectedConversation!)!.isGroup;
|
||||
|
||||
// peers and groups currently have different length constraints (servers can store less)...
|
||||
|
|
Loading…
Reference in New Issue