@@ -70,44 +70,37 @@ fun BookmarksScreen(
7070 removeFromBookmarks : (String ) -> Unit ,
7171 modifier : Modifier = Modifier
7272) {
73- Scaffold (
74- containerColor = Color .Transparent ,
75- contentWindowInsets = WindowInsets (0 , 0 , 0 , 0 )
76- ) { innerPadding ->
77- val scrollableState = rememberLazyGridState()
78- TrackScrollJank (scrollableState = scrollableState, stateName = " bookmarks:grid" )
79- LazyVerticalGrid (
80- columns = Adaptive (300 .dp),
81- contentPadding = PaddingValues (16 .dp),
82- horizontalArrangement = Arrangement .spacedBy(32 .dp),
83- verticalArrangement = Arrangement .spacedBy(24 .dp),
84- state = scrollableState,
85- modifier = modifier
86- .fillMaxSize()
87- .testTag(" bookmarks:feed" )
88- .padding(innerPadding)
89- .consumedWindowInsets(innerPadding)
90- ) {
91- if (feedState is NewsFeedUiState .Loading ) {
92- item(span = { GridItemSpan (maxLineSpan) }) {
93- NiaLoadingWheel (
94- modifier = Modifier
95- .fillMaxWidth()
96- .wrapContentSize()
97- .testTag(" forYou:loading" ),
98- contentDesc = stringResource(id = R .string.saved_loading),
99- )
100- }
73+ val scrollableState = rememberLazyGridState()
74+ TrackScrollJank (scrollableState = scrollableState, stateName = " bookmarks:grid" )
75+ LazyVerticalGrid (
76+ columns = Adaptive (300 .dp),
77+ contentPadding = PaddingValues (16 .dp),
78+ horizontalArrangement = Arrangement .spacedBy(32 .dp),
79+ verticalArrangement = Arrangement .spacedBy(24 .dp),
80+ state = scrollableState,
81+ modifier = modifier
82+ .fillMaxSize()
83+ .testTag(" bookmarks:feed" )
84+ ) {
85+ if (feedState is NewsFeedUiState .Loading ) {
86+ item(span = { GridItemSpan (maxLineSpan) }) {
87+ NiaLoadingWheel (
88+ modifier = Modifier
89+ .fillMaxWidth()
90+ .wrapContentSize()
91+ .testTag(" forYou:loading" ),
92+ contentDesc = stringResource(id = R .string.saved_loading),
93+ )
10194 }
95+ }
10296
103- newsFeed(
104- feedState = feedState,
105- onNewsResourcesCheckedChanged = { id, _ -> removeFromBookmarks(id) },
106- )
97+ newsFeed(
98+ feedState = feedState,
99+ onNewsResourcesCheckedChanged = { id, _ -> removeFromBookmarks(id) },
100+ )
107101
108- item(span = { GridItemSpan (maxLineSpan) }) {
109- Spacer (Modifier .windowInsetsBottomHeight(WindowInsets .safeDrawing))
110- }
102+ item(span = { GridItemSpan (maxLineSpan) }) {
103+ Spacer (Modifier .windowInsetsBottomHeight(WindowInsets .safeDrawing))
111104 }
112105 }
113106}
0 commit comments