Skip to content

Commit 4529d6e

Browse files
authored
[release] ⬆️ 5.7.2
2 parents 8c62fc3 + 30e07d4 commit 4529d6e

File tree

19 files changed

+249
-32
lines changed

19 files changed

+249
-32
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## 5.7.2
4+
- Fixed Material Theme not Working #230
5+
36
## 5.7.1
47
- Fixed auto lyrics fetching issues
58
- Fixed miscellaneous song sync bugs

app/build.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@ plugins {
2222
alias(libs.plugins.kotlin.serialization)
2323
alias(libs.plugins.ksp)
2424
alias(libs.plugins.room)
25+
alias(libs.plugins.koin.compiler)
2526
}
2627

2728
val appName = "Rush"
28-
val appVersionName = "5.7.1"
29-
val appVersionCode = 5710
29+
val appVersionName = "5.7.2"
30+
val appVersionCode = 5720
3031

3132
val publicGeniusApiToken = "\"qLSDtgIqHgzGNjOFUmdOxJKGJOg5RIAPzOKTfrs7rNxqYXwfdSh9HTHMJUs2X27Y\""
3233

@@ -162,8 +163,7 @@ dependencies {
162163
implementation(libs.koin.compose)
163164
implementation(libs.koin.compose.viewmodel)
164165
implementation(libs.koin.compose.viewmodel.navigation)
165-
ksp(libs.koin.ksp.compiler)
166-
api(libs.koin.annotations)
166+
implementation(libs.koin.annotations)
167167
}
168168

169169
room { schemaDirectory("$projectDir/schemas") }

