Skip to content

Commit

Permalink
Fix more ktlint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
marazmarci committed Jul 23, 2023
1 parent 7d7f9f0 commit 2b4414c
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ fun LoadHomePage(
navArgument(name = ARG_SCREEN_SHORTCUTS_TILE_ID) {
type = NavType.StringType
}
),
)
) { backStackEntry ->
val shortcutsTileId =
backStackEntry.arguments!!.getString(ARG_SCREEN_SHORTCUTS_TILE_ID)!!.let {
Expand All @@ -202,8 +202,8 @@ fun LoadHomePage(
},
navArgument(name = ARG_SCREEN_SHORTCUTS_TILE_ENTITY_INDEX) {
type = NavType.IntType
},
),
}
)
) { backStackEntry ->
val entityIndex = backStackEntry.arguments!!.getInt(ARG_SCREEN_SHORTCUTS_TILE_ENTITY_INDEX)
val shortcutsTileId =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ private fun PreviewSelectShortcutsTileView() {
shortcutTileEntitiesCountById = mapOf(
ShortcutsTileId.SHORTCUTS_TILE_1 to 7,
ShortcutsTileId.SHORTCUTS_TILE_2 to 1,
ShortcutsTileId.SHORTCUTS_TILE_3 to 0,
ShortcutsTileId.SHORTCUTS_TILE_3 to 0
),
onSelectShortcutsTile = {},
isShowShortcutTextEnabled = true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,14 @@ import androidx.wear.compose.material.Button
import androidx.wear.compose.material.ButtonDefaults
import androidx.wear.compose.material.Chip
import androidx.wear.compose.material.ChipDefaults
import androidx.wear.compose.material.Icon
import androidx.wear.compose.material.PositionIndicator
import androidx.wear.compose.material.Scaffold
import androidx.wear.compose.material.Text
import androidx.wear.compose.material.ToggleChip
import androidx.wear.compose.material.ToggleChipDefaults
import androidx.wear.compose.material.rememberScalingLazyListState
import com.mikepenz.iconics.compose.Image
import com.mikepenz.iconics.typeface.library.community.material.CommunityMaterial
import io.homeassistant.companion.android.data.SimplifiedEntity
import io.homeassistant.companion.android.theme.WearAppTheme
import io.homeassistant.companion.android.theme.wearColorPalette
import io.homeassistant.companion.android.util.getIcon
import io.homeassistant.companion.android.util.simplifiedEntity
import io.homeassistant.companion.android.views.ListHeader
Expand All @@ -37,7 +33,7 @@ import io.homeassistant.companion.android.common.R as commonR
@Composable
fun SetShortcutsTileView(
shortcutEntities: List<SimplifiedEntity>,
onShortcutEntitySelectionChange: (Int) -> Unit,
onShortcutEntitySelectionChange: (Int) -> Unit
) {
val scalingLazyListState = rememberScalingLazyListState()
WearAppTheme {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import io.homeassistant.companion.android.BuildConfig
import io.homeassistant.companion.android.common.data.integration.DeviceRegistration
import io.homeassistant.companion.android.common.data.servers.ServerManager
import io.homeassistant.companion.android.onboarding.getMessagingToken
import io.homeassistant.companion.android.tiles.ConversationTile
import io.homeassistant.companion.android.tiles.BaseShortcutsTile
import io.homeassistant.companion.android.tiles.ConversationTile
import io.homeassistant.companion.android.tiles.TemplateTile
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ import io.homeassistant.companion.android.database.wear.replaceAll
import io.homeassistant.companion.android.home.HomeActivity
import io.homeassistant.companion.android.home.HomePresenterImpl
import io.homeassistant.companion.android.onboarding.getMessagingToken
import io.homeassistant.companion.android.tiles.ConversationTile
import io.homeassistant.companion.android.tiles.BaseShortcutsTile
import io.homeassistant.companion.android.tiles.ConversationTile
import io.homeassistant.companion.android.tiles.TemplateTile
import io.homeassistant.companion.android.util.UrlUtil
import kotlinx.coroutines.CoroutineScope
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ abstract class BaseShortcutsTile(
.build()

companion object {
private fun ShortcutsTileId.getTileServiceClass() = when(this) {
private fun ShortcutsTileId.getTileServiceClass() = when (this) {
ShortcutsTileId.SHORTCUTS_TILE_1 -> ShortcutsTile::class
ShortcutsTileId.SHORTCUTS_TILE_2 -> ShortcutsTile2::class
ShortcutsTileId.SHORTCUTS_TILE_3 -> ShortcutsTile3::class
Expand Down

0 comments on commit 2b4414c

Please sign in to comment.