minor fix

This commit is contained in:
ashilkn 2022-10-20 17:26:48 +05:30
parent c0ec502600
commit 5bdc9eaf09
2 changed files with 3 additions and 5 deletions

View file

@ -94,7 +94,7 @@ class _DetailsSectionWidgetState extends State<DetailsSectionWidget> {
if (snapshot.hasData) {
return userDetails(snapshot.data as UserDetails);
}
if (snapshot.hasData) {
if (snapshot.hasError) {
_logger.severe(
'failed to load user details',
snapshot.error,

View file

@ -37,15 +37,13 @@ class SettingsTitleBarWidget extends StatelessWidget {
' on tree',
);
throw Error();
}
if (snapshot.hasData) {
} else if (snapshot.hasData) {
final userDetails = snapshot.data as UserDetails;
return Text(
"${NumberFormat().format(userDetails.fileCount)} memories",
style: getEnteTextTheme(context).largeBold,
);
}
if (snapshot.hasError) {
} else if (snapshot.hasError) {
logger.severe('failed to load user details');
return const EnteLoadingWidget();
} else {