Skip to content

Instantly share code, notes, and snippets.

View SorrowBlue's full-sized avatar

Sorrow Blue SorrowBlue

View GitHub Profile
@SorrowBlue
SorrowBlue / JVM_IR_Backend_Is_Stable.kt
Created April 6, 2021 00:08
The New JVM IR Backend Is Stable for android.
import org.gradle.kotlin.dsl.withType
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
// https://blog.jetbrains.com/kotlin/2021/02/the-jvm-backend-is-in-beta-let-s-make-it-stable-together/
android {
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions.useIR = true
}
}
@SorrowBlue
SorrowBlue / extract_material3_colors.js
Last active May 15, 2022 04:30
Bookmarklet to extract XML from Material Theme Builder
javascript:(function(){var b=prompt("1_light/dark");var a=' <color name="md_theme_'+b+'_primary">'+getComputedStyle(document.getElementsByTagName("body")[0]).getPropertyValue("--md-sys-color-primary")+"</color>\n";a+=' <color name="md_theme_'+b+'_onPrimary">'+getComputedStyle(document.getElementsByTagName("body")[0]).getPropertyValue("--md-sys-color-on-primary")+"</color>\n";a+=' <color name="md_theme_'+b+'_primaryContainer">'+getComputedStyle(document.getElementsByTagName("body")[0]).getPropertyValue("--md-sys-color-primary-container")+"</color>\n";a+=' <color name="md_theme_'+b+'_onPrimaryContainer">'+getComputedStyle(document.getElementsByTagName("body")[0]).getPropertyValue("--md-sys-color-on-primary-container")+"</color>\n";a+=' <color name="md_theme_'+b+'_secondary">'+getComputedStyle(document.getElementsByTagName("body")[0]).getPropertyValue("--md-sys-color-secondary")+"</color>\n";a+=' <color name="md_theme_'+b+'_onSecondary">'+getComputedStyle(document.getElementsByTagName("body")[0
ExtraPaneScaffold2(
modifier = Modifier.clip(ComicTheme.shapes.large).background(ComicTheme.colorScheme.surface),
extraPane = {
Scaffold(
topBar = {
TopAppBar(
title = { Text(text = "Side sheet title") },
actions = {
IconButton(onClick = onInfoSheetCloseClick) {
Icon(imageVector = ComicIcons.Close, contentDescription = null)
package com.sorrowblue.comicviewer.feature.bookshelf.edit
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.KSerializer
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import kotlinx.serialization.SerializationException
import kotlinx.serialization.Serializer
import kotlinx.serialization.encodeToString
import kotlinx.serialization.encoding.Decoder