Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,19 @@ class ImageGridAppWidget : GlanceAppWidget() {
val items by repo.data().collectAsState(initial = initialItems)
val coroutineScope = rememberCoroutineScope()

GlanceTheme
key(LocalSize.current) {
WidgetContent(
items = items,
refreshAction = {
coroutineScope.launch {
withContext(Dispatchers.IO) {
repo.refresh(context)
}
}
GlanceTheme {
key(LocalSize.current) {
WidgetContent(
items = items,
refreshAction = {
coroutineScope.launch {
withContext(Dispatchers.IO) {
repo.refresh(context)
}
}
}
)
}
)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import androidx.glance.action.clickable
import androidx.glance.appwidget.appWidgetBackground
import androidx.glance.appwidget.cornerRadius
import androidx.glance.background
import androidx.glance.color.ColorProvider
import androidx.glance.layout.Alignment
import androidx.glance.layout.Box
import androidx.glance.layout.fillMaxSize
Expand Down Expand Up @@ -235,7 +234,7 @@ private fun CornerButton(
contentDescription = toolBarButton.contentDescription,
iconSize = iconSize,
backgroundSize = buttonBackgroundSize,
backgroundColor = ColorProvider(Color.Transparent, Color.Transparent),
backgroundColor = androidx.glance.color.ColorProvider(Color.Transparent, Color.Transparent),
contentColor = GlanceTheme.colors.primary,
roundedCornerShape = RoundedCornerShape.FULL,
onClick = toolBarButton.onClick,
Expand All @@ -255,7 +254,7 @@ private fun CenterButton(
val backgroundColor = if (filled) {
GlanceTheme.colors.tertiary
} else {
ColorProvider(Color.Transparent, Color.Transparent)
androidx.glance.color.ColorProvider(Color.Transparent, Color.Transparent)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused this is referring to what. I've checked androidx.glance.color.ColorProvider and it doesn't seem to exist. Can you double check?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}

val contentColor = if (filled) {
Expand Down
Loading