Skip to content

Instantly share code, notes, and snippets.

View mitchtabian's full-sized avatar
🎞️
Building stuff

Mitch Tabian mitchtabian

🎞️
Building stuff
View GitHub Profile
name: Django CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
override fun sync(
currentAutoGratuityOnTicket: AutoGratuity?,
coverCount: Int,
enableAutoGratuity: (AutoGratuity) -> Unit,
disableAutoGratuity: () -> Unit,
) {
if (!currentAutoGratuityOnTicket.hasBeenManuallyToggled &&
autoGratuityService.isAutoGratuityEnabled
) {
val autoGratuity = autoGratuityService.autoGratuity
Column(modifier = Modifier.fillMaxSize()) {
var state1 by remember { mutableStateOf(_state1) }
var state2 by remember { mutableStateOf(_state2) }
LazyColumn(
modifier = Modifier.wrapContentSize(),
) {
items(
items = state1.cartRows,
key = { value ->
/* Suppose I have the following table: */
CREATE TABLE {table} (
{id} STRING PRIMARY KEY,
{name} STRING NOT NULL COLLATE LOCALIZED,
{data} BLOB
)
/*
* Where {data} is is large object such as:
* class Data(
sealed class ProgressBarState{
object Loading: ProgressBarState()
object None: ProgressBarState()
}
sealed class DataState<T> {
data class Response<T>(
def private_chat_room_view(request, *args, **kwargs):
room_id = request.GET.get("room_id")
user = request.user
if not user.is_authenticated:
base_url = reverse('login')
query_string = urlencode({'next': f"/chat/?room_id={room_id}"})
url = f"{base_url}?{query_string}"
return redirect(url)
context = {}
struct RecipeListScreen: View {
@ObservedObject var viewModel: RecipeListViewModel
init(){
self.viewModel = RecipeListViewModel()
}
var body: some View {
List {
@Composable
fun RecipeListScreen(
state: RecipeListState,
onTriggerEvent: (Event) -> Unit,
onClickRecipeListItem: (Int) -> Unit,
){
AppTheme {
RecipeList(
loading = state.isLoading,
recipes = state.recipes,

I couldn't get BottomSheetScaffold to work properly when used on top of a GoogleMap (in an AndroidView). So I made my own.

It is not thoroughly tested but seems to be working well enough.

Create a bottom sheet like this: https://imgur.com/gallery/FTWS8Uc

Usage

Keep reference to SimpleBottomSheetManager in viewmodel