Skip to content

Commit 91710f3

Browse files
committed
New Features:
Comments feature Location persistence fix Temperature conversion (°C / °F) support Upgraded audio engine for smoother playback Optimized search page performance Technical Improvements: Optimized database queries Improved comments feature stability Volume safety checks using coerceAtLeast(0f) / coerceAtMost(1f) Added FADE_INTERVAL constant for fade precision Dynamic JSON-based API fetching Removed deprecated Web SQL API Bug Fixes: Fixed: Pitchblack and System themes were reversed Fixed: Most Played filter in Cubic Picks Fixed: No more duplicate or missing songs when switching recommendation types Fixed: TextField colors in General Settings Fixed: Memory leaks during long playback sessions Fixed: Minor UI glitches in Search and Settings
1 parent 0d40514 commit 91710f3

File tree

9 files changed

+509
-96
lines changed

9 files changed

+509
-96
lines changed

composeApp/src/androidMain/kotlin/it/fast4x/rimusic/enums/NavRoutes.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ enum class NavRoutes {
2525
newAlbums,
2626
moodsPage,
2727
podcast,
28+
djVeda,
2829
artistAlbums;
2930

3031
companion object {

composeApp/src/androidMain/kotlin/it/fast4x/rimusic/enums/ThumbnailRoundness.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ enum class ThumbnailRoundness(
1212
@field:StringRes override val textId: Int
1313
): TextView {
1414

15-
None( RoundedCornerShape(0.dp), R.string.none ),
15+
None( RoundedCornerShape(8.dp), R.string.none ),
1616

1717
Light( RoundedCornerShape(8.dp), R.string.light ),
1818

composeApp/src/androidMain/kotlin/it/fast4x/rimusic/extensions/contributors/models/Developer.kt

Lines changed: 51 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -39,22 +39,24 @@ import it.fast4x.rimusic.ui.styling.favoritesIcon
3939

4040
data class Developer(
4141
val id: Int,
42-
@SerializedName( "login" ) val username: String,
43-
@SerializedName( "name" ) val displayName: String?,
44-
@SerializedName( "html_url" )val url: String,
45-
@SerializedName( "avatar_url") val avatar: String,
46-
val contributions: Int?
42+
@SerializedName("login") val username: String,
43+
@SerializedName("name") val displayName: String?,
44+
@SerializedName("html_url") val url: String,
45+
@SerializedName("avatar_url") val avatar: String,
46+
val contributions: Int?,
47+
// Add missing fields from your JSON
48+
val about: String? = null,
49+
val why_choose_us: String? = null
4750
) {
4851
private val handle: String
49-
get() = url.split( "/" ).last()
52+
get() = url.split("/").last()
5053

5154
@Composable
5255
fun Draw() {
5356
val uriHandler = LocalUriHandler.current
54-
val avatarPainter = ImageCacheFactory.Painter( this.avatar )
57+
val avatarPainter = ImageCacheFactory.Painter(this.avatar)
5558
val backgroundColor = if (id == 1484476) colorPalette().background1 else Color.Transparent
5659

57-
5860
Card(
5961
modifier = Modifier
6062
.padding(start = 12.dp, end = 20.dp, bottom = 10.dp)
@@ -70,22 +72,22 @@ data class Developer(
7072
modifier = Modifier
7173
.fillMaxWidth()
7274
.padding(vertical = 5.dp, horizontal = 15.dp)
73-
.background(backgroundColor, RoundedCornerShape( 12.dp )),
75+
.background(backgroundColor, RoundedCornerShape(12.dp)),
7476
verticalAlignment = Alignment.CenterVertically
7577
) {
7678
Image(
7779
painter = avatarPainter,
7880
contentDescription = null,
7981
modifier = Modifier
8082
.size(40.dp)
81-
.clip( RoundedCornerShape( 25.dp ) )
82-
.border( 1.dp, Color.White, RoundedCornerShape( 25.dp ) ),
83+
.clip(RoundedCornerShape(25.dp))
84+
.border(1.dp, Color.White, RoundedCornerShape(25.dp)),
8385
contentScale = ContentScale.Fit
8486
)
8587

86-
Spacer(modifier = Modifier.width( 16.dp ) )
88+
Spacer(modifier = Modifier.width(16.dp))
8789

88-
Column( Modifier.fillMaxWidth().padding(end = 10.dp) ) {
90+
Column(Modifier.fillMaxWidth().padding(end = 10.dp)) {
8991
Text(
9092
text = displayName ?: username,
9193
style = TextStyle(
@@ -96,7 +98,7 @@ data class Developer(
9698
textAlign = TextAlign.Start
9799
)
98100

99-
Row( Modifier.fillMaxWidth() ) {
101+
Row(Modifier.fillMaxWidth()) {
100102
Text(
101103
text = "@$handle",
102104
style = TextStyle(
@@ -109,10 +111,10 @@ data class Developer(
109111
.clickable { uriHandler.openUri(url) },
110112
)
111113

112-
if( contributions == null )
114+
if (contributions == null)
113115
return@Column
114116

115-
val color = colorPalette().favoritesIcon.copy( alpha = .8f )
117+
val color = colorPalette().favoritesIcon.copy(alpha = .8f)
116118

117119
Text(
118120
text = contributions.toString(),
@@ -121,20 +123,48 @@ data class Developer(
121123
fontSize = typography().xs.fontSize,
122124
),
123125
textAlign = TextAlign.End,
124-
modifier = Modifier.weight( 1f )
126+
modifier = Modifier.weight(1f)
125127
)
126128

127-
Spacer( Modifier.width(5.dp ) )
129+
Spacer(Modifier.width(5.dp))
128130

129131
Icon(
130-
painter = painterResource( R.drawable.git_pull_request_outline ),
132+
painter = painterResource(R.drawable.git_pull_request_outline),
131133
contentDescription = null,
132134
tint = color,
133-
modifier = Modifier.size( typography().xs.fontSize.value.dp )
135+
modifier = Modifier.size(typography().xs.fontSize.value.dp)
136+
)
137+
}
138+
139+
// Display about text if available
140+
about?.let { aboutText ->
141+
Spacer(modifier = Modifier.padding(top = 4.dp))
142+
Text(
143+
text = aboutText,
144+
style = TextStyle(
145+
color = colorPalette().textSecondary,
146+
fontSize = typography().xxs.fontSize,
147+
fontStyle = FontStyle.Normal,
148+
),
149+
textAlign = TextAlign.Start
150+
)
151+
}
152+
153+
// Display why_choose_us text if available
154+
why_choose_us?.let { whyText ->
155+
Spacer(modifier = Modifier.padding(top = 2.dp))
156+
Text(
157+
text = whyText,
158+
style = TextStyle(
159+
color = colorPalette().textSecondary,
160+
fontSize = typography().xxs.fontSize,
161+
fontStyle = FontStyle.Italic,
162+
),
163+
textAlign = TextAlign.Start
134164
)
135165
}
136166
}
137167
}
138168
}
139169
}
140-
}
170+
}

composeApp/src/androidMain/kotlin/it/fast4x/rimusic/extensions/contributors/models/Translator.kt

Lines changed: 64 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -38,22 +38,25 @@ import it.fast4x.rimusic.colorPalette
3838
import it.fast4x.rimusic.typography
3939

4040
data class Translator(
41-
@SerializedName( "username" ) val username: String,
42-
@SerializedName( "displayName" ) val displayName: String?,
43-
@SerializedName( "languages" ) val languages: String,
44-
@SerializedName( "profileUrl" ) val profileUrl: String?,
45-
@SerializedName( "avatarUrl" ) val avatarUrl: String?
41+
@SerializedName("username") val username: String,
42+
@SerializedName("displayName") val displayName: String?,
43+
@SerializedName("languages") val languages: String,
44+
@SerializedName("profileUrl") val profileUrl: String?,
45+
@SerializedName("avatarUrl") val avatarUrl: String?,
46+
// Add missing fields from your JSON
47+
val bio: String? = null,
48+
val role: String? = null,
49+
val description: String? = null
4650
) {
4751
private val usernameByProfile: String
48-
get() = profileUrl?.split( "/" )?.last().toString()
52+
get() = profileUrl?.split("/")?.last().toString()
4953

5054
@Composable
5155
fun Draw() {
5256
val uriHandler = LocalUriHandler.current
53-
val avatarPainter = ImageCacheFactory.Painter( this.avatarUrl )
57+
val avatarPainter = ImageCacheFactory.Painter(this.avatarUrl ?: "")
5458
val backgroundColor = Color.Transparent
5559

56-
5760
Card(
5861
modifier = Modifier
5962
.padding(start = 12.dp, end = 20.dp, bottom = 10.dp)
@@ -69,22 +72,35 @@ data class Translator(
6972
modifier = Modifier
7073
.fillMaxWidth()
7174
.padding(vertical = 5.dp, horizontal = 15.dp)
72-
.background(backgroundColor, RoundedCornerShape( 12.dp )),
75+
.background(backgroundColor, RoundedCornerShape(12.dp)),
7376
verticalAlignment = Alignment.CenterVertically
7477
) {
7578
Image(
7679
painter = avatarPainter,
7780
contentDescription = null,
7881
modifier = Modifier
7982
.size(40.dp)
80-
.clip( RoundedCornerShape( 25.dp ) )
81-
.border( 1.dp, Color.White, RoundedCornerShape( 25.dp ) ),
83+
.clip(RoundedCornerShape(25.dp))
84+
.border(1.dp, Color.White, RoundedCornerShape(25.dp)),
8285
contentScale = ContentScale.Fit
8386
)
8487

85-
Spacer(modifier = Modifier.width( 16.dp ) )
88+
Spacer(modifier = Modifier.width(16.dp))
89+
90+
Column(Modifier.fillMaxWidth().padding(end = 10.dp)) {
91+
// Display role if available
92+
role?.let { roleText ->
93+
Text(
94+
text = roleText,
95+
style = TextStyle(
96+
color = colorPalette().textSecondary,
97+
fontSize = typography().xxs.fontSize,
98+
fontStyle = FontStyle.Italic,
99+
),
100+
textAlign = TextAlign.Start
101+
)
102+
}
86103

87-
Column( Modifier.fillMaxWidth().padding(end = 10.dp) ) {
88104
Text(
89105
text = displayName ?: username,
90106
style = TextStyle(
@@ -95,7 +111,7 @@ data class Translator(
95111
textAlign = TextAlign.Start
96112
)
97113

98-
Row( Modifier.fillMaxWidth() ) {
114+
Row(Modifier.fillMaxWidth()) {
99115
Text(
100116
text = if (profileUrl != null) "@${usernameByProfile}" else "@${username}",
101117
style = TextStyle(
@@ -112,7 +128,7 @@ data class Translator(
112128
},
113129
)
114130

115-
val color = colorPalette().favoritesIcon.copy( alpha = .8f )
131+
val color = colorPalette().favoritesIcon.copy(alpha = .8f)
116132

117133
Text(
118134
text = languages,
@@ -121,20 +137,48 @@ data class Translator(
121137
fontSize = typography().xs.fontSize,
122138
),
123139
textAlign = TextAlign.End,
124-
modifier = Modifier.weight( 1f )
140+
modifier = Modifier.weight(1f)
125141
)
126142

127-
Spacer( Modifier.width(5.dp ) )
143+
Spacer(Modifier.width(5.dp))
128144

129145
Icon(
130-
painter = painterResource( R.drawable.translate ),
146+
painter = painterResource(R.drawable.translate),
131147
contentDescription = null,
132148
tint = color,
133-
modifier = Modifier.size( typography().xs.fontSize.value.dp )
149+
modifier = Modifier.size(typography().xs.fontSize.value.dp)
150+
)
151+
}
152+
153+
// Display bio if available
154+
bio?.let { bioText ->
155+
Spacer(modifier = Modifier.padding(top = 4.dp))
156+
Text(
157+
text = bioText,
158+
style = TextStyle(
159+
color = colorPalette().textSecondary,
160+
fontSize = typography().xxs.fontSize,
161+
fontStyle = FontStyle.Normal,
162+
),
163+
textAlign = TextAlign.Start
164+
)
165+
}
166+
167+
// Display description if available
168+
description?.let { descText ->
169+
Spacer(modifier = Modifier.padding(top = 2.dp))
170+
Text(
171+
text = descText,
172+
style = TextStyle(
173+
color = colorPalette().textSecondary,
174+
fontSize = typography().xxs.fontSize,
175+
fontStyle = FontStyle.Italic,
176+
),
177+
textAlign = TextAlign.Start
134178
)
135179
}
136180
}
137181
}
138182
}
139183
}
140-
}
184+
}

0 commit comments

Comments
 (0)