mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-28 18:03:14 +08:00
More removals of Settings.instance
This commit is contained in:
@ -217,7 +217,8 @@ class _JournalAppState extends State<JournalApp> {
|
|||||||
return;
|
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");
|
_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
|
// Copied from MarkdownStyleSheet except Grey is replaced with Highlight color
|
||||||
var markdownStyleSheet = MarkdownStyleSheet.fromTheme(theme).copyWith(
|
var markdownStyleSheet = MarkdownStyleSheet.fromTheme(theme).copyWith(
|
||||||
code: theme.textTheme.bodyText2.copyWith(
|
code: theme.textTheme.bodyText2.copyWith(
|
||||||
@ -117,7 +119,7 @@ class NoteViewer extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 16.0),
|
const SizedBox(height: 16.0),
|
||||||
if (Settings.instance.experimentalBacklinks)
|
if (settings.experimentalBacklinks)
|
||||||
NoteBacklinkRenderer(note: note, rootFolder: rootFolder),
|
NoteBacklinkRenderer(note: note, rootFolder: rootFolder),
|
||||||
// _buildFooter(context),
|
// _buildFooter(context),
|
||||||
],
|
],
|
||||||
|
Reference in New Issue
Block a user