Skip to content

Commit

Permalink
Improve Home Page Filter
Browse files Browse the repository at this point in the history
  • Loading branch information
maxrave-dev committed Aug 1, 2024
1 parent 3b4b921 commit 3c4b529
Show file tree
Hide file tree
Showing 36 changed files with 75 additions and 125 deletions.
31 changes: 16 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
- Analyze your playing data, create custom playlists, and sync with YouTube Music...
- Spotify Canvas supported
- Play 1080p video option with subtitle
- AI suggest songs
- AI suggestions songs
- Notification from followed artists
- Caching and can save data for offline playback
- Synced lyrics from Musixmatch, Spotify (require login) and YouTube Transcript and translated lyrics (Community translation from Musixmatch)
- Synced lyrics from Musixmatch, LRCLIB, Spotify (require login) and YouTube Transcript and translated lyrics (Community translation from Musixmatch)
- Personalize data (*) and multi-YouTube-account support
- Support SponsorBlock, Return YouTube Dislike
- Sleep Timer
Expand All @@ -43,20 +43,21 @@
## Screenshots

<p align="center">
<img src="https://github.com/maxrave-dev/SimpMusic/blob/jetpack_compose/asset/screenshot/2.jpg?raw=true" width="200" />
<img src="https://github.com/maxrave-dev/SimpMusic/blob/jetpack_compose/asset/screenshot/3.jpg?raw=true" width="200" />
<img src="https://github.com/maxrave-dev/SimpMusic/blob/jetpack_compose/asset/screenshot/4.jpg?raw=true" width="200" />
<img src="https://github.com/maxrave-dev/SimpMusic/blob/jetpack_compose/asset/screenshot/5.jpg?raw=true" width="200" />
<img src="https://github.com/maxrave-dev/SimpMusic/blob/jetpack_compose/asset/screenshot/2.png?raw=true" width="200" />
<img src="https://github.com/maxrave-dev/SimpMusic/blob/jetpack_compose/asset/screenshot/3.png?raw=true" width="200" />
<img src="https://github.com/maxrave-dev/SimpMusic/blob/jetpack_compose/asset/screenshot/4.png?raw=true" width="200" />
<img src="https://github.com/maxrave-dev/SimpMusic/blob/jetpack_compose/asset/screenshot/5.png?raw=true" width="200" />
</p>
<p align="center">
<img src="https://github.com/maxrave-dev/SimpMusic/blob/jetpack_compose/asset/screenshot/6.jpg?raw=true" width="200" />
<img src="https://github.com/maxrave-dev/SimpMusic/blob/jetpack_compose/asset/screenshot/7.jpg?raw=true" width="200" />
<img src="https://github.com/maxrave-dev/SimpMusic/blob/jetpack_compose/asset/screenshot/8.jpg?raw=true" width="200" />
<img src="https://github.com/maxrave-dev/SimpMusic/blob/jetpack_compose/asset/screenshot/9.jpg?raw=true" width="200" />
<img src="https://github.com/maxrave-dev/SimpMusic/blob/jetpack_compose/asset/screenshot/6.png?raw=true" width="200" />
<img src="https://github.com/maxrave-dev/SimpMusic/blob/jetpack_compose/asset/screenshot/7.png?raw=true" width="200" />
<img src="https://github.com/maxrave-dev/SimpMusic/blob/jetpack_compose/asset/screenshot/8.png?raw=true" width="200" />
<img src="https://github.com/maxrave-dev/SimpMusic/blob/jetpack_compose/asset/screenshot/9.png?raw=true" width="200" />
</p>
<p align="center">
<img src="https://github.com/maxrave-dev/SimpMusic/blob/jetpack_compose/asset/screenshot/10.jpg?raw=true" width="200" />
<img src="https://github.com/maxrave-dev/SimpMusic/blob/jetpack_compose/asset/screenshot/11.jpg?raw=true" width="200" />
<img src="https://github.com/maxrave-dev/SimpMusic/blob/jetpack_compose/asset/screenshot/10.png?raw=true" width="200" />
<img src="https://github.com/maxrave-dev/SimpMusic/blob/jetpack_compose/asset/screenshot/11.png?raw=true" width="200" />
<img src="https://github.com/maxrave-dev/SimpMusic/blob/jetpack_compose/asset/screenshot/12.png?raw=true" width="200" />
</p>

