1package soy.iko.opencode
3import android.os.Bundle
4import androidx.activity.ComponentActivity
5import androidx.activity.compose.setContent
6import androidx.activity.enableEdgeToEdge
7import androidx.compose.foundation.isSystemInDarkTheme
8import androidx.compose.runtime.getValue
9import androidx.lifecycle.compose.collectAsStateWithLifecycle
10import soy.iko.opencode.data.repo.ThemeMode
11import soy.iko.opencode.ui.OpencodeApp as OpencodeAppUi
12import soy.iko.opencode.ui.theme.OpencodeTheme
14class MainActivity : ComponentActivity() {
15 override fun onCreate(savedInstanceState: Bundle?) {
16 super.onCreate(savedInstanceState)
18 val container = (application as OpencodeApp).container
20 val themeMode by container.settingsStore.themeMode
21 .collectAsStateWithLifecycle(initialValue = ThemeMode.SYSTEM)
22 val dark = when (themeMode) {
23 ThemeMode.SYSTEM -> isSystemInDarkTheme()
24 ThemeMode.LIGHT -> false
25 ThemeMode.DARK -> true
27 OpencodeTheme(darkTheme = dark) {
28 OpencodeAppUi(container = container)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list