Previously, we would list nicks with an uppercase initial letter before
those with a lowercase nick.
This changes the logic so that we sort nicks in a case-insensitive
manner. There are no case insensitive compare functions in the Flutter
stdlib so we have to do a toLowerCase comparison. This is only run once
when opening buffer details so it should be OK wrt performance.
---
lib/page/buffer_details.dart | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/page/buffer_details.dart b/lib/page/buffer_details.dart
index 760ebbd..29abc05 100644
--- a/lib/page/buffer_details.dart+++ b/lib/page/buffer_details.dart
@@ -86,7 +86,7 @@ class _BufferDetailsPageState extends State<BufferDetailsPage> {
if (i != j) {
return i - j;
}
- return a.nickname.compareTo(b.nickname);+ return a.nickname.toLowerCase().compareTo(b.nickname.toLowerCase()); });
setState(() {
base-commit: c98e7ac19013c4b331ddc87da62c20e0f1cdf506
--
2.17.1
On Friday, September 2nd, 2022 at 15:35, Simon Ser <contact@emersion.fr> wrote:
> Can we do the same for buffers as well?> > lib/models.dart:352: return a.name.compareTo(b.name);
Pushed with that call updated as well, thanks.