Repo created
This commit is contained in:
parent
75dc487a7a
commit
39c29d175b
6317 changed files with 388324 additions and 2 deletions
8
feature/navigation/drawer/api/build.gradle.kts
Normal file
8
feature/navigation/drawer/api/build.gradle.kts
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
plugins {
|
||||
id(ThunderbirdPlugins.Library.androidCompose)
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "net.thunderbird.feature.navigation.drawer.api"
|
||||
resourcePrefix = "navigation_drawer_"
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package net.thunderbird.feature.navigation.drawer.api
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
|
||||
interface NavigationDrawer {
|
||||
val parent: AppCompatActivity
|
||||
val isOpen: Boolean
|
||||
|
||||
fun selectAccount(accountUuid: String)
|
||||
|
||||
fun selectFolder(accountUuid: String, folderId: Long)
|
||||
|
||||
fun selectUnifiedInbox()
|
||||
|
||||
fun deselect()
|
||||
|
||||
fun open()
|
||||
|
||||
fun close()
|
||||
|
||||
fun lock()
|
||||
|
||||
fun unlock()
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package net.thunderbird.feature.navigation.drawer.api
|
||||
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
|
||||
interface NavigationDrawerExternalContract {
|
||||
|
||||
data class DrawerConfig(
|
||||
val showUnifiedFolders: Boolean,
|
||||
val showStarredCount: Boolean,
|
||||
val showAccountSelector: Boolean,
|
||||
)
|
||||
|
||||
fun interface DrawerConfigLoader {
|
||||
fun loadDrawerConfigFlow(): Flow<DrawerConfig>
|
||||
}
|
||||
|
||||
fun interface DrawerConfigWriter {
|
||||
fun writeDrawerConfig(drawerConfig: DrawerConfig)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.compose.ui.platform.ComposeView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@id/navigation_drawer_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
/>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<item name="navigation_drawer_layout" type="id" />
|
||||
<item name="navigation_drawer_content" type="id" />
|
||||
|
||||
</resources>
|
||||
Loading…
Add table
Add a link
Reference in a new issue