refactor: update personalized view handling, improve GitHub issue link, and adjust VaaniLogo size

This commit is contained in:
Dr-Blank 2024-10-05 04:48:52 -04:00
parent fa815ae206
commit 758e4cdc83
No known key found for this signature in database
GPG key ID: 7452CC63F210A266
4 changed files with 11 additions and 5 deletions

View file

@ -116,6 +116,8 @@ class PersonalizedView extends _$PersonalizedView {
ref.read(apiSettingsProvider.notifier).updateState( ref.read(apiSettingsProvider.notifier).updateState(
apiSettings.copyWith(activeLibraryId: login.userDefaultLibraryId), apiSettings.copyWith(activeLibraryId: login.userDefaultLibraryId),
); );
yield [];
return;
} }
// try to find in cache // try to find in cache
// final cacheKey = 'personalizedView:${apiSettings.activeLibraryId}'; // final cacheKey = 'personalizedView:${apiSettings.activeLibraryId}';

View file

@ -648,7 +648,7 @@ class _LoginProviderElement
AuthenticatedUser? get user => (origin as LoginProvider).user; AuthenticatedUser? get user => (origin as LoginProvider).user;
} }
String _$personalizedViewHash() => r'65c0bc60e312d290498ab488496495114d407ccb'; String _$personalizedViewHash() => r'425e89d99d7e4712b4d6a688f3a12442bd66584f';
/// fetch the personalized view /// fetch the personalized view
/// ///

View file

@ -9,6 +9,7 @@ import 'package:vaani/api/authenticated_user_provider.dart';
import 'package:vaani/hacks/fix_autofill_losing_focus.dart'; import 'package:vaani/hacks/fix_autofill_losing_focus.dart';
import 'package:vaani/models/error_response.dart'; import 'package:vaani/models/error_response.dart';
import 'package:vaani/router/router.dart'; import 'package:vaani/router/router.dart';
import 'package:vaani/settings/constants.dart';
import 'package:vaani/settings/models/models.dart' as model; import 'package:vaani/settings/models/models.dart' as model;
import 'package:vaani/shared/utils.dart'; import 'package:vaani/shared/utils.dart';
@ -206,8 +207,10 @@ Future<void> handleServerError(
onPressed: () { onPressed: () {
// open an issue on the github page // open an issue on the github page
handleLaunchUrl( handleLaunchUrl(
Uri.parse( AppMetadata.githubRepo
'https://github.com/Dr-Blank/Vaani/issues', // append the issue url
.replace(
path: '${AppMetadata.githubRepo.path}/issues/new',
), ),
); );
}, },

View file

@ -105,7 +105,6 @@ class YouPage extends HookConsumerWidget {
showNotImplementedToast(context); showNotImplementedToast(context);
}, },
), ),
AboutListTile( AboutListTile(
icon: const Icon(Icons.info), icon: const Icon(Icons.info),
applicationName: AppMetadata.appName, applicationName: AppMetadata.appName,
@ -128,7 +127,9 @@ class YouPage extends HookConsumerWidget {
Theme.of(context).colorScheme.primary, Theme.of(context).colorScheme.primary,
BlendMode.srcIn, BlendMode.srcIn,
), ),
child: const VaaniLogo(), child: const VaaniLogo(
size: 48,
),
), ),
), ),
], ],