Add user statistics section in AccountScreen with centered header and dynamic deleted count text

This commit is contained in:
2025-10-03 18:25:41 +02:00
parent adc00c672b
commit 864397d96e
4 changed files with 116 additions and 1 deletions

View File

@@ -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
}