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",
|
"@@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",
|
"shareMenuQRCode": "Show QR Code",
|
||||||
"shareProfileMenuTooltop": "Share profile via...",
|
"shareProfileMenuTooltop": "Share profile via...",
|
||||||
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "da",
|
"@@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",
|
"shareMenuQRCode": "Show QR Code",
|
||||||
"shareProfileMenuTooltop": "Share profile via...",
|
"shareProfileMenuTooltop": "Share profile via...",
|
||||||
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "de",
|
"@@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",
|
"shareMenuQRCode": "Show QR Code",
|
||||||
"shareProfileMenuTooltop": "Share profile via...",
|
"shareProfileMenuTooltop": "Share profile via...",
|
||||||
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "el",
|
"@@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",
|
"shareMenuQRCode": "Show QR Code",
|
||||||
"shareProfileMenuTooltop": "Share profile via...",
|
"shareProfileMenuTooltop": "Share profile via...",
|
||||||
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "en",
|
"@@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",
|
"shareMenuQRCode": "Show QR Code",
|
||||||
"shareProfileMenuTooltop": "Share profile via...",
|
"shareProfileMenuTooltop": "Share profile via...",
|
||||||
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "es",
|
"@@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",
|
"shareMenuQRCode": "Show QR Code",
|
||||||
"shareProfileMenuTooltop": "Share profile via...",
|
"shareProfileMenuTooltop": "Share profile via...",
|
||||||
"tooltipPinConversation": "Fija la conversación en la parte superior de \"Conversaciones\"",
|
"tooltipPinConversation": "Fija la conversación en la parte superior de \"Conversaciones\"",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "fr",
|
"@@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",
|
"shareMenuQRCode": "Show QR Code",
|
||||||
"shareProfileMenuTooltop": "Share profile via...",
|
"shareProfileMenuTooltop": "Share profile via...",
|
||||||
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "it",
|
"@@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",
|
"shareMenuQRCode": "Show QR Code",
|
||||||
"shareProfileMenuTooltop": "Share profile via...",
|
"shareProfileMenuTooltop": "Share profile via...",
|
||||||
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "lb",
|
"@@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",
|
"shareMenuQRCode": "Show QR Code",
|
||||||
"shareProfileMenuTooltop": "Share profile via...",
|
"shareProfileMenuTooltop": "Share profile via...",
|
||||||
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "no",
|
"@@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",
|
"shareMenuQRCode": "Show QR Code",
|
||||||
"shareProfileMenuTooltop": "Share profile via...",
|
"shareProfileMenuTooltop": "Share profile via...",
|
||||||
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "pl",
|
"@@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",
|
"shareMenuQRCode": "Show QR Code",
|
||||||
"shareProfileMenuTooltop": "Share profile via...",
|
"shareProfileMenuTooltop": "Share profile via...",
|
||||||
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "pt",
|
"@@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",
|
"shareMenuQRCode": "Show QR Code",
|
||||||
"shareProfileMenuTooltop": "Share profile via...",
|
"shareProfileMenuTooltop": "Share profile via...",
|
||||||
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "ro",
|
"@@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",
|
"shareMenuQRCode": "Show QR Code",
|
||||||
"shareProfileMenuTooltop": "Share profile via...",
|
"shareProfileMenuTooltop": "Share profile via...",
|
||||||
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "ru",
|
"@@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",
|
"shareMenuQRCode": "Show QR Code",
|
||||||
"shareProfileMenuTooltop": "Share profile via...",
|
"shareProfileMenuTooltop": "Share profile via...",
|
||||||
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
||||||
|
|
|
@ -15,6 +15,7 @@ const FileSharingExperiment = "filesharing";
|
||||||
const ImagePreviewsExperiment = "filesharing-images";
|
const ImagePreviewsExperiment = "filesharing-images";
|
||||||
const ClickableLinksExperiment = "clickable-links";
|
const ClickableLinksExperiment = "clickable-links";
|
||||||
const FormattingExperiment = "message-formatting";
|
const FormattingExperiment = "message-formatting";
|
||||||
|
const QRCodeExperiment = "qrcode-support";
|
||||||
|
|
||||||
enum DualpaneMode {
|
enum DualpaneMode {
|
||||||
Single,
|
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(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),
|
icon: Icon(CwtchIcons.address_copy_2),
|
||||||
tooltip: AppLocalizations.of(context)!.shareProfileMenuTooltop,
|
tooltip: AppLocalizations.of(context)!.shareProfileMenuTooltop,
|
||||||
splashRadius: Material.defaultSplashRadius / 2,
|
splashRadius: Material.defaultSplashRadius / 2,
|
||||||
|
@ -196,8 +197,22 @@ class _ContactsViewState extends State<ContactsView> {
|
||||||
value: ShareMenu.qrcode,
|
value: ShareMenu.qrcode,
|
||||||
child: Text(AppLocalizations.of(context)!.shareMenuQRCode),
|
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
|
// Manage known Servers
|
||||||
if (Provider.of<Settings>(context, listen: false).isExperimentEnabled(TapirGroupsExperiment) || Provider.of<Settings>(context, listen: false).isExperimentEnabled(ServerManagementExperiment)) {
|
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,
|
inactiveTrackColor: settings.theme.defaultButtonDisabledColor,
|
||||||
secondary: Icon(Icons.link, color: settings.current().mainTextColor),
|
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(
|
AboutListTile(
|
||||||
icon: appIcon,
|
icon: appIcon,
|
||||||
applicationIcon: Padding(padding: EdgeInsets.all(5), child: Icon(CwtchIcons.cwtch_knott)),
|
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...
|
// Do this after we trim to preserve enter-behaviour...
|
||||||
bool isOffline = Provider.of<ContactInfoState>(context, listen: false).isOnline() == false;
|
bool isOffline = Provider.of<ContactInfoState>(context, listen: false).isOnline() == false;
|
||||||
if (isOffline) {
|
bool performingAntiSpam = Provider.of<ContactInfoState>(context).antispamTickets == 0;
|
||||||
|
if (isOffline || performingAntiSpam) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var isGroup = Provider.of<ProfileInfoState>(context, listen: false).contactList.getContact(Provider.of<AppState>(context, listen: false).selectedConversation!)!.isGroup;
|
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)...
|
// peers and groups currently have different length constraints (servers can store less)...
|
||||||
|
|
Loading…
Reference in New Issue