feat(IconOptions): add confirm button
This commit is contained in:
parent
7c63e253d2
commit
306d7b3c87
3 changed files with 15 additions and 1 deletions
1
TODO.md
1
TODO.md
|
|
@ -6,5 +6,4 @@
|
|||
- Auto-rename package names when adding new installs...?
|
||||
- `IconOptionsScreen`
|
||||
- https://discord.com/channels/811255666990907402/1373756392892272691/1380726498725593220
|
||||
- Save/Back button at the bottom
|
||||
- Reset button on PatchOptionsScreen?
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ private fun IconOptionsScreenPreview(
|
|||
setSelectedColor = { color = it },
|
||||
selectedImage = { image },
|
||||
setSelectedImage = {},
|
||||
onBackPressed = {},
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ import com.aliucord.manager.ui.screens.patchopts.PatchOptions
|
|||
import com.aliucord.manager.ui.screens.patchopts.PatchOptionsScreen
|
||||
import com.aliucord.manager.ui.util.ColorSaver
|
||||
import com.aliucord.manager.ui.util.throttledState
|
||||
import com.aliucord.manager.util.back
|
||||
import dev.zt64.compose.pipette.CircularColorPicker
|
||||
import dev.zt64.compose.pipette.HsvColor
|
||||
import kotlinx.parcelize.IgnoredOnParcel
|
||||
|
|
@ -70,6 +71,7 @@ class IconOptionsScreen : Screen, Parcelable {
|
|||
setSelectedColor = model::changeSelectedColor,
|
||||
selectedImage = { model.selectedImage },
|
||||
setSelectedImage = model::changeSelectedImageUri,
|
||||
onBackPressed = { navigator.back(currentActivity = null) },
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -82,6 +84,7 @@ fun IconOptionsScreenContent(
|
|||
setSelectedColor: (HsvColor) -> Unit,
|
||||
selectedImage: () -> ByteArray?,
|
||||
setSelectedImage: (Uri) -> Unit,
|
||||
onBackPressed: () -> Unit,
|
||||
) {
|
||||
val isAdaptiveIconsAvailable = Build.VERSION.SDK_INT >= 26
|
||||
|
||||
|
|
@ -160,6 +163,17 @@ fun IconOptionsScreenContent(
|
|||
setSelectedImage = setSelectedImage,
|
||||
)
|
||||
}
|
||||
|
||||
Row(
|
||||
horizontalArrangement = Arrangement.End,
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
) {
|
||||
FilledTonalButton(
|
||||
onClick = onBackPressed,
|
||||
) {
|
||||
Text(stringResource(R.string.action_confirm))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue