mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-09-19 21:31:33 +08:00
Remove another use of Settings.instance
I really want to remove this global variable, and only access it through the Provider.
This commit is contained in:
@ -47,14 +47,15 @@ void showSnackbar(BuildContext context, String message) {
|
||||
}
|
||||
|
||||
NotesFolderFS getFolderForEditor(
|
||||
Settings settings,
|
||||
NotesFolderFS rootFolder,
|
||||
EditorType editorType,
|
||||
) {
|
||||
var spec = Settings.instance.defaultNewNoteFolderSpec;
|
||||
var spec = settings.defaultNewNoteFolderSpec;
|
||||
|
||||
switch (editorType) {
|
||||
case EditorType.Journal:
|
||||
spec = Settings.instance.journalEditordefaultNewNoteFolderSpec;
|
||||
spec = settings.journalEditordefaultNewNoteFolderSpec;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
Reference in New Issue
Block a user