fixed most reported bugs

This commit is contained in:
Kima
2023-05-30 19:27:16 +02:00
parent f5682e9137
commit d1507f5eae
23 changed files with 1570 additions and 1124 deletions

View File

@@ -6,7 +6,10 @@ import 'settings_screen.i18n.dart';
class PrivacyView extends StatelessWidget {
const PrivacyView({Key? key}) : super(key: key);
static void show(BuildContext context) => showDialog(context: context, builder: (context) => const PrivacyView(), barrierDismissible: true);
static void show(BuildContext context) => showDialog(
context: context,
builder: (context) => const PrivacyView(),
barrierDismissible: true);
@override
Widget build(BuildContext context) {

View File

@@ -54,6 +54,9 @@ class _SettingsScreenState extends State<SettingsScreen>
int devmodeCountdown = 3;
bool __ss = false; // secret settings
late Future<Map> futureRelease =
Provider.of<UpdateProvider>(context).installedVersion();
late UserProvider user;
late UpdateProvider updateProvider;
late SettingsProvider settings;
@@ -150,6 +153,7 @@ class _SettingsScreenState extends State<SettingsScreen>
@override
void initState() {
super.initState();
futureRelease = Provider.of<UpdateProvider>(context).installedVersion();
_hideContainersController = AnimationController(
vsync: this, duration: const Duration(milliseconds: 200));
}
@@ -877,9 +881,36 @@ class _SettingsScreenState extends State<SettingsScreen>
top: false,
child: Center(
child: GestureDetector(
child: const Panel(
title: Text("v" +
String.fromEnvironment("APPVER", defaultValue: "?"))),
child: FutureBuilder<Map>(
future: futureRelease,
builder: (context, release) {
if (release.hasData) {
return DefaultTextStyle(
style: Theme.of(context)
.textTheme
.titleMedium!
.copyWith(
fontWeight: FontWeight.w600,
color: AppColors.of(context)
.text
.withOpacity(0.65)),
child: Text("v${release.data!['version']}"),
);
} else {
return DefaultTextStyle(
style: Theme.of(context)
.textTheme
.titleMedium!
.copyWith(
fontWeight: FontWeight.w600,
color: AppColors.of(context)
.text
.withOpacity(0.65)),
child: const Text("v?"),
);
}
},
),
onTap: () {
if (devmodeCountdown > 0) {
ScaffoldMessenger.of(context).showSnackBar(SnackBar(

View File

@@ -41,7 +41,8 @@ extension SettingsLocalization on String {
"done": "Done",
"reset": "Reset",
"open": "Open",
"data_collected": "Data collected: Platform (eg. Android), App version (eg. 3.0.0), Unique Install Identifier",
"data_collected":
"Data collected: Platform (eg. Android), App version (eg. 3.0.0), Unique Install Identifier",
"Analytics": "Analytics",
"Anonymous Usage Analytics": "Anonymous Usage Analytics",
"graph_class_avg": "Class average on graph",
@@ -92,7 +93,7 @@ extension SettingsLocalization on String {
"about": "Névjegy",
"supporters": "Támogatók",
"privacy": "Adatvédelmi irányelvek",
"licenses": "Licenszek",
"licenses": "Licencek",
"vibrate": "Rezgés",
"voff": "Kikapcsolás",
"vlight": "Alacsony",
@@ -102,7 +103,8 @@ extension SettingsLocalization on String {
"done": "Kész",
"reset": "Visszaállítás",
"open": "Megnyitás",
"data_collected": "Gyűjtött adat: Platform (pl. Android), App verzió (pl. 3.0.0), Egyedi telepítési azonosító",
"data_collected":
"Gyűjtött adat: Platform (pl. Android), App verzió (pl. 3.0.0), Egyedi telepítési azonosító",
"Analytics": "Analitika",
"Anonymous Usage Analytics": "Névtelen használati analitika",
"graph_class_avg": "Osztályátlag a grafikonon",
@@ -163,7 +165,8 @@ extension SettingsLocalization on String {
"done": "Fertig",
"reset": "Zurücksetzen",
"open": "Öffnen",
"data_collected": "Erhobene Daten: Plattform (z.B. Android), App version (z.B. 3.0.0), Eindeutige Installationskennung",
"data_collected":
"Erhobene Daten: Plattform (z.B. Android), App version (z.B. 3.0.0), Eindeutige Installationskennung",
"Analytics": "Analytik",
"Anonymous Usage Analytics": "Anonyme Nutzungsanalyse",
"graph_class_avg": "Klassendurchschnitt in der Grafik",