Directly get the RootFolder from the Provider

Instead of going through the StateContainer
This commit is contained in:
Vishesh Handa
2020-08-16 15:38:26 +02:00
parent 4bcbf8226a
commit 155d04e465

View File

@ -73,8 +73,7 @@ Future<void> showAlertDialog(
}
bool folderWithSpecExists(BuildContext context, String spec) {
var stateContainer = Provider.of<StateContainer>(context, listen: false);
var rootFolder = stateContainer.appState.notesFolder;
var rootFolder = Provider.of<NotesFolderFS>(context, listen: false);
return rootFolder.getFolderWithSpec(spec) != null;
}