app/src/main/assets/changelog.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
[
2+
{
3+
"version": "5.7.2",
4+
"changes": [
5+
"Fixed Material Theme not Working #230"
6+
]
7+
},
28
{
39
"version": "5.7.1",
410
"changes": [

app/src/main/java/com/shub39/rush/app/RushApplication.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,16 @@ import com.shub39.rush.data.listener.MediaListenerImpl
2323
import com.shub39.rush.di.RushModules
2424
import org.koin.android.ext.koin.androidContext
2525
import org.koin.android.ext.koin.androidLogger
26-
import org.koin.core.context.startKoin
27-
import org.koin.ksp.generated.module
26+
import org.koin.plugin.module.dsl.startKoin
2827

2928
class RushApplication : Application() {
3029

3130
override fun onCreate() {
3231
super.onCreate()
3332

34-
startKoin {
33+
startKoin<RushModules> {
3534
if (BuildConfig.DEBUG) androidLogger()
3635
androidContext(this@RushApplication)
37-
modules(RushModules().module)
3836
}
3937

4038
BillingInitializerImpl().initialize(this)

app/src/main/java/com/shub39/rush/presentation/Glow.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import androidx.compose.ui.graphics.RectangleShape
3838
import androidx.compose.ui.graphics.Shape
3939
import androidx.compose.ui.graphics.asAndroidPath
4040
import androidx.compose.ui.graphics.nativeCanvas
41+
import androidx.compose.ui.graphics.nativePaint
4142
import androidx.compose.ui.graphics.toArgb
4243
import androidx.compose.ui.text.TextStyle
4344
import androidx.compose.ui.tooling.preview.Preview
@@ -78,7 +79,7 @@ fun Modifier.glowBackground(
7879
path.asAndroidPath(),
7980
Paint()
8081
.apply { this.color = Color.Transparent }
81-
.asFrameworkPaint()
82+
.nativePaint
8283
.applyShadowLayer(radius, xShifting, yShifting, color, density),
8384
)
8485
}

app/src/main/java/com/shub39/rush/presentation/setting/section/LookAndFeelPage.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ fun LookAndFeelPage(
192192
}
193193
}
194194

195+
// material theme
195196
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
196197
ListItem(
197198
headlineContent = {

app/src/main/java/com/shub39/rush/presentation/share/component/SharePageSheet.kt

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,17 @@ import androidx.compose.foundation.layout.size
3030
import androidx.compose.foundation.lazy.LazyColumn
3131
import androidx.compose.foundation.shape.RoundedCornerShape
3232
import androidx.compose.material3.ExperimentalMaterial3Api
33+
import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi
3334
import androidx.compose.material3.HorizontalDivider
3435
import androidx.compose.material3.Icon
3536
import androidx.compose.material3.IconButton
3637
import androidx.compose.material3.IconButtonDefaults
3738
import androidx.compose.material3.ListItem
38-
import androidx.compose.material3.MaterialTheme
3939
import androidx.compose.material3.ModalBottomSheet
4040
import androidx.compose.material3.SheetState
4141
import androidx.compose.material3.Switch
4242
import androidx.compose.material3.Text
43+
import androidx.compose.material3.ToggleButtonDefaults
4344
import androidx.compose.material3.rememberModalBottomSheetState
4445
import androidx.compose.material3.rememberStandardBottomSheetState
4546
import androidx.compose.runtime.Composable
@@ -76,7 +77,7 @@ import com.shub39.rush.presentation.toFullName
7677
import com.shub39.rush.presentation.toShape
7778
import com.shub39.rush.presentation.toStringRes
7879

79-
@OptIn(ExperimentalMaterial3Api::class)
80+
@OptIn(ExperimentalMaterial3Api::class, ExperimentalMaterial3ExpressiveApi::class)
8081
@Composable
8182
fun SharePageSheet(
8283
state: SharePageState,
@@ -204,7 +205,14 @@ fun SharePageSheet(
204205
modifier =
205206
Modifier.size(20.dp)
206207
.background(
207-
color = MaterialTheme.colorScheme.onSurface,
208+
color =
209+
if (state.albumArtShape == it) {
210+
ToggleButtonDefaults.tonalToggleButtonColors()
211+
.checkedContentColor
212+
} else {
213+
ToggleButtonDefaults.tonalToggleButtonColors()
214+
.contentColor
215+
},
208216
shape = it.toShape(),
209217
)
210218
)

app/src/main/java/com/shub39/rush/viewmodels/GlobalVM.kt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import kotlinx.coroutines.flow.onStart
3939
import kotlinx.coroutines.flow.stateIn
4040
import kotlinx.coroutines.flow.update
4141
import kotlinx.coroutines.launch
42-
import org.koin.android.annotation.KoinViewModel
42+
import org.koin.core.annotation.KoinViewModel
4343

4444
@KoinViewModel
4545
class GlobalVM(
@@ -139,6 +139,13 @@ class GlobalVM(
139139
}
140140
.launchIn(this)
141141

142+
otherPreferences
143+
.getMaterialYouFlow()
144+
.onEach { pref ->
145+
_state.update { it.copy(theme = it.theme.copy(materialTheme = pref)) }
146+
}
147+
.launchIn(this)
148+
142149
otherPreferences
143150
.getSeedColorFlow()
144151
.onEach { pref ->

app/src/main/java/com/shub39/rush/viewmodels/LyricsVM.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ import kotlinx.coroutines.flow.stateIn
4848
import kotlinx.coroutines.flow.update
4949
import kotlinx.coroutines.isActive
5050
import kotlinx.coroutines.launch
51-
import org.koin.android.annotation.KoinViewModel
51+
import org.koin.core.annotation.KoinViewModel
5252

5353
@KoinViewModel
5454
class LyricsVM(

app/src/main/java/com/shub39/rush/viewmodels/SavedVM.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import kotlinx.coroutines.flow.onStart
3939
import kotlinx.coroutines.flow.stateIn
4040
import kotlinx.coroutines.flow.update
4141
import kotlinx.coroutines.launch
42-
import org.koin.android.annotation.KoinViewModel
42+
import org.koin.core.annotation.KoinViewModel
4343

4444
@KoinViewModel
4545
class SavedVM(

0 commit comments

Comments
 (0)