Skip to content

Commit

Permalink
Replace usages of ImmutableList with List
Browse files Browse the repository at this point in the history
  • Loading branch information
yasanglass committed Sep 12, 2024
1 parent 9689d8b commit c49b7e0
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ import app.lawnchair.ui.preferences.data.liveinfo.liveInformationManager
import app.lawnchair.ui.preferences.data.liveinfo.model.Announcement
import app.lawnchair.ui.util.addIf
import com.android.launcher3.R
import kotlinx.collections.immutable.ImmutableList
import kotlinx.collections.immutable.toImmutableList
import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.launch

@Composable
Expand All @@ -62,7 +59,7 @@ fun AnnouncementPreference() {

if (enabled && showAnnouncements) {
AnnouncementPreference(
announcements = liveInformation.announcements.filter { it.id !in dismissedAnnouncementIds }.toImmutableList(),
announcements = liveInformation.announcements.filter { it.id !in dismissedAnnouncementIds },
onDismiss = { announcement ->
val dismissed = dismissedAnnouncementIds.toMutableSet().apply { add(announcement.id) }
coroutineScope.launch { liveInformationManager.dismissedAnnouncementIds.set(dismissed) }
Expand All @@ -73,7 +70,7 @@ fun AnnouncementPreference() {

@Composable
fun AnnouncementPreference(
announcements: ImmutableList<Announcement>,
announcements: List<Announcement>,
onDismiss: (Announcement) -> Unit,
modifier: Modifier = Modifier,
) {
Expand Down

0 comments on commit c49b7e0

Please sign in to comment.