Name changes
This commit is contained in:
@@ -21,19 +21,19 @@ part 'add_link.provider.g.dart';
|
||||
|
||||
@riverpod
|
||||
Future<ApiResponse<CheckBookmark>> checkBookmark(CheckBookmarkRef ref, String url) async {
|
||||
final result = await ref.watch(apiClientProviderProvider)!.fetchCheckAddBookmark(url: url);
|
||||
final result = await ref.watch(apiClientProvider)!.fetchCheckAddBookmark(url: url);
|
||||
return result;
|
||||
}
|
||||
|
||||
@riverpod
|
||||
FutureOr<ApiResponse<Bookmark>> addBookmark(AddBookmarkRef ref, PostBookmark newBookmark) async {
|
||||
final result = await ref.watch(apiClientProviderProvider)!.fetchPostBookmark(newBookmark);
|
||||
final result = await ref.watch(apiClientProvider)!.fetchPostBookmark(newBookmark);
|
||||
return result;
|
||||
}
|
||||
|
||||
@riverpod
|
||||
FutureOr<ApiResponse<Tags>> getTags(GetTagsRef ref) async {
|
||||
final result = await ref.watch(apiClientProviderProvider)!.fetchTags();
|
||||
final result = await ref.watch(apiClientProvider)!.fetchTags();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ part of 'add_link.provider.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$checkBookmarkHash() => r'a4397a4497e3b7c8dec6027bb927371cc85e526c';
|
||||
String _$checkBookmarkHash() => r'8eeb8cb7ee801ca7ed1b604b56a4301a86568c54';
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
@@ -160,7 +160,7 @@ class _CheckBookmarkProviderElement
|
||||
String get url => (origin as CheckBookmarkProvider).url;
|
||||
}
|
||||
|
||||
String _$addBookmarkHash() => r'94d54330832874c142e417df21522f5faac27f9e';
|
||||
String _$addBookmarkHash() => r'f0994cdf9fe086431549dac44daadd367a8b801b';
|
||||
|
||||
/// See also [addBookmark].
|
||||
@ProviderFor(addBookmark)
|
||||
@@ -290,7 +290,7 @@ class _AddBookmarkProviderElement
|
||||
PostBookmark get newBookmark => (origin as AddBookmarkProvider).newBookmark;
|
||||
}
|
||||
|
||||
String _$getTagsHash() => r'feecc7515f9492838c4a9bccc7031f49713e6ebb';
|
||||
String _$getTagsHash() => r'22cfedf0f73a32c41992b922cbdfbb0145cccc9a';
|
||||
|
||||
/// See also [getTags].
|
||||
@ProviderFor(getTags)
|
||||
|
||||
@@ -10,7 +10,7 @@ part 'links.provider.g.dart';
|
||||
|
||||
@riverpod
|
||||
FutureOr<ApiResponse<Bookmarks>> linksRequest(LinksRequestRef ref) async {
|
||||
final result = await ref.watch(apiClientProviderProvider)!.fetchBookmarks();
|
||||
final result = await ref.watch(apiClientProvider)!.fetchBookmarks();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ part of 'links.provider.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$linksRequestHash() => r'be41da02d669705dc7723ba9fbab0c5b59fd233b';
|
||||
String _$linksRequestHash() => r'2bc6cb36d7c7090f5328c48e1f71acd46df5303b';
|
||||
|
||||
/// See also [linksRequest].
|
||||
@ProviderFor(linksRequest)
|
||||
|
||||
@@ -93,7 +93,7 @@ FutureOr<bool> connectToServer(ConnectToServerRef ref) async {
|
||||
token: ref.watch(connectProvider).tokenController.text,
|
||||
);
|
||||
|
||||
final apiClient = ApiClient(
|
||||
final apiClient = ApiClientService(
|
||||
serverInstance: serverInstance,
|
||||
dioInstance: Dio(
|
||||
BaseOptions(
|
||||
@@ -112,9 +112,8 @@ FutureOr<bool> connectToServer(ConnectToServerRef ref) async {
|
||||
|
||||
processModal.close();
|
||||
if (result == true) {
|
||||
ref.read(apiClientProviderProvider.notifier).setApiClient(apiClient);
|
||||
ref.read(apiClientProvider.notifier).setApiClient(apiClient);
|
||||
ref.read(serverInstancesProvider.notifier).saveNewInstance(serverInstance);
|
||||
// ref.watch(routerProvider).replace(RoutesPaths.links);
|
||||
} else {
|
||||
showSnacbkar(label: t.onboarding.cannotConnectToServer, color: Colors.red);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ part of 'connect.provider.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$connectToServerHash() => r'a12cade5244ec6d3b19897053380bd6c5fcf1265';
|
||||
String _$connectToServerHash() => r'a5ff5c1030b4af6ead6fd6c4d5fdbd95c71a65cc';
|
||||
|
||||
/// See also [connectToServer].
|
||||
@ProviderFor(connectToServer)
|
||||
|
||||
@@ -13,14 +13,14 @@ part 'search.provider.g.dart';
|
||||
@riverpod
|
||||
FutureOr<ApiResponse<Bookmarks>?> searchBookmarks(SearchBookmarksRef ref) async {
|
||||
if (ref.watch(searchProvider).searchTerm == "") return null;
|
||||
final result = await ref.read(apiClientProviderProvider)!.fetchBookmarks(q: ref.watch(searchProvider).searchTerm);
|
||||
final result = await ref.read(apiClientProvider)!.fetchBookmarks(q: ref.watch(searchProvider).searchTerm);
|
||||
return result;
|
||||
}
|
||||
|
||||
@riverpod
|
||||
FutureOr<ApiResponse<Tags>?> searchTags(SearchTagsRef ref) async {
|
||||
if (ref.watch(searchProvider).searchTerm == "") return null;
|
||||
final result = await ref.read(apiClientProviderProvider)!.fetchTags(q: ref.watch(searchProvider).searchTerm);
|
||||
final result = await ref.read(apiClientProvider)!.fetchTags(q: ref.watch(searchProvider).searchTerm);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ part of 'search.provider.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$searchBookmarksHash() => r'5e5ace5cf7231e9c6b919578700fa1f34cf3aca3';
|
||||
String _$searchBookmarksHash() => r'c8d0bfb69cc6c295649a8e2d90f57352689cdab7';
|
||||
|
||||
/// See also [searchBookmarks].
|
||||
@ProviderFor(searchBookmarks)
|
||||
@@ -23,7 +23,7 @@ final searchBookmarksProvider =
|
||||
|
||||
typedef SearchBookmarksRef
|
||||
= AutoDisposeFutureProviderRef<ApiResponse<Bookmarks>?>;
|
||||
String _$searchTagsHash() => r'8470a8d018af64a04b1716b43d1d98dcb54f491d';
|
||||
String _$searchTagsHash() => r'6af31fef1a5020612f098550d54939852d88e187';
|
||||
|
||||
/// See also [searchTags].
|
||||
@ProviderFor(searchTags)
|
||||
|
||||
@@ -24,7 +24,7 @@ class DisconnectModal extends ConsumerWidget {
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
ref.read(apiClientProviderProvider.notifier).disconnectApiClient();
|
||||
ref.read(apiClientProvider.notifier).disconnectApiClient();
|
||||
},
|
||||
child: Text(t.generic.confirm),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user