Skip to content

Commit

Permalink
Remove legacy data store
Browse files Browse the repository at this point in the history
  • Loading branch information
MM2-0 committed Jul 26, 2024
1 parent 3f31cc1 commit f635a4d
Show file tree
Hide file tree
Showing 37 changed files with 2 additions and 1,439 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ obj/
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml
.idea/runConfigurations.xml

# OS-specific files
.DS_Store?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package de.mm20.launcher2.ui.base

import androidx.compose.runtime.*
import de.mm20.launcher2.preferences.IconShape
import de.mm20.launcher2.preferences.LegacySettings
import de.mm20.launcher2.preferences.ui.CardStyle
import de.mm20.launcher2.preferences.ui.GridSettings
import de.mm20.launcher2.preferences.ui.UiSettings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import androidx.lifecycle.viewmodel.compose.viewModel
import de.mm20.launcher2.preferences.GestureAction
import de.mm20.launcher2.preferences.LegacySettings
import de.mm20.launcher2.ui.R
import de.mm20.launcher2.ui.component.BottomSheetDialog
import de.mm20.launcher2.ui.component.MissingPermissionBanner
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import androidx.lifecycle.viewmodel.compose.viewModel
import de.mm20.launcher2.preferences.LegacySettings
import de.mm20.launcher2.preferences.SurfaceShape
import de.mm20.launcher2.preferences.ui.CardStyle
import de.mm20.launcher2.ui.R
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import de.mm20.launcher2.icons.LauncherIcon
import de.mm20.launcher2.ktx.isAtLeastApiLevel
import de.mm20.launcher2.preferences.BaseLayout
import de.mm20.launcher2.preferences.GestureAction
import de.mm20.launcher2.preferences.LegacySettings.LayoutSettings.Layout
import de.mm20.launcher2.search.SavableSearchable
import de.mm20.launcher2.ui.R
import de.mm20.launcher2.ui.common.SearchablePicker
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import androidx.compose.ui.unit.dp
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import androidx.lifecycle.viewmodel.compose.viewModel
import com.google.accompanist.pager.HorizontalPagerIndicator
import de.mm20.launcher2.preferences.LegacySettings
import de.mm20.launcher2.preferences.SearchBarColors
import de.mm20.launcher2.preferences.SearchBarStyle
import de.mm20.launcher2.preferences.SystemBarColors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import androidx.lifecycle.viewModelScope
import androidx.lifecycle.viewmodel.initializer
import androidx.lifecycle.viewmodel.viewModelFactory
import de.mm20.launcher2.ktx.isAtLeastApiLevel
import de.mm20.launcher2.preferences.LegacySettings
import de.mm20.launcher2.preferences.ScreenOrientation
import de.mm20.launcher2.preferences.SearchBarColors
import de.mm20.launcher2.preferences.SearchBarStyle
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.toArgb
import androidx.compose.ui.platform.LocalContext
import androidx.core.content.ContextCompat
import androidx.datastore.core.DataStore
import de.mm20.launcher2.preferences.LegacySettings
import de.mm20.launcher2.preferences.ui.UiSettings
import de.mm20.launcher2.themes.CorePalette
import de.mm20.launcher2.themes.DefaultDarkColorScheme
Expand All @@ -22,9 +20,7 @@ import de.mm20.launcher2.themes.Theme
import de.mm20.launcher2.themes.get
import de.mm20.launcher2.themes.merge
import de.mm20.launcher2.ui.locals.LocalWallpaperColors
import kotlinx.coroutines.flow.map
import org.koin.androidx.compose.inject
import org.koin.core.component.inject

@Composable
fun lightColorSchemeOf(theme: Theme): ColorScheme {
Expand Down Expand Up @@ -113,44 +109,3 @@ fun systemCorePalette(): CorePalette<Int> {
)
}
}

fun CustomColorScheme(colors: LegacySettings.AppearanceSettings.CustomColors.Scheme): ColorScheme {
return ColorScheme(
primary = Color(colors.primary),
onPrimary = Color(colors.onPrimary),
primaryContainer = Color(colors.primaryContainer),
onPrimaryContainer = Color(colors.onPrimaryContainer),
secondary = Color(colors.secondary),
onSecondary = Color(colors.onSecondary),
secondaryContainer = Color(colors.secondaryContainer),
onSecondaryContainer = Color(colors.onSecondaryContainer),
tertiary = Color(colors.tertiary),
onTertiary = Color(colors.onTertiary),
tertiaryContainer = Color(colors.tertiaryContainer),
onTertiaryContainer = Color(colors.onTertiaryContainer),
background = Color(colors.background),
onBackground = Color(colors.onBackground),
surface = Color(colors.surface),
onSurface = Color(colors.onSurface),
surfaceVariant = Color(colors.surfaceVariant),
onSurfaceVariant = Color(colors.onSurfaceVariant),
outline = Color(colors.outline),
inverseSurface = Color(colors.inverseSurface),
inverseOnSurface = Color(colors.inverseOnSurface),
inversePrimary = Color(colors.inversePrimary),
surfaceTint = Color(colors.surfaceTint),
error = Color(colors.error),
onError = Color(colors.onError),
errorContainer = Color(colors.errorContainer),
onErrorContainer = Color(colors.onErrorContainer),
outlineVariant = Color(colors.outlineVariant),
scrim = Color(colors.scrim),
surfaceBright = Color(colors.surfaceBright),
surfaceDim = Color(colors.surfaceDim),
surfaceContainer = Color(colors.surfaceContainer),
surfaceContainerHigh = Color(colors.surfaceContainerHigh),
surfaceContainerHighest = Color(colors.surfaceContainerHighest),
surfaceContainerLow = Color(colors.surfaceContainerLow),
surfaceContainerLowest = Color(colors.surfaceContainerLowest),
)
}
1 change: 0 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ plugins {
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.kotlin.plugin.serialization) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.protobuf) apply false
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.dokka) apply true
Expand Down
23 changes: 0 additions & 23 deletions core/preferences/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import com.google.protobuf.gradle.*

plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.protobuf)
alias(libs.plugins.kotlin.plugin.serialization)
}

Expand Down Expand Up @@ -37,32 +34,12 @@ android {
namespace = "de.mm20.launcher2.preferences"
}

protobuf {
protoc {
artifact = libs.protobuf.protoc.get().toString()
}

// Generates the java Protobuf-lite code for the Protobufs in this project. See
// https://github.com/google/protobuf-gradle-plugin#customizing-protobuf-compilation
// for more information.
generateProtoTasks {
all().forEach { task ->
task.plugins {
create("java") {
option("lite")
}
}
}
}
}

dependencies {
implementation(libs.kotlin.stdlib)
implementation(libs.kotlinx.serialization.json)
implementation(libs.androidx.core)
implementation(libs.androidx.appcompat)
api(libs.androidx.datastore)
api(libs.protobuf.javalite)
implementation(libs.koin.android)

implementation(project(":core:ktx"))
Expand Down

This file was deleted.

Loading

0 comments on commit f635a4d

Please sign in to comment.