1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-06-19 08:15:16 +00:00

Start update

This commit is contained in:
2021-02-07 17:09:08 +01:00
parent df915e1ca3
commit ee6e28426c
39 changed files with 163 additions and 110 deletions

View File

@ -74,13 +74,13 @@ class _AccountImageSettingsScreenState
// Upload new account image
SettingsTile(
title: tr("Upload an account image"),
onTap: () => _uploadAccountImage(),
onPressed: (_) => _uploadAccountImage(),
),
// Generate a random account image
SettingsTile(
title: tr("Generate a random account image"),
onTap: () => _generateRandomAccountImage(),
onPressed: (_) => _generateRandomAccountImage(),
),
];
}
@ -100,19 +100,19 @@ class _AccountImageSettingsScreenState
// Upload new account image
SettingsTile(
title: tr("Upload new account image"),
onTap: () => _uploadAccountImage(),
onPressed: (_) => _uploadAccountImage(),
),
// Generate a random account image
SettingsTile(
title: tr("Generate a random account image"),
onTap: () => _generateRandomAccountImage(),
onPressed: (_) => _generateRandomAccountImage(),
),
// Change account image visibility
SettingsTile(
title: tr("Change account image visibility"),
onTap: () => _chooseAccountImageVisibility(),
onPressed: (_) => _chooseAccountImageVisibility(),
subtitle: tr("Current level: %level%", args: {
"level":
_settings.visibility == AccountImageVisibilityLevels.EVERYONE
@ -126,7 +126,7 @@ class _AccountImageSettingsScreenState
// Delete account image
SettingsTile(
title: tr("Delete account image"),
onTap: () => _deleteAccountImage(),
onPressed: (_) => _deleteAccountImage(),
),
];
}

View File

@ -24,7 +24,7 @@ class _AccountPrivacySettingsState extends State<AccountPrivacySettings> {
title: tr("Delete your account"),
subtitle:
tr("Permanently delete your account and all data related to it."),
onTap: _deleteAccount,
onPressed: (_)=>_deleteAccount,
)
])
]);

View File

@ -30,19 +30,19 @@ class _AccountSecuritySettingsScreenState
tiles: [
SettingsTile(
title: tr("Change password"),
onTap: _changePassword,
onPressed: (_) => _changePassword,
),
SettingsTile(
title: tr("Change your security questions"),
subtitle: tr(
"Your security questions can be used to recover an access to your account when you loose your password..."),
onTap: _changeSecurityQuestions,
onPressed: (_) => _changeSecurityQuestions,
),
SettingsTile(
title: tr("Disconnect all your devices"),
subtitle: tr(
"Disconnect all your devices from Comunic, including the current one. Use this option if one of the device you use for Comunic was stolen."),
onTap: _disconnectAllDevices,
onPressed: (_) => _disconnectAllDevices,
),
],
)

View File

@ -152,7 +152,7 @@ class __AccountSettingsBodyState extends State<_AccountSettingsBody> {
title: f.title,
leading: Icon(f.icon),
subtitle: f.subtitle,
onTap: () => _openSectionsAsNewRoute(f),
onPressed: (_) => _openSectionsAsNewRoute(f),
))
.toList(),
)

View File

@ -58,7 +58,7 @@ class _ApplicationSettingsState extends State<ApplicationSettings> {
SettingsTile(
title: tr("About this application"),
subtitle: tr("Learn more about us"),
onTap: () => showAboutAppDialog(context),
onPressed: (_) => showAboutAppDialog(context),
)
],
);

View File

@ -1,5 +1,3 @@
import 'dart:io';
import 'package:comunic/helpers/settings_helper.dart';
import 'package:comunic/helpers/users_helper.dart';
import 'package:comunic/lists/custom_emojies_list.dart';
@ -14,6 +12,7 @@ import 'package:comunic/utils/input_utils.dart';
import 'package:comunic/utils/intl_utils.dart';
import 'package:comunic/utils/ui_utils.dart';
import 'package:flutter/material.dart';
import 'package:image_picker/image_picker.dart';
/// Emojies account settings
///
@ -137,7 +136,7 @@ class _NewCustomEmojiDialog extends StatefulWidget {
class _NewCustomEmojiDialogState extends State<_NewCustomEmojiDialog> {
final _controller = TextEditingController();
File _file;
PickedFile _file;
bool get _hasImage => _file != null;

View File

@ -198,7 +198,7 @@ class _GeneralAccountSettingsScreenState
SettingsTile(
title: tr("Virtual directory (optional)"),
subtitle: _settings.virtualDirectory,
onTap: () async {
onPressed: (_) async {
final dir = await showVirtualDirectoryDialog(
context: context,
initialDirectory: _settings.virtualDirectory,