Add bookmark groups option to side menu. Make them work by hooking them up in Account.

This commit is contained in:
KotlinGeekDev
2025-11-14 19:38:48 +01:00
parent 0c06bd4271
commit 34e5e7de5b
5 changed files with 18 additions and 0 deletions
@@ -1784,6 +1784,7 @@ class Account(
newNotesPreProcessor.runNew(newNotes) newNotesPreProcessor.runNew(newNotes)
peopleLists.newNotes(newNotes) peopleLists.newNotes(newNotes)
followLists.newNotes(newNotes) followLists.newNotes(newNotes)
labeledBookmarkLists.newNotes(newNotes)
} }
} }
} }
@@ -1794,6 +1795,7 @@ class Account(
newNotesPreProcessor.runDeleted(deletedNotes) newNotesPreProcessor.runDeleted(deletedNotes)
peopleLists.deletedNotes(deletedNotes) peopleLists.deletedNotes(deletedNotes)
followLists.deletedNotes(deletedNotes) followLists.deletedNotes(deletedNotes)
labeledBookmarkLists.deletedNotes(deletedNotes)
} }
} }
} }
@@ -57,6 +57,7 @@ import com.vitorpamplona.amethyst.ui.note.nip22Comments.ReplyCommentPostScreen
import com.vitorpamplona.amethyst.ui.screen.AccountStateViewModel import com.vitorpamplona.amethyst.ui.screen.AccountStateViewModel
import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountSwitcherAndLeftDrawerLayout import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountSwitcherAndLeftDrawerLayout
import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel
import com.vitorpamplona.amethyst.ui.screen.loggedIn.bookmarkgroups.list.ListOfBookmarkGroupsScreen
import com.vitorpamplona.amethyst.ui.screen.loggedIn.bookmarks.BookmarkListScreen import com.vitorpamplona.amethyst.ui.screen.loggedIn.bookmarks.BookmarkListScreen
import com.vitorpamplona.amethyst.ui.screen.loggedIn.chats.privateDM.ChatroomByAuthorScreen import com.vitorpamplona.amethyst.ui.screen.loggedIn.chats.privateDM.ChatroomByAuthorScreen
import com.vitorpamplona.amethyst.ui.screen.loggedIn.chats.privateDM.ChatroomScreen import com.vitorpamplona.amethyst.ui.screen.loggedIn.chats.privateDM.ChatroomScreen
@@ -129,6 +130,8 @@ fun AppNavigation(
composableFromEndArgs<Route.PeopleListView> { PeopleListScreen(it.dTag, accountViewModel, nav) } composableFromEndArgs<Route.PeopleListView> { PeopleListScreen(it.dTag, accountViewModel, nav) }
composableFromBottomArgs<Route.PeopleListManagement> { EditPeopleListScreen(it.userToAdd, accountViewModel, nav) } composableFromBottomArgs<Route.PeopleListManagement> { EditPeopleListScreen(it.userToAdd, accountViewModel, nav) }
composableFromEnd<Route.BookmarkGroups> { ListOfBookmarkGroupsScreen(accountViewModel, nav) }
composableFromBottomArgs<Route.EditProfile> { NewUserMetadataScreen(nav, accountViewModel) } composableFromBottomArgs<Route.EditProfile> { NewUserMetadataScreen(nav, accountViewModel) }
composable<Route.Search> { SearchScreen(accountViewModel, nav) } composable<Route.Search> { SearchScreen(accountViewModel, nav) }
@@ -48,6 +48,7 @@ import androidx.compose.material.icons.filled.AccountCircle
import androidx.compose.material.icons.filled.Delete import androidx.compose.material.icons.filled.Delete
import androidx.compose.material.icons.outlined.BookmarkBorder import androidx.compose.material.icons.outlined.BookmarkBorder
import androidx.compose.material.icons.outlined.CloudUpload import androidx.compose.material.icons.outlined.CloudUpload
import androidx.compose.material.icons.outlined.CollectionsBookmark
import androidx.compose.material.icons.outlined.Drafts import androidx.compose.material.icons.outlined.Drafts
import androidx.compose.material.icons.outlined.GroupAdd import androidx.compose.material.icons.outlined.GroupAdd
import androidx.compose.material.icons.outlined.Key import androidx.compose.material.icons.outlined.Key
@@ -451,6 +452,14 @@ fun ListContent(
route = Route.Bookmarks, route = Route.Bookmarks,
) )
NavigationRow(
title = R.string.bookmark_groups,
icon = Icons.Outlined.CollectionsBookmark,
tint = MaterialTheme.colorScheme.onBackground,
nav = nav,
route = Route.BookmarkGroups,
)
NavigationRow( NavigationRow(
title = R.string.drafts, title = R.string.drafts,
icon = Icons.Outlined.Drafts, icon = Icons.Outlined.Drafts,
@@ -46,6 +46,8 @@ sealed class Route {
@Serializable object Bookmarks : Route() @Serializable object Bookmarks : Route()
@Serializable object BookmarkGroups : Route()
@Serializable object Drafts : Route() @Serializable object Drafts : Route()
@Serializable object Settings : Route() @Serializable object Settings : Route()
+2
View File
@@ -387,6 +387,8 @@
<string name="remove_from_private_bookmarks">Remove from Private Bookmarks</string> <string name="remove_from_private_bookmarks">Remove from Private Bookmarks</string>
<string name="remove_from_public_bookmarks">Remove from Public Bookmarks</string> <string name="remove_from_public_bookmarks">Remove from Public Bookmarks</string>
<string name="bookmark_groups">Bookmark Groups</string>
<string name="wallet_connect_service">Wallet Connect Service</string> <string name="wallet_connect_service">Wallet Connect Service</string>
<string name="wallet_connect_service_explainer">Authorizes a Nostr Secret to pay zaps without leaving the app. Keep the secret safe and use a private relay if possible</string> <string name="wallet_connect_service_explainer">Authorizes a Nostr Secret to pay zaps without leaving the app. Keep the secret safe and use a private relay if possible</string>
<string name="wallet_connect_service_pubkey">Wallet Connect Pubkey</string> <string name="wallet_connect_service_pubkey">Wallet Connect Pubkey</string>