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