mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-27 18:16:43 +02:00
remove unused showImage parameters
This commit is contained in:
@@ -48,16 +48,6 @@ fun ExpandableRichTextViewer(
|
||||
val settings = accountState?.account?.settings
|
||||
val isMobile = ConnectivityStatus.isOnMobileData.value
|
||||
|
||||
val showImage = remember {
|
||||
mutableStateOf(
|
||||
when (settings?.automaticallyShowImages) {
|
||||
true -> !isMobile
|
||||
false -> false
|
||||
else -> true
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
val automaticallyStartPlayback = remember {
|
||||
mutableStateOf(
|
||||
when (settings?.automaticallyStartPlayback) {
|
||||
@@ -106,7 +96,6 @@ fun ExpandableRichTextViewer(
|
||||
tags,
|
||||
backgroundColor,
|
||||
accountViewModel,
|
||||
showImage,
|
||||
automaticallyStartPlayback,
|
||||
automaticallyShowUrlPreview,
|
||||
nav
|
||||
|
@@ -108,7 +108,6 @@ fun RichTextViewer(
|
||||
tags: ImmutableListOfLists<String>,
|
||||
backgroundColor: MutableState<Color>,
|
||||
accountViewModel: AccountViewModel,
|
||||
showImage: MutableState<Boolean>,
|
||||
automaticallyStartPlayback: MutableState<Boolean>,
|
||||
automaticallyShowUrlPreview: MutableState<Boolean>,
|
||||
nav: (String) -> Unit
|
||||
@@ -117,7 +116,7 @@ fun RichTextViewer(
|
||||
if (remember(content) { isMarkdown(content) }) {
|
||||
RenderContentAsMarkdown(content, tags, nav)
|
||||
} else {
|
||||
RenderRegular(content, tags, canPreview, backgroundColor, accountViewModel, showImage, automaticallyStartPlayback, automaticallyShowUrlPreview, nav)
|
||||
RenderRegular(content, tags, canPreview, backgroundColor, accountViewModel, automaticallyStartPlayback, automaticallyShowUrlPreview, nav)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -130,7 +129,6 @@ private fun RenderRegular(
|
||||
canPreview: Boolean,
|
||||
backgroundColor: MutableState<Color>,
|
||||
accountViewModel: AccountViewModel,
|
||||
showImage: MutableState<Boolean>,
|
||||
automaticallyStartPlayback: MutableState<Boolean>,
|
||||
automaticallyShowUrlPreview: MutableState<Boolean>,
|
||||
nav: (String) -> Unit
|
||||
|
@@ -98,16 +98,6 @@ fun ChannelCardCompose(
|
||||
val settings = accountState?.account?.settings
|
||||
val isMobile = ConnectivityStatus.isOnMobileData.value
|
||||
|
||||
val showImage = remember {
|
||||
mutableStateOf(
|
||||
when (settings?.automaticallyShowImages) {
|
||||
true -> !isMobile
|
||||
false -> false
|
||||
else -> true
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
val automaticallyStartPlayback = remember {
|
||||
mutableStateOf(
|
||||
when (settings?.automaticallyStartPlayback) {
|
||||
@@ -138,7 +128,6 @@ fun ChannelCardCompose(
|
||||
modifier,
|
||||
parentBackgroundColor,
|
||||
accountViewModel,
|
||||
showImage,
|
||||
automaticallyStartPlayback,
|
||||
nav
|
||||
)
|
||||
@@ -153,7 +142,6 @@ fun CheckHiddenChannelCardCompose(
|
||||
modifier: Modifier = Modifier,
|
||||
parentBackgroundColor: MutableState<Color>? = null,
|
||||
accountViewModel: AccountViewModel,
|
||||
showImage: MutableState<Boolean>,
|
||||
automaticallyStartPlayback: MutableState<Boolean>,
|
||||
nav: (String) -> Unit
|
||||
) {
|
||||
@@ -169,7 +157,6 @@ fun CheckHiddenChannelCardCompose(
|
||||
modifier,
|
||||
parentBackgroundColor,
|
||||
accountViewModel,
|
||||
showImage,
|
||||
automaticallyStartPlayback,
|
||||
nav
|
||||
)
|
||||
@@ -184,7 +171,6 @@ fun LoadedChannelCardCompose(
|
||||
modifier: Modifier = Modifier,
|
||||
parentBackgroundColor: MutableState<Color>? = null,
|
||||
accountViewModel: AccountViewModel,
|
||||
showImage: MutableState<Boolean>,
|
||||
automaticallyStartPlayback: MutableState<Boolean>,
|
||||
nav: (String) -> Unit
|
||||
) {
|
||||
@@ -217,7 +203,6 @@ fun LoadedChannelCardCompose(
|
||||
modifier,
|
||||
parentBackgroundColor,
|
||||
accountViewModel,
|
||||
showImage,
|
||||
automaticallyStartPlayback,
|
||||
nav
|
||||
)
|
||||
@@ -232,7 +217,6 @@ fun RenderChannelCardReportState(
|
||||
modifier: Modifier = Modifier,
|
||||
parentBackgroundColor: MutableState<Color>? = null,
|
||||
accountViewModel: AccountViewModel,
|
||||
showImage: MutableState<Boolean>,
|
||||
automaticallyStartPlayback: MutableState<Boolean>,
|
||||
nav: (String) -> Unit
|
||||
) {
|
||||
@@ -255,7 +239,6 @@ fun RenderChannelCardReportState(
|
||||
modifier,
|
||||
parentBackgroundColor,
|
||||
accountViewModel,
|
||||
showImage,
|
||||
automaticallyStartPlayback,
|
||||
nav
|
||||
)
|
||||
@@ -270,7 +253,6 @@ fun NormalChannelCard(
|
||||
modifier: Modifier = Modifier,
|
||||
parentBackgroundColor: MutableState<Color>? = null,
|
||||
accountViewModel: AccountViewModel,
|
||||
showImage: MutableState<Boolean>,
|
||||
automaticallyStartPlayback: MutableState<Boolean>,
|
||||
nav: (String) -> Unit
|
||||
) {
|
||||
@@ -281,7 +263,6 @@ fun NormalChannelCard(
|
||||
modifier,
|
||||
parentBackgroundColor,
|
||||
accountViewModel,
|
||||
showImage,
|
||||
automaticallyStartPlayback,
|
||||
showPopup,
|
||||
nav
|
||||
@@ -296,7 +277,6 @@ private fun CheckNewAndRenderChannelCard(
|
||||
modifier: Modifier = Modifier,
|
||||
parentBackgroundColor: MutableState<Color>? = null,
|
||||
accountViewModel: AccountViewModel,
|
||||
showImage: MutableState<Boolean>,
|
||||
automaticallyStartPlayback: MutableState<Boolean>,
|
||||
showPopup: () -> Unit,
|
||||
nav: (String) -> Unit
|
||||
@@ -355,7 +335,6 @@ private fun CheckNewAndRenderChannelCard(
|
||||
InnerChannelCardWithReactions(
|
||||
baseNote = baseNote,
|
||||
accountViewModel = accountViewModel,
|
||||
showImage,
|
||||
automaticallyStartPlayback,
|
||||
nav = nav
|
||||
)
|
||||
@@ -366,7 +345,6 @@ private fun CheckNewAndRenderChannelCard(
|
||||
fun InnerChannelCardWithReactions(
|
||||
baseNote: Note,
|
||||
accountViewModel: AccountViewModel,
|
||||
showImage: MutableState<Boolean>,
|
||||
automaticallyStartPlayback: MutableState<Boolean>,
|
||||
nav: (String) -> Unit
|
||||
) {
|
||||
@@ -388,13 +366,12 @@ fun InnerChannelCardWithReactions(
|
||||
private fun RenderNoteRow(
|
||||
baseNote: Note,
|
||||
accountViewModel: AccountViewModel,
|
||||
showImage: MutableState<Boolean>,
|
||||
automaticallyStartPlayback: MutableState<Boolean>,
|
||||
nav: (String) -> Unit
|
||||
) {
|
||||
when (remember { baseNote.event }) {
|
||||
is LiveActivitiesEvent -> {
|
||||
RenderLiveActivityThumb(baseNote, accountViewModel, showImage, automaticallyStartPlayback, nav)
|
||||
RenderLiveActivityThumb(baseNote, accountViewModel, automaticallyStartPlayback, nav)
|
||||
}
|
||||
is CommunityDefinitionEvent -> {
|
||||
RenderCommunitiesThumb(baseNote, accountViewModel, nav)
|
||||
@@ -409,7 +386,6 @@ private fun RenderNoteRow(
|
||||
fun RenderLiveActivityThumb(
|
||||
baseNote: Note,
|
||||
accountViewModel: AccountViewModel,
|
||||
showImage: MutableState<Boolean>,
|
||||
automaticallyStartPlayback: MutableState<Boolean>,
|
||||
nav: (String) -> Unit
|
||||
) {
|
||||
@@ -549,7 +525,6 @@ fun RenderLiveActivityThumb(
|
||||
Modifier.padding(start = 0.dp, end = 0.dp, top = 5.dp, bottom = 5.dp)
|
||||
},
|
||||
accountViewModel = accountViewModel,
|
||||
showImage = showImage,
|
||||
automaticallyStartPlayback = automaticallyStartPlayback,
|
||||
nav = nav
|
||||
)
|
||||
|
@@ -464,7 +464,6 @@ fun NormalNote(
|
||||
showVideo = !makeItShort,
|
||||
showBottomDiviser = true,
|
||||
accountViewModel = accountViewModel,
|
||||
showImage = showImage,
|
||||
automaticallyStartPlayback = automaticallyStartPlayback,
|
||||
nav = nav
|
||||
)
|
||||
@@ -948,7 +947,6 @@ fun InnerNoteWithReactions(
|
||||
showSecondRow = showSecondRow,
|
||||
backgroundColor = backgroundColor,
|
||||
accountViewModel = accountViewModel,
|
||||
showImage = showImage,
|
||||
automaticallyStartPlayback = automaticallyStartPlayback,
|
||||
nav = nav
|
||||
)
|
||||
@@ -995,7 +993,6 @@ private fun NoteBody(
|
||||
showSecondRow: Boolean,
|
||||
backgroundColor: MutableState<Color>,
|
||||
accountViewModel: AccountViewModel,
|
||||
showImage: MutableState<Boolean>,
|
||||
automaticallyStartPlayback: MutableState<Boolean>,
|
||||
nav: (String) -> Unit
|
||||
) {
|
||||
@@ -1022,7 +1019,6 @@ private fun NoteBody(
|
||||
unPackReply,
|
||||
backgroundColor,
|
||||
accountViewModel,
|
||||
showImage,
|
||||
automaticallyStartPlayback,
|
||||
nav
|
||||
)
|
||||
@@ -1034,7 +1030,6 @@ private fun NoteBody(
|
||||
makeItShort,
|
||||
canPreview,
|
||||
accountViewModel,
|
||||
showImage,
|
||||
nav
|
||||
)
|
||||
}
|
||||
@@ -1046,12 +1041,11 @@ private fun RenderNoteRow(
|
||||
makeItShort: Boolean,
|
||||
canPreview: Boolean,
|
||||
accountViewModel: AccountViewModel,
|
||||
showImage: MutableState<Boolean>,
|
||||
nav: (String) -> Unit
|
||||
) {
|
||||
when (baseNote.event) {
|
||||
is AppDefinitionEvent -> {
|
||||
RenderAppDefinition(baseNote, accountViewModel, showImage, nav)
|
||||
RenderAppDefinition(baseNote, accountViewModel, nav)
|
||||
}
|
||||
|
||||
is ReactionEvent -> {
|
||||
@@ -1295,7 +1289,6 @@ fun RenderPoll(
|
||||
fun RenderAppDefinition(
|
||||
note: Note,
|
||||
accountViewModel: AccountViewModel,
|
||||
showImage: MutableState<Boolean>,
|
||||
nav: (String) -> Unit
|
||||
) {
|
||||
val noteEvent = note.event as? AppDefinitionEvent ?: return
|
||||
@@ -2125,7 +2118,6 @@ private fun ReplyRow(
|
||||
unPackReply: Boolean,
|
||||
backgroundColor: MutableState<Color>,
|
||||
accountViewModel: AccountViewModel,
|
||||
showImage: MutableState<Boolean>,
|
||||
automaticallyStartPlayback: MutableState<Boolean>,
|
||||
nav: (String) -> Unit
|
||||
) {
|
||||
@@ -2162,7 +2154,6 @@ private fun ReplyRow(
|
||||
showBottomDiviser = false,
|
||||
modifier = remember { Modifier.padding(vertical = 5.dp) },
|
||||
accountViewModel = accountViewModel,
|
||||
showImage = showImage,
|
||||
automaticallyStartPlayback = automaticallyStartPlayback,
|
||||
nav = nav
|
||||
)
|
||||
|
@@ -248,16 +248,6 @@ fun NoteMaster(
|
||||
val settings = accountState?.account?.settings
|
||||
val isMobile = ConnectivityStatus.isOnMobileData.value
|
||||
|
||||
val showImage = remember {
|
||||
mutableStateOf(
|
||||
when (settings?.automaticallyShowImages) {
|
||||
true -> !isMobile
|
||||
false -> false
|
||||
else -> true
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
val automaticallyStartPlayback = remember {
|
||||
mutableStateOf(
|
||||
when (settings?.automaticallyStartPlayback) {
|
||||
@@ -427,7 +417,6 @@ fun NoteMaster(
|
||||
showVideo = true,
|
||||
showBottomDiviser = false,
|
||||
accountViewModel = accountViewModel,
|
||||
showImage = showImage,
|
||||
automaticallyStartPlayback = automaticallyStartPlayback,
|
||||
nav = nav
|
||||
)
|
||||
@@ -463,7 +452,7 @@ fun NoteMaster(
|
||||
nav
|
||||
)
|
||||
} else if (noteEvent is AppDefinitionEvent) {
|
||||
RenderAppDefinition(baseNote, accountViewModel, showImage, nav)
|
||||
RenderAppDefinition(baseNote, accountViewModel, nav)
|
||||
} else if (noteEvent is HighlightEvent) {
|
||||
DisplayHighlight(
|
||||
noteEvent.quote(),
|
||||
|
@@ -204,16 +204,6 @@ fun ChannelScreen(
|
||||
val settings = accountState?.account?.settings
|
||||
val isMobile = ConnectivityStatus.isOnMobileData.value
|
||||
|
||||
val showImage = remember {
|
||||
mutableStateOf(
|
||||
when (settings?.automaticallyShowImages) {
|
||||
true -> !isMobile
|
||||
false -> false
|
||||
else -> true
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
val automaticallyStartPlayback = remember {
|
||||
mutableStateOf(
|
||||
when (settings?.automaticallyStartPlayback) {
|
||||
@@ -264,7 +254,6 @@ fun ChannelScreen(
|
||||
showVideo = true,
|
||||
showBottomDiviser = true,
|
||||
accountViewModel = accountViewModel,
|
||||
showImage = showImage,
|
||||
automaticallyStartPlayback = automaticallyStartPlayback,
|
||||
nav = nav
|
||||
)
|
||||
@@ -545,7 +534,6 @@ fun ChannelHeader(
|
||||
showBottomDiviser: Boolean,
|
||||
modifier: Modifier = StdPadding,
|
||||
accountViewModel: AccountViewModel,
|
||||
showImage: MutableState<Boolean>,
|
||||
automaticallyStartPlayback: MutableState<Boolean>,
|
||||
nav: (String) -> Unit
|
||||
) {
|
||||
@@ -560,7 +548,6 @@ fun ChannelHeader(
|
||||
showVideo = showVideo,
|
||||
showBottomDiviser = showBottomDiviser,
|
||||
accountViewModel = accountViewModel,
|
||||
showImage = showImage,
|
||||
automaticallyStartPlayback = automaticallyStartPlayback,
|
||||
nav = nav
|
||||
)
|
||||
@@ -575,7 +562,6 @@ fun ChannelHeader(
|
||||
showFlag: Boolean = true,
|
||||
modifier: Modifier = StdPadding,
|
||||
accountViewModel: AccountViewModel,
|
||||
showImage: MutableState<Boolean>,
|
||||
automaticallyStartPlayback: MutableState<Boolean>,
|
||||
nav: (String) -> Unit
|
||||
) {
|
||||
@@ -597,7 +583,6 @@ fun ChannelHeader(
|
||||
showFlag,
|
||||
modifier,
|
||||
accountViewModel,
|
||||
showImage,
|
||||
automaticallyStartPlayback,
|
||||
nav
|
||||
)
|
||||
@@ -612,7 +597,6 @@ fun ChannelHeader(
|
||||
showFlag: Boolean = true,
|
||||
modifier: Modifier = StdPadding,
|
||||
accountViewModel: AccountViewModel,
|
||||
showImage: MutableState<Boolean>,
|
||||
automaticallyStartPlayback: MutableState<Boolean>,
|
||||
nav: (String) -> Unit
|
||||
) {
|
||||
|
Reference in New Issue
Block a user