diff options
author | Clyhtsuriva <aimeric@adjutor.xyz> | 2021-02-22 19:51:27 +0100 |
---|---|---|
committer | Clyhtsuriva <aimeric@adjutor.xyz> | 2021-02-22 19:51:27 +0100 |
commit | e79bf68553676c9be09f4616aadcd522149c506e (patch) | |
tree | 835124a1b912ec15ab59cd6729a33f1fc5ffc6d0 /app/src/main/java/xyz/adjutor/aniki/topanime/TopAnimePage.kt | |
parent | 965a5d66b4268e9e2f5bb5abb0af8d1500085517 (diff) |
Detail is now working for animes
Diffstat (limited to 'app/src/main/java/xyz/adjutor/aniki/topanime/TopAnimePage.kt')
-rw-r--r-- | app/src/main/java/xyz/adjutor/aniki/topanime/TopAnimePage.kt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/src/main/java/xyz/adjutor/aniki/topanime/TopAnimePage.kt b/app/src/main/java/xyz/adjutor/aniki/topanime/TopAnimePage.kt index 53dca8a..f2d5e4c 100644 --- a/app/src/main/java/xyz/adjutor/aniki/topanime/TopAnimePage.kt +++ b/app/src/main/java/xyz/adjutor/aniki/topanime/TopAnimePage.kt @@ -37,7 +37,7 @@ class TopAnimePage : Fragment() { // Inflate the layout for this fragment val view = inflater.inflate(R.layout.top_anime_page, container, false) - sharedPreferences = view.context.getSharedPreferences("app_aniki", Context.MODE_PRIVATE) + sharedPreferences = view.context.getSharedPreferences("sp_anime", Context.MODE_PRIVATE) val animeList: List<TopAnime>? = getDataFromCache() if(animeList != null ){ @@ -94,9 +94,9 @@ class TopAnimePage : Fragment() { override fun onResponse(call: Call<RestTopAnimeResponse>, response: Response<RestTopAnimeResponse>) { if(response.isSuccessful && response.body() != null){ //if the code returned is >= 200 and < 300 AND the the body ain't empty - val animeList = response.body()!!.getResults() //getting the "top" field containing our list of TopAnimes + val animeList: List<TopAnime> = response.body()!!.getResults() //getting the "top" field containing our list of TopAnimes saveList(animeList) - showList(view, animeList) // calling the method in charge of displaying on the recyclerview + showList(view, animeList) //calling the method in charge of displaying on the recyclerview } else { showError() //a snackbar |