From caa90a916452bfd209a994be581d15187028966f Mon Sep 17 00:00:00 2001 From: Shamicen Date: Thu, 7 Mar 2024 11:08:42 +0100 Subject: [PATCH] display logged in trackers first --- .../java/eu/kanade/presentation/track/TrackInfoDialogHome.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/eu/kanade/presentation/track/TrackInfoDialogHome.kt b/app/src/main/java/eu/kanade/presentation/track/TrackInfoDialogHome.kt index 4d118e913a..09210ff8e8 100644 --- a/app/src/main/java/eu/kanade/presentation/track/TrackInfoDialogHome.kt +++ b/app/src/main/java/eu/kanade/presentation/track/TrackInfoDialogHome.kt @@ -156,10 +156,14 @@ private fun TrackerRow( onOpenChipElementInBrowser: (TrackerChipElement) -> Unit, ) { val trackerChipElements = webUrlProvider() + ?.asSequence() ?.map { TrackerChipElement(it, trackItems) } ?.filter { it.trackItem?.track?.remoteId != it.remoteId || it.trackItem?.track == null } ?.filter { it.serviceId != null } ?.sortedBy { it.serviceId } + ?.sortedWith(compareBy(nullsLast()) { it.trackItem?.tracker?.id }) + ?.toList() + if (!trackerChipElements.isNullOrEmpty()) { Box( modifier = Modifier