mirror of
https://github.com/bitfireAT/davx5-ose
synced 2024-07-22 03:01:24 +00:00
Move "Community" to "Support the project", remove obsolete code
This commit is contained in:
parent
33e726a7b0
commit
4486c0862a
|
@ -23,7 +23,6 @@ import androidx.compose.foundation.Image
|
|||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.ColumnScope
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
|
@ -330,38 +329,6 @@ class AccountsActivity: AppCompatActivity() {
|
|||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun drawerContent(
|
||||
scope: CoroutineScope,
|
||||
scaffoldState: ScaffoldState
|
||||
): @Composable (ColumnScope.() -> Unit) =
|
||||
{
|
||||
/*
|
||||
LEGACY
|
||||
|
||||
AndroidView(factory = { context ->
|
||||
// use legacy NavigationView for now
|
||||
NavigationView(context).apply {
|
||||
inflateHeaderView(R.layout.nav_header_accounts)
|
||||
|
||||
inflateMenu(R.menu.activity_accounts_drawer)
|
||||
accountsDrawerHandler.initMenu(this@AccountsActivity, menu)
|
||||
|
||||
setNavigationItemSelectedListener { item ->
|
||||
scope.launch {
|
||||
accountsDrawerHandler.onNavigationItemSelected(
|
||||
this@AccountsActivity,
|
||||
item
|
||||
)
|
||||
scaffoldState.drawerState.close()
|
||||
}
|
||||
true
|
||||
}
|
||||
}
|
||||
}, modifier = Modifier.fillMaxWidth())
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
data class AccountInfo(
|
||||
val account: Account,
|
||||
|
|
|
@ -50,13 +50,22 @@ open class OseAccountsDrawerHandler @Inject constructor(): AccountsDrawerHandler
|
|||
Tools()
|
||||
|
||||
// Support the project
|
||||
SupportUs(onContribute = {
|
||||
MenuHeading(R.string.navigation_drawer_support_project)
|
||||
Contribute(onContribute = {
|
||||
uriHandler.openUri(
|
||||
Constants.HOMEPAGE_URL.buildUpon()
|
||||
.appendPath(Constants.HOMEPAGE_PATH_OPEN_SOURCE)
|
||||
.build().toString()
|
||||
)
|
||||
})
|
||||
MenuEntry(
|
||||
icon = Icons.Default.Forum,
|
||||
title = stringResource(R.string.navigation_drawer_community),
|
||||
onClick = {
|
||||
uriHandler.openUri(COMMUNITY_URL.toString())
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
// External links
|
||||
MenuHeading(R.string.navigation_drawer_external_links)
|
||||
|
@ -85,13 +94,6 @@ open class OseAccountsDrawerHandler @Inject constructor(): AccountsDrawerHandler
|
|||
)
|
||||
}
|
||||
)
|
||||
MenuEntry(
|
||||
icon = Icons.Default.Forum,
|
||||
title = stringResource(R.string.navigation_drawer_community),
|
||||
onClick = {
|
||||
uriHandler.openUri(COMMUNITY_URL.toString())
|
||||
}
|
||||
)
|
||||
MenuEntry(
|
||||
icon = Icons.Default.CloudOff,
|
||||
title = stringResource(R.string.navigation_drawer_privacy_policy),
|
||||
|
@ -115,8 +117,7 @@ open class OseAccountsDrawerHandler @Inject constructor(): AccountsDrawerHandler
|
|||
|
||||
|
||||
@Composable
|
||||
open fun SupportUs(onContribute: () -> Unit) {
|
||||
MenuHeading(R.string.navigation_drawer_support_project)
|
||||
open fun Contribute(onContribute: () -> Unit) {
|
||||
MenuEntry(
|
||||
icon = Icons.Default.VolunteerActivism,
|
||||
title = stringResource(R.string.navigation_drawer_contribute),
|
||||
|
|
Loading…
Reference in a new issue