build: Do not load emojis at initial start on web

This commit is contained in:
krille-chan 2024-01-20 11:23:48 +01:00
parent 601220c18f
commit a7a8285a55
No known key found for this signature in database
4 changed files with 10 additions and 2 deletions

View file

@ -19,6 +19,10 @@ jobs:
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
- name: Remove Emoji Font
run: |
rm -rf fonts/NotoEmoji
yq -i 'del( .flutter.fonts[] | select(.family == "NotoEmoji") )' pubspec.yaml
- run: flutter pub get
- name: Prepare web
run: ./scripts/prepare-web.sh

View file

@ -21,6 +21,10 @@ jobs:
cache: true
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install nodejs -y
- name: Remove Emoji Font
run: |
rm -rf fonts/NotoEmoji
yq -i 'del( .flutter.fonts[] | select(.family == "NotoEmoji") )' pubspec.yaml
- run: flutter pub get
- name: Prepare web
run: ./scripts/prepare-web.sh

View file

@ -72,7 +72,7 @@ abstract class FluffyThemes {
useMaterial3: true,
brightness: brightness,
colorScheme: colorScheme,
textTheme: PlatformInfos.isDesktop || PlatformInfos.isWeb
textTheme: PlatformInfos.isDesktop
? brightness == Brightness.light
? Typography.material2018().black.merge(fallbackTextTheme)
: Typography.material2018().white.merge(fallbackTextTheme)

View file

@ -52,7 +52,7 @@
serviceWorkerVersion: serviceWorkerVersion,
},
onEntrypointLoaded: function (engineInitializer) {
engineInitializer.initializeEngine().then(function (appRunner) {
engineInitializer.initializeEngine({ useColorEmoji: true }).then(function (appRunner) {
appRunner.runApp();
});
}