diff --git a/lib/models/contactlist.dart b/lib/models/contactlist.dart index ef8a0cf4..e8709508 100644 --- a/lib/models/contactlist.dart +++ b/lib/models/contactlist.dart @@ -98,7 +98,7 @@ class ContactListState extends ChangeNotifier { notifyListeners(); //} } - + void updateLastMessageReceivedTime(int forIdentifier, DateTime newMessageTime) { var contact = getContact(forIdentifier); if (contact == null) return; diff --git a/lib/themes/opaque.dart b/lib/themes/opaque.dart index 74fdca15..e012c730 100644 --- a/lib/themes/opaque.dart +++ b/lib/themes/opaque.dart @@ -24,7 +24,7 @@ LoadAssetThemes() async { themes = await loadYamlThemes(); } -OpaqueThemeType getTheme(String themeId, String mode) { +OpaqueThemeType getTheme(String themeId, String mode) { if (themeId == "") { themeId = cwtch_theme; } diff --git a/lib/themes/yamltheme.dart b/lib/themes/yamltheme.dart index c788d50b..98e2304b 100644 --- a/lib/themes/yamltheme.dart +++ b/lib/themes/yamltheme.dart @@ -8,8 +8,6 @@ import 'package:flutter/services.dart'; import 'package:yaml/yaml.dart'; import 'package:path/path.dart' as path; - - Future>> loadYamlThemes() async { final manifestJson = await rootBundle.loadString('AssetManifest.json'); final themesList = json.decode(manifestJson).keys.where((String key) => key.startsWith('assets/themes')); @@ -17,7 +15,7 @@ Future>> loadYamlThemes() async { Map> themes = Map(); for (String themefile in themesList) { - if (themefile.substring(themefile.length-4) != ".yml") { + if (themefile.substring(themefile.length - 4) != ".yml") { continue; } @@ -77,16 +75,16 @@ class YmlTheme extends OpaqueThemeType { Color? getColor(String name) { var val = yml["themes"][mode]["theme"][name]; - if (! (val is int)) { + if (!(val is int)) { val = yml["themes"][mode]["theme"][val] ?? val; } - if (! (val is int)) { + if (!(val is int)) { val = yml["themes"][mode]?["colors"][val] ?? val; } - if (! (val is int)) { + if (!(val is int)) { val = yml["colors"]?[val]; } - if (! (val is int)) { + if (!(val is int)) { return null; } return Color(0xFF000000 + val as int); @@ -95,7 +93,7 @@ class YmlTheme extends OpaqueThemeType { String? getImage(String name) { var val = yml["themes"][mode]["theme"]?[name]; if (val != null) { - return path.join("assets", "themes", yml["themes"]["name"], val); + return path.join("assets", "themes", yml["themes"]["name"], val); } return null; } @@ -137,4 +135,4 @@ class YmlTheme extends OpaqueThemeType { // Images get chatImage => getImage("chatImage") ?? fallbackTheme.chatImage; -} \ No newline at end of file +} diff --git a/lib/widgets/messagelist.dart b/lib/widgets/messagelist.dart index 75623952..b9cf4686 100644 --- a/lib/widgets/messagelist.dart +++ b/lib/widgets/messagelist.dart @@ -116,8 +116,8 @@ class _MessageListState extends State { // Only show broken heart is the contact is offline... decoration: BoxDecoration( image: Provider.of(outerContext).isOnline() - ? (Provider.of(context).theme.chatImage != null) ? - DecorationImage( + ? (Provider.of(context).theme.chatImage != null) + ? DecorationImage( repeat: ImageRepeat.repeat, image: AssetImage(Provider.of(context).theme.chatImage), colorFilter: ColorFilter.mode(Provider.of(context).theme.hilightElementColor.withOpacity(0.15), BlendMode.srcIn))