Authentication-Results: mail-b.sr.ht; dkim=pass header.d=dille.cc header.i=@dille.cc Received: from mail.saucisseroyale.cc (ip-150.net-81-220-58.lyon.rev.numericable.fr [81.220.58.150]) by mail-b.sr.ht (Postfix) with ESMTPS id 76A9C11EEE1 for <~emersion/goguma-dev@lists.sr.ht>; Fri, 2 Sep 2022 12:08:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=dille.cc; s=mail; t=1662120521; bh=OREJs3ijWSzsJ2zv1x1zxE+y2RWkFuGb5/bmggwN8Jk=; h=From:To:Cc:Subject:Date:From; b=bTZ8Cm+wNn6x9tBJRANPy+aU5VP8JP98PLHmo3ozWG+ANVN/tmNhEvh1z2PfPKlY+ HNRnhKwtI3O6ToqYY3FKQnm/pxTqqgx0ixxs6g+85BmcoO7CJ82C73z4mwEJoLZzr6 Yz0u3YE014g5D0q4ItoxRWPukfV/FWXafTVKjmFD8ws11hi73Whya1fIrj1J8Y+SRj wxdWqUKA6CgAiIeE80La/2zxPst2UvykybIjLl5eUJJZmetNCrreq1QX+95fesPoXa hud9o/AoJ1mqyluC52irk/QY9CpyVmRY0TQfBETb2lKKg7lNeK0iqmvkgt6gu031uS EInHkqIwqJvpg== Received: from tflament-T490.anevia.com (unknown [IPv6:2a01:e0a:8f7:530:4df7:f8af:ece1:3231]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.saucisseroyale.cc (Postfix) with ESMTPSA id E55768133F; Fri, 2 Sep 2022 14:08:40 +0200 (CEST) From: delthas To: ~emersion/goguma-dev@lists.sr.ht Cc: delthas Subject: [PATCH] Order buffer members in a case-insensitive order Date: Fri, 2 Sep 2022 14:08:37 +0200 Message-Id: <20220902120837.7225-1-delthas@dille.cc> X-Mailer: git-send-email 2.17.1 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 { 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