Skip to content

Commit

Permalink
Deleted some unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
BobbyESP committed Nov 11, 2022
1 parent 94ba149 commit d672e64
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 35 deletions.
17 changes: 0 additions & 17 deletions .idea/deploymentTargetDropDown.xml

This file was deleted.

8 changes: 8 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 2 additions & 14 deletions app/src/main/java/com/bobbyesp/spowlo/presentation/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -1,27 +1,17 @@
package com.bobbyesp.spowlo.presentation

import android.net.Uri
import android.os.Build
import android.os.Bundle
import android.util.Log
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.viewModels
import androidx.appcompat.app.AppCompatDelegate
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.material3.windowsizeclass.ExperimentalMaterial3WindowSizeClassApi
import androidx.compose.material3.windowsizeclass.calculateWindowSizeClass
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import androidx.core.os.LocaleListCompat
import androidx.core.view.ViewCompat
import androidx.core.view.WindowCompat
import androidx.hilt.navigation.compose.hiltViewModel
import com.bobbyesp.spowlo.Spowlo
import com.bobbyesp.spowlo.Spowlo.Companion.applicationScope
import com.bobbyesp.spowlo.Spowlo.Companion.context
import com.bobbyesp.spowlo.presentation.ui.common.LocalDarkTheme
Expand All @@ -40,7 +30,7 @@ import kotlinx.coroutines.runBlocking
@AndroidEntryPoint
class MainActivity : ComponentActivity() {

// private val homeViewModel: HomeViewModel by viewModels()
private val homeViewModel: HomeViewModel by viewModels()

@OptIn(ExperimentalMaterial3WindowSizeClassApi::class)
override fun onCreate(savedInstanceState: Bundle?) {
Expand All @@ -66,8 +56,7 @@ class MainActivity : ComponentActivity() {
seedColor = LocalSeedColor.current,
isDynamicColorEnabled = LocalDynamicColorSwitch.current,
) {
val viewModel = hiltViewModel<HomeViewModel>()
InitialEntry(viewModel)
InitialEntry(homeViewModel)
}
}

Expand All @@ -77,7 +66,6 @@ class MainActivity : ComponentActivity() {
companion object {
private const val TAG = "MainActivity"

//set the language of the app depending on lacale that is passed
fun setLanguage(locale: String) {
Log.d(TAG, "setLanguage: $locale")
val localeListCompat =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ enum class ArchType(
fun PackageItem(
modifier: Modifier = Modifier,
type: ArchType = ArchType.Arm64,
link: String,
link: String = "",
onClick: () -> Unit = {},
onArchClick: () -> Unit = {},
version: String = "8.7.78.373",
Expand Down Expand Up @@ -94,5 +94,5 @@ fun PackageItem(
@Composable
@Preview
fun PackageItemPreview() {
// PackageItem()
PackageItem()
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,17 @@ fun ArchTag(
shape: CornerBasedShape = MaterialTheme.shapes.extraSmall,
isClickable: Boolean = false
) {
Surface(modifier = modifier.clickable(onClick = onClick), shape = shape, color = MaterialTheme.colorScheme.secondaryContainer) {
Surface(modifier = modifier
.clickable(onClick = onClick),
shape = shape,
color = MaterialTheme.colorScheme.secondaryContainer) {

Row(modifier = modifier
.padding(4.dp),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.Center,
)
{

Icon(
modifier = Modifier.size(16.dp),
imageVector = Icons.Filled.Memory,
Expand Down

0 comments on commit d672e64

Please sign in to comment.