@@ -271,53 +271,93 @@ internal fun SettingsScreen(
271271 }
272272 }
273273
274- state.user.onSuccess {
275- Column (
276- verticalArrangement = Arrangement .spacedBy(ListItemDefaults .SegmentedGap ),
277- ) {
278- SegmentedListItem (
279- onClick = {
280- toLocalFilter.invoke()
281- },
282- shapes = ListItemDefaults .first(),
283- content = {
284- Text (text = stringResource(id = R .string.settings_local_filter_title))
285- },
286- leadingContent = {
287- ThemedIcon (
288- imageVector = FontAwesomeIcons .Solid .Filter ,
289- contentDescription = stringResource(id = R .string.settings_local_filter_title),
290- color = ThemeIconData .Color .BurntUmber ,
291- )
292- },
293- supportingContent = {
294- Text (text = stringResource(id = R .string.settings_local_filter_description))
295- },
296- )
297- SegmentedListItem (
298- onClick = {
299- toLocalHistory.invoke()
300- },
301- shapes = ListItemDefaults .item(),
302- content = {
303- Text (text = stringResource(id = R .string.settings_local_history_title))
304- },
305- leadingContent = {
306- ThemedIcon (
307- imageVector = FontAwesomeIcons .Solid .ClockRotateLeft ,
308- contentDescription = stringResource(id = R .string.settings_local_history_title),
309- color = ThemeIconData .Color .BurntUmber ,
310- )
311- },
312- supportingContent = {
313- Text (text = stringResource(id = R .string.settings_local_history_description))
314- },
315- )
274+ state.user
275+ .onSuccess {
276+ Column (
277+ verticalArrangement = Arrangement .spacedBy(ListItemDefaults .SegmentedGap ),
278+ ) {
279+ SegmentedListItem (
280+ onClick = {
281+ toLocalFilter.invoke()
282+ },
283+ shapes = ListItemDefaults .first(),
284+ content = {
285+ Text (text = stringResource(id = R .string.settings_local_filter_title))
286+ },
287+ leadingContent = {
288+ ThemedIcon (
289+ imageVector = FontAwesomeIcons .Solid .Filter ,
290+ contentDescription = stringResource(id = R .string.settings_local_filter_title),
291+ color = ThemeIconData .Color .BurntUmber ,
292+ )
293+ },
294+ supportingContent = {
295+ Text (text = stringResource(id = R .string.settings_local_filter_description))
296+ },
297+ )
298+ SegmentedListItem (
299+ onClick = {
300+ toLocalHistory.invoke()
301+ },
302+ shapes = ListItemDefaults .item(),
303+ content = {
304+ Text (text = stringResource(id = R .string.settings_local_history_title))
305+ },
306+ leadingContent = {
307+ ThemedIcon (
308+ imageVector = FontAwesomeIcons .Solid .ClockRotateLeft ,
309+ contentDescription = stringResource(id = R .string.settings_local_history_title),
310+ color = ThemeIconData .Color .BurntUmber ,
311+ )
312+ },
313+ supportingContent = {
314+ Text (text = stringResource(id = R .string.settings_local_history_description))
315+ },
316+ )
317+ SegmentedListItem (
318+ onClick = {
319+ toStorage.invoke()
320+ },
321+ shapes = ListItemDefaults .last(),
322+ content = {
323+ Text (text = stringResource(id = R .string.settings_storage_title))
324+ },
325+ leadingContent = {
326+ ThemedIcon (
327+ imageVector = FontAwesomeIcons .Solid .Database ,
328+ contentDescription = stringResource(id = R .string.settings_storage_title),
329+ color = ThemeIconData .Color .DarkAmber ,
330+ )
331+ },
332+ supportingContent = {
333+ Text (text = stringResource(id = R .string.settings_storage_subtitle))
334+ },
335+ )
336+ }
337+ // ListItem(
338+ // headlineContent = {
339+ // Text(text = stringResource(id = R.string.settings_notifications_title))
340+ // },
341+ // leadingContent = {
342+ // ThemedIcon(
343+ // imageVector = Icons.Default.Notifications,
344+ // contentDescription = null,
345+ // )
346+ // },
347+ // supportingContent = {
348+ // Text(text = stringResource(id = R.string.settings_notifications_subtitle))
349+ // },
350+ // modifier =
351+ // Modifier.clickable {
352+ // toNotifications.invoke()
353+ // },
354+ // )
355+ }.onError {
316356 SegmentedListItem (
317357 onClick = {
318358 toStorage.invoke()
319359 },
320- shapes = ListItemDefaults .last (),
360+ shapes = ListItemDefaults .single (),
321361 content = {
322362 Text (text = stringResource(id = R .string.settings_storage_title))
323363 },
@@ -333,25 +373,6 @@ internal fun SettingsScreen(
333373 },
334374 )
335375 }
336- // ListItem(
337- // headlineContent = {
338- // Text(text = stringResource(id = R.string.settings_notifications_title))
339- // },
340- // leadingContent = {
341- // ThemedIcon(
342- // imageVector = Icons.Default.Notifications,
343- // contentDescription = null,
344- // )
345- // },
346- // supportingContent = {
347- // Text(text = stringResource(id = R.string.settings_notifications_subtitle))
348- // },
349- // modifier =
350- // Modifier.clickable {
351- // toNotifications.invoke()
352- // },
353- // )
354- }
355376 SegmentedListItem (
356377 onClick = {
357378 toAiConfig.invoke()
0 commit comments