From 374c129adc95d96001a24cac0888d4e38bf83aba Mon Sep 17 00:00:00 2001 From: zoe Date: Tue, 6 Sep 2022 10:30:41 +0200 Subject: [PATCH] mkxmkmx --- lib/business_logic/account/account.dart | 2 +- lib/pages/profile_view/profile_view.dart | 3 ++- lib/themes/themes.dart | 13 +++++++++---- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/lib/business_logic/account/account.dart b/lib/business_logic/account/account.dart index 1c7756f..d52b93a 100644 --- a/lib/business_logic/account/account.dart +++ b/lib/business_logic/account/account.dart @@ -217,7 +217,7 @@ Future?>> getPostsForAccount( for (var element in rb) { posts.add(PostModel.fromJson(element, model.identity)); } - posts.sort(); + // posts.sort(); List threads = []; for (var element in posts) { diff --git a/lib/pages/profile_view/profile_view.dart b/lib/pages/profile_view/profile_view.dart index d1839dd..ca3d5ca 100644 --- a/lib/pages/profile_view/profile_view.dart +++ b/lib/pages/profile_view/profile_view.dart @@ -56,7 +56,7 @@ class _ProfileViewState extends State { } await addRelationship(m.values.first!); } - if (i >= global.settings!.identities.length) { + if (i >= global.settings!.identities.length - 1) { if (mounted) { setState(() { loading = false; @@ -122,6 +122,7 @@ class _ProfileViewState extends State { void initState() { activeIdentity = widget.model.identity; identities.addAll({widget.model.identity: widget.model}); + addRelationship(widget.model); update(); loadPosts(); _scrollController.addListener(() { diff --git a/lib/themes/themes.dart b/lib/themes/themes.dart index 6ac9445..411de12 100644 --- a/lib/themes/themes.dart +++ b/lib/themes/themes.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:universal_html/html.dart'; import 'dracula.dart' as color_dracula; import 'tess.dart' as color_tess; import 'adwaita.dart' as color_adwaita; @@ -71,11 +72,15 @@ ThemeData getTheme(CustomColors colors) { color: colors.colorScheme.onSurface, ), elevatedButtonTheme: ElevatedButtonThemeData( - style: ButtonStyle( - textStyle: MaterialStateProperty.all( - const TextStyle(fontSize: 18), + style: ElevatedButton.styleFrom( + foregroundColor: colors.colorScheme.onPrimary, + textStyle: const TextStyle( + fontFamily: 'Atkinson', + fontSize: 18, + fontWeight: FontWeight.w700, + ), ), - )), + ), outlinedButtonTheme: OutlinedButtonThemeData( style: ButtonStyle( backgroundColor: MaterialStateProperty.all(