Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Briar Desktop
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
briar
Briar Desktop
Commits
c8e65d4b
Verified
Commit
c8e65d4b
authored
2 years ago
by
Torsten Grote
Committed by
Sebastian
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Remove redundant icon parameter for BriarSidebarButton
parent
7114d3cc
No related branches found
No related tags found
1 merge request
!304
Initial working Mailbox implementation
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/navigation/BriarSidebar.kt
+9
-25
9 additions, 25 deletions
...org/briarproject/briar/desktop/navigation/BriarSidebar.kt
with
9 additions
and
25 deletions
briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/navigation/BriarSidebar.kt
+
9
−
25
View file @
c8e65d4b
/*
* Briar Desktop
* Copyright (C) 2021-202
2
The Briar Project
* Copyright (C) 2021-202
3
The Briar Project
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
...
...
@@ -32,14 +32,6 @@ import androidx.compose.material.Badge
import
androidx.compose.material.BadgedBox
import
androidx.compose.material.IconButton
import
androidx.compose.material.MaterialTheme
import
androidx.compose.material.icons.Icons
import
androidx.compose.material.icons.filled.ChromeReaderMode
import
androidx.compose.material.icons.filled.Contacts
import
androidx.compose.material.icons.filled.Forum
import
androidx.compose.material.icons.filled.Group
import
androidx.compose.material.icons.filled.Info
import
androidx.compose.material.icons.filled.Settings
import
androidx.compose.material.icons.filled.WifiTethering
import
androidx.compose.runtime.Composable
import
androidx.compose.ui.Alignment
import
androidx.compose.ui.Modifier
...
...
@@ -64,12 +56,11 @@ fun BriarSidebar(
@Composable
fun
BriarSidebarButton
(
mode
:
UiMode
,
icon
:
ImageVector
=
mode
.
icon
,
messageCount
:
Int
=
0
,
)
=
BriarSidebarButton
(
uiMode
==
mode
,
{
setUiMode
(
mode
)
},
icon
,
mode
.
icon
,
i18n
(
mode
.
contentDescriptionKey
),
messageCount
)
...
...
@@ -88,24 +79,17 @@ fun BriarSidebar(
Spacer
(
Modifier
.
height
(
4
.
dp
))
BriarSidebarButton
(
UiMode
.
CONTACTS
,
Icons
.
Filled
.
Contacts
,
messageCount
.
privateMessages
)
if
(
configuration
.
shouldEnablePrivateGroups
())
BriarSidebarButton
(
UiMode
.
GROUPS
,
Icons
.
Filled
.
Group
)
if
(
configuration
.
shouldEnableForums
())
BriarSidebarButton
(
UiMode
.
FORUMS
,
Icons
.
Filled
.
Forum
,
messageCount
.
forumPosts
)
if
(
configuration
.
shouldEnableBlogs
())
BriarSidebarButton
(
UiMode
.
BLOGS
,
Icons
.
Filled
.
ChromeReaderMode
)
BriarSidebarButton
(
UiMode
.
CONTACTS
,
messageCount
.
privateMessages
)
if
(
configuration
.
shouldEnablePrivateGroups
())
BriarSidebarButton
(
UiMode
.
GROUPS
)
if
(
configuration
.
shouldEnableForums
())
BriarSidebarButton
(
UiMode
.
FORUMS
,
messageCount
.
forumPosts
)
if
(
configuration
.
shouldEnableBlogs
())
BriarSidebarButton
(
UiMode
.
BLOGS
)
Spacer
(
Modifier
.
weight
(
1f
))
if
(
configuration
.
shouldEnableTransportSettings
())
BriarSidebarButton
(
UiMode
.
TRANSPORTS
,
Icons
.
Filled
.
WifiTethering
)
if
(
configuration
.
shouldEnableTransportSettings
())
BriarSidebarButton
(
UiMode
.
TRANSPORTS
)
if
(
configuration
.
shouldEnableMailbox
())
BriarSidebarButton
(
UiMode
.
MAILBOX
)
BriarSidebarButton
(
UiMode
.
SETTINGS
,
Icons
.
Filled
.
Settings
)
BriarSidebarButton
(
UiMode
.
ABOUT
,
Icons
.
Filled
.
Info
)
BriarSidebarButton
(
UiMode
.
SETTINGS
)
BriarSidebarButton
(
UiMode
.
ABOUT
)
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment