Moving preview EmptyNav to a class to avoid Nav auto-imports in production code.
This commit is contained in:
@@ -64,7 +64,7 @@ fun RenderHashTagIconsPreview() {
|
|||||||
) { paragraph, state, spaceWidth, modifier ->
|
) { paragraph, state, spaceWidth, modifier ->
|
||||||
RenderTextParagraph(paragraph, spaceWidth, modifier) { word ->
|
RenderTextParagraph(paragraph, spaceWidth, modifier) { word ->
|
||||||
when (word) {
|
when (word) {
|
||||||
is HashTagSegment -> HashTag(word, EmptyNav)
|
is HashTagSegment -> HashTag(word, EmptyNav())
|
||||||
is RegularTextSegment -> Text(word.segmentText)
|
is RegularTextSegment -> Text(word.segmentText)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -192,11 +192,11 @@ fun RenderRegularPreview() {
|
|||||||
"",
|
"",
|
||||||
1,
|
1,
|
||||||
route = Route.EventRedirect(word.segmentText),
|
route = Route.EventRedirect(word.segmentText),
|
||||||
nav = EmptyNav,
|
nav = EmptyNav(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
is HashTagSegment -> HashTag(word, EmptyNav)
|
is HashTagSegment -> HashTag(word, EmptyNav())
|
||||||
// is HashIndexUserSegment -> TagLink(word, accountViewModel, nav)
|
// is HashIndexUserSegment -> TagLink(word, accountViewModel, nav)
|
||||||
// is HashIndexEventSegment -> TagLink(word, true, backgroundColorState, accountViewModel, nav)
|
// is HashIndexEventSegment -> TagLink(word, true, backgroundColorState, accountViewModel, nav)
|
||||||
is SchemelessUrlSegment -> NoProtocolUrlRenderer(word)
|
is SchemelessUrlSegment -> NoProtocolUrlRenderer(word)
|
||||||
@@ -225,7 +225,7 @@ fun RenderRegularPreview2() {
|
|||||||
is EmailSegment -> ClickableEmail(word.segmentText)
|
is EmailSegment -> ClickableEmail(word.segmentText)
|
||||||
is PhoneSegment -> ClickablePhone(word.segmentText)
|
is PhoneSegment -> ClickablePhone(word.segmentText)
|
||||||
// is BechSegment -> BechLink(word.segmentText, true, backgroundColor, accountViewModel, nav)
|
// is BechSegment -> BechLink(word.segmentText, true, backgroundColor, accountViewModel, nav)
|
||||||
is HashTagSegment -> HashTag(word, EmptyNav)
|
is HashTagSegment -> HashTag(word, EmptyNav())
|
||||||
// is HashIndexUserSegment -> TagLink(word, accountViewModel, nav)
|
// is HashIndexUserSegment -> TagLink(word, accountViewModel, nav)
|
||||||
// is HashIndexEventSegment -> TagLink(word, true, backgroundColorState, accountViewModel, nav)
|
// is HashIndexEventSegment -> TagLink(word, true, backgroundColorState, accountViewModel, nav)
|
||||||
is SchemelessUrlSegment -> NoProtocolUrlRenderer(word)
|
is SchemelessUrlSegment -> NoProtocolUrlRenderer(word)
|
||||||
@@ -267,7 +267,7 @@ fun RenderRegularPreview3() {
|
|||||||
is EmailSegment -> ClickableEmail(word.segmentText)
|
is EmailSegment -> ClickableEmail(word.segmentText)
|
||||||
is PhoneSegment -> ClickablePhone(word.segmentText)
|
is PhoneSegment -> ClickablePhone(word.segmentText)
|
||||||
// is BechSegment -> BechLink(word.segmentText, true, backgroundColor, accountViewModel, nav)
|
// is BechSegment -> BechLink(word.segmentText, true, backgroundColor, accountViewModel, nav)
|
||||||
is HashTagSegment -> HashTag(word, EmptyNav)
|
is HashTagSegment -> HashTag(word, EmptyNav())
|
||||||
// is HashIndexUserSegment -> TagLink(word, accountViewModel, nav)
|
// is HashIndexUserSegment -> TagLink(word, accountViewModel, nav)
|
||||||
// is HashIndexEventSegment -> TagLink(word, true, backgroundColorState, accountViewModel, nav)
|
// is HashIndexEventSegment -> TagLink(word, true, backgroundColorState, accountViewModel, nav)
|
||||||
is SchemelessUrlSegment -> NoProtocolUrlRenderer(word)
|
is SchemelessUrlSegment -> NoProtocolUrlRenderer(word)
|
||||||
|
|||||||
+7
-7
@@ -122,7 +122,7 @@ fun RenderContentAsMarkdown(
|
|||||||
fun RenderContentAsMarkdownPreview() {
|
fun RenderContentAsMarkdownPreview() {
|
||||||
val accountViewModel = mockAccountViewModel()
|
val accountViewModel = mockAccountViewModel()
|
||||||
|
|
||||||
val nav = EmptyNav
|
val nav = EmptyNav()
|
||||||
|
|
||||||
ThemeComparisonRow {
|
ThemeComparisonRow {
|
||||||
val background = MaterialTheme.colorScheme.background
|
val background = MaterialTheme.colorScheme.background
|
||||||
@@ -174,7 +174,7 @@ fun RenderContentAsMarkdownPreview() {
|
|||||||
fun RenderContentAsMarkdownListsPreview() {
|
fun RenderContentAsMarkdownListsPreview() {
|
||||||
val accountViewModel = mockAccountViewModel()
|
val accountViewModel = mockAccountViewModel()
|
||||||
|
|
||||||
val nav = EmptyNav
|
val nav = EmptyNav()
|
||||||
|
|
||||||
ThemeComparisonRow {
|
ThemeComparisonRow {
|
||||||
val background = MaterialTheme.colorScheme.background
|
val background = MaterialTheme.colorScheme.background
|
||||||
@@ -224,7 +224,7 @@ fun RenderContentAsMarkdownListsPreview() {
|
|||||||
fun RenderContentAsMarkdownCodePreview() {
|
fun RenderContentAsMarkdownCodePreview() {
|
||||||
val accountViewModel = mockAccountViewModel()
|
val accountViewModel = mockAccountViewModel()
|
||||||
|
|
||||||
val nav = EmptyNav
|
val nav = EmptyNav()
|
||||||
|
|
||||||
ThemeComparisonRow {
|
ThemeComparisonRow {
|
||||||
val background = MaterialTheme.colorScheme.background
|
val background = MaterialTheme.colorScheme.background
|
||||||
@@ -278,7 +278,7 @@ fun RenderContentAsMarkdownCodePreview() {
|
|||||||
fun RenderContentAsMarkdownTablesPreview() {
|
fun RenderContentAsMarkdownTablesPreview() {
|
||||||
val accountViewModel = mockAccountViewModel()
|
val accountViewModel = mockAccountViewModel()
|
||||||
|
|
||||||
val nav = EmptyNav
|
val nav = EmptyNav()
|
||||||
|
|
||||||
ThemeComparisonRow {
|
ThemeComparisonRow {
|
||||||
val background = MaterialTheme.colorScheme.background
|
val background = MaterialTheme.colorScheme.background
|
||||||
@@ -319,7 +319,7 @@ fun RenderContentAsMarkdownTablesPreview() {
|
|||||||
fun RenderContentAsMarkdownFootNotesPreview() {
|
fun RenderContentAsMarkdownFootNotesPreview() {
|
||||||
val accountViewModel = mockAccountViewModel()
|
val accountViewModel = mockAccountViewModel()
|
||||||
|
|
||||||
val nav = EmptyNav
|
val nav = EmptyNav()
|
||||||
|
|
||||||
ThemeComparisonRow {
|
ThemeComparisonRow {
|
||||||
val background = MaterialTheme.colorScheme.background
|
val background = MaterialTheme.colorScheme.background
|
||||||
@@ -356,7 +356,7 @@ fun RenderContentAsMarkdownFootNotesPreview() {
|
|||||||
fun RenderContentAsMarkdownUserPreview() {
|
fun RenderContentAsMarkdownUserPreview() {
|
||||||
val accountViewModel = mockAccountViewModel()
|
val accountViewModel = mockAccountViewModel()
|
||||||
|
|
||||||
val nav = EmptyNav
|
val nav = EmptyNav()
|
||||||
|
|
||||||
runBlocking {
|
runBlocking {
|
||||||
withContext(Dispatchers.IO) {
|
withContext(Dispatchers.IO) {
|
||||||
@@ -418,7 +418,7 @@ fun RenderContentAsMarkdownUserPreview() {
|
|||||||
fun RenderContentAsMarkdownNotePreview() {
|
fun RenderContentAsMarkdownNotePreview() {
|
||||||
val accountViewModel = mockAccountViewModel()
|
val accountViewModel = mockAccountViewModel()
|
||||||
|
|
||||||
val nav = EmptyNav
|
val nav = EmptyNav()
|
||||||
|
|
||||||
runBlocking {
|
runBlocking {
|
||||||
withContext(Dispatchers.IO) {
|
withContext(Dispatchers.IO) {
|
||||||
|
|||||||
+1
-1
@@ -90,7 +90,7 @@ fun ErrorListPreview() {
|
|||||||
ErrorList(
|
ErrorList(
|
||||||
model = model,
|
model = model,
|
||||||
accountViewModel = accountViewModel,
|
accountViewModel = accountViewModel,
|
||||||
nav = EmptyNav,
|
nav = EmptyNav(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -49,7 +49,7 @@ import kotlinx.coroutines.withContext
|
|||||||
@Preview
|
@Preview
|
||||||
fun MultiUserErrorMessageContentPreview() {
|
fun MultiUserErrorMessageContentPreview() {
|
||||||
val accountViewModel = mockAccountViewModel()
|
val accountViewModel = mockAccountViewModel()
|
||||||
val nav = EmptyNav
|
val nav = EmptyNav()
|
||||||
|
|
||||||
var user1: User? = null
|
var user1: User? = null
|
||||||
var user2: User? = null
|
var user2: User? = null
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ import kotlinx.coroutines.runBlocking
|
|||||||
import kotlin.reflect.KClass
|
import kotlin.reflect.KClass
|
||||||
|
|
||||||
@Stable
|
@Stable
|
||||||
object EmptyNav : INav {
|
class EmptyNav : INav {
|
||||||
override val navigationScope: CoroutineScope get() = TODO("Not yet implemented")
|
override val navigationScope: CoroutineScope get() = TODO("Not yet implemented")
|
||||||
override val drawerState = DrawerState(DrawerValue.Closed)
|
override val drawerState = DrawerState(DrawerValue.Closed)
|
||||||
|
|
||||||
|
|||||||
@@ -95,16 +95,13 @@ fun BlankNote(
|
|||||||
@Composable
|
@Composable
|
||||||
@Preview
|
@Preview
|
||||||
fun HiddenNotePreview() {
|
fun HiddenNotePreview() {
|
||||||
val accountViewModel = mockAccountViewModel()
|
|
||||||
val nav = EmptyNav
|
|
||||||
|
|
||||||
ThemeComparisonColumn(
|
ThemeComparisonColumn(
|
||||||
toPreview = {
|
toPreview = {
|
||||||
HiddenNote(
|
HiddenNote(
|
||||||
reports = persistentSetOf<Note>(),
|
reports = persistentSetOf<Note>(),
|
||||||
isHiddenAuthor = true,
|
isHiddenAuthor = true,
|
||||||
accountViewModel = accountViewModel,
|
accountViewModel = mockAccountViewModel(),
|
||||||
nav = nav,
|
nav = EmptyNav(),
|
||||||
) {}
|
) {}
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ fun PollNotePreview() {
|
|||||||
)
|
)
|
||||||
|
|
||||||
val accountViewModel = mockVitorAccountViewModel()
|
val accountViewModel = mockVitorAccountViewModel()
|
||||||
val nav = EmptyNav
|
val nav = EmptyNav()
|
||||||
val baseNote: Note?
|
val baseNote: Note?
|
||||||
|
|
||||||
runBlocking {
|
runBlocking {
|
||||||
@@ -205,7 +205,7 @@ fun PollNotePreview2() {
|
|||||||
)
|
)
|
||||||
|
|
||||||
val accountViewModel = mockAccountViewModel()
|
val accountViewModel = mockAccountViewModel()
|
||||||
val nav = EmptyNav
|
val nav = EmptyNav()
|
||||||
val baseNote: Note?
|
val baseNote: Note?
|
||||||
|
|
||||||
runBlocking {
|
runBlocking {
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ import com.vitorpamplona.amethyst.service.relayClient.reqCommand.event.observeNo
|
|||||||
import com.vitorpamplona.amethyst.service.relayClient.reqCommand.user.observeUserAboutMe
|
import com.vitorpamplona.amethyst.service.relayClient.reqCommand.user.observeUserAboutMe
|
||||||
import com.vitorpamplona.amethyst.ui.layouts.listItem.SlimListItem
|
import com.vitorpamplona.amethyst.ui.layouts.listItem.SlimListItem
|
||||||
import com.vitorpamplona.amethyst.ui.navigation.navs.EmptyNav
|
import com.vitorpamplona.amethyst.ui.navigation.navs.EmptyNav
|
||||||
import com.vitorpamplona.amethyst.ui.navigation.navs.EmptyNav.nav
|
|
||||||
import com.vitorpamplona.amethyst.ui.navigation.navs.INav
|
import com.vitorpamplona.amethyst.ui.navigation.navs.INav
|
||||||
import com.vitorpamplona.amethyst.ui.navigation.routes.routeFor
|
import com.vitorpamplona.amethyst.ui.navigation.routes.routeFor
|
||||||
import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel
|
import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel
|
||||||
@@ -104,7 +103,7 @@ fun RenderZapNotePreview() {
|
|||||||
user1,
|
user1,
|
||||||
note1,
|
note1,
|
||||||
accountViewModel,
|
accountViewModel,
|
||||||
EmptyNav,
|
EmptyNav(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -122,7 +121,7 @@ fun RenderZapNoteSlimPreview() {
|
|||||||
user1,
|
user1,
|
||||||
note1,
|
note1,
|
||||||
accountViewModel,
|
accountViewModel,
|
||||||
EmptyNav,
|
EmptyNav(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -60,7 +60,7 @@ fun AddInboxRelayForDMCardPreview() {
|
|||||||
ThemeComparisonColumn {
|
ThemeComparisonColumn {
|
||||||
AddInboxRelayForDMCard(
|
AddInboxRelayForDMCard(
|
||||||
accountViewModel = mockAccountViewModel(),
|
accountViewModel = mockAccountViewModel(),
|
||||||
nav = EmptyNav,
|
nav = EmptyNav(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ import java.util.Locale
|
|||||||
fun RenderLiveActivityEventPreview() {
|
fun RenderLiveActivityEventPreview() {
|
||||||
val event = Event.fromJson("{\"id\":\"19406ad34ce3c653d62eb73c1816ac27dcf473c2ccdccf5af7d90d2633c62561\",\"pubkey\":\"6b66886b3add72c779d205be574ec2d7cec619061ac3e75717389b26445989e4\",\"created_at\":1719084750,\"kind\":30311,\"tags\":[[\"r\",\"podcast:guid:72d5e069-f907-5ee7-b0d7-45404f4f0aa5\"],[\"r\",\"podcast:item:guid:bfc33d6e-e00f-4f11-a2ff-94865b7867aa\"],[\"d\",\"bfc33d6e-e00f-4f11-a2ff-94865b7867aa\"],[\"title\",\"The Online Identity Time Bomb\"],[\"summary\",\"Online identity is a ticking time bomb. But are trustworthy, open-source solutions ready to disarm it, or will we be stuck with lackluster, proprietary systems?\\n Live chat: https:/jblive.tv\"],[\"streaming\",\"https://jblive.fm\"],[\"starts\",\"1719167400\"],[\"status\",\"planned\"],[\"image\",\"https://station.us-iad-1.linodeobjects.com/art/lup-mp3.jpg\"]],\"content\":\"\",\"sig\":\"2ce3fae9ad4512541aaae4dbd9484f50df62ab95ba935d7512b736f087f151c1d15ec2bf62d3135474f16c3e070f335b24349c5493461873ddca3051804ca944\"}") as LiveActivitiesEvent
|
val event = Event.fromJson("{\"id\":\"19406ad34ce3c653d62eb73c1816ac27dcf473c2ccdccf5af7d90d2633c62561\",\"pubkey\":\"6b66886b3add72c779d205be574ec2d7cec619061ac3e75717389b26445989e4\",\"created_at\":1719084750,\"kind\":30311,\"tags\":[[\"r\",\"podcast:guid:72d5e069-f907-5ee7-b0d7-45404f4f0aa5\"],[\"r\",\"podcast:item:guid:bfc33d6e-e00f-4f11-a2ff-94865b7867aa\"],[\"d\",\"bfc33d6e-e00f-4f11-a2ff-94865b7867aa\"],[\"title\",\"The Online Identity Time Bomb\"],[\"summary\",\"Online identity is a ticking time bomb. But are trustworthy, open-source solutions ready to disarm it, or will we be stuck with lackluster, proprietary systems?\\n Live chat: https:/jblive.tv\"],[\"streaming\",\"https://jblive.fm\"],[\"starts\",\"1719167400\"],[\"status\",\"planned\"],[\"image\",\"https://station.us-iad-1.linodeobjects.com/art/lup-mp3.jpg\"]],\"content\":\"\",\"sig\":\"2ce3fae9ad4512541aaae4dbd9484f50df62ab95ba935d7512b736f087f151c1d15ec2bf62d3135474f16c3e070f335b24349c5493461873ddca3051804ca944\"}") as LiveActivitiesEvent
|
||||||
val accountViewModel = mockAccountViewModel()
|
val accountViewModel = mockAccountViewModel()
|
||||||
val nav = EmptyNav
|
val nav = EmptyNav()
|
||||||
val baseNote: Note?
|
val baseNote: Note?
|
||||||
|
|
||||||
runBlocking {
|
runBlocking {
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ import kotlin.coroutines.cancellation.CancellationException
|
|||||||
@Composable
|
@Composable
|
||||||
fun TorrentPreview() {
|
fun TorrentPreview() {
|
||||||
val accountViewModel = mockAccountViewModel()
|
val accountViewModel = mockAccountViewModel()
|
||||||
val nav = EmptyNav
|
val nav = EmptyNav()
|
||||||
|
|
||||||
val torrent =
|
val torrent =
|
||||||
runBlocking {
|
runBlocking {
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ import kotlinx.coroutines.withContext
|
|||||||
@Composable
|
@Composable
|
||||||
fun TorrentCommentPreview() {
|
fun TorrentCommentPreview() {
|
||||||
val accountViewModel = mockAccountViewModel()
|
val accountViewModel = mockAccountViewModel()
|
||||||
val nav = EmptyNav
|
val nav = EmptyNav()
|
||||||
|
|
||||||
val comment =
|
val comment =
|
||||||
runBlocking {
|
runBlocking {
|
||||||
|
|||||||
+1
-1
@@ -117,7 +117,7 @@ fun RenderChannelDataPreview() {
|
|||||||
tags = EmptyTagList,
|
tags = EmptyTagList,
|
||||||
bgColor = remember { mutableStateOf(Color.Transparent) },
|
bgColor = remember { mutableStateOf(Color.Transparent) },
|
||||||
accountViewModel = mockAccountViewModel(),
|
accountViewModel = mockAccountViewModel(),
|
||||||
nav = EmptyNav,
|
nav = EmptyNav(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -72,7 +72,7 @@ fun PrivateMessageEditFieldRowPreview() {
|
|||||||
channelScreenModel = channelScreenModel,
|
channelScreenModel = channelScreenModel,
|
||||||
accountViewModel = accountViewModel,
|
accountViewModel = accountViewModel,
|
||||||
onSendNewMessage = {},
|
onSendNewMessage = {},
|
||||||
nav = EmptyNav,
|
nav = EmptyNav(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -81,7 +81,7 @@ private fun DialogContentPreview() {
|
|||||||
ChannelMetadataScaffold(
|
ChannelMetadataScaffold(
|
||||||
postViewModel = postViewModel,
|
postViewModel = postViewModel,
|
||||||
accountViewModel = accountViewModel,
|
accountViewModel = accountViewModel,
|
||||||
nav = EmptyNav,
|
nav = EmptyNav(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -111,7 +111,7 @@ private fun DialogContentPreview() {
|
|||||||
ChannelMetadataScaffold(
|
ChannelMetadataScaffold(
|
||||||
postViewModel = postViewModel,
|
postViewModel = postViewModel,
|
||||||
accountViewModel = accountViewModel,
|
accountViewModel = accountViewModel,
|
||||||
nav = EmptyNav,
|
nav = EmptyNav(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -108,7 +108,7 @@ fun RenderFollowSetThumb(
|
|||||||
@Composable
|
@Composable
|
||||||
fun RenderFollowSetThumbPreview() {
|
fun RenderFollowSetThumbPreview() {
|
||||||
val accountViewModel = mockAccountViewModel()
|
val accountViewModel = mockAccountViewModel()
|
||||||
val nav = EmptyNav
|
val nav = EmptyNav()
|
||||||
|
|
||||||
ThemeComparisonColumn(
|
ThemeComparisonColumn(
|
||||||
toPreview = {
|
toPreview = {
|
||||||
|
|||||||
+1
-1
@@ -57,7 +57,7 @@ fun AddOutboxRelayCardPreview() {
|
|||||||
ThemeComparisonColumn {
|
ThemeComparisonColumn {
|
||||||
AddInboxRelayCard(
|
AddInboxRelayCard(
|
||||||
accountViewModel = mockAccountViewModel(),
|
accountViewModel = mockAccountViewModel(),
|
||||||
nav = EmptyNav,
|
nav = EmptyNav(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -378,7 +378,7 @@ fun FollowSetListViewPreview() {
|
|||||||
memberList = persistentListOf(user1, user2, user3),
|
memberList = persistentListOf(user1, user2, user3),
|
||||||
onDeleteUser = { user -> },
|
onDeleteUser = { user -> },
|
||||||
accountViewModel = accountViewModel,
|
accountViewModel = accountViewModel,
|
||||||
nav = EmptyNav,
|
nav = EmptyNav(),
|
||||||
)
|
)
|
||||||
|
|
||||||
Spacer(HalfVertSpacer)
|
Spacer(HalfVertSpacer)
|
||||||
|
|||||||
+1
-1
@@ -56,7 +56,7 @@ fun AddInboxRelayCardPreview() {
|
|||||||
ThemeComparisonColumn {
|
ThemeComparisonColumn {
|
||||||
AddInboxRelayCard(
|
AddInboxRelayCard(
|
||||||
accountViewModel = mockAccountViewModel(),
|
accountViewModel = mockAccountViewModel(),
|
||||||
nav = EmptyNav,
|
nav = EmptyNav(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -109,7 +109,7 @@ fun ZapTheDevsCardPreview() {
|
|||||||
ZapTheDevsCard(
|
ZapTheDevsCard(
|
||||||
releaseNote,
|
releaseNote,
|
||||||
accountViewModel,
|
accountViewModel,
|
||||||
nav = EmptyNav,
|
nav = EmptyNav(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -56,7 +56,7 @@ fun AddInboxRelayForSearchCardPreview() {
|
|||||||
ThemeComparisonColumn {
|
ThemeComparisonColumn {
|
||||||
AddInboxRelayForSearchCard(
|
AddInboxRelayForSearchCard(
|
||||||
accountViewModel = mockAccountViewModel(),
|
accountViewModel = mockAccountViewModel(),
|
||||||
nav = EmptyNav,
|
nav = EmptyNav(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -63,7 +63,7 @@ import java.util.Locale as JavaLocale
|
|||||||
@Composable
|
@Composable
|
||||||
fun UserSettingsScreenPreview() {
|
fun UserSettingsScreenPreview() {
|
||||||
val accountViewModel = mockAccountViewModel()
|
val accountViewModel = mockAccountViewModel()
|
||||||
val nav = EmptyNav
|
val nav = EmptyNav()
|
||||||
ThemeComparisonRow {
|
ThemeComparisonRow {
|
||||||
UserSettingsScreen(accountViewModel, nav)
|
UserSettingsScreen(accountViewModel, nav)
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-2
@@ -578,7 +578,7 @@ private fun FullBleedNoteCompose(
|
|||||||
} else if (noteEvent is PeopleListEvent) {
|
} else if (noteEvent is PeopleListEvent) {
|
||||||
DisplayPeopleList(baseNote, backgroundColor, accountViewModel, nav)
|
DisplayPeopleList(baseNote, backgroundColor, accountViewModel, nav)
|
||||||
} else if (noteEvent is FollowListEvent) {
|
} else if (noteEvent is FollowListEvent) {
|
||||||
DisplayFollowList(baseNote, backgroundColor, accountViewModel, nav)
|
DisplayFollowList(baseNote, accountViewModel, nav)
|
||||||
} else if (noteEvent is AudioTrackEvent) {
|
} else if (noteEvent is AudioTrackEvent) {
|
||||||
AudioTrackHeader(noteEvent, baseNote, ContentScale.FillWidth, accountViewModel, nav)
|
AudioTrackHeader(noteEvent, baseNote, ContentScale.FillWidth, accountViewModel, nav)
|
||||||
} else if (noteEvent is AudioHeaderEvent) {
|
} else if (noteEvent is AudioHeaderEvent) {
|
||||||
@@ -1059,7 +1059,6 @@ private fun RenderLongFormHeaderForThread(
|
|||||||
private fun RenderWikiHeaderForThreadPreview() {
|
private fun RenderWikiHeaderForThreadPreview() {
|
||||||
val event = Event.fromJson("{\"id\":\"277f982a4cd3f67cc47ad9282176acabee1713848f547d6021e0c155572078e1\",\"pubkey\":\"460c25e682fda7832b52d1f22d3d22b3176d972f60dcdc3212ed8c92ef85065c\",\"created_at\":1708695717,\"kind\":30818,\"tags\":[[\"d\",\"amethyst\"],[\"a\",\"30818:f03e7c5262648e0b7823dfb49f8f17309cfec9cb14711413dcabdf3d7fc6369a:amethyst\",\"wss://relay.nostr.band\",\"fork\"],[\"e\",\"ceabc60c8022c472c727aa25ae7691885964366386ce265c47e5a78be6cb00be\",\"wss://relay.nostr.band\",\"fork\"],[\"title\",\"Amethyst\"],[\"published_at\",\"1708707133\"]],\"content\":\"An Android-only app written in Kotlin with support for over 90 event kinds. \\n\\n\\n\",\"sig\":\"6748126a909a20dbdb67947a09d64e41d7140a79335a4ad675c6173d7dd5dbcab9c360dec617bd67bbbc20dfad416b15056eda2e20716cd6c425a84301a125a0\"}") as WikiNoteEvent
|
val event = Event.fromJson("{\"id\":\"277f982a4cd3f67cc47ad9282176acabee1713848f547d6021e0c155572078e1\",\"pubkey\":\"460c25e682fda7832b52d1f22d3d22b3176d972f60dcdc3212ed8c92ef85065c\",\"created_at\":1708695717,\"kind\":30818,\"tags\":[[\"d\",\"amethyst\"],[\"a\",\"30818:f03e7c5262648e0b7823dfb49f8f17309cfec9cb14711413dcabdf3d7fc6369a:amethyst\",\"wss://relay.nostr.band\",\"fork\"],[\"e\",\"ceabc60c8022c472c727aa25ae7691885964366386ce265c47e5a78be6cb00be\",\"wss://relay.nostr.band\",\"fork\"],[\"title\",\"Amethyst\"],[\"published_at\",\"1708707133\"]],\"content\":\"An Android-only app written in Kotlin with support for over 90 event kinds. \\n\\n\\n\",\"sig\":\"6748126a909a20dbdb67947a09d64e41d7140a79335a4ad675c6173d7dd5dbcab9c360dec617bd67bbbc20dfad416b15056eda2e20716cd6c425a84301a125a0\"}") as WikiNoteEvent
|
||||||
val accountViewModel = mockAccountViewModel()
|
val accountViewModel = mockAccountViewModel()
|
||||||
val nav = EmptyNav
|
|
||||||
|
|
||||||
val editState =
|
val editState =
|
||||||
remember {
|
remember {
|
||||||
@@ -1072,6 +1071,8 @@ private fun RenderWikiHeaderForThreadPreview() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val nav = EmptyNav()
|
||||||
|
|
||||||
LoadNote(baseNoteHex = "277f982a4cd3f67cc47ad9282176acabee1713848f547d6021e0c155572078e1", accountViewModel = accountViewModel) { baseNote ->
|
LoadNote(baseNoteHex = "277f982a4cd3f67cc47ad9282176acabee1713848f547d6021e0c155572078e1", accountViewModel = accountViewModel) { baseNote ->
|
||||||
ThemeComparisonColumn {
|
ThemeComparisonColumn {
|
||||||
val bg = MaterialTheme.colorScheme.background
|
val bg = MaterialTheme.colorScheme.background
|
||||||
|
|||||||
Reference in New Issue
Block a user