Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Result class #30

Merged
merged 1 commit into from
Aug 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions lib/features/core/pages/sheet_selector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -124,18 +124,9 @@ class SheetSelectorPage extends HookConsumerWidget {
logger.info('PageView.onPageChanged: $index');
tabController.animateTo(index);

final table = tables[index];
await api.dbTableRead(tableId: table.id).then((result) {
result.when(
ok: (table) async {
await selectTable(ref, table);
},
ng: (error, stackTrace) =>
notifyError(context, error, stackTrace),
);
}).onError(
(error, stackTrace) => notifyError(context, error, stackTrace),
);
final selectedTable = tables[index];
final table = await api.dbTableRead(tableId: selectedTable.id);
await selectTable(ref, table);
},
controller: pageController,
itemBuilder: _viewBuilder(
Expand Down
3 changes: 1 addition & 2 deletions lib/features/core/providers/fields_provider.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:collection/collection.dart';
import 'package:nocodb/common/logger.dart';
import 'package:nocodb/features/core/providers/providers.dart';
import 'package:nocodb/features/core/providers/utils.dart';
import 'package:nocodb/nocodb_sdk/client.dart';
import 'package:nocodb/nocodb_sdk/models.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';
Expand All @@ -13,7 +12,7 @@ Future<List<NcViewColumn>> viewColumnList(
ViewColumnListRef ref,
String viewId,
) async =>
unwrap(await api.dbViewColumnList(viewId: viewId));
await api.dbViewColumnList(viewId: viewId);

@Riverpod()
class _FieldsBase extends _$FieldsBase {
Expand Down
Loading