light theme fixes + message cache ! fix

This commit is contained in:
Dan Ballard 2022-04-14 17:50:53 -07:00
parent dc5ba7b392
commit 4e2f83ccd9
6 changed files with 6 additions and 4 deletions

View File

@ -165,7 +165,7 @@ class MessageCache extends ChangeNotifier {
int size() {
// very naive cache size, assuming MessageInfo are fairly large on average
// and everything else is small in comparison
int cacheSize = cache.entries.map((e) => e.value.size()).fold(0, (previousValue, element) => previousValue! + element);
int cacheSize = cache.entries.map((e) => e.value.size()).fold(0, (previousValue, element) => previousValue + element);
return cacheSize + cacheByHash.length * 64 + cacheByIndex.length * 16;
}
}

View File

@ -130,7 +130,7 @@ class _ContactsViewState extends State<ContactsView> {
floatingActionButton: FloatingActionButton(
onPressed: _modalAddImportChoice,
tooltip: AppLocalizations.of(context)!.tooltipAddContact,
child: const Icon(CwtchIcons.person_add_alt_1_24px),
child: Icon(CwtchIcons.person_add_alt_1_24px, color: Provider.of<Settings>(context).theme.defaultButtonTextColor,),
),
body: showSearchBar || Provider.of<ContactListState>(context).isFiltered ? _buildFilterable() : _buildContactList());
}

View File

@ -183,7 +183,7 @@ class _GroupSettingsViewState extends State<GroupSettingsView> {
onPressed: () {
showAlertDialog(context);
},
style: ButtonStyle(backgroundColor: MaterialStateProperty.all(Colors.transparent)),
style: ButtonStyle(backgroundColor: MaterialStateProperty.all(Provider.of<Settings>(context).theme.backgroundPaneColor), foregroundColor: MaterialStateProperty.all(Provider.of<Settings>(context).theme.mainTextColor)),
icon: Icon(CwtchIcons.leave_group),
label: Text(
AppLocalizations.of(context)!.leaveConversation,

View File

@ -269,7 +269,7 @@ class _PeerSettingsViewState extends State<PeerSettingsView> {
onPressed: () {
showAlertDialog(context);
},
style: ButtonStyle(backgroundColor: MaterialStateProperty.all(Colors.transparent)),
style: ButtonStyle(backgroundColor: MaterialStateProperty.all(Provider.of<Settings>(context).theme.backgroundPaneColor), foregroundColor: MaterialStateProperty.all(Provider.of<Settings>(context).theme.mainTextColor)),
icon: Icon(CwtchIcons.leave_group),
label: Text(
AppLocalizations.of(context)!.leaveConversation,

View File

@ -75,6 +75,7 @@ class _ProfileMgrViewState extends State<ProfileMgrView> {
child: Icon(
Icons.add,
semanticLabel: AppLocalizations.of(context)!.addNewProfileBtn,
color: Provider.of<Settings>(context).theme.defaultButtonTextColor,
),
),
body: _buildProfileManager(),

View File

@ -41,6 +41,7 @@ class _ServersView extends State<ServersView> {
child: Icon(
Icons.add,
semanticLabel: AppLocalizations.of(context)!.addServerTooltip,
color: Provider.of<Settings>(context).theme.defaultButtonTextColor,
),
),
body: Consumer<ServerListState>(