Skip to content

Commit

Permalink
[1.224.*] Pre-release merge (#697)
Browse files Browse the repository at this point in the history
  • Loading branch information
tramline-github[bot] authored Oct 28, 2024
2 parents 93d2e8f + 1fc8f9a commit f4e9713
Show file tree
Hide file tree
Showing 9 changed files with 85 additions and 190 deletions.
13 changes: 13 additions & 0 deletions android/proguard-rules-missing-classes.pro
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,16 @@
-dontwarn org.openjsse.javax.net.ssl.SSLParameters
-dontwarn org.openjsse.javax.net.ssl.SSLSocket
-dontwarn org.openjsse.net.ssl.OpenJSSE
-dontwarn androidx.window.extensions.WindowExtensions
-dontwarn androidx.window.extensions.WindowExtensionsProvider
-dontwarn androidx.window.extensions.area.ExtensionWindowAreaPresentation
-dontwarn androidx.window.extensions.layout.DisplayFeature
-dontwarn androidx.window.extensions.layout.FoldingFeature
-dontwarn androidx.window.extensions.layout.WindowLayoutComponent
-dontwarn androidx.window.extensions.layout.WindowLayoutInfo
-dontwarn androidx.window.sidecar.SidecarDeviceState
-dontwarn androidx.window.sidecar.SidecarDisplayFeature
-dontwarn androidx.window.sidecar.SidecarInterface$SidecarCallback
-dontwarn androidx.window.sidecar.SidecarInterface
-dontwarn androidx.window.sidecar.SidecarProvider
-dontwarn androidx.window.sidecar.SidecarWindowLayoutInfo
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ fun TwoPaneLayoutPostActions(

override fun viewComments(postId: String) {
viewModel.markPostAsRead(postId)
setSelectedPost(postId) // Update selectedPostId
setSelectedPost(postId)
}

override fun viewCommentsPage(post: UIPost) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
package dev.msfjarvis.claw.android.ui.lists

import androidx.activity.compose.ReportDrawnWhen
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
Expand Down Expand Up @@ -51,7 +50,6 @@ fun NetworkPosts(
postActions: PostActions,
contentPadding: PaddingValues,
modifier: Modifier = Modifier,
onPostClick: (String) -> Unit,
) {
ReportDrawnWhen { lazyPagingItems.itemCount > 0 }
val refreshLoadState by rememberUpdatedState(lazyPagingItems.loadState.refresh)
Expand Down Expand Up @@ -84,14 +82,7 @@ fun NetworkPosts(
) { index ->
val item = lazyPagingItems[index]
if (item != null) {
LobstersListItem(
item = item,
postActions = postActions,
modifier =
Modifier.clickable {
onPostClick(item.shortId) // Trigger the click listener
},
)
LobstersListItem(item = item, postActions = postActions)
HorizontalDivider()
}
}
Expand Down Expand Up @@ -121,7 +112,6 @@ private fun ListPreview() {
listState = rememberLazyListState(),
postActions = TEST_POST_ACTIONS,
contentPadding = PaddingValues(),
onPostClick = {},
)
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ fun SearchList(
setSearchQuery: (String) -> Unit,
contentPadding: PaddingValues,
modifier: Modifier = Modifier,
onPostClick: (String) -> Unit,
) {
val triggerSearch = { query: String ->
setSearchQuery(query)
Expand All @@ -54,7 +53,6 @@ fun SearchList(
listState = listState,
postActions = postActions,
contentPadding = contentPadding,
onPostClick = onPostClick,
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.shadow
import androidx.compose.ui.platform.LocalContext
Expand Down Expand Up @@ -90,7 +89,7 @@ import kotlinx.collections.immutable.persistentMapOf
import kotlinx.collections.immutable.toPersistentList
import kotlinx.coroutines.launch

@OptIn(ExperimentalComposeUiApi::class, ExperimentalMaterial3Api::class)
@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun LobstersPostsScreen(
urlLauncher: UrlLauncher,
Expand Down Expand Up @@ -238,7 +237,6 @@ fun LobstersPostsScreen(
listState = hottestListState,
postActions = postActions,
contentPadding = contentPadding,
onPostClick = { postId -> navController.navigate(Comments(postId)) },
)
}
composable<Newest> {
Expand All @@ -248,7 +246,6 @@ fun LobstersPostsScreen(
listState = newestListState,
postActions = postActions,
contentPadding = contentPadding,
onPostClick = { postId -> navController.navigate(Comments(postId)) },
)
}
composable<Saved> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ fun SearchScreen(
val listState = rememberLazyListState()
val searchResults = viewModel.searchResults.collectAsLazyPagingItems()

val onPostClick: (String) -> Unit = { postId -> navController.navigate("comments/$postId") }
Scaffold(modifier = modifier) { contentPadding ->
NavHost(navController = navController, startDestination = Search) {
composable<Search> {
Expand All @@ -55,7 +54,6 @@ fun SearchScreen(
searchQuery = viewModel.searchQuery,
contentPadding = contentPadding,
setSearchQuery = { query -> viewModel.searchQuery = query },
onPostClick = onPostClick,
)
}
composable<Comments> { backStackEntry ->
Expand Down
Loading

0 comments on commit f4e9713

Please sign in to comment.