mirror of
https://github.com/austinried/subtracks.git
synced 2026-02-10 23:02:43 +01:00
remove active sourceId subquery
This commit is contained in:
@@ -7,6 +7,7 @@ import '../../sources/models.dart';
|
||||
import '../hooks/use_on_source.dart';
|
||||
import '../hooks/use_paging_controller.dart';
|
||||
import '../state/database.dart';
|
||||
import '../state/source.dart';
|
||||
import 'list_items.dart';
|
||||
|
||||
const kPageSize = 60;
|
||||
@@ -21,6 +22,7 @@ class AlbumsGrid extends HookConsumerWidget {
|
||||
getNextPageKey: (state) =>
|
||||
state.lastPageIsEmpty ? null : state.nextIntPageKey,
|
||||
fetchPage: (pageKey) => db.libraryDao.listAlbums(
|
||||
sourceId: ref.read(sourceIdProvider),
|
||||
limit: kPageSize,
|
||||
offset: (pageKey - 1) * kPageSize,
|
||||
),
|
||||
|
||||
@@ -7,6 +7,7 @@ import '../../database/dao/library_dao.dart';
|
||||
import '../hooks/use_on_source.dart';
|
||||
import '../hooks/use_paging_controller.dart';
|
||||
import '../state/database.dart';
|
||||
import '../state/source.dart';
|
||||
import 'list_items.dart';
|
||||
|
||||
const kPageSize = 30;
|
||||
@@ -21,6 +22,7 @@ class ArtistsList extends HookConsumerWidget {
|
||||
getNextPageKey: (state) =>
|
||||
state.lastPageIsEmpty ? null : state.nextIntPageKey,
|
||||
fetchPage: (pageKey) => db.libraryDao.listArtists(
|
||||
sourceId: ref.read(sourceIdProvider),
|
||||
limit: kPageSize,
|
||||
offset: (pageKey - 1) * kPageSize,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user