fix: Settings profile picture

This commit is contained in:
Christian Pauly 2022-11-13 12:47:45 +01:00
parent 5d89f05676
commit 42446a8858
2 changed files with 7 additions and 12 deletions

View File

@ -47,19 +47,12 @@ class ContentBanner extends StatelessWidget {
return Hero(
tag: heroTag,
child: MxcImage(
key: Key(mxContent?.toString() ?? 'NoKey'),
uri: mxContent,
animated: true,
fit: BoxFit.cover,
height: 400,
width: 800,
placeholder: (c) => Center(
child: Icon(
defaultIcon,
size: 200,
color:
Theme.of(context).colorScheme.onSecondaryContainer,
),
),
),
);
}),

View File

@ -492,10 +492,12 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
if (value != null && int.tryParse(value) != null) {
AppConfig.colorSchemeSeed = Color(int.parse(value));
WidgetsBinding.instance.addPostFrameCallback((_) {
AdaptiveTheme.of(context).setTheme(
light: FluffyThemes.buildTheme(Brightness.light),
dark: FluffyThemes.buildTheme(Brightness.dark),
);
if (mounted) {
AdaptiveTheme.of(context).setTheme(
light: FluffyThemes.buildTheme(Brightness.light),
dark: FluffyThemes.buildTheme(Brightness.dark),
);
}
});
}
});