Skip to content

Commit

Permalink
ktlintFormat changes & lint issue fixed (#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
alisen authored Oct 22, 2023
1 parent 9fc83bb commit 67173fe
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ private fun ZeAbout(
fontSize = 24.sp,
)
ZeText(
text = "Running on '${getPlatform()}'."
text = "Running on '${getPlatform()}'.",
)
ZeLazyColumn {
items(lines) { line ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import java.nio.ByteBuffer
import java.nio.IntBuffer
import kotlin.experimental.and


/**
* Render a composable into a bitmap.
*
Expand Down Expand Up @@ -337,4 +336,3 @@ private fun Bitmap.crop(fromX: Int, fromY: Int, targetWidth: Int, targetHeight:
canvas.drawBitmap(this, fromX.toFloat(), fromY.toFloat(), null)
return result
}

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ enum class ZeBadgeType(val rawValue: String) {
CAMERA("Camera"),
IMAGE_DRAWING("Image Drawing"),
BARCODE_TAG("BarCode Tag"),
PHRASE("Custom Phrase");
PHRASE("Custom Phrase"),
;

companion object {
fun getOrNull(type: String): ZeBadgeType? {
Expand Down Expand Up @@ -150,7 +151,7 @@ sealed class ZeConfiguration(

data class CustomPhrase(
val phrase: String,
override val bitmap: Bitmap
override val bitmap: Bitmap,
) : ZeConfiguration(ZeBadgeType.PHRASE, humanTitle = ZeBadgeType.PHRASE.rawValue, bitmap)

// TODO: Add your own pages.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ import androidx.datastore.preferences.preferencesDataStore
import dagger.hilt.android.qualifiers.ApplicationContext
import de.berlindroid.zeapp.PAGE_HEIGHT
import de.berlindroid.zeapp.PAGE_WIDTH
import de.berlindroid.zekompanion.base64
import de.berlindroid.zekompanion.debase64
import de.berlindroid.zekompanion.toBinary
import de.berlindroid.zeapp.zebits.toBitmap
import de.berlindroid.zeapp.zemodels.ZeBadgeType
import de.berlindroid.zeapp.zemodels.ZeConfiguration
import de.berlindroid.zeapp.zemodels.ZeSlot
import de.berlindroid.zeapp.zeui.pixelBuffer
import de.berlindroid.zekompanion.base64
import de.berlindroid.zekompanion.debase64
import de.berlindroid.zekompanion.toBinary
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.flow.firstOrNull
import kotlinx.coroutines.flow.map
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ import com.commit451.coiltransformations.CropTransformation
import de.berlindroid.zeapp.BuildConfig
import de.berlindroid.zeapp.PAGE_HEIGHT
import de.berlindroid.zeapp.PAGE_WIDTH
import de.berlindroid.zekompanion.ditherFloydSteinberg
import de.berlindroid.zeapp.zemodels.ZeConfiguration
import de.berlindroid.zeapp.zemodels.ZeEditor
import de.berlindroid.zeapp.zevm.ZeBadgeViewModel
import de.berlindroid.zekompanion.ditherFloydSteinberg
import kotlinx.coroutines.launch
import java.io.File

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ import de.berlindroid.zeapp.PAGE_WIDTH
import de.berlindroid.zeapp.R
import de.berlindroid.zeapp.zebits.isBinary
import de.berlindroid.zeapp.zebits.scaleIfNeeded
import de.berlindroid.zekompanion.threshold
import de.berlindroid.zeapp.zemodels.ZeConfiguration
import de.berlindroid.zekompanion.threshold
import kotlinx.coroutines.launch

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ fun NamePage(
if (result.didOverflowWidth) {
secondarySize /= 3.0f
}
}
},
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package de.berlindroid.zeapp.zevm

import android.graphics.Bitmap
import de.berlindroid.zeapp.R
import de.berlindroid.zekompanion.ditherFloydSteinberg
import de.berlindroid.zeapp.zemodels.ZeConfiguration
import de.berlindroid.zeapp.zeservices.ZeImageProviderService
import de.berlindroid.zeapp.zeui.pixelManipulation
import de.berlindroid.zekompanion.ditherFloydSteinberg
import javax.inject.Inject

class GetTemplateConfigurations @Inject constructor(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import androidx.lifecycle.viewModelScope
import dagger.hilt.android.lifecycle.HiltViewModel
import de.berlindroid.zeapp.OPENAI_API_KEY
import de.berlindroid.zeapp.R
import de.berlindroid.zekompanion.ditherFloydSteinberg
import de.berlindroid.zeapp.zebits.isBinary
import de.berlindroid.zeapp.zemodels.ZeConfiguration
import de.berlindroid.zeapp.zemodels.ZeEditor
Expand All @@ -20,6 +19,7 @@ import de.berlindroid.zeapp.zeservices.ZeContributorsService
import de.berlindroid.zeapp.zeservices.ZeImageProviderService
import de.berlindroid.zeapp.zeservices.ZePreferencesService
import de.berlindroid.zeapp.zeui.pixelManipulation
import de.berlindroid.zekompanion.ditherFloydSteinberg
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Job
import kotlinx.coroutines.delay
Expand Down
2 changes: 1 addition & 1 deletion zeapp/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ ktlint-gradle = "11.6.1"
license-report-gradle = "0.9.3"
material = "1.10.0"
material3-wsc = "1.1.2"
mik3y-usb-serial = "3.6.0"
mik3y-usb-serial = "3.7.0"
retrofit = "2.9.0"
timber = "5.0.1"
uiautomator = "2.2.0"
Expand Down

0 comments on commit 67173fe

Please sign in to comment.