-
-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mobile 203/user pages 1.3 #455
Merged
akshaaatt
merged 7 commits into
metabrainz:dev
from
pranavkonidena:MOBILE-203/UserPages-1.3
Aug 10, 2024
Merged
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
a170d57
Updated charting library
pranavkonidena a56573e
Initial setup for Stats Tab
pranavkonidena a97ce9d
Bumped package to ensure compatibility with KTS
pranavkonidena 1745767
Added charts for user and global stats, markers left
pranavkonidena c1100d0
Added top artists of user in stats page
pranavkonidena e081a67
Added top songs
pranavkonidena 70ccb2f
Merge branch 'dev' into MOBILE-203/UserPages-1.3
pranavkonidena File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 5 additions & 3 deletions
8
app/src/main/java/org/listenbrainz/android/model/user/Artist.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
package org.listenbrainz.android.model.user | ||
|
||
import com.google.gson.annotations.SerializedName | ||
|
||
data class Artist( | ||
val artist_mbid: String, | ||
val artist_name: String, | ||
val listen_count: Int | ||
@SerializedName("artist_mbid") val artistMbid: String, | ||
@SerializedName("artist_name") val artistName: String, | ||
@SerializedName("listen_count") val listenCount: Int | ||
) |
12 changes: 12 additions & 0 deletions
12
app/src/main/java/org/listenbrainz/android/model/user/ListeningActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package org.listenbrainz.android.model.user | ||
|
||
import com.google.gson.annotations.SerializedName | ||
|
||
data class ListeningActivity( | ||
@SerializedName("from_ts") val fromTs: Int? = null, | ||
@SerializedName("listen_count") val listenCount: Int? = null, | ||
@SerializedName("time_range") val timeRange: String? = null, | ||
@SerializedName("to_ts") val toTs: Int? = null, | ||
var componentIndex: Int? = null, | ||
var color: Int? = null, | ||
) |
12 changes: 12 additions & 0 deletions
12
app/src/main/java/org/listenbrainz/android/model/user/ListeningActivityPayload.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package org.listenbrainz.android.model.user | ||
|
||
import com.google.gson.annotations.SerializedName | ||
|
||
data class ListeningActivityPayload( | ||
@SerializedName("from_ts") val fromTs: Int? = null, | ||
@SerializedName("last_updated") val lastUpdated: Int? = null, | ||
@SerializedName("listening_activity") val listeningActivity: List<ListeningActivity?>? = null, | ||
val range: String? = null, | ||
@SerializedName("to_ts") val toTs: Int? = null, | ||
@SerializedName("user_id") val userId: String? = null, | ||
) |
20 changes: 11 additions & 9 deletions
20
app/src/main/java/org/listenbrainz/android/model/user/TopArtistsPayload.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
package org.listenbrainz.android.model.user | ||
|
||
import com.google.gson.annotations.SerializedName | ||
|
||
data class TopArtistsPayload( | ||
val artists: List<Artist>, | ||
val count: Int, | ||
val from_ts: Int, | ||
val last_updated: Int, | ||
val offset: Int, | ||
val range: String, | ||
val to_ts: Int, | ||
val total_artist_count: Int, | ||
val user_id: String | ||
val artists: List<Artist>, | ||
val count: Int, | ||
@SerializedName("from_ts") val fromTs: Int, | ||
@SerializedName("last_updated") val lastUpdated: Int, | ||
val offset: Int, | ||
val range: String, | ||
@SerializedName("to_ts") val toTs: Int, | ||
@SerializedName("total_artist_count") val totalArtistCount: Int, | ||
@SerializedName("user_id") val userId: String | ||
) |
5 changes: 5 additions & 0 deletions
5
app/src/main/java/org/listenbrainz/android/model/user/UserListeningActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package org.listenbrainz.android.model.user | ||
|
||
data class UserListeningActivity( | ||
val payload: ListeningActivityPayload? = null | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
app/src/main/java/org/listenbrainz/android/ui/screens/profile/stats/CategoryEnum.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
enum class CategoryState { | ||
ARTISTS, | ||
ALBUMS, | ||
SONGS | ||
} |
11 changes: 11 additions & 0 deletions
11
app/src/main/java/org/listenbrainz/android/ui/screens/profile/stats/StatsRange.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package org.listenbrainz.android.ui.screens.profile.stats | ||
|
||
enum class StatsRange (val rangeString: String, val apiIdenfier: String){ | ||
THIS_WEEK("This Week", "this_week"), | ||
THIS_MONTH("This Month", "this_month"), | ||
THIS_YEAR("This Year", "this_year"), | ||
LAST_WEEK("Tast Week", "week"), | ||
LAST_MONTH("Last Month", "month"), | ||
LAST_YEAR("Last Year", "year"), | ||
ALL_TIME("All Time", "all_time"), | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should have been added to the toml file.