light theme fixes + message cache ! fix
continuous-integration/drone/pr Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
This commit is contained in:
parent
dc5ba7b392
commit
4e2f83ccd9
|
@ -165,7 +165,7 @@ class MessageCache extends ChangeNotifier {
|
||||||
int size() {
|
int size() {
|
||||||
// very naive cache size, assuming MessageInfo are fairly large on average
|
// very naive cache size, assuming MessageInfo are fairly large on average
|
||||||
// and everything else is small in comparison
|
// 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;
|
return cacheSize + cacheByHash.length * 64 + cacheByIndex.length * 16;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -130,7 +130,7 @@ class _ContactsViewState extends State<ContactsView> {
|
||||||
floatingActionButton: FloatingActionButton(
|
floatingActionButton: FloatingActionButton(
|
||||||
onPressed: _modalAddImportChoice,
|
onPressed: _modalAddImportChoice,
|
||||||
tooltip: AppLocalizations.of(context)!.tooltipAddContact,
|
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());
|
body: showSearchBar || Provider.of<ContactListState>(context).isFiltered ? _buildFilterable() : _buildContactList());
|
||||||
}
|
}
|
||||||
|
|
|
@ -183,7 +183,7 @@ class _GroupSettingsViewState extends State<GroupSettingsView> {
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
showAlertDialog(context);
|
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),
|
icon: Icon(CwtchIcons.leave_group),
|
||||||
label: Text(
|
label: Text(
|
||||||
AppLocalizations.of(context)!.leaveConversation,
|
AppLocalizations.of(context)!.leaveConversation,
|
||||||
|
|
|
@ -269,7 +269,7 @@ class _PeerSettingsViewState extends State<PeerSettingsView> {
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
showAlertDialog(context);
|
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),
|
icon: Icon(CwtchIcons.leave_group),
|
||||||
label: Text(
|
label: Text(
|
||||||
AppLocalizations.of(context)!.leaveConversation,
|
AppLocalizations.of(context)!.leaveConversation,
|
||||||
|
|
|
@ -75,6 +75,7 @@ class _ProfileMgrViewState extends State<ProfileMgrView> {
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.add,
|
Icons.add,
|
||||||
semanticLabel: AppLocalizations.of(context)!.addNewProfileBtn,
|
semanticLabel: AppLocalizations.of(context)!.addNewProfileBtn,
|
||||||
|
color: Provider.of<Settings>(context).theme.defaultButtonTextColor,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
body: _buildProfileManager(),
|
body: _buildProfileManager(),
|
||||||
|
|
|
@ -41,6 +41,7 @@ class _ServersView extends State<ServersView> {
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.add,
|
Icons.add,
|
||||||
semanticLabel: AppLocalizations.of(context)!.addServerTooltip,
|
semanticLabel: AppLocalizations.of(context)!.addServerTooltip,
|
||||||
|
color: Provider.of<Settings>(context).theme.defaultButtonTextColor,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
body: Consumer<ServerListState>(
|
body: Consumer<ServerListState>(
|
||||||
|
|
Loading…
Reference in New Issue