mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-01-15 09:28:41 +00:00
fix #129
This commit is contained in:
parent
580dc3c3cf
commit
26af9460a6
14 changed files with 306 additions and 90 deletions
|
|
@ -84,6 +84,11 @@
|
|||
"settingsTitle": "Einstellungen",
|
||||
"settingsChats": "Chats",
|
||||
"settingsStorageData": "Daten und Speicher",
|
||||
"settingsStorageDataStoreInGTitle": "In der Galerie speichern",
|
||||
"settingsStorageDataStoreInGSubtitle": "Speichere Bilder zusätzlich in der Systemgalerie.",
|
||||
"settingsStorageDataMediaAutoDownload": "Automatischer Mediendownload",
|
||||
"settingsStorageDataAutoDownMobile": "Bei Nutzung mobiler Daten",
|
||||
"settingsStorageDataAutoDownWifi": "Bei Nutzung von WLAN",
|
||||
"settingsPreSelectedReactions": "Vorgewählte Reaktions-Emojis",
|
||||
"settingsPreSelectedReactionsError": "Es können maximal 12 Reaktionen ausgewählt werden.",
|
||||
"settingsProfile": "Profil",
|
||||
|
|
|
|||
|
|
@ -148,6 +148,16 @@
|
|||
"@settingsProfile": {},
|
||||
"settingsStorageData": "Data and storage",
|
||||
"@settingsStorageData": {},
|
||||
"settingsStorageDataStoreInGTitle": "Store in Gallery",
|
||||
"@settingsStorageDataStoreInGTitle": {},
|
||||
"settingsStorageDataStoreInGSubtitle": "Store saved images additional in the systems gallery.",
|
||||
"@settingsStorageDataStoreInGSubtitle": {},
|
||||
"settingsStorageDataMediaAutoDownload": "Media auto-download",
|
||||
"@settingsStorageDataMediaAutoDownload": {},
|
||||
"settingsStorageDataAutoDownMobile": "When using mobile data",
|
||||
"@settingsStorageDataAutoDownMobile": {},
|
||||
"settingsStorageDataAutoDownWifi": "When using WI-FI",
|
||||
"@settingsStorageDataAutoDownWifi": {},
|
||||
"settingsProfileCustomizeAvatar": "Customize your avatar",
|
||||
"@settingsProfileCustomizeAvatar": {},
|
||||
"settingsProfileEditDisplayName": "Displayname",
|
||||
|
|
|
|||
|
|
@ -527,6 +527,36 @@ abstract class AppLocalizations {
|
|||
/// **'Data and storage'**
|
||||
String get settingsStorageData;
|
||||
|
||||
/// No description provided for @settingsStorageDataStoreInGTitle.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Store in Gallery'**
|
||||
String get settingsStorageDataStoreInGTitle;
|
||||
|
||||
/// No description provided for @settingsStorageDataStoreInGSubtitle.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Store saved images additional in the systems gallery.'**
|
||||
String get settingsStorageDataStoreInGSubtitle;
|
||||
|
||||
/// No description provided for @settingsStorageDataMediaAutoDownload.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Media auto-download'**
|
||||
String get settingsStorageDataMediaAutoDownload;
|
||||
|
||||
/// No description provided for @settingsStorageDataAutoDownMobile.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'When using mobile data'**
|
||||
String get settingsStorageDataAutoDownMobile;
|
||||
|
||||
/// No description provided for @settingsStorageDataAutoDownWifi.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'When using WI-FI'**
|
||||
String get settingsStorageDataAutoDownWifi;
|
||||
|
||||
/// No description provided for @settingsProfileCustomizeAvatar.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
|
|
|
|||
|
|
@ -226,6 +226,21 @@ class AppLocalizationsDe extends AppLocalizations {
|
|||
@override
|
||||
String get settingsStorageData => 'Daten und Speicher';
|
||||
|
||||
@override
|
||||
String get settingsStorageDataStoreInGTitle => 'In der Galerie speichern';
|
||||
|
||||
@override
|
||||
String get settingsStorageDataStoreInGSubtitle => 'Speichere Bilder zusätzlich in der Systemgalerie.';
|
||||
|
||||
@override
|
||||
String get settingsStorageDataMediaAutoDownload => 'Automatischer Mediendownload';
|
||||
|
||||
@override
|
||||
String get settingsStorageDataAutoDownMobile => 'Bei Nutzung mobiler Daten';
|
||||
|
||||
@override
|
||||
String get settingsStorageDataAutoDownWifi => 'Bei Nutzung von WLAN';
|
||||
|
||||
@override
|
||||
String get settingsProfileCustomizeAvatar => 'Avatar anpassen';
|
||||
|
||||
|
|
|
|||
|
|
@ -226,6 +226,21 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||
@override
|
||||
String get settingsStorageData => 'Data and storage';
|
||||
|
||||
@override
|
||||
String get settingsStorageDataStoreInGTitle => 'Store in Gallery';
|
||||
|
||||
@override
|
||||
String get settingsStorageDataStoreInGSubtitle => 'Store saved images additional in the systems gallery.';
|
||||
|
||||
@override
|
||||
String get settingsStorageDataMediaAutoDownload => 'Media auto-download';
|
||||
|
||||
@override
|
||||
String get settingsStorageDataAutoDownMobile => 'When using mobile data';
|
||||
|
||||
@override
|
||||
String get settingsStorageDataAutoDownWifi => 'When using WI-FI';
|
||||
|
||||
@override
|
||||
String get settingsProfileCustomizeAvatar => 'Customize your avatar';
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@ class UserData {
|
|||
bool? useHighQuality;
|
||||
List<String>? preSelectedEmojies;
|
||||
ThemeMode? themeMode;
|
||||
Map<String, List<String>>? autoDownloadOptions;
|
||||
bool? storeMediaFilesInGallery;
|
||||
|
||||
final int userId;
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,13 @@ UserData _$UserDataFromJson(Map<String, dynamic> json) => UserData(
|
|||
..preSelectedEmojies = (json['preSelectedEmojies'] as List<dynamic>?)
|
||||
?.map((e) => e as String)
|
||||
.toList()
|
||||
..themeMode = $enumDecodeNullable(_$ThemeModeEnumMap, json['themeMode']);
|
||||
..themeMode = $enumDecodeNullable(_$ThemeModeEnumMap, json['themeMode'])
|
||||
..autoDownloadOptions =
|
||||
(json['autoDownloadOptions'] as Map<String, dynamic>?)?.map(
|
||||
(k, e) =>
|
||||
MapEntry(k, (e as List<dynamic>).map((e) => e as String).toList()),
|
||||
)
|
||||
..storeMediaFilesInGallery = json['storeMediaFilesInGallery'] as bool?;
|
||||
|
||||
Map<String, dynamic> _$UserDataToJson(UserData instance) => <String, dynamic>{
|
||||
'username': instance.username,
|
||||
|
|
@ -31,6 +37,8 @@ Map<String, dynamic> _$UserDataToJson(UserData instance) => <String, dynamic>{
|
|||
'useHighQuality': instance.useHighQuality,
|
||||
'preSelectedEmojies': instance.preSelectedEmojies,
|
||||
'themeMode': _$ThemeModeEnumMap[instance.themeMode],
|
||||
'autoDownloadOptions': instance.autoDownloadOptions,
|
||||
'storeMediaFilesInGallery': instance.storeMediaFilesInGallery,
|
||||
'userId': instance.userId,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
import 'package:connectivity_plus/connectivity_plus.dart';
|
||||
import 'package:drift/drift.dart';
|
||||
import 'package:path/path.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
|
|
@ -8,7 +9,6 @@ import 'package:twonly/src/database/twonly_database.dart';
|
|||
import 'package:twonly/src/database/tables/messages_table.dart';
|
||||
import 'package:twonly/src/model/json/message.dart';
|
||||
import 'package:twonly/src/providers/api/media_send.dart';
|
||||
import 'package:twonly/src/utils/misc.dart';
|
||||
import 'dart:typed_data';
|
||||
import 'package:cryptography_plus/cryptography_plus.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
|
|
@ -17,6 +17,7 @@ import 'package:twonly/src/model/protobuf/api/client_to_server.pb.dart'
|
|||
as client;
|
||||
import 'package:twonly/src/model/protobuf/api/error.pb.dart';
|
||||
import 'package:twonly/src/model/protobuf/api/server_to_client.pbserver.dart';
|
||||
import 'package:twonly/src/utils/storage.dart';
|
||||
|
||||
Map<int, DateTime> downloadStartedForMediaReceived = {};
|
||||
|
||||
|
|
@ -31,6 +32,51 @@ Future tryDownloadAllMediaFiles() async {
|
|||
}
|
||||
}
|
||||
|
||||
enum DownloadMediaTypes {
|
||||
video,
|
||||
image,
|
||||
}
|
||||
|
||||
Map<String, List<String>> defaultAutoDownloadOptions = {
|
||||
ConnectivityResult.mobile.name: [],
|
||||
ConnectivityResult.wifi.name: [
|
||||
DownloadMediaTypes.video.name,
|
||||
DownloadMediaTypes.image.name
|
||||
]
|
||||
};
|
||||
|
||||
Future<bool> isAllowedToDownload(bool isVideo) async {
|
||||
final List<ConnectivityResult> connectivityResult =
|
||||
await (Connectivity().checkConnectivity());
|
||||
|
||||
final user = await getUser();
|
||||
final options = user!.autoDownloadOptions ?? defaultAutoDownloadOptions;
|
||||
|
||||
if (connectivityResult.contains(ConnectivityResult.mobile)) {
|
||||
if (isVideo) {
|
||||
if (options[ConnectivityResult.mobile.name]!
|
||||
.contains(DownloadMediaTypes.video.name)) {
|
||||
return true;
|
||||
}
|
||||
} else if (options[ConnectivityResult.mobile.name]!
|
||||
.contains(DownloadMediaTypes.image.name)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (connectivityResult.contains(ConnectivityResult.wifi)) {
|
||||
if (isVideo) {
|
||||
if (options[ConnectivityResult.wifi.name]!
|
||||
.contains(DownloadMediaTypes.video.name)) {
|
||||
return true;
|
||||
}
|
||||
} else if (options[ConnectivityResult.wifi.name]!
|
||||
.contains(DownloadMediaTypes.image.name)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Future startDownloadMedia(Message message, bool force) async {
|
||||
if (message.contentJson == null) return;
|
||||
if (downloadStartedForMediaReceived[message.messageId] != null) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import 'dart:io';
|
||||
import 'dart:math';
|
||||
import 'package:connectivity_plus/connectivity_plus.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
|
@ -161,16 +160,6 @@ Future<bool> authenticateUser(String localizedReason,
|
|||
return false;
|
||||
}
|
||||
|
||||
Future<bool> isAllowedToDownload(bool isVideo) async {
|
||||
final List<ConnectivityResult> connectivityResult =
|
||||
await (Connectivity().checkConnectivity());
|
||||
if (connectivityResult.contains(ConnectivityResult.mobile)) {
|
||||
Logger("tryDownloadMedia").info("abort download over mobile connection");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void setupLogger() {
|
||||
Logger.root.level = kReleaseMode ? Level.INFO : Level.ALL;
|
||||
Logger.root.onRecord.listen((record) async {
|
||||
|
|
|
|||
|
|
@ -298,12 +298,13 @@ class _MediaViewerViewState extends State<MediaViewerView> {
|
|||
setState(() {
|
||||
imageSaved = true;
|
||||
});
|
||||
final res = await saveImageToGallery(imageBytes!);
|
||||
if (res == null) {
|
||||
setState(() {
|
||||
imageSaving = false;
|
||||
});
|
||||
final user = await getUser();
|
||||
if (user != null && (user.storeMediaFilesInGallery ?? true)) {
|
||||
await saveImageToGallery(imageBytes!);
|
||||
}
|
||||
setState(() {
|
||||
imageSaving = false;
|
||||
});
|
||||
}
|
||||
|
||||
Widget bottomNavigation() {
|
||||
|
|
|
|||
|
|
@ -7,15 +7,16 @@ class BetterListTile extends StatelessWidget {
|
|||
final Widget? subtitle;
|
||||
final Color? color;
|
||||
final VoidCallback onTap;
|
||||
final double iconSize;
|
||||
|
||||
const BetterListTile({
|
||||
super.key,
|
||||
required this.icon,
|
||||
required this.text,
|
||||
this.color,
|
||||
this.subtitle,
|
||||
required this.onTap,
|
||||
});
|
||||
const BetterListTile(
|
||||
{super.key,
|
||||
required this.icon,
|
||||
required this.text,
|
||||
this.color,
|
||||
this.subtitle,
|
||||
required this.onTap,
|
||||
this.iconSize = 20});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
|
@ -27,7 +28,7 @@ class BetterListTile extends StatelessWidget {
|
|||
),
|
||||
child: FaIcon(
|
||||
icon,
|
||||
size: 20,
|
||||
size: iconSize,
|
||||
color: color,
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -1,60 +1,58 @@
|
|||
import 'package:connectivity_plus/connectivity_plus.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:twonly/src/views/components/better_list_title.dart';
|
||||
import 'package:twonly/src/views/components/better_text.dart';
|
||||
import 'package:twonly/src/views/components/radio_button.dart';
|
||||
import 'package:twonly/src/providers/settings_change_provider.dart';
|
||||
import 'package:twonly/src/providers/api/media_received.dart';
|
||||
import 'package:twonly/src/utils/storage.dart';
|
||||
import 'package:twonly/src/utils/misc.dart';
|
||||
|
||||
class DataAndStorageView extends StatelessWidget {
|
||||
class DataAndStorageView extends StatefulWidget {
|
||||
const DataAndStorageView({super.key});
|
||||
|
||||
void _showSelectThemeMode(BuildContext context) async {
|
||||
ThemeMode? selectedValue = context.read<SettingsChangeProvider>().themeMode;
|
||||
@override
|
||||
State<DataAndStorageView> createState() => _DataAndStorageViewState();
|
||||
}
|
||||
|
||||
class _DataAndStorageViewState extends State<DataAndStorageView> {
|
||||
Map<String, List<String>> autoDownloadOptions = defaultAutoDownloadOptions;
|
||||
bool storeMediaFilesInGallery = true;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
initAsync();
|
||||
}
|
||||
|
||||
Future initAsync() async {
|
||||
final user = await getUser();
|
||||
if (user == null) return;
|
||||
setState(() {
|
||||
autoDownloadOptions =
|
||||
user.autoDownloadOptions ?? defaultAutoDownloadOptions;
|
||||
storeMediaFilesInGallery = user.storeMediaFilesInGallery ?? true;
|
||||
});
|
||||
}
|
||||
|
||||
void showAutoDownloadOptions(
|
||||
BuildContext context, ConnectivityResult connectionMode) async {
|
||||
await showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return AlertDialog(
|
||||
title: Text(context.lang.settingsAppearanceTheme),
|
||||
content: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
RadioButton<ThemeMode>(
|
||||
value: ThemeMode.system,
|
||||
groupValue: selectedValue,
|
||||
label: 'System default',
|
||||
onChanged: (ThemeMode? value) {
|
||||
selectedValue = value;
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
),
|
||||
RadioButton<ThemeMode>(
|
||||
value: ThemeMode.light,
|
||||
groupValue: selectedValue,
|
||||
label: 'Light',
|
||||
onChanged: (ThemeMode? value) {
|
||||
selectedValue = value;
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
),
|
||||
RadioButton<ThemeMode>(
|
||||
value: ThemeMode.dark,
|
||||
groupValue: selectedValue,
|
||||
label: 'Dark',
|
||||
onChanged: (ThemeMode? value) {
|
||||
selectedValue = value;
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
return AutoDownloadOptionsDialog(
|
||||
autoDownloadOptions: autoDownloadOptions,
|
||||
connectionMode: connectionMode,
|
||||
onUpdate: () async {
|
||||
await initAsync();
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
if (selectedValue != null && context.mounted) {
|
||||
context.read<SettingsChangeProvider>().updateThemeMode(selectedValue);
|
||||
}
|
||||
}
|
||||
|
||||
void toggleStoreInGallery() async {
|
||||
final user = await getUser();
|
||||
if (user == null) return;
|
||||
user.storeMediaFilesInGallery = !storeMediaFilesInGallery;
|
||||
await updateUser(user);
|
||||
initAsync();
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
@ -65,26 +63,40 @@ class DataAndStorageView extends StatelessWidget {
|
|||
),
|
||||
body: ListView(
|
||||
children: [
|
||||
BetterText(text: "Media auto-download"),
|
||||
ListTile(
|
||||
title: Text("When using mobile data"),
|
||||
subtitle: Text("Images", style: TextStyle(color: Colors.grey)),
|
||||
title: Text(context.lang.settingsStorageDataStoreInGTitle),
|
||||
subtitle: Text(context.lang.settingsStorageDataStoreInGSubtitle),
|
||||
onTap: toggleStoreInGallery,
|
||||
trailing: Checkbox(
|
||||
value: storeMediaFilesInGallery,
|
||||
onChanged: (a) => toggleStoreInGallery(),
|
||||
),
|
||||
),
|
||||
Divider(),
|
||||
ListTile(
|
||||
title: Text(
|
||||
context.lang.settingsStorageDataMediaAutoDownload,
|
||||
style: TextStyle(fontSize: 13),
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
title: Text(context.lang.settingsStorageDataAutoDownMobile),
|
||||
subtitle: Text(
|
||||
autoDownloadOptions[ConnectivityResult.mobile.name]!.join(", "),
|
||||
style: TextStyle(color: Colors.grey),
|
||||
),
|
||||
onTap: () {
|
||||
_showSelectThemeMode(context);
|
||||
showAutoDownloadOptions(context, ConnectivityResult.mobile);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
title: Text("When using Wi-Fi"),
|
||||
subtitle: Text("Images", style: TextStyle(color: Colors.grey)),
|
||||
title: Text(context.lang.settingsStorageDataAutoDownWifi),
|
||||
subtitle: Text(
|
||||
autoDownloadOptions[ConnectivityResult.wifi.name]!.join(", "),
|
||||
style: TextStyle(color: Colors.grey),
|
||||
),
|
||||
onTap: () {
|
||||
_showSelectThemeMode(context);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
title: Text("When using roaming"),
|
||||
subtitle: Text("Images", style: TextStyle(color: Colors.grey)),
|
||||
onTap: () {
|
||||
_showSelectThemeMode(context);
|
||||
showAutoDownloadOptions(context, ConnectivityResult.wifi);
|
||||
},
|
||||
),
|
||||
],
|
||||
|
|
@ -92,3 +104,86 @@ class DataAndStorageView extends StatelessWidget {
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
class AutoDownloadOptionsDialog extends StatefulWidget {
|
||||
final Map<String, List<String>> autoDownloadOptions;
|
||||
final ConnectivityResult connectionMode;
|
||||
final Function() onUpdate;
|
||||
|
||||
const AutoDownloadOptionsDialog({
|
||||
super.key,
|
||||
required this.autoDownloadOptions,
|
||||
required this.connectionMode,
|
||||
required this.onUpdate,
|
||||
});
|
||||
|
||||
@override
|
||||
State<AutoDownloadOptionsDialog> createState() =>
|
||||
_AutoDownloadOptionsDialogState();
|
||||
}
|
||||
|
||||
class _AutoDownloadOptionsDialogState extends State<AutoDownloadOptionsDialog> {
|
||||
late Map<String, List<String>> autoDownloadOptions;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
autoDownloadOptions = widget.autoDownloadOptions;
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AlertDialog(
|
||||
title: Text(context.lang.settingsStorageDataMediaAutoDownload),
|
||||
content: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
CheckboxListTile(
|
||||
title: Text('Image'),
|
||||
value: autoDownloadOptions[widget.connectionMode.name]!
|
||||
.contains(DownloadMediaTypes.image.name),
|
||||
onChanged: (bool? value) async {
|
||||
await _updateAutoDownloadSetting(DownloadMediaTypes.image, value);
|
||||
},
|
||||
),
|
||||
CheckboxListTile(
|
||||
title: Text('Video'),
|
||||
value: autoDownloadOptions[widget.connectionMode.name]!
|
||||
.contains(DownloadMediaTypes.video.name),
|
||||
onChanged: (bool? value) async {
|
||||
await _updateAutoDownloadSetting(DownloadMediaTypes.video, value);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
child: Text(context.lang.close),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> _updateAutoDownloadSetting(
|
||||
DownloadMediaTypes type, bool? value) async {
|
||||
if (value == null) return;
|
||||
|
||||
// Update the autoDownloadOptions based on the checkbox state
|
||||
autoDownloadOptions[widget.connectionMode.name]!
|
||||
.removeWhere((element) => element == type.name);
|
||||
if (value) {
|
||||
autoDownloadOptions[widget.connectionMode.name]!.add(type.name);
|
||||
}
|
||||
|
||||
// Call the onUpdate callback to notify the parent widget
|
||||
final user = await getUser();
|
||||
if (user == null) return;
|
||||
user.autoDownloadOptions = autoDownloadOptions;
|
||||
await updateUser(user);
|
||||
widget.onUpdate();
|
||||
setState(() {});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ class HelpView extends StatelessWidget {
|
|||
FaIcon(FontAwesomeIcons.arrowUpRightFromSquare, size: 15),
|
||||
),
|
||||
Divider(),
|
||||
|
||||
FutureBuilder(
|
||||
future: PackageInfo.fromPlatform(),
|
||||
builder: (context, snap) {
|
||||
|
|
@ -76,8 +75,6 @@ class HelpView extends StatelessWidget {
|
|||
style: TextStyle(color: Colors.grey, fontSize: 13),
|
||||
),
|
||||
),
|
||||
|
||||
//
|
||||
],
|
||||
));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import 'package:twonly/src/utils/storage.dart';
|
|||
import 'package:twonly/src/views/settings/account_view.dart';
|
||||
import 'package:twonly/src/views/settings/appearance_view.dart';
|
||||
import 'package:twonly/src/views/settings/chat/chat_settings_view.dart';
|
||||
import 'package:twonly/src/views/settings/data_and_storage_view.dart';
|
||||
import 'package:twonly/src/views/settings/notification_view.dart';
|
||||
import 'package:twonly/src/views/settings/profile/profile_view.dart';
|
||||
import 'package:twonly/src/views/settings/help_view.dart';
|
||||
|
|
@ -153,11 +154,12 @@ class _SettingsMainViewState extends State<SettingsMainView> {
|
|||
),
|
||||
BetterListTile(
|
||||
icon: FontAwesomeIcons.chartPie,
|
||||
iconSize: 15,
|
||||
text: context.lang.settingsStorageData,
|
||||
onTap: () async {
|
||||
Navigator.push(context,
|
||||
MaterialPageRoute(builder: (context) {
|
||||
return NotificationView();
|
||||
return DataAndStorageView();
|
||||
}));
|
||||
},
|
||||
),
|
||||
|
|
|
|||
Loading…
Reference in a new issue