mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-27 17:29:50 +08:00
More removals of Settings.instance
This commit is contained in:
@ -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");
|
||||
};
|
||||
|
||||
|
@ -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),
|
||||
],
|
||||
|
Reference in New Issue
Block a user