🐛 Fix wrong update way of data
This commit is contained in:
@@ -57,9 +57,6 @@ class SitePagesNotifier extends AsyncNotifier<List<SnPublicationPage>> {
|
||||
);
|
||||
final newPage = SnPublicationPage.fromJson(resp.data);
|
||||
|
||||
// Refresh the pages list
|
||||
ref.invalidate(sitePagesProvider(arg.pubName, arg.siteSlug));
|
||||
|
||||
return newPage;
|
||||
} catch (error, stackTrace) {
|
||||
state = AsyncValue.error(error, stackTrace);
|
||||
@@ -80,9 +77,6 @@ class SitePagesNotifier extends AsyncNotifier<List<SnPublicationPage>> {
|
||||
);
|
||||
final updatedPage = SnPublicationPage.fromJson(resp.data);
|
||||
|
||||
// Refresh the pages list
|
||||
ref.invalidate(sitePagesProvider(arg.pubName, arg.siteSlug));
|
||||
|
||||
return updatedPage;
|
||||
} catch (error, stackTrace) {
|
||||
state = AsyncValue.error(error, stackTrace);
|
||||
|
||||
Reference in New Issue
Block a user