diff --git a/app/src/main/java/com/jerboa/ui/components/comment/CommentNode.kt b/app/src/main/java/com/jerboa/ui/components/comment/CommentNode.kt index 4e3560957..f1e35ec68 100644 --- a/app/src/main/java/com/jerboa/ui/components/comment/CommentNode.kt +++ b/app/src/main/java/com/jerboa/ui/components/comment/CommentNode.kt @@ -14,7 +14,17 @@ import androidx.compose.material.Divider import androidx.compose.material.MaterialTheme import androidx.compose.material.Text import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.* +import androidx.compose.material.icons.outlined.* +import androidx.compose.material.icons.outlined.Block +import androidx.compose.material.icons.outlined.BookmarkAdd +import androidx.compose.material.icons.outlined.BookmarkAdded +import androidx.compose.material.icons.outlined.Delete +import androidx.compose.material.icons.outlined.Description +import androidx.compose.material.icons.outlined.Edit +import androidx.compose.material.icons.outlined.Flag +import androidx.compose.material.icons.outlined.Link +import androidx.compose.material.icons.outlined.MoreVert +import androidx.compose.material.icons.outlined.Restore import androidx.compose.runtime.* import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier @@ -359,10 +369,14 @@ fun CommentFooterLine( ) if (showRead) { ActionBarButton( - icon = Icons.Filled.Check, + icon = if (commentView.comment.read) { + Icons.Outlined.MarkChatRead + } else { + Icons.Outlined.MarkChatUnread + }, onClick = { onMarkAsReadClick(commentView) }, contentColor = if (commentView.comment.read) { - Color.Green + MaterialTheme.colors.primary } else { MaterialTheme.colors.onBackground.muted }, @@ -370,13 +384,12 @@ fun CommentFooterLine( ) } ActionBarButton( - icon = if (commentView.saved) { Icons.Default.BookmarkAdded } else { - Icons.Default - .BookmarkAdd + icon = if (commentView.saved) { Icons.Outlined.BookmarkAdded } else { + Icons.Outlined.BookmarkAdd }, onClick = { onSaveClick(commentView) }, contentColor = if (commentView.saved) { - Color.Yellow + MaterialTheme.colors.primary } else { MaterialTheme.colors.onBackground.muted }, @@ -385,13 +398,13 @@ fun CommentFooterLine( // Don't let you respond to your own comment. if (commentView.creator.id != account?.id) { ActionBarButton( - icon = Icons.Filled.Reply, + icon = Icons.Outlined.Textsms, onClick = { onReplyClick(commentView) }, account = account ) } ActionBarButton( - icon = Icons.Filled.MoreVert, + icon = Icons.Outlined.MoreVert, account = account, onClick = { showMoreOptions = !showMoreOptions } ) @@ -447,12 +460,12 @@ fun CommentOptionsDialog( Column { IconAndTextDrawerItem( text = "View Source", - icon = Icons.Default.Description, + icon = Icons.Outlined.Description, onClick = onViewSourceClick ) IconAndTextDrawerItem( text = "Copy Permalink", - icon = Icons.Default.Link, + icon = Icons.Outlined.Link, onClick = { val permalink = "${commentView.post.ap_id}/comment/${commentView.comment.id}" localClipboardManager.setText(AnnotatedString(permalink)) @@ -463,32 +476,32 @@ fun CommentOptionsDialog( if (!isCreator) { IconAndTextDrawerItem( text = "Report Comment", - icon = Icons.Default.Flag, + icon = Icons.Outlined.Flag, onClick = onReportClick ) IconAndTextDrawerItem( text = "Block ${commentView.creator.name}", - icon = Icons.Default.Block, + icon = Icons.Outlined.Block, onClick = onBlockCreatorClick ) } if (isCreator) { IconAndTextDrawerItem( text = "Edit", - icon = Icons.Default.Edit, + icon = Icons.Outlined.Edit, onClick = onEditCommentClick ) val deleted = commentView.comment.deleted if (deleted) { IconAndTextDrawerItem( text = "Restore", - icon = Icons.Default.Restore, + icon = Icons.Outlined.Restore, onClick = onDeleteCommentClick ) } else { IconAndTextDrawerItem( text = "Delete", - icon = Icons.Default.Delete, + icon = Icons.Outlined.Delete, onClick = onDeleteCommentClick ) } diff --git a/app/src/main/java/com/jerboa/ui/components/comment/edit/CommentEdit.kt b/app/src/main/java/com/jerboa/ui/components/comment/edit/CommentEdit.kt index 9064da842..5eced42ee 100644 --- a/app/src/main/java/com/jerboa/ui/components/comment/edit/CommentEdit.kt +++ b/app/src/main/java/com/jerboa/ui/components/comment/edit/CommentEdit.kt @@ -6,8 +6,9 @@ import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.verticalScroll import androidx.compose.material.* import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Close -import androidx.compose.material.icons.filled.Save +import androidx.compose.material.icons.outlined.* +import androidx.compose.material.icons.outlined.Close +import androidx.compose.material.icons.outlined.Save import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.text.input.TextFieldValue @@ -46,7 +47,7 @@ fun CommentEditHeader( ) } else { Icon( - imageVector = Icons.Default.Save, + imageVector = Icons.Outlined.Save, contentDescription = "TODO" ) } @@ -59,7 +60,7 @@ fun CommentEditHeader( } ) { Icon( - Icons.Filled.Close, + Icons.Outlined.Close, contentDescription = "Back" ) } diff --git a/app/src/main/java/com/jerboa/ui/components/comment/reply/CommentReply.kt b/app/src/main/java/com/jerboa/ui/components/comment/reply/CommentReply.kt index d2f7f27ac..3e88a142f 100644 --- a/app/src/main/java/com/jerboa/ui/components/comment/reply/CommentReply.kt +++ b/app/src/main/java/com/jerboa/ui/components/comment/reply/CommentReply.kt @@ -8,8 +8,9 @@ import androidx.compose.foundation.text.selection.SelectionContainer import androidx.compose.foundation.verticalScroll import androidx.compose.material.* import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Close -import androidx.compose.material.icons.filled.Send +import androidx.compose.material.icons.outlined.* +import androidx.compose.material.icons.outlined.Close +import androidx.compose.material.icons.outlined.Send import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.text.input.TextFieldValue @@ -54,7 +55,7 @@ fun CommentReplyHeader( ) } else { Icon( - imageVector = Icons.Default.Send, + imageVector = Icons.Outlined.Send, contentDescription = "TODO" ) } @@ -67,7 +68,7 @@ fun CommentReplyHeader( } ) { Icon( - Icons.Filled.Close, + Icons.Outlined.Close, contentDescription = "Back" ) } diff --git a/app/src/main/java/com/jerboa/ui/components/common/AppBars.kt b/app/src/main/java/com/jerboa/ui/components/common/AppBars.kt index 7b7c4538b..55d4de219 100644 --- a/app/src/main/java/com/jerboa/ui/components/common/AppBars.kt +++ b/app/src/main/java/com/jerboa/ui/components/common/AppBars.kt @@ -12,7 +12,7 @@ import androidx.compose.foundation.lazy.LazyListState import androidx.compose.foundation.lazy.rememberLazyListState import androidx.compose.material.* import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.* +import androidx.compose.material.icons.outlined.* import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.ui.Alignment @@ -61,7 +61,7 @@ fun SimpleTopAppBar( navigationIcon = { IconButton(onClick = { navController.popBackStack() }) { Icon( - Icons.Filled.ArrowBack, + Icons.Outlined.ArrowBack, contentDescription = "Back" ) } @@ -87,7 +87,7 @@ fun BottomAppBarAll( BottomNavigationItem( icon = { Icon( - imageVector = Icons.Default.Home, + imageVector = Icons.Outlined.Home, contentDescription = "TODO" ) }, @@ -102,7 +102,7 @@ fun BottomAppBarAll( BottomNavigationItem( icon = { Icon( - imageVector = Icons.Default.List, + imageVector = Icons.Outlined.List, contentDescription = "TODO" ) }, @@ -117,7 +117,7 @@ fun BottomAppBarAll( icon = { InboxIconAndBadge( iconBadgeCount = totalUnreads, - icon = Icons.Default.Email, + icon = Icons.Outlined.Email, tint = if (screen == "inbox") { MaterialTheme.colors.primary } else { @@ -135,7 +135,7 @@ fun BottomAppBarAll( BottomNavigationItem( icon = { Icon( - imageVector = Icons.Default.Bookmarks, + imageVector = Icons.Outlined.Bookmarks, contentDescription = "TODO" ) }, @@ -149,7 +149,7 @@ fun BottomAppBarAll( BottomNavigationItem( icon = { Icon( - imageVector = Icons.Default.Person, + imageVector = Icons.Outlined.Person, contentDescription = "TODO" ) }, @@ -204,7 +204,7 @@ fun CommentOrPostNodeHeader( ) { if (deleted) { Icon( - imageVector = Icons.Default.Delete, + imageVector = Icons.Outlined.Delete, contentDescription = "TODO", tint = MaterialTheme.colors.error ) @@ -243,8 +243,7 @@ fun ActionBarButton( text: String? = null, contentColor: Color = MaterialTheme.colors.onBackground.muted, noClick: Boolean = false, - account: Account?, - smallIcon: Boolean = false + account: Account? ) { val ctx = LocalContext.current // Button( @@ -260,7 +259,6 @@ fun ActionBarButton( // modifier = Modifier // .defaultMinSize(minWidth = 1.dp, minHeight = 1.dp) // ) - val iconHeight = if (smallIcon) { ACTION_BAR_ICON_SIZE_SMALLER } else { ACTION_BAR_ICON_SIZE } val barMod = if (noClick) { Modifier } else { @@ -279,14 +277,14 @@ fun ActionBarButton( Icon( imageVector = icon, contentDescription = "TODO", - tint = contentColor, - modifier = Modifier.height(iconHeight) + tint = contentColor ) text?.also { Spacer(Modifier.size(ButtonDefaults.IconSpacing)) Text( text = text, - color = contentColor + color = contentColor, + style = MaterialTheme.typography.body2 ) } } diff --git a/app/src/main/java/com/jerboa/ui/components/common/Dialogs.kt b/app/src/main/java/com/jerboa/ui/components/common/Dialogs.kt index 12eec6917..2d52c6c8d 100644 --- a/app/src/main/java/com/jerboa/ui/components/common/Dialogs.kt +++ b/app/src/main/java/com/jerboa/ui/components/common/Dialogs.kt @@ -13,17 +13,17 @@ import androidx.compose.material.AlertDialog import androidx.compose.material.Button import androidx.compose.material.Text import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.BarChart -import androidx.compose.material.icons.filled.Bookmarks -import androidx.compose.material.icons.filled.BrightnessLow -import androidx.compose.material.icons.filled.FormatListNumbered -import androidx.compose.material.icons.filled.List -import androidx.compose.material.icons.filled.LocalFireDepartment -import androidx.compose.material.icons.filled.LocationCity -import androidx.compose.material.icons.filled.MarkunreadMailbox -import androidx.compose.material.icons.filled.Moving -import androidx.compose.material.icons.filled.NewReleases -import androidx.compose.material.icons.filled.Public +import androidx.compose.material.icons.outlined.BarChart +import androidx.compose.material.icons.outlined.Bookmarks +import androidx.compose.material.icons.outlined.BrightnessLow +import androidx.compose.material.icons.outlined.FormatListNumbered +import androidx.compose.material.icons.outlined.List +import androidx.compose.material.icons.outlined.LocalFireDepartment +import androidx.compose.material.icons.outlined.LocationCity +import androidx.compose.material.icons.outlined.MarkunreadMailbox +import androidx.compose.material.icons.outlined.Moving +import androidx.compose.material.icons.outlined.NewReleases +import androidx.compose.material.icons.outlined.Public import androidx.compose.runtime.Composable import androidx.compose.runtime.livedata.observeAsState import androidx.compose.runtime.mutableStateOf @@ -114,20 +114,20 @@ fun ListingTypeOptionsDialog( Column { IconAndTextDrawerItem( text = "Subscribed", - icon = Icons.Default.Bookmarks, + icon = Icons.Outlined.Bookmarks, onClick = { onClickListingType(ListingType.Subscribed) }, highlight = (selectedListingType == ListingType.Subscribed) ) // TODO hide local for non-federated instances IconAndTextDrawerItem( text = "Local", - icon = Icons.Default.LocationCity, + icon = Icons.Outlined.LocationCity, onClick = { onClickListingType(ListingType.Local) }, highlight = (selectedListingType == ListingType.Local) ) IconAndTextDrawerItem( text = "All", - icon = Icons.Default.Public, + icon = Icons.Outlined.Public, onClick = { onClickListingType(ListingType.All) }, highlight = (selectedListingType == ListingType.All) ) @@ -150,37 +150,37 @@ fun SortOptionsDialog( Column { IconAndTextDrawerItem( text = "Active", - icon = Icons.Default.Moving, + icon = Icons.Outlined.Moving, onClick = { onClickSortType(SortType.Active) }, highlight = (selectedSortType == SortType.Active) ) IconAndTextDrawerItem( text = "Hot", - icon = Icons.Default.LocalFireDepartment, + icon = Icons.Outlined.LocalFireDepartment, onClick = { onClickSortType(SortType.Hot) }, highlight = (selectedSortType == SortType.Hot) ) IconAndTextDrawerItem( text = "New", - icon = Icons.Default.BrightnessLow, + icon = Icons.Outlined.BrightnessLow, onClick = { onClickSortType(SortType.New) }, highlight = (selectedSortType == SortType.New) ) IconAndTextDrawerItem( text = "Most Comments", - icon = Icons.Default.FormatListNumbered, + icon = Icons.Outlined.FormatListNumbered, onClick = { onClickSortType(SortType.MostComments) }, highlight = (selectedSortType == SortType.MostComments) ) IconAndTextDrawerItem( text = "New Comments", - icon = Icons.Default.NewReleases, + icon = Icons.Outlined.NewReleases, onClick = { onClickSortType(SortType.NewComments) }, highlight = (selectedSortType == SortType.NewComments) ) IconAndTextDrawerItem( text = "Top", - icon = Icons.Default.BarChart, + icon = Icons.Outlined.BarChart, onClick = onClickSortTopOptions, more = true, highlight = (topSortTypes.contains(selectedSortType)) @@ -203,14 +203,14 @@ fun UnreadOrAllOptionsDialog( Column { IconAndTextDrawerItem( text = "All", - icon = Icons.Default.List, + icon = Icons.Outlined.List, onClick = { onClickUnreadOrAll(UnreadOrAll.All) }, highlight = (selectedUnreadOrAll == UnreadOrAll.All) ) // TODO hide local for non-federated instances IconAndTextDrawerItem( text = "Unread", - icon = Icons.Default.MarkunreadMailbox, + icon = Icons.Outlined.MarkunreadMailbox, onClick = { onClickUnreadOrAll(UnreadOrAll.Unread) }, highlight = (selectedUnreadOrAll == UnreadOrAll.Unread) ) diff --git a/app/src/main/java/com/jerboa/ui/components/common/DrawerItems.kt b/app/src/main/java/com/jerboa/ui/components/common/DrawerItems.kt index d5994d071..0f3b4d086 100644 --- a/app/src/main/java/com/jerboa/ui/components/common/DrawerItems.kt +++ b/app/src/main/java/com/jerboa/ui/components/common/DrawerItems.kt @@ -11,7 +11,7 @@ import androidx.compose.material.Icon import androidx.compose.material.MaterialTheme import androidx.compose.material.Text import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.ArrowRight +import androidx.compose.material.icons.outlined.ArrowRight import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier @@ -64,7 +64,7 @@ fun IconAndTextDrawerItem( } if (more) { Icon( - imageVector = Icons.Default.ArrowRight, + imageVector = Icons.Outlined.ArrowRight, contentDescription = "TODO", tint = MaterialTheme.colors.onSurface, modifier = Modifier.size(24.dp) diff --git a/app/src/main/java/com/jerboa/ui/components/common/InputFields.kt b/app/src/main/java/com/jerboa/ui/components/common/InputFields.kt index 2d3d6a16f..93fd5481f 100644 --- a/app/src/main/java/com/jerboa/ui/components/common/InputFields.kt +++ b/app/src/main/java/com/jerboa/ui/components/common/InputFields.kt @@ -12,7 +12,7 @@ import androidx.compose.foundation.text.KeyboardOptions import androidx.compose.foundation.verticalScroll import androidx.compose.material.* import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.* +import androidx.compose.material.icons.outlined.* import androidx.compose.runtime.* import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.ui.Alignment @@ -422,7 +422,7 @@ fun MarkdownHelperBar( onClick = onPreviewClick ) { Icon( - imageVector = Icons.Default.Preview, + imageVector = Icons.Outlined.Preview, contentDescription = "TODO", tint = MaterialTheme.colors.onBackground.muted ) @@ -431,7 +431,7 @@ fun MarkdownHelperBar( onClick = onLinkClick ) { Icon( - imageVector = Icons.Default.Link, + imageVector = Icons.Outlined.Link, contentDescription = "TODO", tint = MaterialTheme.colors.onBackground.muted ) @@ -446,7 +446,7 @@ fun MarkdownHelperBar( ) } else { Icon( - imageVector = Icons.Default.Image, + imageVector = Icons.Outlined.Image, contentDescription = "TODO", tint = MaterialTheme.colors.onBackground.muted ) @@ -456,7 +456,7 @@ fun MarkdownHelperBar( onClick = onBoldClick ) { Icon( - imageVector = Icons.Default.FormatBold, + imageVector = Icons.Outlined.FormatBold, contentDescription = "TODO", tint = MaterialTheme.colors.onBackground.muted ) @@ -465,7 +465,7 @@ fun MarkdownHelperBar( onClick = onItalicsClick ) { Icon( - imageVector = Icons.Default.FormatItalic, + imageVector = Icons.Outlined.FormatItalic, contentDescription = "TODO", tint = MaterialTheme.colors.onBackground.muted ) @@ -474,7 +474,7 @@ fun MarkdownHelperBar( onClick = onQuoteClick ) { Icon( - imageVector = Icons.Default.FormatQuote, + imageVector = Icons.Outlined.FormatQuote, contentDescription = "TODO", tint = MaterialTheme.colors.onBackground.muted ) @@ -483,7 +483,7 @@ fun MarkdownHelperBar( onClick = onListClick ) { Icon( - imageVector = Icons.Default.FormatListBulleted, + imageVector = Icons.Outlined.FormatListBulleted, contentDescription = "TODO", tint = MaterialTheme.colors.onBackground.muted ) @@ -492,7 +492,7 @@ fun MarkdownHelperBar( onClick = onHeaderClick ) { Icon( - imageVector = Icons.Default.Title, + imageVector = Icons.Outlined.Title, contentDescription = "TODO", tint = MaterialTheme.colors.onBackground.muted ) @@ -501,7 +501,7 @@ fun MarkdownHelperBar( onClick = onCodeClick ) { Icon( - imageVector = Icons.Default.Code, + imageVector = Icons.Outlined.Code, contentDescription = "TODO", tint = MaterialTheme.colors.onBackground.muted ) @@ -510,7 +510,7 @@ fun MarkdownHelperBar( onClick = onStrikethroughClick ) { Icon( - imageVector = Icons.Default.FormatStrikethrough, + imageVector = Icons.Outlined.FormatStrikethrough, contentDescription = "TODO", tint = MaterialTheme.colors.onBackground.muted ) @@ -519,7 +519,7 @@ fun MarkdownHelperBar( onClick = onSubscriptClick ) { Icon( - imageVector = Icons.Default.Subscript, + imageVector = Icons.Outlined.Subscript, contentDescription = "TODO", tint = MaterialTheme.colors.onBackground.muted ) @@ -528,7 +528,7 @@ fun MarkdownHelperBar( onClick = onSuperscriptClick ) { Icon( - imageVector = Icons.Default.Superscript, + imageVector = Icons.Outlined.Superscript, contentDescription = "TODO", tint = MaterialTheme.colors.onBackground.muted ) diff --git a/app/src/main/java/com/jerboa/ui/components/common/TimeAgo.kt b/app/src/main/java/com/jerboa/ui/components/common/TimeAgo.kt index bc3cdced0..e46e7238a 100644 --- a/app/src/main/java/com/jerboa/ui/components/common/TimeAgo.kt +++ b/app/src/main/java/com/jerboa/ui/components/common/TimeAgo.kt @@ -12,7 +12,7 @@ import com.jerboa.prettyTimeShortener import com.jerboa.ui.theme.SMALL_PADDING import com.jerboa.ui.theme.muted import java.time.Instant -import java.util.* +import java.util.Date @Composable fun TimeAgo( diff --git a/app/src/main/java/com/jerboa/ui/components/common/VoteHelpers.kt b/app/src/main/java/com/jerboa/ui/components/common/VoteHelpers.kt index 217923bda..ed416e5fd 100644 --- a/app/src/main/java/com/jerboa/ui/components/common/VoteHelpers.kt +++ b/app/src/main/java/com/jerboa/ui/components/common/VoteHelpers.kt @@ -2,8 +2,8 @@ package com.jerboa.ui.components.common import androidx.compose.material.MaterialTheme import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.ArrowDownward -import androidx.compose.material.icons.filled.ArrowUpward +import androidx.compose.material.icons.outlined.FavoriteBorder +import androidx.compose.material.icons.outlined.ThumbDown import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.Color import com.jerboa.VoteType @@ -26,8 +26,8 @@ fun VoteGeneric( else -> downvoteColor(myVote = myVote) } val voteIcon = when (type) { - VoteType.Upvote -> Icons.Default.ArrowUpward - else -> Icons.Default.ArrowDownward + VoteType.Upvote -> Icons.Outlined.FavoriteBorder + else -> Icons.Outlined.ThumbDown } val votesStr = if (showNumber) { diff --git a/app/src/main/java/com/jerboa/ui/components/community/Community.kt b/app/src/main/java/com/jerboa/ui/components/community/Community.kt index 7d45c8743..c5e89fb64 100644 --- a/app/src/main/java/com/jerboa/ui/components/community/Community.kt +++ b/app/src/main/java/com/jerboa/ui/components/community/Community.kt @@ -4,7 +4,7 @@ import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.* import androidx.compose.material.* import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.* +import androidx.compose.material.icons.outlined.* import androidx.compose.runtime.* import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier @@ -61,7 +61,7 @@ fun CommunityTopSection( ) Spacer(Modifier.size(ButtonDefaults.IconSpacing)) Icon( - imageVector = Icons.Default.CheckCircle, + imageVector = Icons.Outlined.CheckCircle, contentDescription = "TODO", tint = if (communityView.subscribed) { Color.Green @@ -160,7 +160,7 @@ fun CommunityHeader( navigationIcon = { IconButton(onClick = { navController.popBackStack() }) { Icon( - Icons.Filled.ArrowBack, + Icons.Outlined.ArrowBack, contentDescription = "Back", tint = contentColor ) @@ -171,7 +171,7 @@ fun CommunityHeader( showSortOptions = !showSortOptions }) { Icon( - Icons.Default.Sort, + Icons.Outlined.Sort, contentDescription = "TODO", tint = contentColor ) @@ -180,7 +180,7 @@ fun CommunityHeader( showMoreOptions = !showMoreOptions }) { Icon( - Icons.Default.MoreVert, + Icons.Outlined.MoreVert, contentDescription = "TODO", tint = contentColor ) @@ -220,7 +220,7 @@ fun CommunityMoreDialog( Column { IconAndTextDrawerItem( text = "Refresh", - icon = Icons.Default.Refresh, + icon = Icons.Outlined.Refresh, onClick = { onDismissRequest() onClickRefresh() @@ -228,7 +228,7 @@ fun CommunityMoreDialog( ) IconAndTextDrawerItem( text = "Community Info", - icon = Icons.Default.Info, + icon = Icons.Outlined.Info, onClick = { navController.navigate("communitySidebar") onDismissRequest() @@ -236,7 +236,7 @@ fun CommunityMoreDialog( ) IconAndTextDrawerItem( text = "Block Community", - icon = Icons.Default.Block, + icon = Icons.Outlined.Block, onClick = onBlockCommunityClick ) } diff --git a/app/src/main/java/com/jerboa/ui/components/community/CommunityActivity.kt b/app/src/main/java/com/jerboa/ui/components/community/CommunityActivity.kt index 7920fcd87..d8068198f 100644 --- a/app/src/main/java/com/jerboa/ui/components/community/CommunityActivity.kt +++ b/app/src/main/java/com/jerboa/ui/components/community/CommunityActivity.kt @@ -12,7 +12,7 @@ import androidx.compose.material.MaterialTheme import androidx.compose.material.Scaffold import androidx.compose.material.Surface import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Add +import androidx.compose.material.icons.outlined.* import androidx.compose.material.rememberScaffoldState import androidx.compose.runtime.Composable import androidx.compose.runtime.rememberCoroutineScope @@ -227,7 +227,7 @@ fun CommunityActivity( } } ) { - Icon(imageVector = Icons.Default.Add, contentDescription = "TODO") + Icon(imageVector = Icons.Outlined.Add, contentDescription = "TODO") } }, bottomBar = { diff --git a/app/src/main/java/com/jerboa/ui/components/community/list/CommunityList.kt b/app/src/main/java/com/jerboa/ui/components/community/list/CommunityList.kt index dc59e1fda..53c48729e 100644 --- a/app/src/main/java/com/jerboa/ui/components/community/list/CommunityList.kt +++ b/app/src/main/java/com/jerboa/ui/components/community/list/CommunityList.kt @@ -14,8 +14,8 @@ import androidx.compose.material.TextFieldDefaults import androidx.compose.material.TopAppBar import androidx.compose.material.contentColorFor import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Close -import androidx.compose.material.icons.filled.MoreVert +import androidx.compose.material.icons.outlined.* +import androidx.compose.material.icons.outlined.MoreVert import androidx.compose.material.primarySurface import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier @@ -58,7 +58,7 @@ fun CommunityListHeader( } ) { Icon( - imageVector = Icons.Default.MoreVert, + imageVector = Icons.Outlined.MoreVert, contentDescription = "TODO", tint = contentColor ) @@ -71,7 +71,7 @@ fun CommunityListHeader( } ) { Icon( - Icons.Filled.Close, + Icons.Outlined.Close, contentDescription = "Back" ) } @@ -173,7 +173,7 @@ fun CommunityTopBarSearchView( onClick = { onSearchChange("") } ) { Icon( - Icons.Default.Close, + Icons.Outlined.Close, contentDescription = "", tint = contentColor ) diff --git a/app/src/main/java/com/jerboa/ui/components/home/Home.kt b/app/src/main/java/com/jerboa/ui/components/home/Home.kt index b30887923..dd1354110 100644 --- a/app/src/main/java/com/jerboa/ui/components/home/Home.kt +++ b/app/src/main/java/com/jerboa/ui/components/home/Home.kt @@ -4,30 +4,84 @@ import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.expandVertically import androidx.compose.animation.shrinkVertically import androidx.compose.foundation.clickable -import androidx.compose.foundation.layout.* +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items import androidx.compose.foundation.lazy.rememberLazyListState -import androidx.compose.material.* +import androidx.compose.material.AlertDialog +import androidx.compose.material.Divider +import androidx.compose.material.DrawerValue +import androidx.compose.material.Icon +import androidx.compose.material.IconButton +import androidx.compose.material.MaterialTheme +import androidx.compose.material.ScaffoldState +import androidx.compose.material.Text +import androidx.compose.material.TopAppBar +import androidx.compose.material.contentColorFor import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.* -import androidx.compose.runtime.* +import androidx.compose.material.icons.outlined.Add +import androidx.compose.material.icons.outlined.Bookmarks +import androidx.compose.material.icons.outlined.Close +import androidx.compose.material.icons.outlined.Email +import androidx.compose.material.icons.outlined.ExpandLess +import androidx.compose.material.icons.outlined.ExpandMore +import androidx.compose.material.icons.outlined.FilterList +import androidx.compose.material.icons.outlined.Info +import androidx.compose.material.icons.outlined.LocationCity +import androidx.compose.material.icons.outlined.Login +import androidx.compose.material.icons.outlined.Menu +import androidx.compose.material.icons.outlined.MoreVert +import androidx.compose.material.icons.outlined.Person +import androidx.compose.material.icons.outlined.Public +import androidx.compose.material.icons.outlined.Refresh +import androidx.compose.material.icons.outlined.Settings +import androidx.compose.material.icons.outlined.Sort +import androidx.compose.material.primarySurface +import androidx.compose.material.rememberDrawerState +import androidx.compose.material.rememberScaffoldState +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.tooling.preview.Preview import androidx.navigation.NavController import androidx.navigation.compose.rememberNavController -import com.jerboa.datatypes.* +import com.jerboa.datatypes.CommunitySafe +import com.jerboa.datatypes.ListingType +import com.jerboa.datatypes.PersonSafe +import com.jerboa.datatypes.SortType import com.jerboa.datatypes.api.GetUnreadCountResponse import com.jerboa.datatypes.api.MyUserInfo +import com.jerboa.datatypes.samplePersonSafe import com.jerboa.db.Account import com.jerboa.db.AccountViewModel -import com.jerboa.ui.components.common.* +import com.jerboa.ui.components.common.IconAndTextDrawerItem +import com.jerboa.ui.components.common.LargerCircularIcon +import com.jerboa.ui.components.common.ListingTypeOptionsDialog +import com.jerboa.ui.components.common.PictrsBannerImage +import com.jerboa.ui.components.common.SortOptionsDialog +import com.jerboa.ui.components.common.SortTopOptionsDialog +import com.jerboa.ui.components.common.simpleVerticalScrollbar import com.jerboa.ui.components.community.CommunityLinkLarger import com.jerboa.ui.components.person.PersonName -import com.jerboa.ui.theme.* +import com.jerboa.ui.theme.APP_BAR_ELEVATION +import com.jerboa.ui.theme.DRAWER_BANNER_SIZE +import com.jerboa.ui.theme.LARGE_PADDING +import com.jerboa.ui.theme.SMALL_PADDING +import com.jerboa.ui.theme.XL_PADDING +import com.jerboa.ui.theme.muted import com.jerboa.unreadCountTotal import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.launch @@ -140,7 +194,7 @@ fun DrawerItemsMain( item { IconAndTextDrawerItem( text = "Subscribed", - icon = Icons.Default.Bookmarks, + icon = Icons.Outlined.Bookmarks, onClick = { onClickListingType(ListingType.Subscribed) } ) } @@ -148,14 +202,14 @@ fun DrawerItemsMain( item { IconAndTextDrawerItem( text = "Local", - icon = Icons.Default.LocationCity, + icon = Icons.Outlined.LocationCity, onClick = { onClickListingType(ListingType.Local) } ) } item { IconAndTextDrawerItem( text = "All", - icon = Icons.Default.Public, + icon = Icons.Outlined.Public, onClick = { onClickListingType(ListingType.All) } ) } @@ -163,7 +217,7 @@ fun DrawerItemsMain( myUserInfo?.also { IconAndTextDrawerItem( text = "Saved", - icon = Icons.Default.Bookmarks, + icon = Icons.Outlined.Bookmarks, onClick = onClickSaved ) } @@ -177,7 +231,7 @@ fun DrawerItemsMain( myUserInfo?.also { IconAndTextDrawerItem( text = "Profile", - icon = Icons.Default.Person, + icon = Icons.Outlined.Person, onClick = onClickProfile ) } @@ -186,7 +240,7 @@ fun DrawerItemsMain( myUserInfo?.also { IconAndTextDrawerItem( text = "Inbox", - icon = Icons.Default.Email, + icon = Icons.Outlined.Email, onClick = onClickInbox, iconBadgeCount = totalUnreads ) @@ -196,7 +250,7 @@ fun DrawerItemsMain( myUserInfo?.also { IconAndTextDrawerItem( text = "Settings", - icon = Icons.Default.Settings, + icon = Icons.Outlined.Settings, onClick = onClickSettings ) } @@ -256,20 +310,20 @@ fun DrawerAddAccountMode( Column { IconAndTextDrawerItem( text = "Add Account", - icon = Icons.Default.Add, + icon = Icons.Outlined.Add, onClick = { navController.navigate(route = "login") } ) accountsWithoutCurrent?.forEach { IconAndTextDrawerItem( text = "Switch to ${it.instance}/${it.name}", - icon = Icons.Default.Login, + icon = Icons.Outlined.Login, onClick = { onSwitchAccountClick(it) } ) } currentAccount?.also { IconAndTextDrawerItem( text = "Sign Out", - icon = Icons.Default.Close, + icon = Icons.Outlined.Close, onClick = onSignOutClick ) } @@ -315,9 +369,9 @@ fun DrawerHeader( AvatarAndAccountName(myPerson) Icon( imageVector = if (showAccountAddMode) { - Icons.Default.ExpandLess + Icons.Outlined.ExpandLess } else { - Icons.Default.ExpandMore + Icons.Outlined.ExpandMore }, contentDescription = "TODO" ) @@ -449,7 +503,7 @@ fun HomeHeader( } }) { Icon( - Icons.Filled.Menu, + Icons.Outlined.Menu, contentDescription = "Menu" ) } @@ -460,7 +514,7 @@ fun HomeHeader( showListingTypeOptions = !showListingTypeOptions }) { Icon( - Icons.Default.FilterList, + Icons.Outlined.FilterList, contentDescription = "TODO", tint = contentColor ) @@ -469,7 +523,7 @@ fun HomeHeader( showSortOptions = !showSortOptions }) { Icon( - Icons.Default.Sort, + Icons.Outlined.Sort, contentDescription = "TODO", tint = contentColor ) @@ -478,7 +532,7 @@ fun HomeHeader( showMoreOptions = !showMoreOptions }) { Icon( - Icons.Default.MoreVert, + Icons.Outlined.MoreVert, contentDescription = "TODO", tint = contentColor ) @@ -517,7 +571,7 @@ fun HomeMoreDialog( Column { IconAndTextDrawerItem( text = "Refresh", - icon = Icons.Default.Refresh, + icon = Icons.Outlined.Refresh, onClick = { onDismissRequest() onClickRefresh() @@ -525,7 +579,7 @@ fun HomeMoreDialog( ) IconAndTextDrawerItem( text = "Site Info", - icon = Icons.Default.Info, + icon = Icons.Outlined.Info, onClick = { navController.navigate("siteSidebar") onDismissRequest() diff --git a/app/src/main/java/com/jerboa/ui/components/home/HomeActivity.kt b/app/src/main/java/com/jerboa/ui/components/home/HomeActivity.kt index 1fe7a0e92..05a53cc07 100644 --- a/app/src/main/java/com/jerboa/ui/components/home/HomeActivity.kt +++ b/app/src/main/java/com/jerboa/ui/components/home/HomeActivity.kt @@ -16,7 +16,7 @@ import androidx.compose.material.Scaffold import androidx.compose.material.ScaffoldState import androidx.compose.material.Surface import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Add +import androidx.compose.material.icons.outlined.Add import androidx.compose.material.rememberScaffoldState import androidx.compose.runtime.Composable import androidx.compose.runtime.rememberCoroutineScope @@ -103,7 +103,7 @@ fun HomeActivity( } } ) { - Icon(imageVector = Icons.Default.Add, contentDescription = "TODO") + Icon(imageVector = Icons.Outlined.Add, contentDescription = "TODO") } }, bottomBar = { diff --git a/app/src/main/java/com/jerboa/ui/components/inbox/Inbox.kt b/app/src/main/java/com/jerboa/ui/components/inbox/Inbox.kt index 8d3aee579..707c411e1 100644 --- a/app/src/main/java/com/jerboa/ui/components/inbox/Inbox.kt +++ b/app/src/main/java/com/jerboa/ui/components/inbox/Inbox.kt @@ -1,12 +1,22 @@ package com.jerboa.ui.components.inbox import androidx.compose.foundation.layout.Column -import androidx.compose.material.* +import androidx.compose.material.Icon +import androidx.compose.material.IconButton +import androidx.compose.material.MaterialTheme +import androidx.compose.material.Text +import androidx.compose.material.TopAppBar +import androidx.compose.material.contentColorFor import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.ArrowBack -import androidx.compose.material.icons.filled.DoneAll -import androidx.compose.material.icons.filled.FilterList -import androidx.compose.runtime.* +import androidx.compose.material.icons.outlined.ArrowBack +import androidx.compose.material.icons.outlined.DoneAll +import androidx.compose.material.icons.outlined.FilterList +import androidx.compose.material.primarySurface +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue import androidx.navigation.NavController import androidx.navigation.compose.rememberNavController import com.jerboa.UnreadOrAll @@ -51,7 +61,7 @@ fun InboxHeader( navigationIcon = { IconButton(onClick = { navController.popBackStack() }) { Icon( - Icons.Filled.ArrowBack, + Icons.Outlined.ArrowBack, contentDescription = "Back" ) } @@ -61,14 +71,14 @@ fun InboxHeader( showUnreadOrAllOptions = !showUnreadOrAllOptions }) { Icon( - Icons.Default.FilterList, + Icons.Outlined.FilterList, contentDescription = "TODO", tint = contentColor ) } IconButton(onClick = onClickMarkAllAsRead) { Icon( - Icons.Default.DoneAll, + Icons.Outlined.DoneAll, contentDescription = "TODO", tint = contentColor ) diff --git a/app/src/main/java/com/jerboa/ui/components/login/Login.kt b/app/src/main/java/com/jerboa/ui/components/login/Login.kt index 2a0b5685e..ac48430ff 100644 --- a/app/src/main/java/com/jerboa/ui/components/login/Login.kt +++ b/app/src/main/java/com/jerboa/ui/components/login/Login.kt @@ -7,9 +7,9 @@ import androidx.compose.foundation.text.KeyboardOptions import androidx.compose.material.* import androidx.compose.material.ExposedDropdownMenuDefaults.TrailingIcon import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.ArrowBack -import androidx.compose.material.icons.filled.Visibility -import androidx.compose.material.icons.filled.VisibilityOff +import androidx.compose.material.icons.outlined.ArrowBack +import androidx.compose.material.icons.outlined.Visibility +import androidx.compose.material.icons.outlined.VisibilityOff import androidx.compose.runtime.* import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.ui.Alignment @@ -63,9 +63,9 @@ fun PasswordField( keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Password), trailingIcon = { val image = if (passwordVisibility) { - Icons.Filled.Visibility + Icons.Outlined.Visibility } else { - Icons.Filled.VisibilityOff + Icons.Outlined.VisibilityOff } IconButton(onClick = { @@ -195,7 +195,7 @@ fun LoginHeader( } ) { Icon( - Icons.Filled.ArrowBack, + Icons.Outlined.ArrowBack, contentDescription = "Back" ) } diff --git a/app/src/main/java/com/jerboa/ui/components/person/PersonProfile.kt b/app/src/main/java/com/jerboa/ui/components/person/PersonProfile.kt index 1584d2cb7..bc40b82cd 100644 --- a/app/src/main/java/com/jerboa/ui/components/person/PersonProfile.kt +++ b/app/src/main/java/com/jerboa/ui/components/person/PersonProfile.kt @@ -16,10 +16,11 @@ import androidx.compose.material.Text import androidx.compose.material.TopAppBar import androidx.compose.material.contentColorFor import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.ArrowBack -import androidx.compose.material.icons.filled.Block -import androidx.compose.material.icons.filled.MoreVert -import androidx.compose.material.icons.filled.Sort +import androidx.compose.material.icons.outlined.* +import androidx.compose.material.icons.outlined.ArrowBack +import androidx.compose.material.icons.outlined.Block +import androidx.compose.material.icons.outlined.MoreVert +import androidx.compose.material.icons.outlined.Sort import androidx.compose.material.primarySurface import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue @@ -195,7 +196,7 @@ fun PersonProfileHeader( navigationIcon = { IconButton(onClick = { navController.popBackStack() }) { Icon( - Icons.Filled.ArrowBack, + Icons.Outlined.ArrowBack, contentDescription = "Back" ) } @@ -205,7 +206,7 @@ fun PersonProfileHeader( showSortOptions = !showSortOptions }) { Icon( - Icons.Default.Sort, + Icons.Outlined.Sort, contentDescription = "TODO", tint = contentColor ) @@ -215,7 +216,7 @@ fun PersonProfileHeader( showMoreOptions = !showMoreOptions }) { Icon( - Icons.Default.MoreVert, + Icons.Outlined.MoreVert, contentDescription = "TODO", tint = contentColor ) @@ -254,7 +255,7 @@ fun PersonProfileMoreDialog( Column { IconAndTextDrawerItem( text = "Block Person", - icon = Icons.Default.Block, + icon = Icons.Outlined.Block, onClick = onBlockPersonClick ) } diff --git a/app/src/main/java/com/jerboa/ui/components/person/PersonProfileLink.kt b/app/src/main/java/com/jerboa/ui/components/person/PersonProfileLink.kt index afcfa5266..5b7c8b951 100644 --- a/app/src/main/java/com/jerboa/ui/components/person/PersonProfileLink.kt +++ b/app/src/main/java/com/jerboa/ui/components/person/PersonProfileLink.kt @@ -8,8 +8,9 @@ import androidx.compose.material.Icon import androidx.compose.material.MaterialTheme import androidx.compose.material.Text import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.NoAccounts -import androidx.compose.material.icons.filled.Shield +import androidx.compose.material.icons.outlined.* +import androidx.compose.material.icons.outlined.NoAccounts +import androidx.compose.material.icons.outlined.Shield import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier @@ -74,21 +75,21 @@ fun PersonProfileLink( if (showTags) { if (isModerator) { Icon( - imageVector = Icons.Default.Shield, + imageVector = Icons.Outlined.Shield, contentDescription = "TODO", tint = MaterialTheme.colors.secondary ) } if (person.admin) { Icon( - imageVector = Icons.Default.Shield, + imageVector = Icons.Outlined.Shield, contentDescription = "TODO", tint = MaterialTheme.colors.primary ) } if (isCommunityBanned || person.banned) { Icon( - imageVector = Icons.Default.NoAccounts, + imageVector = Icons.Outlined.NoAccounts, contentDescription = "TODO", tint = Color.Red ) diff --git a/app/src/main/java/com/jerboa/ui/components/post/PostListing.kt b/app/src/main/java/com/jerboa/ui/components/post/PostListing.kt index 4f0fc439f..3b917564b 100644 --- a/app/src/main/java/com/jerboa/ui/components/post/PostListing.kt +++ b/app/src/main/java/com/jerboa/ui/components/post/PostListing.kt @@ -16,20 +16,20 @@ import androidx.compose.material.Icon import androidx.compose.material.MaterialTheme import androidx.compose.material.Text import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Block -import androidx.compose.material.icons.filled.BookmarkAdd -import androidx.compose.material.icons.filled.BookmarkAdded -import androidx.compose.material.icons.filled.ChatBubble -import androidx.compose.material.icons.filled.Delete -import androidx.compose.material.icons.filled.Edit -import androidx.compose.material.icons.filled.Flag -import androidx.compose.material.icons.filled.Forum -import androidx.compose.material.icons.filled.Link -import androidx.compose.material.icons.filled.Lock -import androidx.compose.material.icons.filled.MoreVert -import androidx.compose.material.icons.filled.PushPin -import androidx.compose.material.icons.filled.Reply -import androidx.compose.material.icons.filled.Restore +import androidx.compose.material.icons.outlined.Block +import androidx.compose.material.icons.outlined.BookmarkAdd +import androidx.compose.material.icons.outlined.BookmarkAdded +import androidx.compose.material.icons.outlined.ChatBubbleOutline +import androidx.compose.material.icons.outlined.CommentsDisabled +import androidx.compose.material.icons.outlined.Delete +import androidx.compose.material.icons.outlined.Edit +import androidx.compose.material.icons.outlined.Flag +import androidx.compose.material.icons.outlined.Forum +import androidx.compose.material.icons.outlined.Link +import androidx.compose.material.icons.outlined.MoreVert +import androidx.compose.material.icons.outlined.PushPin +import androidx.compose.material.icons.outlined.Restore +import androidx.compose.material.icons.outlined.Textsms import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf @@ -37,7 +37,6 @@ import androidx.compose.runtime.remember import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.Color import androidx.compose.ui.platform.LocalClipboardManager import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.text.AnnotatedString @@ -79,7 +78,6 @@ import com.jerboa.ui.theme.MEDIUM_PADDING import com.jerboa.ui.theme.POST_LINK_PIC_SIZE import com.jerboa.ui.theme.SMALL_PADDING import com.jerboa.ui.theme.XL_PADDING -import com.jerboa.ui.theme.XXL_PADDING import com.jerboa.ui.theme.muted @Composable @@ -98,7 +96,7 @@ fun PostHeaderLine( ) { if (postView.post.stickied) { Icon( - imageVector = Icons.Default.PushPin, + imageVector = Icons.Outlined.PushPin, contentDescription = "TODO", tint = MaterialTheme.colors.onBackground.muted ) @@ -106,7 +104,7 @@ fun PostHeaderLine( } if (postView.post.locked) { Icon( - imageVector = Icons.Default.Lock, + imageVector = Icons.Outlined.CommentsDisabled, contentDescription = "TODO", tint = MaterialTheme.colors.error ) @@ -114,7 +112,7 @@ fun PostHeaderLine( } if (postView.post.deleted) { Icon( - imageVector = Icons.Default.Delete, + imageVector = Icons.Outlined.Delete, contentDescription = "TODO", tint = MaterialTheme.colors.error ) @@ -272,7 +270,7 @@ fun PostTitleAndThumbnail( ) { Box(contentAlignment = Alignment.Center) { Icon( - imageVector = Icons.Default.Link, + imageVector = Icons.Outlined.Link, contentDescription = "TODO", modifier = Modifier.size(LINK_ICON_SIZE) ) @@ -406,61 +404,54 @@ fun PostFooterLine( .fillMaxWidth() .padding(bottom = SMALL_PADDING) ) { - Row { - CommentCount( - comments = postView.counts.comments, - account = account - ) - } - Row( - horizontalArrangement = Arrangement.spacedBy(XXL_PADDING) - ) { - VoteGeneric( - myVote = myVote, - votes = upvotes, - item = postView, - type = VoteType.Upvote, - onVoteClick = { - onUpvoteClick(it) - }, - account = account - ) - VoteGeneric( - myVote = myVote, - votes = downvotes, - item = postView, - type = VoteType.Downvote, - onVoteClick = { - onDownvoteClick(it) - }, - account = account - ) + CommentCount( + comments = postView.counts.comments, + account = account + ) + VoteGeneric( + myVote = myVote, + votes = upvotes, + item = postView, + type = VoteType.Upvote, + onVoteClick = { + onUpvoteClick(it) + }, + account = account + ) + VoteGeneric( + myVote = myVote, + votes = downvotes, + item = postView, + type = VoteType.Downvote, + onVoteClick = { + onDownvoteClick(it) + }, + account = account + ) + ActionBarButton( + icon = if (postView.saved) { Icons.Outlined.BookmarkAdded } else { + Icons.Outlined.BookmarkAdd + }, + onClick = { onSaveClick(postView) }, + contentColor = if (postView.saved) { + MaterialTheme.colors.primary + } else { + MaterialTheme.colors.onBackground.muted + }, + account = account + ) + if (showReply) { ActionBarButton( - icon = if (postView.saved) { Icons.Default.BookmarkAdded } else { - Icons.Default - .BookmarkAdd - }, - onClick = { onSaveClick(postView) }, - contentColor = if (postView.saved) { - Color.Yellow - } else { - MaterialTheme.colors.onBackground.muted - }, + icon = Icons.Outlined.Textsms, + onClick = { onReplyClick(postView) }, account = account ) - if (showReply) { - ActionBarButton( - icon = Icons.Default.Reply, - onClick = { onReplyClick(postView) }, - account = account - ) - } - ActionBarButton( - icon = Icons.Default.MoreVert, - account = account, - onClick = { showMoreOptions = !showMoreOptions } - ) } + ActionBarButton( + icon = Icons.Outlined.MoreVert, + account = account, + onClick = { showMoreOptions = !showMoreOptions } + ) } } @@ -470,12 +461,11 @@ fun CommentCount( account: Account? ) { ActionBarButton( - icon = Icons.Default.ChatBubble, - text = "$comments comments", + icon = Icons.Outlined.ChatBubbleOutline, + text = "$comments", noClick = true, account = account, - onClick = {}, - smallIcon = true + onClick = {} ) } @@ -719,7 +709,7 @@ fun PostOptionsDialog( Column { IconAndTextDrawerItem( text = "Go to ${communityNameShown(postView.community)}", - icon = Icons.Default.Forum, + icon = Icons.Outlined.Forum, onClick = { onCommunityClick() } @@ -727,7 +717,7 @@ fun PostOptionsDialog( postView.post.url?.also { IconAndTextDrawerItem( text = "Copy link", - icon = Icons.Default.Link, + icon = Icons.Outlined.Link, onClick = { localClipboardManager.setText(AnnotatedString(it)) Toast.makeText(ctx, "Link Copied", Toast.LENGTH_SHORT).show() @@ -737,7 +727,7 @@ fun PostOptionsDialog( } IconAndTextDrawerItem( text = "Copy Permalink", - icon = Icons.Default.Link, + icon = Icons.Outlined.Link, onClick = { val permalink = postView.post.ap_id localClipboardManager.setText(AnnotatedString(permalink)) @@ -748,37 +738,37 @@ fun PostOptionsDialog( if (!isCreator) { IconAndTextDrawerItem( text = "Report Post", - icon = Icons.Default.Flag, + icon = Icons.Outlined.Flag, onClick = onReportClick ) IconAndTextDrawerItem( text = "Block ${postView.creator.name}", - icon = Icons.Default.Block, + icon = Icons.Outlined.Block, onClick = onBlockCreatorClick ) IconAndTextDrawerItem( text = "Block ${postView.community.name}", - icon = Icons.Default.Block, + icon = Icons.Outlined.Block, onClick = onBlockCommunityClick ) } if (isCreator) { IconAndTextDrawerItem( text = "Edit", - icon = Icons.Default.Edit, + icon = Icons.Outlined.Edit, onClick = onEditPostClick ) val deleted = postView.post.deleted if (deleted) { IconAndTextDrawerItem( text = "Restore", - icon = Icons.Default.Restore, + icon = Icons.Outlined.Restore, onClick = onDeletePostClick ) } else { IconAndTextDrawerItem( text = "Delete", - icon = Icons.Default.Delete, + icon = Icons.Outlined.Delete, onClick = onDeletePostClick ) } diff --git a/app/src/main/java/com/jerboa/ui/components/post/create/CreatePost.kt b/app/src/main/java/com/jerboa/ui/components/post/create/CreatePost.kt index 6e3459a1d..4529f1868 100644 --- a/app/src/main/java/com/jerboa/ui/components/post/create/CreatePost.kt +++ b/app/src/main/java/com/jerboa/ui/components/post/create/CreatePost.kt @@ -8,9 +8,9 @@ import androidx.compose.foundation.text.KeyboardOptions import androidx.compose.foundation.verticalScroll import androidx.compose.material.* import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Add -import androidx.compose.material.icons.filled.ArrowDropDown -import androidx.compose.material.icons.filled.Close +import androidx.compose.material.icons.outlined.* +import androidx.compose.material.icons.outlined.Add +import androidx.compose.material.icons.outlined.Close import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier @@ -60,7 +60,7 @@ fun CreatePostHeader( } else { // Todo add are you sure cancel dialog Icon( - Icons.Filled.Add, + Icons.Outlined.Add, contentDescription = "TODO" ) } @@ -74,7 +74,7 @@ fun CreatePostHeader( ) { // Todo add are you sure cancel dialog Icon( - Icons.Filled.Close, + Icons.Outlined.Close, contentDescription = "Close" ) } @@ -180,7 +180,7 @@ fun CreatePostBody( }, trailingIcon = { Icon( - imageVector = Icons.Default.ArrowDropDown, + imageVector = Icons.Outlined.ArrowDropDown, contentDescription = "TODO" ) }, diff --git a/app/src/main/java/com/jerboa/ui/components/post/edit/PostEdit.kt b/app/src/main/java/com/jerboa/ui/components/post/edit/PostEdit.kt index c55ab5d4a..804a2a32e 100644 --- a/app/src/main/java/com/jerboa/ui/components/post/edit/PostEdit.kt +++ b/app/src/main/java/com/jerboa/ui/components/post/edit/PostEdit.kt @@ -8,8 +8,8 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.text.KeyboardOptions import androidx.compose.material.* import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Close -import androidx.compose.material.icons.filled.Save +import androidx.compose.material.icons.outlined.Close +import androidx.compose.material.icons.outlined.Save import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.text.input.KeyboardType @@ -56,7 +56,7 @@ fun EditPostHeader( } else { // Todo add are you sure cancel dialog Icon( - Icons.Filled.Save, + Icons.Outlined.Save, contentDescription = "TODO" ) } @@ -70,7 +70,7 @@ fun EditPostHeader( ) { // Todo add are you sure cancel dialog Icon( - Icons.Filled.Close, + Icons.Outlined.Close, contentDescription = "Close" ) } diff --git a/app/src/main/java/com/jerboa/ui/components/privatemessage/PrivateMessage.kt b/app/src/main/java/com/jerboa/ui/components/privatemessage/PrivateMessage.kt index 8291a45e0..19617086f 100644 --- a/app/src/main/java/com/jerboa/ui/components/privatemessage/PrivateMessage.kt +++ b/app/src/main/java/com/jerboa/ui/components/privatemessage/PrivateMessage.kt @@ -8,12 +8,12 @@ import androidx.compose.foundation.layout.padding import androidx.compose.material.MaterialTheme import androidx.compose.material.Text import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Check -import androidx.compose.material.icons.filled.Reply +import androidx.compose.material.icons.outlined.MarkChatRead +import androidx.compose.material.icons.outlined.MarkChatUnread +import androidx.compose.material.icons.outlined.Textsms import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.Color import androidx.compose.ui.tooling.preview.Preview import com.jerboa.datatypes.PersonSafe import com.jerboa.datatypes.PrivateMessageView @@ -139,24 +139,28 @@ fun PrivateMessageFooterLine( ) { if (!isCreator(myPersonId, privateMessageView)) { ActionBarButton( - icon = Icons.Filled.Check, + icon = if (privateMessageView.private_message.read) { + Icons.Outlined.MarkChatRead + } else { + Icons.Outlined.MarkChatUnread + }, onClick = { onMarkAsReadClick(privateMessageView) }, contentColor = if (privateMessageView.private_message.read) { - Color.Green + MaterialTheme.colors.primary } else { MaterialTheme.colors.onBackground.muted }, account = account ) ActionBarButton( - icon = Icons.Filled.Reply, + icon = Icons.Outlined.Textsms, onClick = { onReplyClick(privateMessageView) }, account = account ) } // TODO // ActionBarButton( -// icon = Icons.Filled.MoreVert, +// icon = Icons.Outlined.MoreVert, // account = account, // ) } diff --git a/app/src/main/java/com/jerboa/ui/components/privatemessage/PrivateMessageReply.kt b/app/src/main/java/com/jerboa/ui/components/privatemessage/PrivateMessageReply.kt index 9a924043d..7fc33858b 100644 --- a/app/src/main/java/com/jerboa/ui/components/privatemessage/PrivateMessageReply.kt +++ b/app/src/main/java/com/jerboa/ui/components/privatemessage/PrivateMessageReply.kt @@ -8,8 +8,9 @@ import androidx.compose.foundation.text.selection.SelectionContainer import androidx.compose.foundation.verticalScroll import androidx.compose.material.* import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Close -import androidx.compose.material.icons.filled.Send +import androidx.compose.material.icons.outlined.* +import androidx.compose.material.icons.outlined.Close +import androidx.compose.material.icons.outlined.Send import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.text.input.TextFieldValue @@ -53,7 +54,7 @@ fun PrivateMessageReplyHeader( ) } else { Icon( - imageVector = Icons.Default.Send, + imageVector = Icons.Outlined.Send, contentDescription = "TODO" ) } @@ -66,7 +67,7 @@ fun PrivateMessageReplyHeader( } ) { Icon( - Icons.Filled.Close, + Icons.Outlined.Close, contentDescription = "Back" ) } diff --git a/app/src/main/java/com/jerboa/ui/components/report/CreateReport.kt b/app/src/main/java/com/jerboa/ui/components/report/CreateReport.kt index edd58485e..4fcc32e98 100644 --- a/app/src/main/java/com/jerboa/ui/components/report/CreateReport.kt +++ b/app/src/main/java/com/jerboa/ui/components/report/CreateReport.kt @@ -6,8 +6,9 @@ import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.verticalScroll import androidx.compose.material.* import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Close -import androidx.compose.material.icons.filled.Send +import androidx.compose.material.icons.outlined.* +import androidx.compose.material.icons.outlined.Close +import androidx.compose.material.icons.outlined.Send import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.text.input.TextFieldValue @@ -46,7 +47,7 @@ fun CreateReportHeader( ) } else { Icon( - imageVector = Icons.Default.Send, + imageVector = Icons.Outlined.Send, contentDescription = "TODO" ) } @@ -59,7 +60,7 @@ fun CreateReportHeader( } ) { Icon( - Icons.Filled.Close, + Icons.Outlined.Close, contentDescription = "Back" ) } diff --git a/app/src/main/java/com/jerboa/ui/components/settings/SettingsActivity.kt b/app/src/main/java/com/jerboa/ui/components/settings/SettingsActivity.kt index 1a66a64cb..d201e1c27 100644 --- a/app/src/main/java/com/jerboa/ui/components/settings/SettingsActivity.kt +++ b/app/src/main/java/com/jerboa/ui/components/settings/SettingsActivity.kt @@ -9,9 +9,10 @@ import androidx.compose.material.Scaffold import androidx.compose.material.Surface import androidx.compose.material.Text import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Info -import androidx.compose.material.icons.filled.ManageAccounts -import androidx.compose.material.icons.filled.Palette +import androidx.compose.material.icons.outlined.* +import androidx.compose.material.icons.outlined.Info +import androidx.compose.material.icons.outlined.ManageAccounts +import androidx.compose.material.icons.outlined.Palette import androidx.compose.material.rememberScaffoldState import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier @@ -43,7 +44,7 @@ fun SettingsActivity( title = { Text("Look and feel") }, icon = { Icon( - imageVector = Icons.Default.Palette, + imageVector = Icons.Outlined.Palette, contentDescription = "TODO" ) }, @@ -54,7 +55,7 @@ fun SettingsActivity( title = { Text("${acct.name} settings") }, icon = { Icon( - imageVector = Icons.Default.ManageAccounts, + imageVector = Icons.Outlined.ManageAccounts, contentDescription = "TODO" ) }, @@ -65,7 +66,7 @@ fun SettingsActivity( title = { Text("About") }, icon = { Icon( - imageVector = Icons.Default.Info, + imageVector = Icons.Outlined.Info, contentDescription = "TODO" ) }, diff --git a/app/src/main/java/com/jerboa/ui/components/settings/about/AboutActivity.kt b/app/src/main/java/com/jerboa/ui/components/settings/about/AboutActivity.kt index c5d95f272..3022a4b2e 100644 --- a/app/src/main/java/com/jerboa/ui/components/settings/about/AboutActivity.kt +++ b/app/src/main/java/com/jerboa/ui/components/settings/about/AboutActivity.kt @@ -11,12 +11,13 @@ import androidx.compose.material.Scaffold import androidx.compose.material.Surface import androidx.compose.material.Text import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.AttachMoney -import androidx.compose.material.icons.filled.BugReport -import androidx.compose.material.icons.filled.Chat -import androidx.compose.material.icons.filled.Code -import androidx.compose.material.icons.filled.NewReleases -import androidx.compose.material.icons.filled.TravelExplore +import androidx.compose.material.icons.outlined.* +import androidx.compose.material.icons.outlined.AttachMoney +import androidx.compose.material.icons.outlined.BugReport +import androidx.compose.material.icons.outlined.Chat +import androidx.compose.material.icons.outlined.Code +import androidx.compose.material.icons.outlined.NewReleases +import androidx.compose.material.icons.outlined.TravelExplore import androidx.compose.material.rememberScaffoldState import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier @@ -46,6 +47,8 @@ fun AboutActivity( val scaffoldState = rememberScaffoldState() val ctx = LocalContext.current + + @Suppress("DEPRECATION") val version = ctx.packageManager.getPackageInfo(ctx.packageName, 0).versionName Surface(color = MaterialTheme.colors.background) { @@ -61,7 +64,7 @@ fun AboutActivity( subtitle = { Text("Version $version") }, icon = { Icon( - imageVector = Icons.Default.NewReleases, + imageVector = Icons.Outlined.NewReleases, contentDescription = "TODO" ) }, @@ -75,7 +78,7 @@ fun AboutActivity( title = { Text("Issue tracker") }, icon = { Icon( - imageVector = Icons.Default.BugReport, + imageVector = Icons.Outlined.BugReport, contentDescription = "TODO" ) }, @@ -87,7 +90,7 @@ fun AboutActivity( title = { Text("Developer Matrix chatroom") }, icon = { Icon( - imageVector = Icons.Default.Chat, + imageVector = Icons.Outlined.Chat, contentDescription = "TODO" ) }, @@ -99,7 +102,7 @@ fun AboutActivity( title = { Text("Donate to Jerboa development") }, icon = { Icon( - imageVector = Icons.Default.AttachMoney, + imageVector = Icons.Outlined.AttachMoney, contentDescription = "TODO" ) }, @@ -126,7 +129,7 @@ fun AboutActivity( title = { Text("Follow on Mastodon") }, icon = { Icon( - imageVector = Icons.Default.TravelExplore, + imageVector = Icons.Outlined.TravelExplore, contentDescription = "TODO" ) }, @@ -147,7 +150,7 @@ fun AboutActivity( }, icon = { Icon( - imageVector = Icons.Default.Code, + imageVector = Icons.Outlined.Code, contentDescription = "TODO" ) }, diff --git a/app/src/main/java/com/jerboa/ui/components/settings/account/AccountSettings.kt b/app/src/main/java/com/jerboa/ui/components/settings/account/AccountSettings.kt index 3e178fa8e..a359b9830 100644 --- a/app/src/main/java/com/jerboa/ui/components/settings/account/AccountSettings.kt +++ b/app/src/main/java/com/jerboa/ui/components/settings/account/AccountSettings.kt @@ -6,7 +6,8 @@ import androidx.compose.foundation.text.KeyboardOptions import androidx.compose.foundation.verticalScroll import androidx.compose.material.* import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Close +import androidx.compose.material.icons.outlined.* +import androidx.compose.material.icons.outlined.Close import androidx.compose.runtime.* import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.ui.Alignment @@ -58,7 +59,7 @@ fun ImageWithClose( Box(contentAlignment = Alignment.TopEnd) { composable() IconButton(onClick = onClick) { - Icon(imageVector = Icons.Default.Close, contentDescription = "Remove Current Avatar") + Icon(imageVector = Icons.Outlined.Close, contentDescription = "Remove Current Avatar") } } } diff --git a/app/src/main/java/com/jerboa/ui/components/settings/lookandfeel/LookAndFeelActivity.kt b/app/src/main/java/com/jerboa/ui/components/settings/lookandfeel/LookAndFeelActivity.kt index bf5b92040..15d6f8201 100644 --- a/app/src/main/java/com/jerboa/ui/components/settings/lookandfeel/LookAndFeelActivity.kt +++ b/app/src/main/java/com/jerboa/ui/components/settings/lookandfeel/LookAndFeelActivity.kt @@ -9,10 +9,11 @@ import androidx.compose.material.Scaffold import androidx.compose.material.Surface import androidx.compose.material.Text import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.FlashlightOn -import androidx.compose.material.icons.filled.FormatSize -import androidx.compose.material.icons.filled.Palette -import androidx.compose.material.icons.filled.ShieldMoon +import androidx.compose.material.icons.outlined.* +import androidx.compose.material.icons.outlined.FlashlightOn +import androidx.compose.material.icons.outlined.FormatSize +import androidx.compose.material.icons.outlined.Palette +import androidx.compose.material.icons.outlined.ShieldMoon import androidx.compose.material.rememberScaffoldState import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier @@ -63,7 +64,7 @@ fun LookAndFeelActivity( state = fontSizeState, icon = { Icon( - imageVector = Icons.Default.FormatSize, + imageVector = Icons.Outlined.FormatSize, contentDescription = "TODO" ) }, @@ -85,7 +86,7 @@ fun LookAndFeelActivity( items = ThemeMode.values().map { it.name }, icon = { Icon( - imageVector = Icons.Default.Palette, + imageVector = Icons.Outlined.Palette, contentDescription = "TODO" ) }, @@ -107,7 +108,7 @@ fun LookAndFeelActivity( items = LightTheme.values().map { it.name }, icon = { Icon( - imageVector = Icons.Default.FlashlightOn, + imageVector = Icons.Outlined.FlashlightOn, contentDescription = "TODO" ) }, @@ -129,7 +130,7 @@ fun LookAndFeelActivity( items = DarkTheme.values().map { it.name }, icon = { Icon( - imageVector = Icons.Default.ShieldMoon, + imageVector = Icons.Outlined.ShieldMoon, contentDescription = "TODO" ) }, diff --git a/app/src/main/java/com/jerboa/ui/theme/Sizes.kt b/app/src/main/java/com/jerboa/ui/theme/Sizes.kt index 2021e4a43..6c00925d6 100644 --- a/app/src/main/java/com/jerboa/ui/theme/Sizes.kt +++ b/app/src/main/java/com/jerboa/ui/theme/Sizes.kt @@ -2,8 +2,7 @@ package com.jerboa.ui.theme import androidx.compose.ui.unit.dp -val ACTION_BAR_ICON_SIZE = 24.dp -val ACTION_BAR_ICON_SIZE_SMALLER = 16.dp +val ACTION_BAR_ICON_SIZE = 16.dp val SMALL_PADDING = 4.dp val MEDIUM_PADDING = 8.dp