chore: prefer flutter markdown in android

ref: #132
This commit is contained in:
Rongjian Zhang 2021-02-27 19:37:19 +08:00
parent 7521c40ee8
commit 11fc186091
1 changed files with 9 additions and 2 deletions

View File

@ -157,8 +157,15 @@ class ThemeModel with ChangeNotifier {
} }
bool get shouldUseMarkdownFlutterView { bool get shouldUseMarkdownFlutterView {
// WebView on macOS not working // webview on macOS not working
return Platform.isMacOS || markdown == AppMarkdownType.flutter; if (Platform.isMacOS) return true;
// android webview has some issues, prefer flutter
// https://github.com/git-touch/git-touch/issues/132
if (Platform.isAndroid && markdown == null) return true;
// otherwise, prefer webview
return markdown == AppMarkdownType.flutter;
} }
// supported languages // supported languages