Skip to content

Commit

Permalink
[Update] remove glance previews (errors on ci)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeprubio committed Sep 10, 2024
1 parent f25e21b commit 584ac44
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 44 deletions.
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
package com.rumosoft.marvelcompose.presentation.widget

import android.content.Context
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.DpSize
import androidx.compose.ui.unit.dp
import androidx.datastore.preferences.core.preferencesOf
import androidx.glance.GlanceId
import androidx.glance.GlanceTheme
import androidx.glance.appwidget.ExperimentalGlanceRemoteViewsApi
import androidx.glance.appwidget.GlanceAppWidget
import androidx.glance.appwidget.provideContent
import androidx.glance.material3.ColorProviders
import androidx.glance.preview.ExperimentalGlancePreviewApi
import androidx.glance.preview.Preview
import com.google.android.glance.appwidget.host.glance.GlanceAppWidgetHostPreview
import com.rumosoft.components.presentation.theme.DarkColorPalette
import com.rumosoft.components.presentation.theme.LightColorPalette

Expand All @@ -35,18 +25,3 @@ class MarvelAppWidget : GlanceAppWidget() {
}
}
}

@OptIn(ExperimentalGlancePreviewApi::class, ExperimentalGlanceRemoteViewsApi::class)
@Preview
@Composable
fun PreviewMarvelAppWidget() {
val displaySize = DpSize(200.dp, 200.dp)
val state = preferencesOf()

GlanceAppWidgetHostPreview(
modifier = Modifier.fillMaxSize(),
glanceAppWidget = MarvelAppWidget(),
state = state,
displaySize = displaySize,
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,9 @@ import androidx.glance.layout.fillMaxSize
import androidx.glance.layout.fillMaxWidth
import androidx.glance.layout.padding
import androidx.glance.layout.width
import androidx.glance.material3.ColorProviders
import androidx.glance.preview.ExperimentalGlancePreviewApi
import androidx.glance.preview.Preview
import androidx.glance.text.Text
import com.rumosoft.characters.presentation.navigation.NavCharItem
import com.rumosoft.comics.presentation.navigation.NavComicItem
import com.rumosoft.components.presentation.theme.DarkColorPalette
import com.rumosoft.components.presentation.theme.LightColorPalette

@Composable
internal fun WidgetContent() {
Expand Down Expand Up @@ -83,17 +78,3 @@ private fun openDeepLink(context: Context, deepLink: String) {
}
context.startActivity(intent)
}

@OptIn(ExperimentalGlancePreviewApi::class)
@Preview(widthDp = 260, heightDp = 100)
@Composable
private fun WidgetContentPreview() {
GlanceTheme(
colors = ColorProviders(
light = LightColorPalette,
dark = DarkColorPalette,
),
) {
WidgetContent()
}
}

0 comments on commit 584ac44

Please sign in to comment.