Skip to content

Commit

Permalink
Now options for sharing will start from favorite options (disable opt…
Browse files Browse the repository at this point in the history
…ions grouping to add favorite options) by #1318
  • Loading branch information
T8RIN committed Sep 15, 2024
1 parent 5a0567f commit 45e256c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import androidx.compose.runtime.getValue
import androidx.compose.runtime.remember
import androidx.compose.ui.platform.LocalContext
import androidx.core.net.toUri
import ru.tech.imageresizershrinker.core.settings.presentation.provider.LocalSettingsState
import ru.tech.imageresizershrinker.core.ui.utils.navigation.Screen
import java.util.Locale

Expand Down Expand Up @@ -245,7 +246,10 @@ internal fun List<Uri>.screenList(
}
}

val favoriteScreens = LocalSettingsState.current.favoriteScreenList

return remember(
favoriteScreens,
extraImageType,
uris,
pdfAvailableScreens,
Expand All @@ -262,7 +266,7 @@ internal fun List<Uri>.screenList(
extraImageType != null -> textAvailableScreens

else -> multipleImagesScreens
}
}.sortedWith(compareBy(nullsLast()) { s -> favoriteScreens.find { it == s.id } })
}
}
}
Expand Down

0 comments on commit 45e256c

Please sign in to comment.