Skip to content

Commit 085c81a

Browse files
committed
🔧 fixed review errors
1 parent e31afae commit 085c81a

File tree

6 files changed

+20
-18
lines changed

6 files changed

+20
-18
lines changed

.github/workflows/beta.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
build:
11-
if: startsWith(github.event.head_commit.message, '[beta]')
11+
if: github.event_name == 'workflow_dispatch' || startsWith(github.event.head_commit.message, '[beta]')
1212
runs-on: ubuntu-latest
1313
env:
1414
VERSION: $( echo ${{ github.event.head_commit.id }} | cut -c1-7 )

app/src/main/java/com/shub39/rush/presentation/lyrics/component/customisation/LyricsCustomisationSettings.kt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,7 @@ fun LazyListScope.lyricsCustomisationSettings(
101101
ListItem(
102102
colors = listItemColors(),
103103
modifier = Modifier.clip(middleItemShape()),
104-
headlineContent = {
105-
Text(
106-
text = stringResource(R.string.blur_synced),
107-
modifier = Modifier.weight(1f),
108-
)
109-
},
104+
headlineContent = { Text(text = stringResource(R.string.blur_synced)) },
110105
trailingContent = {
111106
Switch(
112107
checked = state.blurSyncedLyrics,

app/src/main/java/com/shub39/rush/presentation/setting/component/AboutApp.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ fun AboutApp() {
8989
)
9090
}
9191

92-
IconButton(onClick = { uriHandler.openUri("https://github.com/shub39/Grit") }) {
92+
IconButton(onClick = { uriHandler.openUri("https://github.com/shub39/Rush") }) {
9393
Icon(
9494
painter = painterResource(R.drawable.github),
9595
contentDescription = "Github",
@@ -139,7 +139,7 @@ fun AboutApp() {
139139
shape = middleItemShape(),
140140
)
141141
.clip(middleItemShape())
142-
.clickable { uriHandler.openUri("https://hosted.weblate.org/engage/grit/") }
142+
.clickable { uriHandler.openUri("https://hosted.weblate.org/engage/rush/") }
143143
) {
144144
Row(
145145
modifier = Modifier.fillMaxWidth().padding(16.dp),
@@ -170,7 +170,7 @@ fun AboutApp() {
170170
.clip(endItemShape())
171171
.clickable {
172172
uriHandler.openUri(
173-
"https://play.google.com/store/apps/details?id=com.shub39.grit"
173+
"https://play.google.com/store/apps/details?id=com.shub39.rush.play"
174174
)
175175
}
176176
) {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,9 @@ fun SharePageSheet(
238238
modifier = Modifier.clip(endItemShape()),
239239
headlineContent = {
240240
Text(
241-
text = "Show Rush Branding",
241+
text = stringResource(R.string.show_app_branding),
242242
maxLines = 1,
243-
modifier = Modifier.basicMarquee().weight(1f),
243+
modifier = Modifier.basicMarquee(),
244244
)
245245
},
246246
trailingContent = {

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

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import com.shub39.rush.presentation.searchsheet.SearchSheetAction
3333
import com.shub39.rush.presentation.searchsheet.SearchSheetState
3434
import kotlinx.coroutines.Dispatchers
3535
import kotlinx.coroutines.FlowPreview
36+
import kotlinx.coroutines.Job
3637
import kotlinx.coroutines.delay
3738
import kotlinx.coroutines.flow.MutableStateFlow
3839
import kotlinx.coroutines.flow.SharingStarted
@@ -52,6 +53,7 @@ import org.koin.android.annotation.KoinViewModel
5253
@KoinViewModel
5354
class SearchSheetVM(private val stateLayer: SharedStates, private val repo: SongRepository) :
5455
ViewModel() {
56+
private var searchStateResetJob: Job? = null
5557

5658
private val _state = stateLayer.searchSheetState
5759
private val _lastSearched = MutableStateFlow("")
@@ -163,13 +165,17 @@ class SearchSheetVM(private val stateLayer: SharedStates, private val repo: Song
163165
it.copy(searchState = SearchState.UserPrompt, sync = false)
164166
}
165167

166-
delay(5000)
168+
searchStateResetJob?.cancel()
169+
searchStateResetJob =
170+
viewModelScope.launch {
171+
delay(5000)
167172

168-
stateLayer.lyricsState.update {
169-
if (it.searchState == SearchState.UserPrompt)
170-
it.copy(searchState = SearchState.Idle)
171-
else it
172-
}
173+
stateLayer.lyricsState.update {
174+
if (it.searchState == SearchState.UserPrompt)
175+
it.copy(searchState = SearchState.Idle)
176+
else it
177+
}
178+
}
173179
}
174180
}
175181

app/src/main/res/values/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,4 +150,5 @@
150150
<string name="looks">Looks</string>
151151
<string name="text">Text</string>
152152
<string name="others">Others</string>
153+
<string name="show_app_branding">Show App Branding</string>
153154
</resources>

0 commit comments

Comments
 (0)