mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-16 18:56:00 -07:00
[Bugfix] Fixed refreshing details screens
This commit is contained in:
parent
8bda03ee2c
commit
aaa6a737cb
4 changed files with 10 additions and 13 deletions
|
|
@ -98,7 +98,7 @@ class BookDetailsProviderNotifier extends StateNotifier<BookProviderModel> {
|
|||
|
||||
Future<Response?> fetchDetails(BookModel book) async {
|
||||
state = state.copyWith(
|
||||
parentModel: () => book,
|
||||
parentModel: () => state.book ?? book,
|
||||
);
|
||||
String bookId = state.book?.id ?? book.id;
|
||||
|
||||
|
|
@ -108,7 +108,7 @@ class BookDetailsProviderNotifier extends StateNotifier<BookProviderModel> {
|
|||
final parentModel = parentResponse.bodyOrThrow;
|
||||
final getViews = await api.usersUserIdViewsGet();
|
||||
|
||||
//Hacky solution more false positives so good enough for now.
|
||||
//Hacky solution for determining parent views
|
||||
final parentIsView =
|
||||
getViews.body?.items?.firstWhereOrNull((element) => element.name == parentResponse.body?.name) != null;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue