From 043e88a6641b1eed017bf5a3b561dc4cd62cf75b Mon Sep 17 00:00:00 2001 From: zeyus Date: Sat, 11 Apr 2026 10:27:22 +0200 Subject: [PATCH 1/3] Fix vodozemac initialization. --- commet/lib/client/matrix/matrix_client.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commet/lib/client/matrix/matrix_client.dart b/commet/lib/client/matrix/matrix_client.dart index 4fddec62f..86a9060b1 100644 --- a/commet/lib/client/matrix/matrix_client.dart +++ b/commet/lib/client/matrix/matrix_client.dart @@ -212,7 +212,7 @@ class MatrixClient extends Client { static Future _checkSystem(ClientManager clientManager) async { try { - await vod.init(wasmPath: './assets/assets/vodozemac/'); + await vodozemac.init(wasmPath: './assets/assets/vodozemac/'); if (!vod.isInitialized()) { throw Exception("Vodozemac failed to initialize!"); } From 2929068d5622ff3ff59bfadfb8c16600fc85e82e Mon Sep 17 00:00:00 2001 From: zeyus Date: Sat, 11 Apr 2026 10:29:02 +0200 Subject: [PATCH 2/3] Fix exception on app launch. --- commet/lib/main.dart | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/commet/lib/main.dart b/commet/lib/main.dart index 61c109c76..7cf347bea 100644 --- a/commet/lib/main.dart +++ b/commet/lib/main.dart @@ -217,6 +217,32 @@ Future initNecessary() async { NeedsPostLoginInit.doPostLoginInit(); } +/// Wrapping the initialization functions in closures prevents an exception +/// "Null check operator used on a null value". Despite the try/catch, +/// the error does not actually occur inside of the closure now. +/// This has the added benefit of providing a stacktrace if there is an +/// error. +Future _loadLocalization(Locale locale) async { + // Wrap the localization initialization functions with a try/catch + // and if there is an exception print the error and stack trace. + Future _load(dynamic Function() loadFunction) async { + try { + await loadFunction(); + } catch (e, st) { + Log.e("Error loading localization: $e\n$st"); + } + } + + return await Future.wait([ + _load(() async => UnicodeEmojis.load()), + if (!preferences.debugTranslations.value) + _load(() async => initializeMessages(locale.languageCode)), + if (preferences.debugTranslations.value) + _load(() async => initializeMessagesDebug()), + _load(() async => initializeDateFormatting(locale.languageCode)), + ]); +} + /// Initializes everything that is needed to run in GUI mode Future initGuiRequirements() async { isHeadless = false; @@ -225,13 +251,7 @@ Future initGuiRequirements() async { var locale = PlatformDispatcher.instance.locale; - Future.wait([ - UnicodeEmojis.load(), - if (!preferences.debugTranslations.value) - initializeMessages(locale.languageCode), - if (preferences.debugTranslations.value) initializeMessagesDebug(), - initializeDateFormatting(locale.languageCode), - ]); + await _loadLocalization(locale); tiamat.getAppScale = () { return preferences.appScale.value; From ef0e6b95b0d83c4780fc7c840a5622d57eee255b Mon Sep 17 00:00:00 2001 From: zeyus Date: Sat, 11 Apr 2026 10:31:43 +0200 Subject: [PATCH 3/3] Fix emoji rendering on apple platforms --- tiamat/lib/config/style/theme_common.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tiamat/lib/config/style/theme_common.dart b/tiamat/lib/config/style/theme_common.dart index 3166ee7b3..e2c6646d0 100644 --- a/tiamat/lib/config/style/theme_common.dart +++ b/tiamat/lib/config/style/theme_common.dart @@ -3,6 +3,11 @@ import 'dart:io' show Platform; class ThemeCommon { static List? fontFamilyFallback() { + // Apple does not render emoji with the default font + // instead use the system-available emoji font. + if (!kIsWeb && (Platform.isMacOS || Platform.isIOS)) { + return ["Apple Color Emoji"]; + } const fonts = ["EmojiFont"]; return fonts; }