mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-10-22 15:28:45 +02:00
fix(riverpod): remove public notifier getters
This commit is contained in:
1 parent
6cf2195563
commit
023a093f15
3 files changed
+5
-9
No files matched your search
@@ -148,8 +148,6 @@ class LibraryBrowseNotifier extends AsyncNotifier<LibraryBrowseState> {
|
||||
bool _includeLocal = true;
|
||||
int _generation = 0;
|
||||
|
||||
bool get hasMore => _hasMore;
|
||||
|
||||
LibraryBrowsePageRequest _pageRequest(
|
||||
int offset,
|
||||
QueueLibraryDbCursor? cursor,
|
||||
|
||||
@@ -34,14 +34,14 @@ class _Collections extends LibraryCollectionsNotifier {
|
||||
@override
|
||||
LibraryCollectionsState build() => LibraryCollectionsState(isLoaded: true);
|
||||
|
||||
CollectionTrackEntry get entry => CollectionTrackEntry(
|
||||
CollectionTrackEntry get _entry => CollectionTrackEntry(
|
||||
key: trackCollectionKey(_track),
|
||||
track: _track,
|
||||
addedAt: DateTime.utc(2026),
|
||||
);
|
||||
|
||||
void publishWishlist() => state = state.copyWith(wishlist: [entry]);
|
||||
void publishLoved() => state = state.copyWith(loved: [entry]);
|
||||
void publishWishlist() => state = state.copyWith(wishlist: [_entry]);
|
||||
void publishLoved() => state = state.copyWith(loved: [_entry]);
|
||||
}
|
||||
|
||||
class _Recent extends RecentAccessNotifier {
|
||||
@@ -62,9 +62,7 @@ Widget _app(ProviderContainer container, Widget child, {bool mornye = false}) =>
|
||||
UncontrolledProviderScope(
|
||||
container: container,
|
||||
child: MaterialApp(
|
||||
theme: mornye
|
||||
? MornyeTheme.build(Brightness.light)
|
||||
: AppTheme.light(),
|
||||
theme: mornye ? MornyeTheme.build(Brightness.light) : AppTheme.light(),
|
||||
localizationsDelegates: AppLocalizations.localizationsDelegates,
|
||||
supportedLocales: AppLocalizations.supportedLocales,
|
||||
home: Scaffold(body: child),
|
||||
|
||||
@@ -118,7 +118,7 @@ void main() {
|
||||
container.listen(provider, (_, _) {});
|
||||
await container.read(provider.future);
|
||||
final notifier = container.read(provider.notifier);
|
||||
while (notifier.hasMore) {
|
||||
while (container.read(provider).requireValue.hasMore) {
|
||||
await notifier.loadMore();
|
||||
expect(container.read(provider).requireValue.loadMoreError, isNull);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user