More removals of Settings.instance

This commit is contained in:
Vishesh Handa
2020-08-09 01:59:07 +02:00
parent 9c01b8a931
commit 2bc9e8deaf
2 changed files with 5 additions and 2 deletions

View File

@ -217,7 +217,8 @@ class _JournalAppState extends State<JournalApp> {
return;
}
var editor = Settings.instance.defaultEditor.toInternalString();
var settings = Provider.of<Settings>(context, listen: false);
var editor = settings.defaultEditor.toInternalString();
_navigatorKey.currentState.pushNamed("/newNote/$editor");
};

View File

@ -32,6 +32,8 @@ class NoteViewer extends StatelessWidget {
),
);
var settings = Provider.of<Settings>(context);
// Copied from MarkdownStyleSheet except Grey is replaced with Highlight color
var markdownStyleSheet = MarkdownStyleSheet.fromTheme(theme).copyWith(
code: theme.textTheme.bodyText2.copyWith(
@ -117,7 +119,7 @@ class NoteViewer extends StatelessWidget {
),
),
const SizedBox(height: 16.0),
if (Settings.instance.experimentalBacklinks)
if (settings.experimentalBacklinks)
NoteBacklinkRenderer(note: note, rootFolder: rootFolder),
// _buildFooter(context),
],