mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-08 12:07:54 -06:00
fix: Fix dependents error when switching accounts
This commit is contained in:
@@ -56,10 +56,11 @@ class SliverSearchBar extends StatelessWidget {
|
||||
},
|
||||
),
|
||||
onPressed: () {
|
||||
final apiVersion = context.read<ApiVersion>();
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (_) => Provider.value(
|
||||
value: context.read<ApiVersion>(),
|
||||
builder: (context) => Provider.value(
|
||||
value: apiVersion,
|
||||
child: const ManageAccountsPage(),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -109,16 +109,13 @@ class HomeRoute extends StatelessWidget {
|
||||
providers: [
|
||||
ProxyProvider3<PaperlessDocumentsApi, DocumentChangedNotifier, LabelRepository,
|
||||
DocumentsCubit>(
|
||||
update: (context, docApi, notifier, labelRepo, previous) {
|
||||
print("UPDATED DOCUMENT CUBIT"); //TODO: REMOVE
|
||||
return DocumentsCubit(
|
||||
docApi,
|
||||
notifier,
|
||||
labelRepo,
|
||||
Hive.box<LocalUserAppState>(HiveBoxes.localUserAppState)
|
||||
.get(currentLocalUserId)!,
|
||||
)..reload();
|
||||
},
|
||||
update: (context, docApi, notifier, labelRepo, previous) => DocumentsCubit(
|
||||
docApi,
|
||||
notifier,
|
||||
labelRepo,
|
||||
Hive.box<LocalUserAppState>(HiveBoxes.localUserAppState)
|
||||
.get(currentLocalUserId)!,
|
||||
)..reload(),
|
||||
),
|
||||
Provider(create: (context) => DocumentScannerCubit()),
|
||||
ProxyProvider4<PaperlessDocumentsApi, PaperlessServerStatsApi, LabelRepository,
|
||||
|
||||
Reference in New Issue
Block a user