Add user statistics section in AccountScreen with centered header and dynamic deleted count text
This commit is contained in:
@@ -287,3 +287,18 @@ suspend fun fetchImageStreamPost(
|
||||
null
|
||||
}
|
||||
}
|
||||
|
||||
/** user_stats.php → shared. */
|
||||
suspend fun fetchUserStats(): UserStats? {
|
||||
val sh = try {
|
||||
KlottrApiShared.userStats(
|
||||
baseUrl = ApiConfig.SERVER_API_BASE_URL,
|
||||
apiKey = ApiConfig.SERVER_API_KEY,
|
||||
bearerToken = AuthShared.idToken
|
||||
)
|
||||
} catch (_: Throwable) {
|
||||
return null
|
||||
} ?: return null
|
||||
|
||||
return sh
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user