#### More [screenshot](https://photos.app.goo.gl/AbieoXG5ctDrpwzp7) here.
Expand All @@ -68,7 +69,7 @@
- Thanks to [InnerTune](https://github.com/z-huang/InnerTune/) for the idea to get data from YouTube Music. This repo is my inspiration to create this app
- My app is using [SponsorBlock](https://sponsor.ajay.app/) to skip sponsor in YouTube videos.
- ReturnYouTubeDislike for getting information on votes
- Lyrics data from Musixmatch. More information [Musixmatch](https://developer.musixmatch.com/)
- Lyrics data from Musixmatch and LRCLIB. More information [Musixmatch](https://developer.musixmatch.com/), [LRCLIB](https://lrclib.net/)

## Privacy

Expand Down Expand Up @@ -152,7 +153,7 @@ Simply, because I love this name. It's a combination of Simple and Music. But Si

### [maxrave-dev](https://github.com/maxrave-dev/SimpMusic): Founder/Developer/Designer

### [owen connor](https://github.com/owencz1998): Discord Server Admin.
### [Owen Connor](https://github.com/owencz1998): Discord Server Admin.

## Support & Donations
<div align="left">
Expand All @@ -165,7 +166,7 @@ Simply, because I love this name. It's a combination of Simple and Music. But Si
&nbsp;
<a href="https://liberapay.com/maxrave/"><img alt="liberapay" height="50"
src="https://raw.githubusercontent.com/liberapay/liberapay.com/master/www/assets/liberapay/logo-v2_black-on-yellow.svg"></a>
<div/>
</div>

### MOMO or Vietnamese banking
<p float="left">
Expand Down
7 changes: 6 additions & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,9 @@
-dontwarn kotlinx.serialization.internal.ClassValueReferences
-keepattributes Signature
-keep class com.google.gson.reflect.TypeToken { *; }
-keep class * extends com.google.gson.reflect.TypeToken
-keep class * extends com.google.gson.reflect.TypeToken
-keep class kotlin.coroutines.Continuation
-keep class com.maxrave.simpmusic.data.model.** { *; }
-keep,allowobfuscation,allowshrinking class com.maxrave.simpmusic.extension.AllExtKt { *; }
-keep,allowobfuscation,allowshrinking class com.maxrave.simpmusic.extension.AllExtKt$* { *; }
-keep,allowobfuscation,allowshrinking class com.maxrave.kotlinytmusicscraper.extension.MapExtKt$* { *; }
20 changes: 16 additions & 4 deletions app/src/main/java/com/maxrave/simpmusic/extension/UIExt.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@ import androidx.compose.foundation.gestures.animateScrollBy
import androidx.compose.foundation.lazy.LazyListItemInfo
import androidx.compose.foundation.lazy.LazyListState
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.derivedStateOf
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableIntStateOf
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.runtime.snapshotFlow
import androidx.compose.ui.Modifier
import androidx.compose.ui.composed
import androidx.compose.ui.draw.DrawModifier
Expand Down Expand Up @@ -358,12 +360,19 @@ fun KeepScreenOn() = AndroidView({ View(it).apply { keepScreenOn = true } })
fun LazyListState.isScrollingUp(): Boolean {
var previousIndex by remember(this) { mutableIntStateOf(firstVisibleItemIndex) }
var previousScrollOffset by remember(this) { mutableIntStateOf(firstVisibleItemScrollOffset) }

LaunchedEffect(Unit) {
snapshotFlow { layoutInfo.totalItemsCount }.collect {
Log.w("isScrollingUp", "firstVisibleItemIndex: $firstVisibleItemIndex")
previousIndex = firstVisibleItemIndex
previousScrollOffset = firstVisibleItemScrollOffset
}
}

return remember(this) {
derivedStateOf {
if (firstVisibleItemIndex == 0) {
return@derivedStateOf true
}
else {
Log.w("isScrollingUp", "offset: $firstVisibleItemScrollOffset")
if (firstVisibleItemIndex > 0) {
if (previousIndex != firstVisibleItemIndex) {
previousIndex > firstVisibleItemIndex
} else {
Expand All @@ -373,6 +382,9 @@ fun LazyListState.isScrollingUp(): Boolean {
previousScrollOffset = firstVisibleItemScrollOffset
}
}
else {
true
}
}
}.value
}
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ fun HomeScreen(
val moodMomentAndGenre by viewModel.exploreMoodItem.collectAsState()
val chartLoading by viewModel.loadingChart.collectAsState()
val loading by viewModel.loading.collectAsState()
val accountShow by rememberSaveable {
mutableStateOf(homeData.find { it.subtitle == accountInfo?.first } != null)
var accountShow by rememberSaveable {
mutableStateOf(false)
}
val regionChart by viewModel.regionCodeChart.collectAsState()
val homeRefresh by sharedViewModel.homeRefresh.collectAsState()
Expand All @@ -139,12 +139,16 @@ fun HomeScreen(
LinearOutSlowInEasing.transform(pullToRefreshState.progress).coerceIn(0f, 1f)
}
if (pullToRefreshState.isRefreshing) {
viewModel.getHomeItemList()
viewModel.getHomeItemList()
if (!loading) {
pullToRefreshState.endRefresh()
sharedViewModel.homeRefreshDone()
}
}
LaunchedEffect(key1 = homeData) {
accountShow = homeData.find { it.subtitle == accountInfo?.first } == null
}
LaunchedEffect(key1 = homeRefresh) {
Log.w("HomeScreen", "homeRefresh: $homeRefresh")
if (homeRefresh) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,6 @@ constructor(
}
}
}
// initJob =
viewModelScope.launch {
val job1 =
launch {
Expand Down Expand Up @@ -326,11 +325,22 @@ constructor(

is SimpleMediaState.Progress -> {
if (mediaState.progress >= 0L && mediaState.progress != _timeline.value.current) {
_timeline.update {
it.copy(
current = mediaState.progress,
loading = false
)
if (_timeline.value.total > 0L) {
_timeline.update {
it.copy(
current = mediaState.progress,
loading = false
)
}
}
else {
_timeline.update {
it.copy(
current = mediaState.progress,
loading = true,
total = handler.getPlayerDuration()
)
}
}
}
else {
Expand All @@ -354,7 +364,7 @@ constructor(
is SimpleMediaState.Ready -> {
_timeline.update {
it.copy(
current = simpleMediaServiceHandler!!.getProgress(),
current = handler.getProgress(),
loading = false,
total = mediaState.duration
)
Expand Down
96 changes: 0 additions & 96 deletions app/src/main/res/raw/aboutlibraries.json
Original file line number Diff line number Diff line change
Expand Up @@ -3376,102 +3376,6 @@
"BSD-2-Clause"
]
},
{
"uniqueId": "com.github.bumptech.glide:annotations",
"funding": [

],
"developers": [
{
"name": "Sam Judd"
}
],
"artifactVersion": "4.16.0",
"description": "A set of annotations for configuring Glide.",
"scm": {
"connection": "scm:git@github.com:bumptech/glide.git",
"url": "https://github.com/bumptech/glide",
"developerConnection": "scm:git@github.com:bumptech/glide.git"
},
"name": "Glide Annotations",
"website": "https://github.com/bumptech/glide",
"licenses": [
"Apache-2.0",
"BSD-2-Clause"
]
},
{
"uniqueId": "com.github.bumptech.glide:disklrucache",
"funding": [

],
"developers": [
{
"name": "Sam Judd"
}
],
"artifactVersion": "4.16.0",
"description": "A cache that uses a bounded amount of space on a filesystem. Based on Jake Wharton's tailored for Glide.",
"scm": {
"connection": "scm:git@github.com:bumptech/glide.git",
"url": "https://github.com/bumptech/glide",
"developerConnection": "scm:git@github.com:bumptech/glide.git"
},
"name": "Glide Disk LRU Cache Library",
"website": "https://github.com/bumptech/glide",
"licenses": [
"Apache-2.0",
"BSD-2-Clause"
]
},
{
"uniqueId": "com.github.bumptech.glide:gifdecoder",
"funding": [

],
"developers": [
{
"name": "Sam Judd"
}
],
"artifactVersion": "4.16.0",
"description": "Implementation of GifDecoder that is more memory efficient to animate for Android devices.",
"scm": {
"connection": "scm:git@github.com:bumptech/glide.git",
"url": "https://github.com/bumptech/glide",
"developerConnection": "scm:git@github.com:bumptech/glide.git"
},
"name": "Glide GIF Decoder Library",
"website": "https://github.com/bumptech/glide",
"licenses": [
"Apache-2.0",
"BSD-2-Clause"
]
},
{
"uniqueId": "com.github.bumptech.glide:glide",
"funding": [

],
"developers": [
{
"name": "Sam Judd"
}
],
"artifactVersion": "4.16.0",
"description": "A fast and efficient image loading library for Android focused on smooth scrolling.",
"scm": {
"connection": "scm:git@github.com:bumptech/glide.git",
"url": "https://github.com/bumptech/glide",
"developerConnection": "scm:git@github.com:bumptech/glide.git"
},
"name": "Glide",
"website": "https://github.com/bumptech/glide",
"licenses": [
"Apache-2.0",
"BSD-2-Clause"
]
},
{
"uniqueId": "com.github.giangpham96.expandable-text:expandable_text_compose",
"funding": [
Expand Down
Binary file modified asset/screenshot/1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed asset/screenshot/10.jpg
Binary file not shown.
Binary file added asset/screenshot/10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed asset/screenshot/11.jpg
Binary file not shown.
Binary file added asset/screenshot/11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added asset/screenshot/12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed asset/screenshot/2.jpg
Binary file not shown.
Binary file added asset/screenshot/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed asset/screenshot/3.jpg
Binary file not shown.
Binary file added asset/screenshot/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed asset/screenshot/4.jpg
Binary file not shown.
Binary file added asset/screenshot/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed asset/screenshot/5.jpg
Binary file not shown.
Binary file added asset/screenshot/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed asset/screenshot/6.jpg
Binary file not shown.
Binary file added asset/screenshot/6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed asset/screenshot/7.jpg
Binary file not shown.
Binary file added asset/screenshot/7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed asset/screenshot/8.jpg
Binary file not shown.
Binary file added asset/screenshot/8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed asset/screenshot/9.jpg
Binary file not shown.
Binary file added asset/screenshot/9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions fastlane/metadata/android/en-US/changelogs/19.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
- New full-screen lyrics layout
- Background playing without opening app
- Home page filters
- Option to change background of bottom navigation bar
- Improve UI in some screens
- Fix some bugs caused by changing API of YouTube
- Fix local playlist bugs
Binary file modified fastlane/metadata/android/en-US/images/featureGraphic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/metadata/android/en-US/images/phoneScreenshots/1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions fastlane/metadata/android/vi-VN/changelogs/19.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
- Giao diện lời bài hát toàn màn hình mới
- Chơi nhạc nền mà không cần mở ứng dụng
- Bộ lọc trang chủ
- Tùy chọn thay đổi nền của thanh điều hướng dưới cùng
- Cải thiện giao diện người dùng trên một số màn hình
- Sửa một số lỗi do thay đổi API của YouTube
- Sửa lỗi danh sách phát cục bộ
Binary file modified fastlane/metadata/android/vi-VN/images/featureGraphic.png
Binary file modified fastlane/metadata/android/vi-VN/images/phoneScreenshots/1.jpg

0 comments on commit 3c4b529

Please sign in to comment.