Skip to content

Commit

Permalink
Merge branch '14-alpha' of https://github.com/nulldrf/lawnchair into …
Browse files Browse the repository at this point in the history
…14-alpha
  • Loading branch information
nulldrf committed Apr 10, 2024
2 parents e097f12 + 7516813 commit bdb9e5b
Show file tree
Hide file tree
Showing 130 changed files with 5,668 additions and 6,420 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/close_stale_issues.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Close stale issues and PRs
on:
schedule:
- cron: 0 0 * * *
# schedule:
# - cron: 0 0 * * *
workflow_dispatch:
jobs:
stale:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ public void onAnimationCanceled(TaskSnapshot taskSnapshot) {
public void onTaskAppeared(RemoteAnimationTarget app) {
runnerCompat.onTaskAppeared(app);
}

public void onTasksAppeared(RemoteAnimationTarget[] apps) {
runnerCompat.onTasksAppeared(apps);
}
};
}
try {
Expand Down
187 changes: 83 additions & 104 deletions lawnchair/res/values-af-rZA/strings.xml

Large diffs are not rendered by default.

187 changes: 83 additions & 104 deletions lawnchair/res/values-am-rET/strings.xml

Large diffs are not rendered by default.

187 changes: 83 additions & 104 deletions lawnchair/res/values-ar-rSA/strings.xml

Large diffs are not rendered by default.

187 changes: 83 additions & 104 deletions lawnchair/res/values-b+sr+Latn/strings.xml

Large diffs are not rendered by default.

187 changes: 83 additions & 104 deletions lawnchair/res/values-bn-rBD/strings.xml

Large diffs are not rendered by default.

187 changes: 83 additions & 104 deletions lawnchair/res/values-ca-rES/strings.xml

Large diffs are not rendered by default.

205 changes: 92 additions & 113 deletions lawnchair/res/values-cs-rCZ/strings.xml

Large diffs are not rendered by default.

187 changes: 83 additions & 104 deletions lawnchair/res/values-da-rDK/strings.xml

Large diffs are not rendered by default.

197 changes: 87 additions & 110 deletions lawnchair/res/values-de-rDE/strings.xml

Large diffs are not rendered by default.

187 changes: 83 additions & 104 deletions lawnchair/res/values-el-rGR/strings.xml

Large diffs are not rendered by default.

187 changes: 83 additions & 104 deletions lawnchair/res/values-en-rCA/strings.xml

Large diffs are not rendered by default.

187 changes: 83 additions & 104 deletions lawnchair/res/values-es-rES/strings.xml

Large diffs are not rendered by default.

187 changes: 83 additions & 104 deletions lawnchair/res/values-fa-rIR/strings.xml

Large diffs are not rendered by default.

187 changes: 83 additions & 104 deletions lawnchair/res/values-fi-rFI/strings.xml

Large diffs are not rendered by default.

187 changes: 83 additions & 104 deletions lawnchair/res/values-fil-rPH/strings.xml

Large diffs are not rendered by default.

443 changes: 211 additions & 232 deletions lawnchair/res/values-fr-rFR/strings.xml

Large diffs are not rendered by default.

187 changes: 83 additions & 104 deletions lawnchair/res/values-gl-rES/strings.xml

Large diffs are not rendered by default.

187 changes: 83 additions & 104 deletions lawnchair/res/values-hi-rIN/strings.xml

Large diffs are not rendered by default.

187 changes: 83 additions & 104 deletions lawnchair/res/values-hu-rHU/strings.xml

Large diffs are not rendered by default.

187 changes: 83 additions & 104 deletions lawnchair/res/values-in-rID/strings.xml

Large diffs are not rendered by default.

187 changes: 83 additions & 104 deletions lawnchair/res/values-it-rIT/strings.xml

Large diffs are not rendered by default.

187 changes: 83 additions & 104 deletions lawnchair/res/values-iw-rIL/strings.xml

Large diffs are not rendered by default.

185 changes: 82 additions & 103 deletions lawnchair/res/values-ja-rJP/strings.xml

Large diffs are not rendered by default.

187 changes: 83 additions & 104 deletions lawnchair/res/values-kmr-rTR/strings.xml

Large diffs are not rendered by default.

187 changes: 83 additions & 104 deletions lawnchair/res/values-ko-rKR/strings.xml

Large diffs are not rendered by default.

199 changes: 89 additions & 110 deletions lawnchair/res/values-lt-rLT/strings.xml

Large diffs are not rendered by default.

207 changes: 93 additions & 114 deletions lawnchair/res/values-ml-rIN/strings.xml

Large diffs are not rendered by default.

187 changes: 83 additions & 104 deletions lawnchair/res/values-mr-rIN/strings.xml

Large diffs are not rendered by default.

187 changes: 83 additions & 104 deletions lawnchair/res/values-nl-rNL/strings.xml

Large diffs are not rendered by default.

187 changes: 83 additions & 104 deletions lawnchair/res/values-no-rNO/strings.xml

Large diffs are not rendered by default.

191 changes: 85 additions & 106 deletions lawnchair/res/values-pl-rPL/strings.xml

Large diffs are not rendered by default.

187 changes: 83 additions & 104 deletions lawnchair/res/values-pt-rBR/strings.xml

Large diffs are not rendered by default.

187 changes: 83 additions & 104 deletions lawnchair/res/values-pt-rPT/strings.xml

Large diffs are not rendered by default.

187 changes: 83 additions & 104 deletions lawnchair/res/values-ro-rRO/strings.xml

Large diffs are not rendered by default.

181 changes: 80 additions & 101 deletions lawnchair/res/values-ru-rRU/strings.xml

Large diffs are not rendered by default.

187 changes: 83 additions & 104 deletions lawnchair/res/values-sk-rSK/strings.xml

Large diffs are not rendered by default.

187 changes: 83 additions & 104 deletions lawnchair/res/values-sl-rSI/strings.xml

Large diffs are not rendered by default.

187 changes: 83 additions & 104 deletions lawnchair/res/values-sq-rAL/strings.xml

Large diffs are not rendered by default.

187 changes: 83 additions & 104 deletions lawnchair/res/values-sr/strings.xml

Large diffs are not rendered by default.

187 changes: 83 additions & 104 deletions lawnchair/res/values-sv-rSE/strings.xml

Large diffs are not rendered by default.

187 changes: 83 additions & 104 deletions lawnchair/res/values-sw-rKE/strings.xml

Large diffs are not rendered by default.

187 changes: 83 additions & 104 deletions lawnchair/res/values-ta-rIN/strings.xml

Large diffs are not rendered by default.

187 changes: 83 additions & 104 deletions lawnchair/res/values-te-rIN/strings.xml

Large diffs are not rendered by default.

185 changes: 82 additions & 103 deletions lawnchair/res/values-th-rTH/strings.xml

Large diffs are not rendered by default.

187 changes: 83 additions & 104 deletions lawnchair/res/values-tr-rTR/strings.xml

Large diffs are not rendered by default.

185 changes: 82 additions & 103 deletions lawnchair/res/values-uk-rUA/strings.xml

Large diffs are not rendered by default.

187 changes: 83 additions & 104 deletions lawnchair/res/values-ur-rIN/strings.xml

Large diffs are not rendered by default.

187 changes: 83 additions & 104 deletions lawnchair/res/values-ur-rPK/strings.xml

Large diffs are not rendered by default.

191 changes: 85 additions & 106 deletions lawnchair/res/values-uz-rUZ/strings.xml

Large diffs are not rendered by default.

187 changes: 83 additions & 104 deletions lawnchair/res/values-vi-rVN/strings.xml

Large diffs are not rendered by default.

173 changes: 76 additions & 97 deletions lawnchair/res/values-zh-rCN/strings.xml

Large diffs are not rendered by default.

173 changes: 76 additions & 97 deletions lawnchair/res/values-zh-rTW/strings.xml

Large diffs are not rendered by default.

9 changes: 2 additions & 7 deletions lawnchair/src/app/lawnchair/backup/ui/CreateBackupScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import androidx.lifecycle.viewmodel.compose.viewModel
import androidx.navigation.NavGraphBuilder
import app.lawnchair.backup.LawnchairBackup
import app.lawnchair.preferences.PreferenceManager
import app.lawnchair.ui.preferences.LocalNavController
Expand All @@ -47,7 +46,6 @@ import app.lawnchair.ui.preferences.components.WallpaperPreview
import app.lawnchair.ui.preferences.components.controls.FlagSwitchPreference
import app.lawnchair.ui.preferences.components.layout.PreferenceGroup
import app.lawnchair.ui.preferences.components.layout.PreferenceLayout
import app.lawnchair.ui.preferences.preferenceGraph
import app.lawnchair.util.BackHandler
import app.lawnchair.util.checkAndRequestFilesPermission
import app.lawnchair.util.filesAndStorageGranted
Expand All @@ -58,15 +56,11 @@ import com.google.accompanist.permissions.ExperimentalPermissionsApi
import com.google.accompanist.permissions.isGranted
import com.google.accompanist.permissions.rememberPermissionState
import kotlinx.coroutines.launch

fun NavGraphBuilder.createBackupGraph(route: String) {
preferenceGraph(route, { CreateBackupScreen(viewModel()) })
}

@OptIn(ExperimentalPermissionsApi::class)
@Composable
fun CreateBackupScreen(
viewModel: CreateBackupViewModel,
modifier: Modifier = Modifier,
) {
val contents by viewModel.backupContents.collectAsState()
val screenshot by viewModel.screenshot.collectAsState()
Expand Down Expand Up @@ -122,6 +116,7 @@ fun CreateBackupScreen(

PreferenceLayout(
label = stringResource(id = R.string.create_backup),
modifier = modifier,
scrollState = if (isPortrait) null else scrollState,
) {
DisposableEffect(contents, hasLiveWallpaper, hasStoragePermission) {
Expand Down
47 changes: 25 additions & 22 deletions lawnchair/src/app/lawnchair/backup/ui/RestoreBackupScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ import app.lawnchair.ui.preferences.components.DummyLauncherBox
import app.lawnchair.ui.preferences.components.controls.FlagSwitchPreference
import app.lawnchair.ui.preferences.components.layout.PreferenceGroup
import app.lawnchair.ui.preferences.components.layout.PreferenceLayout
import app.lawnchair.ui.preferences.preferenceGraph
import app.lawnchair.util.BackHandler
import app.lawnchair.util.hasFlag
import app.lawnchair.util.restartLauncher
Expand All @@ -58,31 +57,30 @@ import java.util.Base64
import kotlinx.coroutines.launch

fun NavGraphBuilder.restoreBackupGraph(route: String) {
preferenceGraph(route, {}) { subRoute ->
composable(
route = subRoute("{base64Uri}"),
arguments = listOf(
navArgument("base64Uri") { type = NavType.StringType },
),
) { backStackEntry ->
val args = backStackEntry.arguments!!
val backupUri = remember {
val base64Uri = args.getString("base64Uri")!!
val backupUriString = String(Base64.getDecoder().decode(base64Uri))
Uri.parse(backupUriString)
}
val viewModel: RestoreBackupViewModel = viewModel()
DisposableEffect(key1 = null) {
viewModel.init(backupUri)
onDispose { }
}
RestoreBackupScreen()
composable(
route = "$route/{base64Uri}",
arguments = listOf(
navArgument("base64Uri") { type = NavType.StringType },
),
) { backStackEntry ->
val args = backStackEntry.arguments!!
val backupUri = remember {
val base64Uri = args.getString("base64Uri")!!
val backupUriString = String(Base64.getDecoder().decode(base64Uri))
Uri.parse(backupUriString)
}
val viewModel: RestoreBackupViewModel = viewModel()
DisposableEffect(key1 = null) {
viewModel.init(backupUri)
onDispose { }
}
RestoreBackupScreen()
}
}

@Composable
fun RestoreBackupScreen(
modifier: Modifier = Modifier,
viewModel: RestoreBackupViewModel = viewModel(),
) {
val isPortrait = LocalConfiguration.current.orientation == Configuration.ORIENTATION_PORTRAIT
Expand All @@ -91,6 +89,7 @@ fun RestoreBackupScreen(

PreferenceLayout(
label = stringResource(id = R.string.restore_backup),
modifier = modifier,
scrollState = if (isPortrait) null else scrollState,
) {
when (uiState) {
Expand All @@ -117,6 +116,7 @@ fun RestoreBackupScreen(
fun ColumnScope.RestoreBackupOptions(
isPortrait: Boolean,
backup: LawnchairBackup,
modifier: Modifier = Modifier,
viewModel: RestoreBackupViewModel = viewModel(),
) {
val backupContents = backup.info.contents
Expand Down Expand Up @@ -175,7 +175,10 @@ fun ColumnScope.RestoreBackupOptions(
}
}

PreferenceGroup(heading = stringResource(id = R.string.what_to_restore)) {
PreferenceGroup(
modifier = modifier,
heading = stringResource(id = R.string.what_to_restore),
) {
FlagSwitchPreference(
flags = contents,
setFlags = viewModel::setBackupContents,
Expand Down Expand Up @@ -218,7 +221,7 @@ fun restoreBackupOpener(): () -> Unit {
val uri = it.data?.data ?: return@rememberLauncherForActivityResult

val base64Uri = Base64.getEncoder().encodeToString(uri.toString().toByteArray())
navController.navigate("/${Routes.RESTORE_BACKUP}/$base64Uri/")
navController.navigate("${Routes.RESTORE_BACKUP}/$base64Uri")
}

return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ sealed class GestureHandlerOption(
GestureHandlerConfig.OpenApp::class.java,
) {
override suspend fun buildConfig(activity: Activity): GestureHandlerConfig? {
val intent = PreferenceActivity.createIntent(activity, "/${Routes.PICK_APP_FOR_GESTURE}/")
val intent = PreferenceActivity.createIntent(activity, "${Routes.PICK_APP_FOR_GESTURE}")
val result = BlankActivity.startBlankActivityForResult(activity, intent)
val configString = result.data?.getStringExtra("config") ?: return null
return kotlinxJson.decodeFromString(configString)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import android.content.Intent
import android.os.Build
import android.provider.Settings
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.requiredWidth
import androidx.compose.material3.Button
import androidx.compose.material3.OutlinedButton
Expand All @@ -37,7 +38,7 @@ import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import app.lawnchair.LawnchairLauncher
import app.lawnchair.lawnchairApp
import app.lawnchair.ui.AlertBottomSheetContent
import app.lawnchair.ui.ModalBottomSheetContent
import app.lawnchair.util.requireSystemService
import app.lawnchair.views.ComposeBottomSheet
import com.android.launcher3.R
Expand Down Expand Up @@ -133,10 +134,12 @@ fun ServiceWarningDialog(
title: Int,
description: Int,
settingsIntent: Intent,
modifier: Modifier = Modifier,
handleClose: () -> Unit,
) {
val context = LocalContext.current
AlertBottomSheetContent(
ModalBottomSheetContent(
modifier = modifier.padding(top = 16.dp),
title = { Text(text = stringResource(id = title)) },
text = { Text(text = stringResource(id = description)) },
buttons = {
Expand Down
10 changes: 8 additions & 2 deletions lawnchair/src/app/lawnchair/override/CustomizeDialog.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package app.lawnchair.override

import android.app.Activity
import android.graphics.drawable.Drawable
import android.util.Log
import androidx.activity.compose.rememberLauncherForActivityResult
import androidx.activity.result.contract.ActivityResultContracts
import androidx.compose.foundation.Image
Expand Down Expand Up @@ -52,10 +53,11 @@ fun CustomizeDialog(
onTitleChange: (String) -> Unit,
defaultTitle: String,
launchSelectIcon: (() -> Unit)?,
modifier: Modifier = Modifier,
content: (@Composable () -> Unit)? = null,
) {
Column(
modifier = Modifier
modifier = modifier
.navigationBarsOrDisplayCutoutPadding()
.fillMaxWidth(),
) {
Expand Down Expand Up @@ -108,6 +110,7 @@ fun CustomizeAppDialog(
icon: Drawable,
defaultTitle: String,
componentKey: ComponentKey,
modifier: Modifier = Modifier,
onClose: () -> Unit,
) {
val prefs = preferenceManager()
Expand All @@ -123,8 +126,10 @@ fun CustomizeAppDialog(
onClose()
}

Log.d("TEST", "${Routes.SELECT_ICON}/$componentKey")

val openIconPicker = {
val destination = "/${Routes.SELECT_ICON}/$componentKey/"
val destination = "${Routes.SELECT_ICON}/$componentKey/"
request.launch(PreferenceActivity.createIntent(context, destination))
}

Expand All @@ -146,6 +151,7 @@ fun CustomizeAppDialog(
onTitleChange = { title = it },
defaultTitle = defaultTitle,
launchSelectIcon = openIconPicker,
modifier = modifier,
) {
PreferenceGroup(
description = componentKey.componentName.flattenToString(),
Expand Down
31 changes: 20 additions & 11 deletions lawnchair/src/app/lawnchair/search/LawnchairAppSearchAlgorithm.kt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ class LawnchairAppSearchAlgorithm(context: Context) : LawnchairSearchAlgorithm(c
private var hiddenAppsInSearch = ""
private val generateSearchTarget = GenerateSearchTarget(context)
private var enableWideSearch = false
private var searchApps = true
private var useStartpageSuggestions = true

private val prefs: PreferenceManager = PreferenceManager.getInstance(context)

Expand All @@ -60,6 +62,8 @@ class LawnchairAppSearchAlgorithm(context: Context) : LawnchairSearchAlgorithm(c
pref2.performWideSearch.onEach(launchIn = coroutineScope) {
enableWideSearch = it
}
useStartpageSuggestions = prefs.searchResultStartPageSuggestion.get()
searchApps = prefs.searchResultApps.get()
}

override fun doSearch(query: String, callback: SearchCallback<AdapterItem>) {
Expand Down Expand Up @@ -93,11 +97,11 @@ class LawnchairAppSearchAlgorithm(context: Context) : LawnchairSearchAlgorithm(c

val searchTargets = mutableListOf<SearchTargetCompat>()

if (appResults.isNotEmpty()) {
if (appResults.isNotEmpty() && searchApps) {
appResults.mapTo(searchTargets, ::createSearchTarget)
}

if (appResults.size == 1 && context.isDefaultLauncher()) {
if (appResults.size == 1 && searchApps && context.isDefaultLauncher()) {
val singleAppResult = appResults.first()
val shortcuts = getShortcuts(singleAppResult)
if (shortcuts.isNotEmpty()) {
Expand Down Expand Up @@ -143,7 +147,8 @@ class LawnchairAppSearchAlgorithm(context: Context) : LawnchairSearchAlgorithm(c
}

searchTargets.add(generateSearchTarget.getHeaderTarget(SPACE))
searchTargets.add(generateSearchTarget.getStartPageSearchItem(query))

if (useStartpageSuggestions) searchTargets.add(generateSearchTarget.getStartPageSearchItem(query))
generateSearchTarget.getMarketSearchItem(query)?.let { searchTargets.add(it) }

val adapterItems = transformSearchResults(searchTargets)
Expand Down Expand Up @@ -192,15 +197,19 @@ class LawnchairAppSearchAlgorithm(context: Context) : LawnchairSearchAlgorithm(c
}

private fun Sequence<AppInfo>.filterHiddenApps(query: String): Sequence<AppInfo> {
return if (hiddenAppsInSearch == HiddenAppsInSearch.ALWAYS) {
this
} else if (hiddenAppsInSearch == HiddenAppsInSearch.IF_NAME_TYPED) {
filter {
it.toComponentKey().toString() !in hiddenApps ||
it.title.toString().lowercase(Locale.getDefault()) == query
return when (hiddenAppsInSearch) {
HiddenAppsInSearch.ALWAYS -> {
this
}
HiddenAppsInSearch.IF_NAME_TYPED -> {
filter {
it.toComponentKey().toString() !in hiddenApps ||
it.title.toString().lowercase(Locale.getDefault()) == query
}
}
else -> {
filter { it.toComponentKey().toString() !in hiddenApps }
}
} else {
filter { it.toComponentKey().toString() !in hiddenApps }
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,12 @@ sealed class LawnchairSearchAlgorithm(
}

val settingsDeferred = async {
findSettingsByNameAndAction(query, maxSettingsEntryCount)
.map { SearchResult(SETTING, it) }
if (prefs.searchResultSettings.get()) {
findSettingsByNameAndAction(query, maxSettingsEntryCount)
.map { SearchResult(SETTING, it) }
} else {
emptyList()
}
}

val startPageSuggestionsDeferred = async {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class SmartspacePreferencesShortcut : AppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
startActivity(PreferenceActivity.createIntent(this, "/${Routes.SMARTSPACE_WIDGET}/"))
startActivity(PreferenceActivity.createIntent(this, "${Routes.SMARTSPACE_WIDGET}"))
finish()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class SmartspaceViewContainer @JvmOverloads constructor(
R.drawable.ic_setting,
StatsLogManager.LauncherEvent.IGNORE,
) {
context.startActivity(PreferenceActivity.createIntent(context, "/${Routes.SMARTSPACE}/"))
context.startActivity(PreferenceActivity.createIntent(context, "${Routes.SMARTSPACE}"))
true
}

Expand Down
2 changes: 1 addition & 1 deletion lawnchair/src/app/lawnchair/smartspace/SmartspacerView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class SmartspacerView(context: Context, attrs: AttributeSet?) : BcSmartspaceView
R.drawable.ic_setting,
StatsLogManager.LauncherEvent.IGNORE,
) {
context.startActivity(PreferenceActivity.createIntent(context, "/${Routes.SMARTSPACE}/"))
context.startActivity(PreferenceActivity.createIntent(context, "${Routes.SMARTSPACE}"))
true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class NowPlayingProvider(context: Context) : SmartspaceDataSource(
notificationDotsEnabled(context = context).first().not()

override suspend fun startSetup(activity: Activity) {
val intent = PreferenceActivity.createIntent(activity, "/${Routes.GENERAL}/")
val intent = PreferenceActivity.createIntent(activity, "${Routes.GENERAL}")
val message = activity.getString(
R.string.event_provider_missing_notification_dots,
activity.getString(providerName),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class SmartspaceProvider private constructor(context: Context) {
headerAction = SmartspaceAction(
id = "smartspaceSetupAction",
title = context.getString(R.string.smartspace_requires_setup),
intent = PreferenceActivity.createIntent(context, "/${Routes.SMARTSPACE}/"),
intent = PreferenceActivity.createIntent(context, "${Routes.SMARTSPACE}"),
),
score = 999f,
featureType = SmartspaceTarget.FeatureType.FEATURE_TIPS,
Expand Down
6 changes: 5 additions & 1 deletion lawnchair/src/app/lawnchair/ui/OverflowMenu.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,22 @@ import androidx.compose.runtime.Composable
import androidx.compose.runtime.MutableState
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.DpOffset
import androidx.compose.ui.unit.dp
import app.lawnchair.ui.preferences.components.layout.ClickableIcon

@Composable
fun OverflowMenu(
modifier: Modifier = Modifier,
block: @Composable OverflowMenuScope.() -> Unit,
) {
val showMenu = remember { mutableStateOf(false) }
val overflowMenuScope = remember { OverflowMenuScopeImpl(showMenu) }

Box {
Box(
modifier = modifier,
) {
ClickableIcon(
imageVector = Icons.Rounded.MoreVert,
onClick = { showMenu.value = true },
Expand Down
Loading

0 comments on commit bdb9e5b

Please sign in to comment.