allow sharing proifile via qrcode #536
|
@ -1,6 +1,10 @@
|
||||||
{
|
{
|
||||||
"@@locale": "cy",
|
"@@locale": "cy",
|
||||||
"@@last_modified": "2022-09-09T21:46:36+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",
|
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
||||||
"acquiringTicketsFromServer": "Performing Antispam Challenge",
|
"acquiringTicketsFromServer": "Performing Antispam Challenge",
|
||||||
"errorDownloadDirectoryDoesNotExist": "Filesharing cannot be enabled because the Download Folder has not been set, or is set to a folder that does not exist.",
|
"errorDownloadDirectoryDoesNotExist": "Filesharing cannot be enabled because the Download Folder has not been set, or is set to a folder that does not exist.",
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
{
|
{
|
||||||
"@@locale": "da",
|
"@@locale": "da",
|
||||||
"@@last_modified": "2022-09-09T21:46:36+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",
|
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
||||||
"acquiringTicketsFromServer": "Performing Antispam Challenge",
|
"acquiringTicketsFromServer": "Performing Antispam Challenge",
|
||||||
"errorDownloadDirectoryDoesNotExist": "Filesharing cannot be enabled because the Download Folder has not been set, or is set to a folder that does not exist.",
|
"errorDownloadDirectoryDoesNotExist": "Filesharing cannot be enabled because the Download Folder has not been set, or is set to a folder that does not exist.",
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
{
|
{
|
||||||
"@@locale": "de",
|
"@@locale": "de",
|
||||||
"@@last_modified": "2022-09-09T21:46:36+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",
|
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
||||||
"acquiringTicketsFromServer": "Performing Antispam Challenge",
|
"acquiringTicketsFromServer": "Performing Antispam Challenge",
|
||||||
"localeIt": "Italienisch \/ Italiano",
|
"localeIt": "Italienisch \/ Italiano",
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
{
|
{
|
||||||
"@@locale": "el",
|
"@@locale": "el",
|
||||||
"@@last_modified": "2022-09-09T21:46:36+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",
|
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
||||||
"acquiringTicketsFromServer": "Performing Antispam Challenge",
|
"acquiringTicketsFromServer": "Performing Antispam Challenge",
|
||||||
"errorDownloadDirectoryDoesNotExist": "Filesharing cannot be enabled because the Download Folder has not been set, or is set to a folder that does not exist.",
|
"errorDownloadDirectoryDoesNotExist": "Filesharing cannot be enabled because the Download Folder has not been set, or is set to a folder that does not exist.",
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
{
|
{
|
||||||
"@@locale": "en",
|
"@@locale": "en",
|
||||||
"@@last_modified": "2022-09-09T21:46:36+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",
|
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
||||||
"acquiringTicketsFromServer": "Performing Antispam Challenge",
|
"acquiringTicketsFromServer": "Performing Antispam Challenge",
|
||||||
"errorDownloadDirectoryDoesNotExist": "Filesharing cannot be enabled because the Download Folder has not been set, or is set to a folder that does not exist.",
|
"errorDownloadDirectoryDoesNotExist": "Filesharing cannot be enabled because the Download Folder has not been set, or is set to a folder that does not exist.",
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
{
|
{
|
||||||
"@@locale": "es",
|
"@@locale": "es",
|
||||||
"@@last_modified": "2022-09-09T21:46:36+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\"",
|
"tooltipPinConversation": "Fija la conversación en la parte superior de \"Conversaciones\"",
|
||||||
"errorDownloadDirectoryDoesNotExist": "No se puede habilitar el uso compartido de archivos porque la carpeta de descarga no se ha configurado o se configuró en una carpeta que no existe.",
|
"errorDownloadDirectoryDoesNotExist": "No se puede habilitar el uso compartido de archivos porque la carpeta de descarga no se ha configurado o se configuró en una carpeta que no existe.",
|
||||||
"acquiringTicketsFromServer": "Realizando Desafío Antispam",
|
"acquiringTicketsFromServer": "Realizando Desafío Antispam",
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
{
|
{
|
||||||
"@@locale": "fr",
|
"@@locale": "fr",
|
||||||
"@@last_modified": "2022-09-09T21:46:36+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",
|
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
||||||
"acquiringTicketsFromServer": "Performing Antispam Challenge",
|
"acquiringTicketsFromServer": "Performing Antispam Challenge",
|
||||||
"errorDownloadDirectoryDoesNotExist": "Le partage de fichiers ne peut pas être activé car le dossier de téléchargement n'a pas été défini ou est défini sur un dossier qui n'existe pas.",
|
"errorDownloadDirectoryDoesNotExist": "Le partage de fichiers ne peut pas être activé car le dossier de téléchargement n'a pas été défini ou est défini sur un dossier qui n'existe pas.",
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
{
|
{
|
||||||
"@@locale": "it",
|
"@@locale": "it",
|
||||||
"@@last_modified": "2022-09-09T21:46:36+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",
|
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
||||||
"acquiringTicketsFromServer": "Performing Antispam Challenge",
|
"acquiringTicketsFromServer": "Performing Antispam Challenge",
|
||||||
"errorDownloadDirectoryDoesNotExist": "Filesharing cannot be enabled because the Download Folder has not been set, or is set to a folder that does not exist.",
|
"errorDownloadDirectoryDoesNotExist": "Filesharing cannot be enabled because the Download Folder has not been set, or is set to a folder that does not exist.",
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
{
|
{
|
||||||
"@@locale": "lb",
|
"@@locale": "lb",
|
||||||
"@@last_modified": "2022-09-09T21:46:36+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",
|
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
||||||
"acquiringTicketsFromServer": "Performing Antispam Challenge",
|
"acquiringTicketsFromServer": "Performing Antispam Challenge",
|
||||||
"errorDownloadDirectoryDoesNotExist": "Filesharing cannot be enabled because the Download Folder has not been set, or is set to a folder that does not exist.",
|
"errorDownloadDirectoryDoesNotExist": "Filesharing cannot be enabled because the Download Folder has not been set, or is set to a folder that does not exist.",
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
{
|
{
|
||||||
"@@locale": "no",
|
"@@locale": "no",
|
||||||
"@@last_modified": "2022-09-09T21:46:36+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",
|
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
||||||
"acquiringTicketsFromServer": "Performing Antispam Challenge",
|
"acquiringTicketsFromServer": "Performing Antispam Challenge",
|
||||||
"errorDownloadDirectoryDoesNotExist": "Filesharing cannot be enabled because the Download Folder has not been set, or is set to a folder that does not exist.",
|
"errorDownloadDirectoryDoesNotExist": "Filesharing cannot be enabled because the Download Folder has not been set, or is set to a folder that does not exist.",
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
{
|
{
|
||||||
"@@locale": "pl",
|
"@@locale": "pl",
|
||||||
"@@last_modified": "2022-09-09T21:46:36+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",
|
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
||||||
"acquiringTicketsFromServer": "Performing Antispam Challenge",
|
"acquiringTicketsFromServer": "Performing Antispam Challenge",
|
||||||
"errorDownloadDirectoryDoesNotExist": "Filesharing cannot be enabled because the Download Folder has not been set, or is set to a folder that does not exist.",
|
"errorDownloadDirectoryDoesNotExist": "Filesharing cannot be enabled because the Download Folder has not been set, or is set to a folder that does not exist.",
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
{
|
{
|
||||||
"@@locale": "pt",
|
"@@locale": "pt",
|
||||||
"@@last_modified": "2022-09-09T21:46:36+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",
|
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
||||||
"acquiringTicketsFromServer": "Performing Antispam Challenge",
|
"acquiringTicketsFromServer": "Performing Antispam Challenge",
|
||||||
"errorDownloadDirectoryDoesNotExist": "Filesharing cannot be enabled because the Download Folder has not been set, or is set to a folder that does not exist.",
|
"errorDownloadDirectoryDoesNotExist": "Filesharing cannot be enabled because the Download Folder has not been set, or is set to a folder that does not exist.",
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
{
|
{
|
||||||
"@@locale": "ro",
|
"@@locale": "ro",
|
||||||
"@@last_modified": "2022-09-09T21:46:36+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",
|
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
||||||
"acquiringTicketsFromServer": "Performing Antispam Challenge",
|
"acquiringTicketsFromServer": "Performing Antispam Challenge",
|
||||||
"errorDownloadDirectoryDoesNotExist": "Filesharing cannot be enabled because the Download Folder has not been set, or is set to a folder that does not exist.",
|
"errorDownloadDirectoryDoesNotExist": "Filesharing cannot be enabled because the Download Folder has not been set, or is set to a folder that does not exist.",
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
{
|
{
|
||||||
"@@locale": "ru",
|
"@@locale": "ru",
|
||||||
"@@last_modified": "2022-09-09T21:46:36+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",
|
"acquiredTicketsFromServer": "Antispam Challenge Complete",
|
||||||
"acquiringTicketsFromServer": "Performing Antispam Challenge",
|
"acquiringTicketsFromServer": "Performing Antispam Challenge",
|
||||||
"errorDownloadDirectoryDoesNotExist": "Filesharing cannot be enabled because the Download Folder has not been set, or is set to a folder that does not exist.",
|
"errorDownloadDirectoryDoesNotExist": "Filesharing cannot be enabled because the Download Folder has not been set, or is set to a folder that does not exist.",
|
||||||
|
|
|
@ -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,
|
||||||
|
|
|
@ -19,9 +19,12 @@ import '../main.dart';
|
||||||
import '../settings.dart';
|
import '../settings.dart';
|
||||||
import 'addcontactview.dart';
|
import 'addcontactview.dart';
|
||||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||||
|
import 'package:qr_flutter/qr_flutter.dart';
|
||||||
|
|
||||||
import 'messageview.dart';
|
import 'messageview.dart';
|
||||||
|
|
||||||
|
enum ShareMenu { copyCode, qrcode }
|
||||||
|
|
||||||
class ContactsView extends StatefulWidget {
|
class ContactsView extends StatefulWidget {
|
||||||
const ContactsView({Key? key}) : super(key: key);
|
const ContactsView({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@ -163,16 +166,53 @@ 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)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copy profile onion
|
if (Provider.of<Settings>(context, listen: false).isExperimentEnabled(QRCodeExperiment)) {
|
||||||
actions.add(IconButton(
|
actions.add(PopupMenuButton<ShareMenu>(
|
||||||
icon: Icon(CwtchIcons.address_copy_2),
|
icon: Icon(CwtchIcons.address_copy_2),
|
||||||
tooltip: AppLocalizations.of(context)!.copyAddress,
|
tooltip: AppLocalizations.of(context)!.shareProfileMenuTooltop,
|
||||||
splashRadius: Material.defaultSplashRadius / 2,
|
splashRadius: Material.defaultSplashRadius / 2,
|
||||||
onPressed: () {
|
onSelected: (ShareMenu item) {
|
||||||
Clipboard.setData(new ClipboardData(text: Provider.of<ProfileInfoState>(context, listen: false).onion));
|
switch(item) {
|
||||||
final snackBar = SnackBar(content: Text(AppLocalizations.of(context)!.copiedToClipboardNotification));
|
case ShareMenu.copyCode:
|
||||||
ScaffoldMessenger.of(context).showSnackBar(snackBar);
|
{
|
||||||
}));
|
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);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case ShareMenu.qrcode: {
|
||||||
|
_showQRCode("cwtch:" + Provider.of<ProfileInfoState>(context, listen: false).onion);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
itemBuilder: (BuildContext context) => <PopupMenuEntry<ShareMenu>>[
|
||||||
|
PopupMenuItem<ShareMenu>(
|
||||||
|
value: ShareMenu.copyCode,
|
||||||
|
child: Text(AppLocalizations.of(context)!.copyAddress),
|
||||||
|
),
|
||||||
|
PopupMenuItem<ShareMenu>(
|
||||||
|
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
|
// 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)) {
|
||||||
|
@ -381,4 +421,25 @@ class _ContactsViewState extends State<ContactsView> {
|
||||||
)));
|
)));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void _showQRCode(String profile_code) {
|
||||||
|
showModalBottomSheet<dynamic>(
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return Wrap( children: <Widget>[
|
||||||
|
Center( child:
|
||||||
|
QrImage(
|
||||||
|
data: profile_code,
|
||||||
|
version: QrVersions.auto,
|
||||||
|
size: 400.0,
|
||||||
|
backgroundColor: Provider.of<Settings>(context).theme.backgroundPaneColor,
|
||||||
|
foregroundColor: Provider.of<Settings>(context).theme.mainTextColor,
|
||||||
|
gapless: false,
|
||||||
|
),
|
||||||
|
)]);
|
||||||
|
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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)...
|
||||||
|
|
14
pubspec.lock
14
pubspec.lock
|
@ -617,6 +617,20 @@ packages:
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.2.0"
|
||||||
|
qr:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: qr
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.0"
|
||||||
|
qr_flutter:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: qr_flutter
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "4.0.0"
|
||||||
screen_retriever:
|
screen_retriever:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
|
@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||||
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
|
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
|
||||||
# Read more about iOS versioning at
|
# Read more about iOS versioning at
|
||||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||||
version: 1.8.0+34
|
version: 1.9.0+35
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.15.0 <3.0.0"
|
sdk: ">=2.15.0 <3.0.0"
|
||||||
|
@ -46,6 +46,7 @@ dependencies:
|
||||||
win_toast: ^0.0.2
|
win_toast: ^0.0.2
|
||||||
flutter_local_notifications: ^9.6.1
|
flutter_local_notifications: ^9.6.1
|
||||||
desktop_notifications: ^0.6.3
|
desktop_notifications: ^0.6.3
|
||||||
|
qr_flutter: ^4.0.0
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
msix: ^3.6.2
|
msix: ^3.6.2
|
||||||
|
|
Loading…
Reference in New Issue