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

@@ -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(